|
Sequential Quantum Gate Decomposer
v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
|
#include <Python.h>#include <numpy/arrayobject.h>#include "structmember.h"#include <stdio.h>#include <complex>#include <cmath>#include <cstring>#include <cctype>#include <strings.h>#include "numpy_interface.h"#include "matrix_any.h"#include "matrix_real_any.h"#include "N_Qubit_Decomposition.h"#include "N_Qubit_Decomposition_adaptive.h"#include "N_Qubit_Decomposition_Tree_Search.h"#include "N_Qubit_Decomposition_Tabu_Search.h"#include "Gates_block.h"
Go to the source code of this file.
Classes | |
| struct | qgd_Circuit_Wrapper |
| Type definition for qgd_Circuit_Wrapper. More... | |
| struct | qgd_N_Qubit_Decomposition_Wrapper |
| Type definition of the unified N-Qubit Decomposition wrapper. More... | |
Macros | |
| #define | CIRQ_ADD_ROTATION_GATE(name, param) |
| #define | CIRQ_ADD_SINGLE_QUBIT_GATE(name) |
| Method to get Cirq circuit representation. More... | |
| #define | CIRQ_ADD_TWO_QUBIT_GATE(name) |
| #define | DECOMPOSITION_WRAPPER_BASE_METHODS |
| Base methods shared by all decomposition types These methods are available for all decomposition classes. More... | |
| #define | decomposition_wrapper_type_template(decomp_class) |
| #define | NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION |
| #define | Py_INCREF_template(decomp_name) |
| #define | PY_SSIZE_T_CLEAN |
Functions | |
| static bool | config_requests_float (std::map< std::string, Config_Element > &config) |
| decomposition_wrapper_type_template (N_Qubit_Decomposition) decomposition_wrapper_type_template(N_Qubit_Decomposition_adaptive) decomposition_wrapper_type_template(N_Qubit_Decomposition_custom) decomposition_wrapper_type_template(N_Qubit_Decomposition_Tree_Search) decomposition_wrapper_type_template(N_Qubit_Decomposition_Tabu_Search) static PyModuleDef qgd_N_Qubit_Decompositions_Wrapper_Module | |
| Structure containing metadata about the module. More... | |
| std::map< std::string, Config_Element > | extract_config (PyObject *config_arg) |
| Extract config dictionary. More... | |
| guess_type | extract_guess_type (PyObject *initial_guess) |
| Extract guess_type from Python string/object. More... | |
| Matrix | extract_matrix (PyObject *Umtx_arg, PyArrayObject **store_ref) |
| Extract and validate Matrix from numpy array. More... | |
| void | extract_matrix_any (PyObject *matrix_arg, PyArrayObject **store_ref, Matrix &matrix64, Matrix_float &matrix32, bool &is_float32) |
| Extract complex64/complex128 numpy input without rejecting float32 callers. More... | |
| void | extract_parameters_any (PyObject *parameters_arg, PyArrayObject **store_ref, Matrix_real ¶meters64, Matrix_real_float ¶meters32, bool &is_float32) |
| Extract real float32/float64 parameters without forced precision conversion. More... | |
| std::vector< matrix_base< int > > | extract_topology (PyObject *topology) |
| Extract topology list from Python. More... | |
| Matrix_real | parameters_float_to_double (Matrix_real_float ¶meters32) |
| PyMODINIT_FUNC | PyInit_qgd_N_Qubit_Decompositions_Wrapper (void) |
| Method called when the Python module is initialized. More... | |
| static int | qgd_N_Qubit_Decomposition_adaptive_Wrapper_init (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
| static int | qgd_N_Qubit_Decomposition_custom_Wrapper_init (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
| static int | qgd_N_Qubit_Decomposition_Tabu_Search_Wrapper_init (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
| static int | qgd_N_Qubit_Decomposition_Tree_Search_Wrapper_init (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_add_Adaptive_Layers (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Wrapper method to add adaptive layers to the gate structure stored by the class. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_add_Finalyzing_Layer_To_Gate_Structure (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Wrapper function to add finalyzing layer (single qubit rotations on all qubits) to the gate structure. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_add_Gate_Structure_From_Binary (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Wrapper function to append custom layers to the gate structure from binary file. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_add_Layer_To_Imported_Gate_Structure (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Wrapper method to add layer to imported gate structure. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_apply_Global_Phase_Factor (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Apply global phase factor to the unitary matrix. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_apply_Imported_Gate_Structure (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Wrapper function to apply the imported gate structure on the unitary. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_Compress_Circuit (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Call to compress circuit. More... | |
| static void | qgd_N_Qubit_Decomposition_Wrapper_dealloc (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Called when Python object is destroyed. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_export_Unitary (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Export unitary matrix to binary file. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_Finalize_Circuit (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
| Call to finalize circuit. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Circuit (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Call to get the incorporated circuit. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Cirq_Circuit (qgd_N_Qubit_Decomposition_Wrapper *self) |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Decomposition_Error (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Get the error of the decomposition. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Gate_Num (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Call to get the number of gates. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Gates (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Method to get gates as a list of dictionaries (with parameters from optimized_parameters array) More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Global_Phase (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Call to get the global phase factor (returns the angle of the global phase) More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Initial_Circuit (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Call to get initial circuit. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Matrix (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
| Call to get the matrix representation of the circuit with given parameters. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Num_of_Iters (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Get the number of free parameters in the gate structure used for the decomposition. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Optimized_Parameters (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Call to get the optimized parameters. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Parameter_Num (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Get the number of free parameters in the gate structure used for the decomposition. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Project_Name (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Call to get the project name. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Qbit_Num (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Get the number of qubits. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Qiskit_Circuit (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Method to get Qiskit circuit representation. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Second_Renyi_Entropy (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Get second Renyi entropy. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Trace_Offset (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Get trace offset of the compression. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_get_Unitary (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Call to get the unitary matrix. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_import_Qiskit_Circuit (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Method to import Qiskit circuit. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_import_Qiskit_Circuit_adaptive (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *qc_in) |
| Method to import Qiskit circuit (adaptive-specific version with custom CZ decomposition) More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_import_Qiskit_Circuit_standard (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *qc_in) |
| Method to import Qiskit circuit (standard version for non-adaptive decompositions) More... | |
| static int | qgd_N_Qubit_Decomposition_Wrapper_init (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_List_Gates (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Call to list the gates decomposing the unitary. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_new (PyTypeObject *type, PyObject *args, PyObject *kwds) |
| Allocate memory for new Python object. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_Optimization_Problem (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Call to evaluate the optimization problem (cost function) More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_Optimization_Problem_Batch (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Call to evaluate the optimization problem for batched parameters. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_Optimization_Problem_Combined (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Call to evaluate the optimization problem with cost and gradient combined. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_Optimization_Problem_Combined_Unitary (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Call to evaluate the optimization problem with unitary and derivatives. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_Optimization_Problem_Grad (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Call to evaluate the gradient of the optimization problem. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_Reorder_Qubits (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Method to reorder the qubits in the decomposition class. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Convergence_Threshold (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Wrapper method to set the threshold of convergence. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Cost_Function_Variant (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
| Call to set the cost function variant. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Debugfile (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Set the debugfile name of the decomposition class. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Gate_Structure (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Wrapper function to set custom gate structure for the decomposition. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Gate_Structure_From_Binary (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Wrapper function to set custom layers to the gate structure that are intended to be used in the decomposition. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Global_Phase (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Call to set the global phase. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Identical_Blocks (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Set the number of identical successive blocks (N_Qubit_Decomposition only) More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Iteration_Loops (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Set the number of iteration loops during the subdecomposition of the qbit-th qubit. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Max_Iterations (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Set the number of maximum iterations for optimization. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Max_Layer_Num (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Set the maximal number of layers used in the subdecomposition of the qbit-th qubit. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Optimization_Blocks (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Wrapper method to set the number of gate blocks to be optimized. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Optimization_Tolerance (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Wrapper method to set the optimization tolerance. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Optimized_Parameters (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Extract the optimized parameters. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Optimizer (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
| Call to set the optimizer algorithm. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Project_Name (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Call to set the project name. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Trace_Offset (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
| Set trace offset for the compression. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Unitary (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Call to set unitary matrix. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Unitary_From_Binary (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Wrapper function to set unitary from binary file. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_set_Verbose (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args) |
| Set the verbosity of the decomposition class. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_Start_Decomposition (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
| Wrapper function to call the start_decomposition method of C++ class N_Qubit_Decomposition. More... | |
| static PyObject * | qgd_N_Qubit_Decomposition_Wrapper_Upload_Umtx_to_DFE (qgd_N_Qubit_Decomposition_Wrapper *self) |
| Upload unitary matrix to DFE. More... | |
| template<typename DecompT > | |
| void | release_decomposition (DecompT *instance) |
| Deallocate decomposition instance. More... | |
| template<typename DecompT > | |
| static int | search_wrapper_init (qgd_N_Qubit_Decomposition_Wrapper *self, PyObject *args, PyObject *kwds) |
Variables | |
| static PyMethodDef | qgd_N_Qubit_Decomposition_adaptive_methods [] |
| Method table for N_Qubit_Decomposition_adaptive. More... | |
| static PyMethodDef | qgd_N_Qubit_Decomposition_custom_methods [] |
| Method table for N_Qubit_Decomposition_custom. More... | |
| static PyMethodDef | qgd_N_Qubit_Decomposition_methods [] |
| Method table for base N_Qubit_Decomposition. More... | |
| static PyMethodDef | qgd_N_Qubit_Decomposition_Tabu_Search_methods [] |
| Method table for N_Qubit_Decomposition_Tabu_Search. More... | |
| static PyMethodDef | qgd_N_Qubit_Decomposition_Tree_Search_methods [] |
| Method table for N_Qubit_Decomposition_Tree_Search. More... | |
| #define CIRQ_ADD_ROTATION_GATE | ( | name, | |
| param | |||
| ) |
Definition at line 2480 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
| #define CIRQ_ADD_SINGLE_QUBIT_GATE | ( | name | ) |
Method to get Cirq circuit representation.
Definition at line 2451 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
| #define CIRQ_ADD_TWO_QUBIT_GATE | ( | name | ) |
Definition at line 2464 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
| #define DECOMPOSITION_WRAPPER_BASE_METHODS |
Base methods shared by all decomposition types These methods are available for all decomposition classes.
Definition at line 3124 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
| #define decomposition_wrapper_type_template | ( | decomp_class | ) |
Definition at line 3281 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
| #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION |
Definition at line 6 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
| #define Py_INCREF_template | ( | decomp_name | ) |
Definition at line 3357 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
| #define PY_SSIZE_T_CLEAN |
Definition at line 5 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Definition at line 218 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

| decomposition_wrapper_type_template | ( | N_Qubit_Decomposition | ) |
Structure containing metadata about the module.
| std::map<std::string, Config_Element> extract_config | ( | PyObject * | config_arg | ) |
Extract config dictionary.
Definition at line 193 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.


| guess_type extract_guess_type | ( | PyObject * | initial_guess | ) |
Extract guess_type from Python string/object.
Definition at line 142 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

| Matrix extract_matrix | ( | PyObject * | Umtx_arg, |
| PyArrayObject ** | store_ref | ||
| ) |
Extract and validate Matrix from numpy array.
Definition at line 57 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

| void extract_matrix_any | ( | PyObject * | matrix_arg, |
| PyArrayObject ** | store_ref, | ||
| Matrix & | matrix64, | ||
| Matrix_float & | matrix32, | ||
| bool & | is_float32 | ||
| ) |
Extract complex64/complex128 numpy input without rejecting float32 callers.
Definition at line 74 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.


| void extract_parameters_any | ( | PyObject * | parameters_arg, |
| PyArrayObject ** | store_ref, | ||
| Matrix_real & | parameters64, | ||
| Matrix_real_float & | parameters32, | ||
| bool & | is_float32 | ||
| ) |
Extract real float32/float64 parameters without forced precision conversion.
Definition at line 104 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.


| std::vector<matrix_base<int> > extract_topology | ( | PyObject * | topology | ) |
Extract topology list from Python.
Definition at line 168 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

| Matrix_real parameters_float_to_double | ( | Matrix_real_float & | parameters32 | ) |
Definition at line 128 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

| PyMODINIT_FUNC PyInit_qgd_N_Qubit_Decompositions_Wrapper | ( | void | ) |
Method called when the Python module is initialized.
Definition at line 3369 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Definition at line 279 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Definition at line 347 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Definition at line 450 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Definition at line 445 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Wrapper method to add adaptive layers to the gate structure stored by the class.
Definition at line 2174 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Wrapper function to add finalyzing layer (single qubit rotations on all qubits) to the gate structure.
Definition at line 874 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Wrapper function to append custom layers to the gate structure from binary file.
Definition at line 2098 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Wrapper method to add layer to imported gate structure.
Definition at line 2190 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Apply global phase factor to the unitary matrix.
Definition at line 1133 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Wrapper function to apply the imported gate structure on the unitary.
The transformed unitary is to be decomposed in the calculations, and the imported gate structure is released.
Definition at line 2206 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to compress circuit.
Definition at line 2016 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Called when Python object is destroyed.
Definition at line 468 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Export unitary matrix to binary file.
| args | Tuple containing filename string |
Definition at line 1034 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to finalize circuit.
Definition at line 2037 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to get the incorporated circuit.
Definition at line 581 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.


|
static |
Definition at line 2501 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Get the error of the decomposition.
Definition at line 1809 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to get the number of gates.
Definition at line 547 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Method to get gates as a list of dictionaries (with parameters from optimized_parameters array)
Definition at line 2309 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.


|
static |
Call to get the global phase factor (returns the angle of the global phase)
Definition at line 1098 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Call to get initial circuit.
Definition at line 1995 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to get the matrix representation of the circuit with given parameters.
| args | Tuple containing parameters array (numpy array of doubles) |
| kwds | Optional keyword arguments (currently unused) |
Definition at line 1303 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Get the number of free parameters in the gate structure used for the decomposition.
Definition at line 1021 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to get the optimized parameters.
Definition at line 559 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.


|
static |
Get the number of free parameters in the gate structure used for the decomposition.
Definition at line 971 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to get the project name.
Definition at line 1057 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Get the number of qubits.
Definition at line 1929 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Method to get Qiskit circuit representation.
Definition at line 2404 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Get second Renyi entropy.
| args | Python tuple of arguments (parameters_arr, input_state_arg, qubit_list_arg) |
Definition at line 1834 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Get trace offset of the compression.
Definition at line 1751 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to get the unitary matrix.
Definition at line 1150 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Method to import Qiskit circuit.
| qc_in | Qiskit QuantumCircuit to import |
Definition at line 3097 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Method to import Qiskit circuit (adaptive-specific version with custom CZ decomposition)
| qc_in | Qiskit QuantumCircuit to import |
Definition at line 2701 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.


|
static |
Method to import Qiskit circuit (standard version for non-adaptive decompositions)
| qc_in | Qiskit QuantumCircuit to import |
Definition at line 2644 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.


|
static |
Definition at line 229 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to list the gates decomposing the unitary.
Definition at line 616 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Allocate memory for new Python object.
Definition at line 488 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Call to evaluate the optimization problem (cost function)
| args | Tuple containing parameters array (numpy array of doubles) |
Definition at line 1396 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to evaluate the optimization problem for batched parameters.
| args | Tuple containing parameters matrix (numpy array of doubles, each row is a parameter set) |
Definition at line 1650 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to evaluate the optimization problem with cost and gradient combined.
| args | Tuple containing parameters array (numpy array of doubles) |
Definition at line 1578 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to evaluate the optimization problem with unitary and derivatives.
| args | Tuple containing parameters array (numpy array of doubles) |
Definition at line 1446 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to evaluate the gradient of the optimization problem.
| args | Tuple containing parameters array (numpy array of doubles) |
Definition at line 1509 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Method to reorder the qubits in the decomposition class.
| args | Tuple or list of integers representing the new qubit ordering |
Definition at line 773 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Wrapper method to set the threshold of convergence.
| args | Double representing the threshold value |
Definition at line 835 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Call to set the cost function variant.
| args | Positional arguments |
| kwds | Keyword arguments (costfnc: integer) |
Definition at line 1357 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Set the debugfile name of the decomposition class.
| args | PyObject string for debug filename |
Definition at line 743 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Wrapper function to set custom gate structure for the decomposition.
| self | A pointer pointing to an instance of the class qgd_N_Qubit_Decompositions_Wrapper |
| args | PyObject containing either a dictionary {int: Gates_block} (Decomposition only) or a single gate structure (all types) |
Definition at line 899 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.


|
static |
Wrapper function to set custom layers to the gate structure that are intended to be used in the decomposition.
Definition at line 2058 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to set the global phase.
| args | Tuple containing phase angle (double) |
Definition at line 1112 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Set the number of identical successive blocks (N_Qubit_Decomposition only)
Definition at line 1954 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Set the number of iteration loops during the subdecomposition of the qbit-th qubit.
| args | Dictionary {'n': iteration_loops} labeling the number of successive identical layers used in the subdecomposition at the disentangling of the n-th qubit |
Definition at line 676 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Set the number of maximum iterations for optimization.
| args | Tuple containing max_iterations integer |
Definition at line 1280 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Set the maximal number of layers used in the subdecomposition of the qbit-th qubit.
| args | Dictionary {'n': max_layer_num} labeling the maximal number of the gate layers used in the subdecomposition |
Definition at line 628 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Wrapper method to set the number of gate blocks to be optimized.
| args | Integer representing the number of optimization blocks |
Definition at line 855 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Wrapper method to set the optimization tolerance.
| args | Double representing the tolerance value |
Definition at line 815 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Extract the optimized parameters.
| start_index | The index of the first inverse gate |
Definition at line 983 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.


|
static |
Call to set the optimizer algorithm.
| args | Positional arguments |
| kwds | Keyword arguments (optimizer: string) |
Definition at line 1197 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Call to set the project name.
| args | Tuple containing project name string |
Definition at line 1075 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Set trace offset for the compression.
| args | Python tuple of arguments (trace_offset: int) |
Definition at line 1776 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Call to set unitary matrix.
| args | Tuple containing numpy array (unitary matrix) |
Definition at line 2237 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Wrapper function to set unitary from binary file.
Definition at line 2136 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Set the verbosity of the decomposition class.
| args | Integer (0=False, non-zero=True) |
Definition at line 723 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Wrapper function to call the start_decomposition method of C++ class N_Qubit_Decomposition.
| self | A pointer pointing to an instance of the class qgd_N_Qubit_Decompositions_Wrapper |
| kwds | A tuple of keywords |
Definition at line 507 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Upload unitary matrix to DFE.
Definition at line 1722 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
| void release_decomposition | ( | DecompT * | instance | ) |
Deallocate decomposition instance.
Definition at line 458 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Definition at line 396 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.

|
static |
Method table for N_Qubit_Decomposition_adaptive.
Definition at line 3228 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Method table for N_Qubit_Decomposition_custom.
Definition at line 3256 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Method table for base N_Qubit_Decomposition.
Definition at line 3218 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Method table for N_Qubit_Decomposition_Tabu_Search.
Definition at line 3264 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
|
static |
Method table for N_Qubit_Decomposition_Tree_Search.
Definition at line 3274 of file qgd_N_Qubit_Decompositions_Wrapper.cpp.
1.8.13