Skip to main content

Qu & Co Chemistry

Qu & Co Quantum Code - Chemistry

The Qu & Co Chemistry package is an open source library (licensed under Apache 2) for compiling and running quantum chemistry algorithms on Rigetti’s Forest quantum computing platform.

Installation

To start using Qu & Co Chemistry library, you need to first install the Rigetti’s Forest SDK which contains both the Quantum Virtual Machine and the Rigetti’s quantum compiler.

You can install the library in two different ways.

From PyPi or conda

Using pip install the latest version from PyPi within a virtual environment:

python -m pip install qucochemistry

Alternatively, the library can be installed within a conda environment:

conda install -c quco qucochemistry

From source

Using pip, install the library within a virtual environment:

python -m pip install -r deploy/requirements.txt
python -m pip install -e .

Alternatively, install within a Conda environment using the provided environment:

conda env create -n <env_name> -f deploy/environment.yml
conda activate <env_name>
python -m pip install -e .

Usage

In 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’s Forest SDK is correctly installed, you can start them in the background with the following commands:

screen -dm -S qvm qvm -S
screen -dm -S quilc quilc -S

On Windows just execute qvm -S and quilc -S commands in two separate cmd terminals.

For more details on how to use the library, several tutorials on Jupyter notebook are available here. To be able run end-to-end programs, you should install PySCF and OpenFermion-PySCF as additional dependencies with pip:

python -m pip install openfermionpyscf pyscf

If 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.

Development

The unit tests are built using the pytest framework. In order to run them, install the qucochemistry package using the previous instruction and add the following dependencies:

# for Conda environment
conda install pytest pytest-cov
# for standard virtual environment
python -m pip install pytest pytest-cov

The tests can be executed in the root project directory as follows:

pytest -v --cov=qucochemistry

An 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 browser

pytest -v --cov=qucochemistry --cov-report html
firefox htmlcov/index.html

How to contribute

We’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. Consult GitHub Help for 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 follow PEP 8 and use the corresponding linter to check for it. Code should always come with documentation.

Authors

Vincent Elfving (Qu & Co B.V.)

We are happy to include future contributors as authors on later Qu & Co Chemistry releases.

Disclaimer

Copyright 2019

Metadata

Release files for qucochemistry 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qucochemistry 0.1
File Size Uploaded
qucochemistry-0.1.tar.gz 20.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qucochemistry 0.1
File Interpreter ABI Platform
qucochemistry-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 45.1 kB

Release files / qucochemistry-0.1.tar.gz

Download URL qucochemistry-0.1.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
614688a48e4fb294243362bc26f84b794ec6089e18de8d0721b1aa173af76a88
BLAKE2b-256 checksum
How to use checksums
d2203751875070b00ab43bcd41130ddc4579b99311ab1bcc805a11897706e4ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / qucochemistry-0.1-py3-none-any.whl

Download URL qucochemistry-0.1-py3-none-any.whl
Size 24.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1cdd3b402e5a0f9e246032f1f39749ab6869a48a9ca1bccf549344b628e92fdc
BLAKE2b-256 checksum
How to use checksums
0b51d4e543496d75fa3f90648bd29d5ea7684c4b07779e82d9b55232f72f81eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page