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_submtx_cost_fnc Class Reference

Function operator class to calculate the partial cost function derived from the individual products of the submatrices. More...

#include <Sub_Matrix_Decomposition_Cost_Function.h>

Public Member Functions

 functor_submtx_cost_fnc (std::vector< Matrix, tbb::cache_aligned_allocator< Matrix >> *submatrices_in, tbb::combinable< double > *prod_cost_functions_in, size_t prod_num_in)
 Constructor of the class. More...
 
void operator() (int product_idx) const
 Operator to calculate the partial cost function labeled by product_idx. More...
 

Protected Attributes

tbb::combinable< double > * prod_cost_functions
 
int prod_num
 number of distinct submatix products More...
 
std::vector< Matrix, tbb::cache_aligned_allocator< Matrix > > * submatrices
 container storing the submatrices More...
 

Detailed Description

Function operator class to calculate the partial cost function derived from the individual products of the submatrices.

Definition at line 78 of file Sub_Matrix_Decomposition_Cost_Function.h.

Constructor & Destructor Documentation

◆ functor_submtx_cost_fnc()

functor_submtx_cost_fnc::functor_submtx_cost_fnc ( std::vector< Matrix, tbb::cache_aligned_allocator< Matrix >> *  submatrices_in,
tbb::combinable< double > *  prod_cost_functions_in,
size_t  prod_num_in 
)

Constructor of the class.

Parameters
submatrices_inThe array of the submatrices.
prod_cost_functions_inPreallocated array storing the calculated partial cost functions.
prod_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 144 of file Sub_Matrix_Decomposition_Cost_Function.cpp.

Member Function Documentation

◆ operator()()

void functor_submtx_cost_fnc::operator() ( int  product_idx) const

Operator to calculate the partial cost function labeled by product_idx.

Parameters
product_idxThe index labeling the partial cost function to be calculated.

Definition at line 155 of file Sub_Matrix_Decomposition_Cost_Function.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ prod_cost_functions

tbb::combinable<double>* functor_submtx_cost_fnc::prod_cost_functions
protected

Definition at line 87 of file Sub_Matrix_Decomposition_Cost_Function.h.

◆ prod_num

int functor_submtx_cost_fnc::prod_num
protected

number of distinct submatix products

Definition at line 83 of file Sub_Matrix_Decomposition_Cost_Function.h.

◆ submatrices

std::vector<Matrix, tbb::cache_aligned_allocator<Matrix> >* functor_submtx_cost_fnc::submatrices
protected

container storing the submatrices

Definition at line 85 of file Sub_Matrix_Decomposition_Cost_Function.h.


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