Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Classes | Functions | Variables
squander.decomposition.qgd_N_Qubit_Decomposition Namespace Reference

Classes

class  qgd_N_Qubit_Decomposition
 A QGD Python interface class for the decomposition of N-qubit unitaries into U3 and CNOT gates. More...
 

Functions

def __init__ (self, Umtx, optimize_layer_num=False, initial_guess="RANDOM")
 Constructor of the class. More...
 
def get_Circuit (self)
 Call to retrieve the incorporated quantum circuit (Squander format) More...
 
def get_Cirq_Circuit (self)
 Export the unitary decomposition into Qiskit format. More...
 
def get_Qiskit_Circuit (self)
 Export the unitary decomposition into Qiskit format. More...
 
def List_Gates (self)
 Call to print the gates decomposing the initial unitary. More...
 
def Reorder_Qubits (self, qbit_list)
 Call to reorder the qubits in the matrix of the gate. More...
 
def set_Gate_Structure (self, gate_structure_dict)
 Call to set the gate structure to be used in the decomposition. More...
 
def Start_Decomposition (self)
 Wrapper function to call the start_decomposition method of C++ class N_Qubit_Decomposition. More...
 

Variables

 qbit_num
 the number of qubits More...
 

Function Documentation

◆ __init__()

def squander.decomposition.qgd_N_Qubit_Decomposition.__init__ (   self,
  Umtx,
  optimize_layer_num = False,
  initial_guess = "RANDOM" 
)

Constructor of the class.

Parameters
UmtxThe unitary matrix to be decomposed.
optimize_layer_numSet true to optimize the minimum number of operation layers required in the decomposition, or false when the predefined maximal number of layer gates is used (ideal for general unitaries).
initial_guessString indicating the method to guess initial values for the optimalization. Possible values: "zeros" ,"random", "close_to_zero".
Returns
An instance of the class

Definition at line 47 of file qgd_N_Qubit_Decomposition.py.

◆ get_Circuit()

def squander.decomposition.qgd_N_Qubit_Decomposition.get_Circuit (   self)

Call to retrieve the incorporated quantum circuit (Squander format)

Returns
Return with a Qiskit compatible quantum circuit.

Definition at line 102 of file qgd_N_Qubit_Decomposition.py.

◆ get_Cirq_Circuit()

def squander.decomposition.qgd_N_Qubit_Decomposition.get_Cirq_Circuit (   self)

Export the unitary decomposition into Qiskit format.

Returns
Return with a Qiskit compatible quantum circuit.

Definition at line 124 of file qgd_N_Qubit_Decomposition.py.

◆ get_Qiskit_Circuit()

def squander.decomposition.qgd_N_Qubit_Decomposition.get_Qiskit_Circuit (   self)

Export the unitary decomposition into Qiskit format.

Returns
Return with a Qiskit compatible quantum circuit.

Definition at line 110 of file qgd_N_Qubit_Decomposition.py.

◆ List_Gates()

def squander.decomposition.qgd_N_Qubit_Decomposition.List_Gates (   self)

Call to print the gates decomposing the initial unitary.

These gates brings the intial matrix into unity.

Definition at line 75 of file qgd_N_Qubit_Decomposition.py.

◆ Reorder_Qubits()

def squander.decomposition.qgd_N_Qubit_Decomposition.Reorder_Qubits (   self,
  qbit_list 
)

Call to reorder the qubits in the matrix of the gate.

Parameters
qbit_listThe reordered list of qubits spanning the matrix

Definition at line 67 of file qgd_N_Qubit_Decomposition.py.

◆ set_Gate_Structure()

def squander.decomposition.qgd_N_Qubit_Decomposition.set_Gate_Structure (   self,
  gate_structure_dict 
)

Call to set the gate structure to be used in the decomposition.

Definition at line 83 of file qgd_N_Qubit_Decomposition.py.

◆ Start_Decomposition()

def squander.decomposition.qgd_N_Qubit_Decomposition.Start_Decomposition (   self)

Wrapper function to call the start_decomposition method of C++ class N_Qubit_Decomposition.

Definition at line 58 of file qgd_N_Qubit_Decomposition.py.

Variable Documentation

◆ qbit_num

squander.decomposition.qgd_N_Qubit_Decomposition.qbit_num

the number of qubits

Definition at line 50 of file qgd_N_Qubit_Decomposition.py.