23 #ifndef SUB_MATRIX_DECOMPOSITION_H 24 #define SUB_MATRIX_DECOMPOSITION_H 179 #endif //SUB_MATRIX_DECOMPOSITION bool optimize_layer_num
logical value. Set true to optimize the minimum number of gate layers required in the decomposition...
Sub_Matrix_Decomposition()
Nullary constructor of the class.
static void optimization_problem_grad(Matrix_real parameters, void *void_instance, Matrix_real &grad)
Calculate the approximate derivative (f-f0)/(x-x0) of the cost function with respect to the free para...
void set_custom_gate_layers(Gates_block *block_in)
Call to set custom layers to the gate structure that are intended to be used in the subdecomposition...
Gates_block * unit_gate_structure
Custom gate structure describing the gate structure used in the decomposition. The gate structure is ...
void disentangle_submatrices()
Start the optimization process to disentangle the most significant qubit from the others...
long long max_inner_iterations
maximal number of inner iterations
std::map< int, int > identical_blocks
A map of <int n: int num> indicating that how many identical succesive blocks should be used in the d...
int set_identical_blocks(int qbit, int identical_blocks_in)
Set the number of identical successive blocks during the subdecomposition of the qbit-th qubit...
bool subdisentaglement_done
logical value indicating whether the disentamglement of a qubit from the othetrs was done or not ...
virtual void add_gate_layers()
Call to add further layer to the gate structure used in the subdecomposition.
Sub_Matrix_Decomposition * clone()
Call to create a clone of the present class.
~Sub_Matrix_Decomposition()
Destructor of the class.
void add_default_gate_layers()
Call to add default gate layers to the gate structure used in the subdecomposition.
A class containing basic methods for the decomposition process.
Class to store data of complex arrays and its properties.
Header file for a class containing basic methods for the decomposition process.
A class responsible for grouping two-qubit (CNOT,CZ,CH) and one-qubit gates into layers.
Matrix subdecomposed_mtx
The subdecomposed matrix.
guess_type
Type definition of the types of the initial guess.
static void optimization_problem_combined(Matrix_real parameters, void *void_instance, double *f0, Matrix_real &grad)
Call to calculate both the cost function and the its gradient components.
double optimization_problem(double *parameters)
The optimization problem of the final optimization.
A class responsible for the disentanglement of one qubit from the others.
Class to store data of complex arrays and its properties.
void solve_layer_optimization_problem(int num_of_parameters, Matrix_real solution_guess_gsl)
Call to solve layer by layer the optimization problem.