Package: qucochemistry
TheQu & Co Chemistrypackage is an open source library (licensed under Apache 2) for compiling and running quantum chemistry algorithms on Rigetti’s Forest quantum computing platform.InstallationTo start using Qu & Co Chemistry library, you need to first install the Rigetti’sForest SDKwhich contains both the Quantum Virtual Machine and the Rigetti’s quantum compiler.You can install the library in two different ways.From PyPi or condaUsing pip install the latest version from PyPi within a virtual environment:python-mpipinstallqucochemistryAlternatively, the library can be installed within a conda environment:condainstall-cqucoqucochemistryFrom sourceUsing pip, install the library within a virtual environment:python-mpipinstall-rdeploy/requirements.txtpython-mpipinstall-e.Alternatively, install within a Conda environment using the provided environment:condaenvcreate-n<env_name>-fdeploy/environment.ymlcondaactivate<env_name>python-mpipinstall-e.UsageIn order to use this library within your program, Rigetti’s quantum virtual machine and quantum compilers must be running in the background.
If you run on Linux or OSX and the Rigetti’sForest SDKis correctly installed, you can start them in the
background with the following commands:screen-dm-Sqvmqvm-Sscreen-dm-Squilcquilc-SOn Windows just executeqvm -Sandquilc -Scommands in two separate cmd terminals.For more details on how to use the library, several tutorials on Jupyter notebook are availablehere.
To be able run end-to-end programs, you should install PySCF and OpenFermion-PySCF as additional dependencies with pip:python-mpipinstallopenfermionpyscfpyscfIf you created the Conda environment as described in the previous section, you should be able to install these dependencies within
the environment with the same command.With Docker containerThe library can also be used in Jupyter notebooks hosted within a Docker container. You should have bothdockeranddocker-composeinstalled in your system.To setup the Docker environment in the project root directory run:docker-composeup-dNow you can access a Jupyter notebook in your browser athttp://127.0.0.1:8888with Qu&Co Chemistry library available. Navigate to theexamples/folder to run the tutorial notebooks.DevelopmentThe unit tests are built using thepytestframework. In order to run them, install the qucochemistry package using the previous instruction
and add the following dependencies:# for Conda environmentcondainstallpytestpytest-cov# for standard virtual environmentpython-mpipinstallpytestpytest-covThe tests can be executed in the root project directory as follows:pytest-v--cov=qucochemistryAn automatic code coverage report will be generated after running the above command. In order to visualize
the details of the code coverage for each module, an HTML report can be generated and rendered with your favorite
browserpytest-v--cov=qucochemistry--cov-reporthtmlfirefoxhtmlcov/index.htmlHow to contributeWe’d love to accept your contributions and patches to Qu & Co Chemistry.
There are a few guidelines you need to follow.
Contributions to Qu & Co Chemistry must be accompanied by a Contributor License Agreement.
You (or your employer) retain the copyright to your contribution,
this simply gives us permission to use and redistribute your contributions as part of the project.All submissions, including submissions by project members, require review.
We use GitHub pull requests for this purpose. ConsultGitHub Helpfor
more information on using pull requests.
Furthermore, please make sure your new code comes with extensive tests!
We use automatic testing to make sure all pull requests pass tests and do not
decrease overall test coverage by too much. Make sure you adhere to our style
guide. Just have a look at our code for clues. We mostly followPEP 8and use
the correspondinglinterto check for it.
Code should always come with documentation.AuthorsVincent Elfving(Qu & Co B.V.)We are happy to include future contributors as authors on later Qu & Co Chemistry releases.DisclaimerCopyright 2019