23 #ifndef N_Qubit_Decomposition_Cost_Function_H 24 #define N_Qubit_Decomposition_Cost_Function_H 30 #include <tbb/combinable.h> 137 void operator()( tbb::blocked_range<int> r )
const;
143 const std::vector<int>& A_qubits,
144 double Fnorm,
double tol = 1e-10);
146 const std::vector<int>& A_qubits,
147 double Fnorm,
double tol = 1e-10);
Header file of single-precision complex array storage with automatic and thread safe reference counti...
Class to store single-precision real arrays and properties.
std::vector< std::vector< int > > unique_cuts(int n)
QGD_Complex16 * data
Pointer to the data stored in the matrix.
Matrix_real get_cost_function_with_correction(const Matrix &matrix, int qbit_num, int trace_offset=0)
Call co calculate the cost function of the optimization process, and the first correction to the cost...
Matrix get_deriv_sum_of_squares(Matrix &matrix)
double get_osr_entanglement_test(Matrix &matrix, std::vector< std::vector< int >> &use_cuts, int rank=-1, bool use_softmax=false)
Header file for a class containing basic methods for setting up the verbosity level.
Matrix_real get_cost_function_with_correction2(const Matrix &matrix, int qbit_num, int trace_offset=0)
Call co calculate the cost function of the optimization process, and the first correction to the cost...
A class containing basic methods for setting up the verbosity level.
QGD_Complex16 get_trace(Matrix &matrix)
Call to calculate the real and imaginary parts of the trace.
double get_infidelity(Matrix &matrix)
Call to calculate infidelity.
Function operator class to calculate the partial cost function of the final optimization process...
std::pair< int, double > operator_schmidt_rank(const Matrix &U, int n, const std::vector< int > &A_qubits, double Fnorm, double tol=1e-10)
Matrix matrix
Array stroing the matrix.
Matrix get_deriv_osr_entanglement(Matrix &matrix, std::vector< std::vector< int >> &use_cuts, int rank=-1, bool use_softmax=false)
functor_cost_fnc(Matrix matrix_in, tbb::combinable< double > *partial_cost_functions_in)
Constructor of the class.
double real_trace_conj_dot(Matrix &A, Matrix &B)
void operator()(tbb::blocked_range< int > r) const
Operator to calculate the partial cost function derived from the row of the matrix labeled by row_idx...
Structure type representing complex numbers in the SQUANDER package.
Double-precision complex matrix (float64).
Matrix get_trace_with_correction(Matrix &matrix, int qbit_num)
Call co calculate the Hilbert Schmidt testof the optimization process, and the first correction to th...
double get_cost_function(const Matrix &matrix, int trace_offset=0)
Call co calculate the cost function during the final optimization process.
Single-precision complex matrix (float32).
double get_cost_function_sum_of_squares(Matrix &matrix)
Header file for commonly used functions and wrappers to CBLAS functions.
Matrix get_trace_with_correction2(Matrix &matrix, int qbit_num)
Call co calculate the Hilbert Schmidt testof the optimization process, and the first correction to th...
Class to store data of complex arrays and its properties.
double get_hilbert_schmidt_test(Matrix &matrix)
Call co calculate the cost function of the optimization process according to https://arxiv.org/pdf/2210.09191.pdf.
tbb::combinable< double > * partial_cost_functions
array storing the partial cost functions