Sequential Quantum Gate Decomposer
v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
|
Go to the source code of this file.
Classes | |
struct | qgd_CROT_Wrapper |
Type definition of the qgd_CROT Python class of the qgd_CROT module. More... | |
Macros | |
#define | PY_SSIZE_T_CLEAN |
Functions | |
CROT * | create_CROT (int qbit_num, int target_qbit, int control_qbit, crot_type subtype_in) |
Creates an instance of class N_Qubit_Decomposition and return with a pointer pointing to the class instance (C++ linking is needed) More... | |
PyMODINIT_FUNC | PyInit_qgd_CROT_Wrapper (void) |
Method called when the Python module is initialized. More... | |
static PyObject * | qgd_CROT_Wrapper_apply_to (qgd_CROT_Wrapper *self, PyObject *args) |
Call to apply the gate operation on the inut matrix. More... | |
static void | qgd_CROT_Wrapper_dealloc (qgd_CROT_Wrapper *self) |
Method called when a python instance of the class qgd_CROT_Wrapper is destroyed. More... | |
static PyObject * | qgd_CROT_Wrapper_Extract_Parameters (qgd_CROT_Wrapper *self, PyObject *args) |
Call to extract the paramaters corresponding to the gate, from a parameter array associated to the circuit in which the gate is embedded. More... | |
static PyObject * | qgd_CROT_Wrapper_get_Control_Qbit (qgd_CROT_Wrapper *self) |
Call to get the control qbit (returns with -1 if no control qbit is used in the gate) More... | |
static PyObject * | qgd_CROT_Wrapper_get_Parameter_Num (qgd_CROT_Wrapper *self) |
Call to get the number of free parameters in the gate. More... | |
static PyObject * | qgd_CROT_Wrapper_get_Parameter_Start_Index (qgd_CROT_Wrapper *self) |
Call to get the starting index of the parameters in the parameter array corresponding to the circuit in which the current gate is incorporated. More... | |
static PyObject * | qgd_CROT_Wrapper_get_Target_Qbit (qgd_CROT_Wrapper *self) |
Call to get the target qbit. More... | |
static int | qgd_CROT_Wrapper_init (qgd_CROT_Wrapper *self, PyObject *args, PyObject *kwds) |
Method called when a python instance of the class qgd_CROT_Wrapper is initialized. More... | |
static PyObject * | qgd_CROT_Wrapper_new (PyTypeObject *type, PyObject *args, PyObject *kwds) |
Method called when a python instance of the class qgd_CROT_Wrapper is allocated. More... | |
static PyObject * | qgd_CROT_Wrapper_set_Control_Qbit (qgd_CROT_Wrapper *self, PyObject *args) |
Call to set the target qbit. More... | |
static PyObject * | qgd_CROT_Wrapper_set_Target_Qbit (qgd_CROT_Wrapper *self, PyObject *args) |
Call to set the target qbit. More... | |
void | release_CROT (CROT *instance) |
Call to deallocate an instance of N_Qubit_Decomposition class. More... | |
Variables | |
static PyMemberDef | qgd_CROT_Wrapper_members [] |
Structure containing metadata about the members of class qgd_CROT_Wrapper. More... | |
static PyMethodDef | qgd_CROT_Wrapper_methods [] |
Structure containing metadata about the methods of class qgd_CROT_Wrapper. More... | |
static PyModuleDef | qgd_CROT_Wrapper_Module |
Structure containing metadata about the module. More... | |
static PyTypeObject | qgd_CROT_Wrapper_Type |
A structure describing the type of the class qgd_CROT_Wrapper. More... | |
#define PY_SSIZE_T_CLEAN |
Definition at line 27 of file qgd_CROT_Wrapper.cpp.
Creates an instance of class N_Qubit_Decomposition and return with a pointer pointing to the class instance (C++ linking is needed)
qbit_num | The number of qubits spanning the operation. |
target_qbit | The 0<=ID<qbit_num of the target qubit. |
Definition at line 54 of file qgd_CROT_Wrapper.cpp.
PyMODINIT_FUNC PyInit_qgd_CROT_Wrapper | ( | void | ) |
Method called when the Python module is initialized.
Definition at line 467 of file qgd_CROT_Wrapper.cpp.
|
static |
Call to apply the gate operation on the inut matrix.
Definition at line 155 of file qgd_CROT_Wrapper.cpp.
|
static |
Method called when a python instance of the class qgd_CROT_Wrapper is destroyed.
self | A pointer pointing to an instance of class qgd_CROT_Wrapper. |
Definition at line 83 of file qgd_CROT_Wrapper.cpp.
|
static |
Call to extract the paramaters corresponding to the gate, from a parameter array associated to the circuit in which the gate is embedded.
Definition at line 292 of file qgd_CROT_Wrapper.cpp.
|
static |
Call to get the control qbit (returns with -1 if no control qbit is used in the gate)
Definition at line 253 of file qgd_CROT_Wrapper.cpp.
|
static |
Call to get the number of free parameters in the gate.
Definition at line 213 of file qgd_CROT_Wrapper.cpp.
|
static |
Call to get the starting index of the parameters in the parameter array corresponding to the circuit in which the current gate is incorporated.
Definition at line 226 of file qgd_CROT_Wrapper.cpp.
|
static |
Call to get the target qbit.
Definition at line 240 of file qgd_CROT_Wrapper.cpp.
|
static |
Method called when a python instance of the class qgd_CROT_Wrapper is initialized.
self | A pointer pointing to an instance of the class qgd_CROT_Wrapper. |
args | A tuple of the input arguments: qbit_num (int), target_qbit (int), Theta (bool) , Phi (bool), Lambda (bool) |
kwds | A tuple of keywords |
Definition at line 114 of file qgd_CROT_Wrapper.cpp.
|
static |
Method called when a python instance of the class qgd_CROT_Wrapper is allocated.
type | A pointer pointing to a structure describing the type of the class qgd_CROT_Wrapper. |
Definition at line 98 of file qgd_CROT_Wrapper.cpp.
|
static |
Call to set the target qbit.
Definition at line 279 of file qgd_CROT_Wrapper.cpp.
|
static |
Call to set the target qbit.
Definition at line 265 of file qgd_CROT_Wrapper.cpp.
void release_CROT | ( | CROT * | instance | ) |
Call to deallocate an instance of N_Qubit_Decomposition class.
ptr | A pointer pointing to an instance of N_Qubit_Decomposition class. |
Definition at line 65 of file qgd_CROT_Wrapper.cpp.
|
static |
Structure containing metadata about the members of class qgd_CROT_Wrapper.
Definition at line 342 of file qgd_CROT_Wrapper.cpp.
|
static |
Structure containing metadata about the methods of class qgd_CROT_Wrapper.
Definition at line 350 of file qgd_CROT_Wrapper.cpp.
|
static |
Structure containing metadata about the module.
Definition at line 455 of file qgd_CROT_Wrapper.cpp.
|
static |
A structure describing the type of the class qgd_CROT_Wrapper.
Definition at line 382 of file qgd_CROT_Wrapper.cpp.