Global Namespace

Overview

Detailed Documentation

Global Variables

Square root of two

Global Functions

Unsigned integer to binary string.

Parameters:

const

UnsignedIntegralType & number

int

binary string length

Returns:

std::string unsigned integer string

Unsigned integer to binary string.

Parameters:

const

UnsignedIntegralType & number

Returns:

std::string unsigned integer string

Get quantum state dec index in pmeasure.

Parameters:

const

UnsignedIntegralType & num1

const

UnsignedIntegralType & num2

std::vector<size_t>

qvec

size_t

binary string length

Returns:

Unsigned Integral Type

Initialize the quantum chemistry calculation.

Parameters:

std::string

The dir of the psi4 chemistry calculation package

Returns:

ChemiQ* a ChemiQ object ptr

Finalize the quantum chemistry calculation.

Parameters:

ChemiQ*

the ChemiQ object ptr will be finalized

Set the molecular model to calculate.

Parameters:

ChemiQ*

the target ChemiQ object ptr

std::string

molecule model

Set the molecular model to calculate.

Parameters:

ChemiQ*

the target ChemiQ object ptr

char*

the molecules ptr

Set the multiplicity of the molecular model.

Parameters:

ChemiQ*

the target ChemiQ object ptr

int

multiplicity

Set the charge of the molecular model.

Parameters:

ChemiQ*

the target ChemiQ object ptr

int

charge

Set the calculation basis.

Parameters:

ChemiQ*

the target ChemiQ object ptr

std::string

basis

Set Eq Tolerance.

Parameters:

ChemiQ*

the target ChemiQ object ptr

double

EqTolerance value

Set the transform type from Fermion operator to Pauli operator.

Parameters:

ChemiQ*

the target ChemiQ object ptr

int

transform type

See also:

QPanda::TransFormType

Set the ucc type to contruct the Fermion operator.

Parameters:

ChemiQ*

the target ChemiQ object ptr

int

ucc type

See also:

QPanda::UccType

Set the optimizer type.

Parameters:

ChemiQ*

the target ChemiQ object ptr

int

optimizer type

See also:

QPanda::OptimizerType

Set the optimizer iteration number.

Parameters:

ChemiQ*

the target ChemiQ object ptr

size_t

iteration number

Set the optimizer function callback number.

Parameters:

ChemiQ*

the target ChemiQ object ptr

size_t

function callback number

Set the optimizer iteration number.

Parameters:

ChemiQ*

the target ChemiQ object ptr

size_t

iteration number

Set the optimizer fatol.It is the Absolute error in func(xopt) between iterations that is acceptable for convergence.

Parameters:

ChemiQ*

the target ChemiQ object ptr

double

absolute error between func(xopt)

Set the learing rate when using Gradient optimizer.

Parameters:

ChemiQ*

the target ChemiQ object ptr

double

learing rate

Set the evolution time when doing hamiltonian simulation.

Parameters:

ChemiQ*

the target ChemiQ object ptr

double

evolution time

Set the hamiltonian simulation slices (e^iAt/n*e^iBt/n)^n, n is the slices.

Parameters:

ChemiQ*

the target ChemiQ object ptr

double

hamiltonian simulation slices

Set the directory to save the calculated data. If it's a not exist dir data will not be saved.

Parameters:

ChemiQ*

the target ChemiQ object ptr

std::string

dir

get qubits num with the above config.

Parameters:

ChemiQ*

the target ChemiQ object ptr

Returns:

int -1:means failed.

exec molecule calculate.

Parameters:

ChemiQ*

the target ChemiQ object ptr

Returns:

bool true:success; false:failed

get last error.

Parameters:

ChemiQ*

the target ChemiQ object ptr

Returns:

char* last error

Macros

QPanda2 cout error message.

output the error string to standard error and throw a standard exception. A standard exception can be of the following types: runtime_error, invalid_argument, range_error, etc