Quantum Gate Decomposer
v1.3
Powerful decomposition of almost any unitary into U3 and CNOT gates
|
Classes | |
class | N_Qubit_Decomposition |
A QGD Python interface class for the decomposition of N-qubit unitaries into U3 and CNOT gates. More... | |
Functions | |
def | __del__ (self) |
Destructor of the class. More... | |
def | get_quantum_circuit (self) |
Export the unitary decomposition into Qiskit format. More... | |
def | list_operations (self, start_index=1) |
Lists the operations decomposing the initial unitary. More... | |
def | set_identical_blocks (self, identical_blocks) |
Set the number of identical successive blocks during the subdecomposition of the qbit-th qubit. More... | |
def | set_iteration_loops (self, iteration_loops) |
Set the number of iteration loops during the subdecomposition of the qbit-th qubit. More... | |
def | set_max_layer_num (self, max_layer_num) |
Set the maximal number of layers used in the subdecomposition of the qbit-th qubit. More... | |
def | set_optimalization_block (self, optimalization_block) |
Call to set the number of blocks to be optimized in one shot. More... | |
def | set_verbose (self, verbose) |
Set the verbosity of the N_Qubit_Decomposition class. More... | |
def | start_decomposition (self, finalize_decomposition=True) |
Start the disentanglig process of the least significant two qubit unitary. More... | |
Variables | |
_qgd_library = ctypes.cdll.LoadLibrary(library_path) | |
The loaded QGD library. More... | |
argtypes | |
string | library_path = '.libs/libqgd.so' |
path to the QGD library More... | |
restype | |
def qgd_python.N_Qubit_Decomposition.__del__ | ( | self | ) |
Destructor of the class.
Definition at line 111 of file N_Qubit_Decomposition.py.
def qgd_python.N_Qubit_Decomposition.get_quantum_circuit | ( | self | ) |
Export the unitary decomposition into Qiskit format.
Definition at line 168 of file N_Qubit_Decomposition.py.
def qgd_python.N_Qubit_Decomposition.list_operations | ( | self, | |
start_index = 1 |
|||
) |
Lists the operations decomposing the initial unitary.
(These operations are the inverse operations of the operations bringing the intial matrix into unity.)
start_index | The index of the first inverse operation |
Definition at line 160 of file N_Qubit_Decomposition.py.
def qgd_python.N_Qubit_Decomposition.set_identical_blocks | ( | self, | |
identical_blocks | |||
) |
Set the number of identical successive blocks during the subdecomposition of the qbit-th qubit.
identical_blocks | A dictionary {'n': identical_blocks} labeling the number of successive identical layers used in the subdecomposition at the disentangling of the n-th qubit. |
Definition at line 150 of file N_Qubit_Decomposition.py.
def qgd_python.N_Qubit_Decomposition.set_iteration_loops | ( | self, | |
iteration_loops | |||
) |
Set the number of iteration loops during the subdecomposition of the qbit-th qubit.
iteration_loops | A dictionary {'n': iteration_loops} labeling the number of iteration loops in each step of the subdecomposition. |
Definition at line 140 of file N_Qubit_Decomposition.py.
def qgd_python.N_Qubit_Decomposition.set_max_layer_num | ( | self, | |
max_layer_num | |||
) |
Set the maximal number of layers used in the subdecomposition of the qbit-th qubit.
max_layer_num | A dictionary {'n': max_layer_num} labeling the maximal number of the operation layers used in the subdecomposition. |
Definition at line 131 of file N_Qubit_Decomposition.py.
def qgd_python.N_Qubit_Decomposition.set_optimalization_block | ( | self, | |
optimalization_block | |||
) |
Call to set the number of blocks to be optimized in one shot.
optimalization_block | The number of blocks to be optimized in one shot |
Definition at line 230 of file N_Qubit_Decomposition.py.
def qgd_python.N_Qubit_Decomposition.set_verbose | ( | self, | |
verbose | |||
) |
Set the verbosity of the N_Qubit_Decomposition class.
verbose | Set False to suppress the output messages of the decompostion, or True (deafult) otherwise. |
Definition at line 221 of file N_Qubit_Decomposition.py.
def qgd_python.N_Qubit_Decomposition.start_decomposition | ( | self, | |
finalize_decomposition = True |
|||
) |
Start the disentanglig process of the least significant two qubit unitary.
finalize_decomposition | Optional logical parameter. If true (default), the decoupled qubits are rotated into state |0> when the disentangling of the qubits is done. Set to False to omit this procedure |
Definition at line 122 of file N_Qubit_Decomposition.py.
|
private |
The loaded QGD library.
Definition at line 46 of file N_Qubit_Decomposition.py.
qgd_python.N_Qubit_Decomposition.argtypes |
Definition at line 52 of file N_Qubit_Decomposition.py.
string qgd_python.N_Qubit_Decomposition.library_path = '.libs/libqgd.so' |
path to the QGD library
Definition at line 36 of file N_Qubit_Decomposition.py.
qgd_python.N_Qubit_Decomposition.restype |
Definition at line 53 of file N_Qubit_Decomposition.py.