Quantum Gate Decomposer
v1.3
Powerful decomposition of almost any unitary into U3 and CNOT gates
|
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... | |
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.
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.
submatrices_in | The array of the submatrices. |
prod_cost_functions_in | Preallocated array storing the calculated partial cost functions. |
prod_num_in | The number of partial cost function values (equal to the number of distinct submatrix products.) |
Definition at line 144 of file Sub_Matrix_Decomposition_Cost_Function.cpp.
void functor_submtx_cost_fnc::operator() | ( | int | product_idx | ) | const |
Operator to calculate the partial cost function labeled by product_idx.
product_idx | The index labeling the partial cost function to be calculated. |
Definition at line 155 of file Sub_Matrix_Decomposition_Cost_Function.cpp.
|
protected |
Definition at line 87 of file Sub_Matrix_Decomposition_Cost_Function.h.
|
protected |
number of distinct submatix products
Definition at line 83 of file Sub_Matrix_Decomposition_Cost_Function.h.
|
protected |
container storing the submatrices
Definition at line 85 of file Sub_Matrix_Decomposition_Cost_Function.h.