46 if (
gates.size() == 0 ) {
51 if (solution_guess.
size() == 0 ) {
62 int iteration_loops_max = 1;
71 std::uniform_real_distribution<> distrib_real(0.0, 2*M_PI);
74 long long max_inner_iterations_loc;
75 if (
config.count(
"max_inner_iterations_bayes_opt") > 0 ) {
76 config[
"max_inner_iterations_bfgs"].get_property( max_inner_iterations_loc );
78 else if (
config.count(
"max_inner_iterations") > 0 ) {
79 config[
"max_inner_iterations"].get_property( max_inner_iterations_loc );
86 int output_periodicity;
87 if (
config.count(
"output_periodicity_cosine") > 0 ) {
89 config[
"output_periodicity_cosine"].get_property( value );
90 output_periodicity = (
int) value;
92 if (
config.count(
"output_periodicity") > 0 ) {
94 config[
"output_periodicity"].get_property( value );
95 output_periodicity = (
int) value;
98 output_periodicity = 0;
105 for (
long long idx=0; idx<iteration_loops_max; idx++) {
117 solution_guess[jdx] = solution_guess[jdx] + distrib_real(
gen);
double current_minimum
The current minimum of the optimization problem.
A class implementing the BayesOpt algorithm as seen in: https://browse.arxiv.org/pdf/1807.02811.pdf.
double optimization_problem(double *parameters)
Evaluate the optimization problem of the optimization.
scalar * get_data() const
Call to get the pointer to the stored data.
double Start_Optimization(Matrix_real &x, int max_iterations_in)
std::vector< Gate * > gates
The list of stored gates.
int size() const
Call to get the number of the allocated elements.
std::map< std::string, Config_Element > config
config metadata utilized during the optimization
Header file for the paralleized calculation of the cost function of the final optimization problem (s...
Header file for DFE support in unitary simulation.
int max_inner_iterations
the maximal number of iterations for which an optimization engine tries to solve the optimization pro...
Matrix_real optimized_parameters_mtx
The optimized parameters for the gates.
Class to store data of complex arrays and its properties.
void solve_layer_optimization_problem_BAYES_OPT(int num_of_parameters, Matrix_real &solution_guess)
Call to solve layer by layer the optimization problem via Bayes algorithm.
std::mt19937 gen
Standard mersenne_twister_engine seeded with rd()