Quantum Gate Decomposer  v1.3
Powerful decomposition of almost any unitary into U3 and CNOT gates
List of all members | Public Member Functions | Protected Attributes
functor_cost_fnc Class Reference

Function operator class to calculate the partial cost function of the final optimization process. More...

#include <N_Qubit_Decomposition_Cost_Function.h>

Public Member Functions

 functor_cost_fnc (Matrix matrix_in, tbb::combinable< double > *partial_cost_functions_in)
 Constructor of the class. More...
 
void operator() (tbb::blocked_range< size_t > r) const
 Operator to calculate the partial cost function derived from the row of the matrix labeled by row_idx. More...
 

Protected Attributes

QGD_Complex16data
 Pointer to the data stored in the matrix. More...
 
Matrix matrix
 Array stroing the matrix. More...
 
tbb::combinable< double > * partial_cost_functions
 array storing the partial cost functions More...
 

Detailed Description

Function operator class to calculate the partial cost function of the final optimization process.

Definition at line 42 of file N_Qubit_Decomposition_Cost_Function.h.

Constructor & Destructor Documentation

◆ functor_cost_fnc()

functor_cost_fnc::functor_cost_fnc ( Matrix  matrix_in,
tbb::combinable< double > *  partial_cost_functions_in 
)

Constructor of the class.

Parameters
matrix_inArry containing the input matrix
partial_cost_functions_inPreallocated array storing the calculated partial cost functions.
Returns
Returns with the instance of the class.
Parameters
matrix_inArry containing the input matrix
matrix_size_inThe number rows in the matrix.
partial_cost_functions_inPreallocated array storing the calculated partial cost functions.
partial_cost_fnc_num_inThe number of partial cost function values (equal to the number of distinct submatrix products.)
Returns
Returns with the instance of the class.

Definition at line 71 of file N_Qubit_Decomposition_Cost_Function.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ operator()()

void functor_cost_fnc::operator() ( tbb::blocked_range< size_t r) const

Operator to calculate the partial cost function derived from the row of the matrix labeled by row_idx.

Parameters
rA TBB range labeling the partial cost function to be calculated.

Definition at line 82 of file N_Qubit_Decomposition_Cost_Function.cpp.

Member Data Documentation

◆ data

QGD_Complex16* functor_cost_fnc::data
protected

Pointer to the data stored in the matrix.

Definition at line 49 of file N_Qubit_Decomposition_Cost_Function.h.

◆ matrix

Matrix functor_cost_fnc::matrix
protected

Array stroing the matrix.

Definition at line 47 of file N_Qubit_Decomposition_Cost_Function.h.

◆ partial_cost_functions

tbb::combinable<double>* functor_cost_fnc::partial_cost_functions
protected

array storing the partial cost functions

Definition at line 51 of file N_Qubit_Decomposition_Cost_Function.h.


The documentation for this class was generated from the following files: