Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Classes | Macros | Functions | Variables
qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp File Reference
#include <Python.h>
#include <numpy/arrayobject.h>
#include "structmember.h"
#include <stdio.h>
#include "N_Qubit_Decomposition_adaptive.h"
#include "Gates_block.h"
#include "numpy_interface.h"
Include dependency graph for qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp:

Go to the source code of this file.

Classes

struct  qgd_Circuit_Wrapper
 Type definition of the qgd_Circuit_Wrapper Python class of the qgd_Circuit_Wrapper module. More...
 
struct  qgd_N_Qubit_Decomposition_adaptive_Wrapper
 Type definition of the qgd_N_Qubit_Decomposition_adaptive_Wrapper Python class of the qgd_N_Qubit_Decomposition_adaptive_Wrapper module. More...
 

Macros

#define PY_SSIZE_T_CLEAN
 

Functions

N_Qubit_Decomposition_adaptivecreate_N_Qubit_Decomposition_adaptive (Matrix &Umtx, int qbit_num, int level_limit, int level_limit_min, std::vector< matrix_base< int >> topology_in, std::map< std::string, Config_Element > &config, int accelerator_num)
 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_N_Qubit_Decomposition_adaptive_Wrapper (void)
 Method called when the Python module is initialized. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Adaptive_Layers (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Wrapper method to add adaptive layers to the gate structure stored by the class. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Finalyzing_Layer_To_Gate_Structure (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Wrapper function to add finalyzing layer (single qubit rotations on all of the qubits) to the gate structure. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Gate_Structure_From_Binary (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper function to append custom layers to the gate structure that are intended to be used in the decomposition. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Layer_To_Imported_Gate_Structure (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Wrapper method to reorder the qubits in the decomposition class. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_apply_Global_Phase_Factor (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 applies the global phase to the Unitary matrix More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_apply_Imported_Gate_Structure (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Wrapper function to apply the imported gate structure on the unitary. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_Compress_Circuit (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 
static void qgd_N_Qubit_Decomposition_adaptive_Wrapper_dealloc (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Method called when a python instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper is destroyed. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_export_Unitary (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 export unitary to binary file More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_Finalize_Circuit (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args, PyObject *kwds)
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_circuit (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Wrapper function to retrieve the circuit (Squander format) incorporated in the instance. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Decomposition_Error (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Cll to get the error of the decomposition (i.e. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_gate_num (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Wrapper function to get the number of decomposing gates. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Global_Phase (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 returns the angle of the global phase (the radius us always sqrt(2)) More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Initial_Circuit (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Matrix (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Retrieve the unified unitary operation of the circuit. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Num_of_Iters (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Get the number of free parameters in the gate structure used for the decomposition. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Optimized_Parameters (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Extract the optimized parameters. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Parameter_Num (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Get the number of free parameters in the gate structure used for the decomposition. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Project_Name (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 get project name More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Qbit_Num (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Call to retrieve the number of qubits in the circuit. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Second_Renyi_Entropy (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper function to evaluate the second Rényi entropy of a quantum circuit at a specific parameter set. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Trace_Offset (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Wrapper function to get the trace offset used in the cost function. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Unitary (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 get Unitary More...
 
static int qgd_N_Qubit_Decomposition_adaptive_Wrapper_init (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args, PyObject *kwds)
 Method called when a python instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper is initialized. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_List_Gates (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Lists the gates decomposing the initial unitary. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
 Method called when a python instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper is allocated. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper function to evaluate the cost function. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Batch (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper function to evaluate the cost function for many input paramaters at once. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Combined (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper function to evaluate the cost function an dthe gradient components. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Combined_Unitary (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper function to evaluate the unitary function and the unitary derivates. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Grad (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper function to evaluate the cost function an dthe gradient components. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_Reorder_Qubits (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper method to reorder the qubits in the decomposition class. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Convergence_Threshold (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper method to set the threshold of convergence in the optimization processes. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Cost_Function_Variant (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args, PyObject *kwds)
 Wrapper function to set a variant for the cost function. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Debugfile (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Set the debugfile name of the N_Qubit_Decomposition class. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Gate_Structure (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper function to set custom gate structure for the decomposition. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Gate_Structure_From_Binary (qgd_N_Qubit_Decomposition_adaptive_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_adaptive_Wrapper_set_Global_Phase (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 sets the global phase to the new angle given More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Iteration_Loops (qgd_N_Qubit_Decomposition_adaptive_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_adaptive_Wrapper_set_Max_Iterations (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Set the number of maximum iterations. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Max_Layer_Num (qgd_N_Qubit_Decomposition_adaptive_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_adaptive_Wrapper_set_Optimization_Blocks (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper method to to set the number of gate blocks to be optimized in one shot. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Optimization_Tolerance (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Wrapper method to set the optimization tolerance of the optimization process during the decomposition. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Optimized_Parameters (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Extract the optimized parameters. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Optimizer (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args, PyObject *kwds)
 Wrapper function to set custom gate structure for the decomposition. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Project_Name (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 set project name More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Trace_Offset (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args, PyObject *kwds)
 Wrapper function to set the trace offset used in the cost function. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Unitary (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Unitary_From_Binary (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Verbose (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self, PyObject *args)
 Set the verbosity of the N_Qubit_Decomposition class. More...
 
static PyObject * qgd_N_Qubit_Decomposition_adaptive_Wrapper_Start_Decomposition (qgd_N_Qubit_Decomposition_adaptive_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_adaptive_Wrapper_Upload_Umtx_to_DFE (qgd_N_Qubit_Decomposition_adaptive_Wrapper *self)
 Call to upload the unitary to the DFE. More...
 
void release_N_Qubit_Decomposition_adaptive (N_Qubit_Decomposition_adaptive *instance)
 Call to deallocate an instance of N_Qubit_Decomposition_adaptive class. More...
 

Variables

static PyMemberDef qgd_N_Qubit_Decomposition_adaptive_Wrapper_members []
 Structure containing metadata about the members of class qgd_N_Qubit_Decomposition_adaptive_Wrapper. More...
 
static PyMethodDef qgd_N_Qubit_Decomposition_adaptive_Wrapper_methods []
 Structure containing metadata about the methods of class qgd_N_Qubit_Decomposition_adaptive_Wrapper. More...
 
static PyModuleDef qgd_N_Qubit_Decomposition_adaptive_Wrapper_Module
 Structure containing metadata about the module. More...
 
static PyTypeObject qgd_N_Qubit_Decomposition_adaptive_Wrapper_Type
 A structure describing the type of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper. More...
 

Macro Definition Documentation

◆ PY_SSIZE_T_CLEAN

#define PY_SSIZE_T_CLEAN

Function Documentation

◆ create_N_Qubit_Decomposition_adaptive()

N_Qubit_Decomposition_adaptive* create_N_Qubit_Decomposition_adaptive ( Matrix Umtx,
int  qbit_num,
int  level_limit,
int  level_limit_min,
std::vector< matrix_base< int >>  topology_in,
std::map< std::string, Config_Element > &  config,
int  accelerator_num 
)

Creates an instance of class N_Qubit_Decomposition and return with a pointer pointing to the class instance (C++ linking is needed)

Parameters
UmtxAn instance of class Matrix containing the unitary to be decomposed
qbit_numNumber of qubits spanning the unitary
level_limitThe maximal number of layers used in the decomposition
initial_guessType to guess the initial values for the optimization. Possible values: ZEROS=0, RANDOM=1, CLOSE_TO_ZERO=2
Returns
Return with a void pointer pointing to an instance of N_Qubit_Decomposition class.

Definition at line 75 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the caller graph for this function:

◆ PyInit_qgd_N_Qubit_Decomposition_adaptive_Wrapper()

PyMODINIT_FUNC PyInit_qgd_N_Qubit_Decomposition_adaptive_Wrapper ( void  )

Method called when the Python module is initialized.

Definition at line 2315 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Adaptive_Layers()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Adaptive_Layers ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Wrapper method to add adaptive layers to the gate structure stored by the class.

Parameters

Definition at line 1611 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Finalyzing_Layer_To_Gate_Structure()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Finalyzing_Layer_To_Gate_Structure ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Wrapper function to add finalyzing layer (single qubit rotations on all of the qubits) to the gate structure.

Definition at line 1032 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Gate_Structure_From_Binary()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Gate_Structure_From_Binary ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper function to append custom layers to the gate structure that are intended to be used in the decomposition.

Definition at line 920 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Layer_To_Imported_Gate_Structure()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_add_Layer_To_Imported_Gate_Structure ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Wrapper method to reorder the qubits in the decomposition class.

Parameters

Definition at line 1627 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_apply_Global_Phase_Factor()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_apply_Global_Phase_Factor ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

applies the global phase to the Unitary matrix

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.

Definition at line 462 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_apply_Imported_Gate_Structure()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_apply_Imported_Gate_Structure ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
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 1060 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Compress_Circuit()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_Compress_Circuit ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_dealloc()

static void qgd_N_Qubit_Decomposition_adaptive_Wrapper_dealloc ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Method called when a python instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper is destroyed.

Parameters
selfA pointer pointing to an instance of class qgd_N_Qubit_Decomposition_adaptive_Wrapper.

Definition at line 110 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_export_Unitary()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_export_Unitary ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

export unitary to binary file

Parameters
filenamefile to be exported to

Definition at line 1144 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Finalize_Circuit()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_Finalize_Circuit ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args,
PyObject *  kwds 
)
static

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_circuit()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_circuit ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Wrapper function to retrieve the circuit (Squander format) incorporated in the instance.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_custom_Wrapper.

Definition at line 477 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Decomposition_Error()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Decomposition_Error ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Cll to get the error of the decomposition (i.e.

the final value of the cost function)

Returns
The error of the decomposition

Definition at line 1130 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_gate_num()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_gate_num ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Wrapper function to get the number of decomposing gates.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
Returns
Returns with the number of gates

Definition at line 413 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Global_Phase()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Global_Phase ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

returns the angle of the global phase (the radius us always sqrt(2))

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.

Definition at line 434 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Initial_Circuit()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Initial_Circuit ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Matrix()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Matrix ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Retrieve the unified unitary operation of the circuit.

Parameters
start_indexThe index of the first inverse gate

Definition at line 1645 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Num_of_Iters()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Num_of_Iters ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Get the number of free parameters in the gate structure used for the decomposition.

Definition at line 571 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Optimized_Parameters()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Optimized_Parameters ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Extract the optimized parameters.

Parameters
start_indexThe index of the first inverse gate

Definition at line 538 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Parameter_Num()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Parameter_Num ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Get the number of free parameters in the gate structure used for the decomposition.

Definition at line 560 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Project_Name()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Project_Name ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

get project name

Returns
string name of the project

Definition at line 1089 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Qbit_Num()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Qbit_Num ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Call to retrieve the number of qubits in the circuit.

Definition at line 2039 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Second_Renyi_Entropy()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Second_Renyi_Entropy ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper function to evaluate the second Rényi entropy of a quantum circuit at a specific parameter set.

Definition at line 1945 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Trace_Offset()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Trace_Offset ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Wrapper function to get the trace offset used in the cost function.

In this case Tr(A) = sum_(i-offset=j) A_{ij}

Returns
Returns with the trace offset

Definition at line 1880 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Unitary()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_get_Unitary ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

get Unitary

Returns
Unitarty numpy matrix

Definition at line 1168 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_init()

static int qgd_N_Qubit_Decomposition_adaptive_Wrapper_init ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args,
PyObject *  kwds 
)
static

Method called when a python instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper is initialized.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
argsA tuple of the input arguments: Umtx (numpy array), qbit_num (integer), optimize_layer_num (bool), initial_guess (string PyObject
kwdsA tuple of keywords

Definition at line 157 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_List_Gates()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_List_Gates ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Lists the gates decomposing the initial unitary.

(These gates are the inverse gates of the gates bringing the intial matrix into unity.)

Parameters
start_indexThe index of the first inverse gate

Definition at line 523 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_new()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_new ( PyTypeObject type,
PyObject *  args,
PyObject *  kwds 
)
static

Method called when a python instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper is allocated.

Parameters
typeA pointer pointing to a structure describing the type of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.

Definition at line 135 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper function to evaluate the cost function.

Returns
teh value of the cost function

Definition at line 1200 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Batch()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Batch ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper function to evaluate the cost function for many input paramaters at once.

Returns
Unitarty numpy matrix

Definition at line 1452 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Combined()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Combined ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper function to evaluate the cost function an dthe gradient components.

Returns
Unitarty numpy matrix

Definition at line 1319 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Combined_Unitary()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Combined_Unitary ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper function to evaluate the unitary function and the unitary derivates.

Returns
Unitarty numpy matrix

Definition at line 1383 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Grad()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_Optimization_Problem_Grad ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper function to evaluate the cost function an dthe gradient components.

Returns
Unitarty numpy matrix

Definition at line 1258 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Reorder_Qubits()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_Reorder_Qubits ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper method to reorder the qubits in the decomposition class.

Parameters

Definition at line 1554 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Convergence_Threshold()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Convergence_Threshold ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper method to set the threshold of convergence in the optimization processes.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_Wrapper.
argsA tuple of the input arguments: tolerance (double) tolerance: The maximal allowed error of the optimization problem

Definition at line 836 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Cost_Function_Variant()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Cost_Function_Variant ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args,
PyObject *  kwds 
)
static

Wrapper function to set a variant for the cost function.

Input argument 0 stands for FROBENIUS_NORM, 1 for FROBENIUS_NORM_CORRECTION1, 2 for FROBENIUS_NORM_CORRECTION2, 3 for FROBENIUS_NORM_CORRECTION2_EXACT_DERIVATE

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
Returns
Returns with zero on success.

Definition at line 1785 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Debugfile()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Debugfile ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Set the debugfile name of the N_Qubit_Decomposition class.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
argsA tuple of the input arguments: debugfile_name (string) debug: Set True to suppress the output messages of the decompostion into a file named debugfile_name, or False (deafult) otherwise.

Definition at line 774 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Gate_Structure()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Gate_Structure ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper function to set custom gate structure for the decomposition.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
Returns
Returns with zero on success.

Definition at line 883 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Gate_Structure_From_Binary()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Gate_Structure_From_Binary ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper function to set custom layers to the gate structure that are intended to be used in the decomposition.

Definition at line 961 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Global_Phase()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Global_Phase ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

sets the global phase to the new angle given

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
argglobal_phase_factor_new_angle the angle to be set

Definition at line 448 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Iteration_Loops()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Iteration_Loops ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Set the number of iteration loops during the subdecomposition of the qbit-th qubit.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
argsA tuple of the input arguments: identical_blocks (PyDict) identical_blocks: A 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 683 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Max_Iterations()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Max_Iterations ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Set the number of maximum iterations.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
args(int) number of max iters.

Definition at line 727 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Max_Layer_Num()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Max_Layer_Num ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Set the maximal number of layers used in the subdecomposition of the qbit-th qubit.

Parameters
max_layer_numA dictionary {'n': max_layer_num} labeling the maximal number of the gate layers used in the subdecomposition.

Definition at line 633 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Optimization_Blocks()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Optimization_Blocks ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper method to to set the number of gate blocks to be optimized in one shot.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
argsA tuple of the input arguments: tolerance (double) optimization_block: number of operators in one sub-layer of the optimization process

Definition at line 859 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Optimization_Tolerance()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Optimization_Tolerance ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Wrapper method to set the optimization tolerance of the optimization process during the decomposition.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
argsA tuple of the input arguments: tolerance (double) tolerance: The maximal allowed error of the optimization problem

Definition at line 811 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Optimized_Parameters()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Optimized_Parameters ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Extract the optimized parameters.

Parameters
start_indexThe index of the first inverse gate

Definition at line 584 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Optimizer()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Optimizer ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args,
PyObject *  kwds 
)
static

Wrapper function to set custom gate structure for the decomposition.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
Returns
Returns with zero on success.

Definition at line 1690 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Project_Name()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Project_Name ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

set project name

Parameters
project_name_newnew string to be set as project name

Definition at line 1105 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Trace_Offset()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Trace_Offset ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args,
PyObject *  kwds 
)
static

Wrapper function to set the trace offset used in the cost function.

In this case Tr(A) = sum_(i-offset=j) A_{ij}

Returns
Returns with zero on success.

Definition at line 1835 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Unitary()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Unitary ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Definition at line 1516 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the call graph for this function:

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Unitary_From_Binary()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Unitary_From_Binary ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Verbose()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_set_Verbose ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args 
)
static

Set the verbosity of the N_Qubit_Decomposition class.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
argsA tuple of the input arguments: verbose (int) verbose: Set False to suppress the output messages of the decompostion, or True (deafult) otherwise.

Definition at line 750 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Start_Decomposition()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_Start_Decomposition ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self,
PyObject *  args,
PyObject *  kwds 
)
static

Wrapper function to call the start_decomposition method of C++ class N_Qubit_Decomposition.

Parameters
selfA pointer pointing to an instance of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.
kwdsA tuple of keywords

Definition at line 292 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Upload_Umtx_to_DFE()

static PyObject* qgd_N_Qubit_Decomposition_adaptive_Wrapper_Upload_Umtx_to_DFE ( qgd_N_Qubit_Decomposition_adaptive_Wrapper self)
static

Call to upload the unitary to the DFE.

(Has no effect for non-DFE builds)

Definition at line 1911 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ release_N_Qubit_Decomposition_adaptive()

void release_N_Qubit_Decomposition_adaptive ( N_Qubit_Decomposition_adaptive instance)

Call to deallocate an instance of N_Qubit_Decomposition_adaptive class.

Parameters
ptrA pointer pointing to an instance of N_Qubit_Decomposition class.

Definition at line 88 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_members

PyMemberDef qgd_N_Qubit_Decomposition_adaptive_Wrapper_members[]
static
Initial value:
= {
{NULL}
}

Structure containing metadata about the members of class qgd_N_Qubit_Decomposition_adaptive_Wrapper.

Definition at line 2067 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_methods

PyMethodDef qgd_N_Qubit_Decomposition_adaptive_Wrapper_methods[]
static

Structure containing metadata about the methods of class qgd_N_Qubit_Decomposition_adaptive_Wrapper.

Definition at line 2074 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Module

PyModuleDef qgd_N_Qubit_Decomposition_adaptive_Wrapper_Module
static
Initial value:
= {
PyModuleDef_HEAD_INIT,
"qgd_N_Qubit_Decomposition_adaptive_Wrapper",
"Python binding for QGD N_Qubit_Decomposition class",
-1,
}

Structure containing metadata about the module.

Definition at line 2303 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.

◆ qgd_N_Qubit_Decomposition_adaptive_Wrapper_Type

PyTypeObject qgd_N_Qubit_Decomposition_adaptive_Wrapper_Type
static

A structure describing the type of the class qgd_N_Qubit_Decomposition_adaptive_Wrapper.

Definition at line 2231 of file qgd_N_Qubit_Decomposition_adaptive_Wrapper.cpp.