class QPanda::ChemiQ¶
Overview¶
Detailed Documentation¶
ChemiQ Algorithm class.
Methods¶
Initialize the quantum chemistry calculation.
Parameters:
std::string |
The dir of the psi4 chemistry calculation package |
Finalize the quantum chemistry calculation.
Set the molecular model to calculate separated by commas(’
‘) between atoms.
Parameters:
std::string |
molecule model |
Setup molecular models, separated by semicolons(‘;’) and separated by commas(‘,’) between atoms.
Parameters:
std::string |
molecule model |
Set the molecular model to calculate.
Parameters:
vector_s |
molecule model |
See also:
vector_s
Set the multiplicity of the molecular model.
Parameters:
int |
multiplicity |
Set the charge of the molecular model.
Parameters:
int |
charge |
Set the calculation basis.
Parameters:
std::string |
basis |
set Eq Tolerance
Parameters:
double |
the val of Tolerance |
Set the transform type from Fermion operator to Pauli operator.
Parameters:
TransFormType |
transform type |
See also:
TransFormType
Set the ucc type to contruct the Fermion operator.
Parameters:
UccType |
ucc type |
See also:
UccType
Set the optimizer type.
Parameters:
OptimizerType |
optimizer type |
See also:
OptimizerType
Set the optimizer iteration number.
Parameters:
size_t |
iteration number |
Set the optimizer function callback number.
Parameters:
size_t |
function callback number |
Set the optimizer xatol.It is the Absolute error in xopt between iterations that is acceptable for convergence.
Parameters:
double |
absolute error between iterations |
Set the optimizer fatol.It is the Absolute error in func(xopt) between iterations that is acceptable for convergence.
Parameters:
double |
absolute error between func(xopt) |
Whether to print the optimized log to the terminal.
Parameters:
bool |
enable |
Set the learing rate when using Gradient optimizer.
Parameters:
double |
learing rate |
Set the evolution time when doing hamiltonian simulation.
Parameters:
double |
evolution time |
Set the hamiltonian simulation slices (e^iAt/n*e^iBt/n)^n, n is the slices.
Parameters:
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:
std::string |
dir |
Set the quantum machine type.
Parameters:
QMachineType |
quantum machine type |
See also:
Set random default optimizer paramter.
Parameters:
bool |
enable |
Set the default optimizer paramter by the given paramter.
Parameters:
vecotr_d |
default paramter |
See also:
vector_d
Set to get hamiltonian from file.
Parameters:
bool |
enable |
Set hamiltonian generation only.
Parameters:
bool |
enable |
get qubits num with the above config.
Returns:
int -1:means failed.
exec molecule calculate.
Returns:
bool true:success; false:failed
get last error.
Returns:
std::string last error
get calculated energies of the molecules.
Returns:
vector_d energies