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.
Functions | |
PyObject * | array_from_ptr (void *ptr, int dim, npy_intp *shape, int np_type) |
Call to make a numpy array from data stored via void pointer. More... | |
void | capsule_cleanup (PyObject *capsule) |
Method to cleanup the memory when the python object becomes released. More... | |
PyObject * | matrix_int8_to_numpy (matrix_base< int8_t > &mtx) |
Call to make a numpy array from an instance of matrix_base<int8_t> class. More... | |
PyObject * | matrix_real_to_numpy (Matrix_real &mtx) |
Call to make a numpy array from an instance of matrix class. More... | |
PyObject * | matrix_to_numpy (Matrix &mtx) |
Call to make a numpy array from an instance of matrix class. More... | |
Matrix | numpy2matrix (PyArrayObject *arr) |
Call to create a matrix representation of a numpy array. More... | |
Matrix_real | numpy2matrix_real (PyArrayObject *arr) |
Call to create a PIC matrix_real representation of a numpy array. More... | |
Call to make a numpy array from data stored via void pointer.
ptr | pointer pointing to the data |
dim | The number of dimensions |
shape | array containing the dimensions. |
np_type | The data type stored in the numpy array (see possible values at https://numpy.org/doc/1.17/reference/c-api.dtype.html) |
Definition at line 49 of file numpy_interface.cpp.
void capsule_cleanup | ( | PyObject * | capsule | ) |
Method to cleanup the memory when the python object becomes released.
capsule | Pointer to the memory capsule |
Definition at line 28 of file numpy_interface.cpp.
PyObject* matrix_int8_to_numpy | ( | matrix_base< int8_t > & | mtx | ) |
Call to make a numpy array from an instance of matrix_base<int8_t> class.
mtx | a matrix instance |
Definition at line 129 of file numpy_interface.cpp.
PyObject* matrix_real_to_numpy | ( | Matrix_real & | mtx | ) |
Call to make a numpy array from an instance of matrix class.
mtx | a matrix instance |
Definition at line 94 of file numpy_interface.cpp.
PyObject* matrix_to_numpy | ( | Matrix & | mtx | ) |
Call to make a numpy array from an instance of matrix class.
mtx | a matrix instance |
Definition at line 73 of file numpy_interface.cpp.
Matrix numpy2matrix | ( | PyArrayObject * | arr | ) |
Call to create a matrix representation of a numpy array.
Call to create a PIC matrix representation of a numpy array.
Definition at line 151 of file numpy_interface.cpp.
Matrix_real numpy2matrix_real | ( | PyArrayObject * | arr | ) |
Call to create a PIC matrix_real representation of a numpy array.
Definition at line 193 of file numpy_interface.cpp.