Qu & Co quantum-code-chemistry is an end-to-end stack which compiles and executes quantum chemistry algorithms for NISQ devices. It takes classical chemistry-package ab-initio calculations to build problem-specifically motivated ansatzes to start a variational algorithm, which finds the groundstate energy of the problem. The package is highly customizable and can be executed on a wide range of simulation backend types, in addition to being able to run on Rigetti’s Forest backend through their cloud-based quantum-processing-unit. Users may configure their own circuits or use built-in functionality based on popular quantum computational chemistry algorithms. We gladly invite users to contribute to this project.
Install (requires Python 3.6+)
$ pip install qucochemistry
Example (requires OpenFermion)
from qucochemistry.vqe import VQEexperiment from openfermion.hamiltonians import MolecularData filename = 'molecules/H2_pyscf_equi.hdf5' molecule = MolecularData(filename=filename) vqe = VQEexperiment(molecule=molecule) E = vqe.get_exact_gs() vqe.start_vqe() result = vqe.get_results() print('Difference between VQE optimized and exact GS energy:')
(result.fun-E)/0.0016) + 'kcal/mol')