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 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_Complex16 * | data |
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... | |
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.
functor_cost_fnc::functor_cost_fnc | ( | Matrix | matrix_in, |
tbb::combinable< double > * | partial_cost_functions_in | ||
) |
Constructor of the class.
matrix_in | Arry containing the input matrix |
partial_cost_functions_in | Preallocated array storing the calculated partial cost functions. |
matrix_in | Arry containing the input matrix |
matrix_size_in | The number rows in the matrix. |
partial_cost_functions_in | Preallocated array storing the calculated partial cost functions. |
partial_cost_fnc_num_in | The number of partial cost function values (equal to the number of distinct submatrix products.) |
Definition at line 71 of file N_Qubit_Decomposition_Cost_Function.cpp.
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.
r | A TBB range labeling the partial cost function to be calculated. |
Definition at line 82 of file N_Qubit_Decomposition_Cost_Function.cpp.
|
protected |
Pointer to the data stored in the matrix.
Definition at line 49 of file N_Qubit_Decomposition_Cost_Function.h.
|
protected |
Array stroing the matrix.
Definition at line 47 of file N_Qubit_Decomposition_Cost_Function.h.
|
protected |
array storing the partial cost functions
Definition at line 51 of file N_Qubit_Decomposition_Cost_Function.h.