Struct Params

Struct Documentation

struct Params

Data container for VQE optimizer problems. Everything is constant, except theta and value which should be updated during iterations.

Public Members

std::shared_ptr<xacc::CompositeInstruction> ansatz = {}
std::string circuitString = {}
std::string pauliString = {}
std::string acceleratorName = {"qpp"}
std::string algorithm = {"cobyla"}

algorithm : sets the classical optimisation algorithm, e.g “nelder-mead”, “cobyla”, “l-bfgs”

std::string extraOptions = {}

extraOptions : YAML format for options to use with the classical optimiser

double tolerance = {1E-6}
double optimalValue = {}
std::vector<double> energies = {}
std::vector<double> theta = {}
std::vector<vqe_iteration_data> iterationData = {}

iterationData : a structure for per-iteration energy and theta

int nQubits = {1}
int nShots = {1}
int maxIters = {50}
int nWorker = {1}
int nThreadsPerWorker = {1}
bool isDeterministic = {true}
bool partitioned = {false}
bool enableVis = {false}

enableVis : when set to true, the vis member will be filled with ASCII bar graphs. These provide a visual cue of the VQE convergence from a text-only interface.

bool showTheta = {false}

showTheta : when set to true, selected elements of theta are added to the visualisation

size_t limitThetaN = {0}

limitThetaN : limit to this number of elements of theta to visualise. 0 => no limit

size_t tail = {0}

tail : visualise the last n=tail iterations only

bool plain = {false}

plain : when set to true, no colour codes are output in vis

bool blocked = {false}

blocked : when set to true, all elements in any given iteration are visualised in a single block.

std::string vis = {}

vis : a visualisation of energy and each element of theta, at selected iterations of VQE.