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_R_Wrapper |
Type definition of the qgd_RX_Wrapper Python class of the qgd_RX_Wrapper module. More... | |
Macros | |
#define | PY_SSIZE_T_CLEAN |
Functions | |
R * | create_R (int qbit_num, int target_qbit) |
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_R_Wrapper (void) |
Method called when the Python module is initialized. More... | |
static PyObject * | qgd_R_Wrapper_apply_to (qgd_R_Wrapper *self, PyObject *args) |
Call to apply the gate operation on the inut matrix. More... | |
static void | qgd_R_Wrapper_dealloc (qgd_R_Wrapper *self) |
Method called when a python instance of the class qgd_RX_Wrapper is destroyed. More... | |
static PyObject * | qgd_R_Wrapper_Extract_Parameters (qgd_R_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_R_Wrapper_get_Control_Qbit (qgd_R_Wrapper *self) |
Call to get the control qbit (returns with -1 if no control qbit is used in the gate) More... | |
static PyObject * | qgd_R_Wrapper_get_Gate_Kernel (qgd_R_Wrapper *self, PyObject *args) |
Calculate the matrix of a U3 gate gate corresponding to the given parameters acting on a single qbit space. More... | |
static PyObject * | qgd_R_Wrapper_get_Matrix (qgd_R_Wrapper *self, PyObject *args) |
Extract the optimized parameters. More... | |
static PyObject * | qgd_R_Wrapper_get_Parameter_Num (qgd_R_Wrapper *self) |
Call to get the number of free parameters in the gate. More... | |
static PyObject * | qgd_R_Wrapper_get_Parameter_Start_Index (qgd_R_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_R_Wrapper_get_Target_Qbit (qgd_R_Wrapper *self) |
Call to get the target qbit. More... | |
static int | qgd_R_Wrapper_init (qgd_R_Wrapper *self, PyObject *args, PyObject *kwds) |
Method called when a python instance of the class qgd_RX_Wrapper is initialized. More... | |
static PyObject * | qgd_R_Wrapper_new (PyTypeObject *type, PyObject *args, PyObject *kwds) |
Method called when a python instance of the class qgd_RX_Wrapper is allocated. More... | |
static PyObject * | qgd_R_Wrapper_set_Target_Qbit (qgd_R_Wrapper *self, PyObject *args) |
Call to set the target qbit. More... | |
void | release_R (R *instance) |
Call to deallocate an instance of N_Qubit_Decomposition class. More... | |
Variables | |
static PyMemberDef | qgd_R_Wrapper_members [] |
Structure containing metadata about the members of class qgd_RX_Wrapper. More... | |
static PyMethodDef | qgd_R_Wrapper_methods [] |
Structure containing metadata about the methods of class qgd_RX_Wrapper. More... | |
static PyModuleDef | qgd_R_Wrapper_Module |
Structure containing metadata about the module. More... | |
static PyTypeObject | qgd_R_Wrapper_Type |
A structure describing the type of the class qgd_RX_Wrapper. More... | |
#define PY_SSIZE_T_CLEAN |
Definition at line 27 of file qgd_R_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_R_Wrapper.cpp.
PyMODINIT_FUNC PyInit_qgd_R_Wrapper | ( | void | ) |
Method called when the Python module is initialized.
Definition at line 514 of file qgd_R_Wrapper.cpp.
|
static |
Call to apply the gate operation on the inut matrix.
Definition at line 179 of file qgd_R_Wrapper.cpp.
|
static |
Method called when a python instance of the class qgd_RX_Wrapper is destroyed.
self | A pointer pointing to an instance of class qgd_RX_Wrapper. |
Definition at line 83 of file qgd_R_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 335 of file qgd_R_Wrapper.cpp.
|
static |
Call to get the control qbit (returns with -1 if no control qbit is used in the gate)
Definition at line 309 of file qgd_R_Wrapper.cpp.
|
static |
Calculate the matrix of a U3 gate gate corresponding to the given parameters acting on a single qbit space.
ThetaOver2 | Real parameter standing for the parameter theta. |
Phi | Real parameter standing for the parameter phi. |
Lambda | Real parameter standing for the parameter lambda. |
Definition at line 239 of file qgd_R_Wrapper.cpp.
|
static |
Extract the optimized parameters.
start_index | The index of the first inverse gate |
Definition at line 139 of file qgd_R_Wrapper.cpp.
|
static |
Call to get the number of free parameters in the gate.
Definition at line 268 of file qgd_R_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 281 of file qgd_R_Wrapper.cpp.
|
static |
Call to get the target qbit.
Definition at line 296 of file qgd_R_Wrapper.cpp.
|
static |
Method called when a python instance of the class qgd_RX_Wrapper is initialized.
self | A pointer pointing to an instance of the class qgd_RX_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_R_Wrapper.cpp.
|
static |
Method called when a python instance of the class qgd_RX_Wrapper is allocated.
type | A pointer pointing to a structure describing the type of the class qgd_RX_Wrapper. |
Definition at line 98 of file qgd_R_Wrapper.cpp.
|
static |
Call to set the target qbit.
Definition at line 321 of file qgd_R_Wrapper.cpp.
void release_R | ( | R * | 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_R_Wrapper.cpp.
|
static |
Structure containing metadata about the members of class qgd_RX_Wrapper.
Definition at line 386 of file qgd_R_Wrapper.cpp.
|
static |
Structure containing metadata about the methods of class qgd_RX_Wrapper.
Definition at line 394 of file qgd_R_Wrapper.cpp.
|
static |
Structure containing metadata about the module.
Definition at line 502 of file qgd_R_Wrapper.cpp.
|
static |
A structure describing the type of the class qgd_RX_Wrapper.
Definition at line 429 of file qgd_R_Wrapper.cpp.