Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
Powells_method Class Reference

A class implementing the Powells-algorithm as seen in: https://academic.oup.com/comjnl/article-abstract/7/2/155/335330?redirectedFrom=fulltext&login=false. More...

#include <Powells_method.h>

Public Member Functions

 Powells_method (double(*f_pointer)(Matrix_real, void *), void *meta_data_in)
 Constructor of the class. More...
 
double Start_Optimization (Matrix_real &x, long max_iter)
 
 ~Powells_method ()
 Destructor of the class. More...
 

Protected Member Functions

void bracket (double x1, double h, double &a, double &b, Matrix_real x)
 
double direction (double s, Matrix_real x)
 
void search (double a, double b, double &s, double &f_val, double tol, Matrix_real x)
 

Protected Attributes

double(* costfnc )(Matrix_real x, void *params)
 function pointer to evaluate the cost function and its gradient vector More...
 
void * meta_data
 additional data needed to evaluate the cost function More...
 
Matrix_real u
 
Matrix_real v
 
int variable_num
 number of independent variables in the problem More...
 

Detailed Description

A class implementing the Powells-algorithm as seen in: https://academic.oup.com/comjnl/article-abstract/7/2/155/335330?redirectedFrom=fulltext&login=false.

Definition at line 27 of file Powells_method.h.

Constructor & Destructor Documentation

◆ Powells_method()

Powells_method::Powells_method ( double(*)(Matrix_real, void *)  f_pointer,
void *  meta_data_in 
)

Constructor of the class.

Parameters
f_pointerA function pointer (x, meta_data, f, grad) to evaluate the cost function and its gradients. The cost function and the gradient vector are returned via reference by the two last arguments.
meta_datavoid pointer to additional meta data needed to evaluate the cost function.
Returns
An instance of the class

Definition at line 31 of file Powells_method.cpp.

◆ ~Powells_method()

Powells_method::~Powells_method ( )

Destructor of the class.

Definition at line 167 of file Powells_method.cpp.

Member Function Documentation

◆ bracket()

void Powells_method::bracket ( double  x1,
double  h,
double &  a,
double &  b,
Matrix_real  x 
)
protected

Definition at line 47 of file Powells_method.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ direction()

double Powells_method::direction ( double  s,
Matrix_real  x 
)
protected

Definition at line 39 of file Powells_method.cpp.

Here is the caller graph for this function:

◆ search()

void Powells_method::search ( double  a,
double  b,
double &  s,
double &  f_val,
double  tol,
Matrix_real  x 
)
protected

Definition at line 77 of file Powells_method.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Start_Optimization()

double Powells_method::Start_Optimization ( Matrix_real x,
long  max_iter 
)

Definition at line 112 of file Powells_method.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ costfnc

double(* Powells_method::costfnc) (Matrix_real x, void *params)
protected

function pointer to evaluate the cost function and its gradient vector

Definition at line 37 of file Powells_method.h.

◆ meta_data

void* Powells_method::meta_data
protected

additional data needed to evaluate the cost function

Definition at line 40 of file Powells_method.h.

◆ u

Matrix_real Powells_method::u
protected

Definition at line 32 of file Powells_method.h.

◆ v

Matrix_real Powells_method::v
protected

Definition at line 34 of file Powells_method.h.

◆ variable_num

int Powells_method::variable_num
protected

number of independent variables in the problem

Definition at line 30 of file Powells_method.h.


The documentation for this class was generated from the following files: