24 #ifndef VARIATIONAL_QUANTUM_EIGENSOLVER_BASE_H 25 #define VARIATIONAL_QUANTUM_EIGENSOLVER_BASE_H void set_gate_structure(std::string filename)
Call to set custom layers to the gate structure that are intended to be used in the VQE process...
ansatz_type ansatz
Ansatz type (HEA stands for hardware efficient ansatz)
Variational_Quantum_Eigensolver_Base()
Nullary constructor of the class.
Class to store data of complex arrays and its properties.
virtual void optimization_problem_combined(Matrix_real parameters, double *f0, Matrix_real grad) override
Call to calculate both the cost function and the its gradient components.
Matrix initial_state
Quantum state used as an initial state in the VQE iterations.
virtual double optimization_problem_non_static(Matrix_real parameters, void *void_instance) override
The optimization problem of the final optimization.
void generate_circuit(int layers, int inner_blocks)
Call to generate the circuit ansatz.
static void optimization_problem_grad_vqe(Matrix_real parameters, void *void_instance, Matrix_real &grad)
Calculate the derivative of the cost function with respect to the free parameters.
int accelerator_num
number of utilized accelerators
void start_optimization()
Call to start solving the VQE problem to get the approximation for the ground state.
ansatz_type
Type definition of the fifferent types of ansatz.
A base class to determine the decomposition of an N-qubit unitary into a sequence of CNOT and U3 gate...
QGD_Complex16 Expectation_value_of_energy(Matrix &State_left, Matrix &State_right)
Call to evaluate the expectation value of the energy <State_left| H | State_right>.
virtual void optimization_problem_combined_non_static(Matrix_real parameters, void *void_instance, double *f0, Matrix_real &grad) override
Call to calculate both the cost function and the its gradient components.
Structure type representing complex numbers in the SQUANDER package.
void set_initial_state(Matrix initial_state_in)
Call to set the initial quantum state in the VQE iterations.
A base class to solve VQE problems This class can be used to approximate the ground state of the inpu...
void set_ansatz(ansatz_type ansatz_in)
Call to set the ansatz type.
Class to store data of complex arrays and its properties.
Matrix_sparse Hamiltonian
The Hamiltonian of the system.
double Expectation_value_of_energy_real(Matrix &State_left, Matrix &State_right)
Call to evaluate the expectation value of the energy <State_left| H | State_right>.
void initialize_zero_state()
Initialize the state used in the quantun circuit.
Class to store data of complex arrays and its properties.
virtual ~Variational_Quantum_Eigensolver_Base()
Destructor of the class.
virtual double optimization_problem(Matrix_real ¶meters) override
The optimization problem of the final optimization.