Skip to main content

Open source library for continuous-variable quantum computation

Project description

Travis Codecov coverage Codacy grade Read the Docs PyPI PyPI - License PyPI - Python Version

Strawberry Fields is a full-stack Python library for designing, simulating, and optimizing continuous variable (CV) quantum optical circuits.

Features

doc/_static/sfcomponents.svg
  • An open-source software architecture for photonic quantum computing

  • A full-stack quantum software platform, implemented in Python specifically targeted to the CV model

  • Quantum circuits are written using the easy-to-use and intuitive Blackbird quantum programming language

  • Includes a suite of CV quantum computer simulators implemented using NumPy and Tensorflow - these built-in quantum compiler tools convert and optimize Blackbird code for classical simulation

  • Future releases will aim to target experimental backends, including photonic quantum computing chips

Dependencies

Strawberry Fields depends on the following Python packages:

These can be installed using pip, or, if on linux, using your package manager (i.e. apt if on a Debian-based system.)

Installation

Installation of Strawberry Fields, as well as all required Python packages mentioned above, can be done using pip:

$ python -m pip install strawberryfields

Software tests

To ensure that Strawberry Fields is working correctly after installation, the test suite can be run by navigating to the source code folder and running

make test

Note that this runs all of the tests, using all available backends, so can be quite slow (it should take around 40 minutes to complete). Alternatively, you can run the full test suite for a particular backend by running

make test-[backend]

where [backend] should be replaced with the backend you would like to test (fock, tf, or guassian).

Individual test modules are run using

python3 tests/test_gate.py --backend=[backend]

Documentation

The Strawberry Fields documentation is built automatically and hosted at Read the Docs.

To build the documentation locally, the following additional packages are required:

If using Ubuntu, they can be installed via a combination of apt and pip:

$ sudo apt install graphviz
$ pip3 install sphinx --user
$ pip3 install sphinxcontrib-bibtex --user

To build the HTML documentation, go to the top-level directory and run the command

$ make docs

The documentation can then be found in the doc/_build/html/ directory.

Support

If you are having issues, please let us know by posting the issue on our Github issue tracker.

License

Strawberry Fields is free and open source, released under the Apache License, Version 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

StrawberryFields-0.7.1.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

StrawberryFields-0.7.1-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file StrawberryFields-0.7.1.tar.gz.

File metadata

File hashes

Hashes for StrawberryFields-0.7.1.tar.gz
Algorithm Hash digest
SHA256 70e9b5dad2e449a347d4be5ef6189d520403573df30afd7c868e8e6d4e31f9f0
MD5 3ba37b6cab04c0b1b38abd70baf512cf
BLAKE2b-256 a81e3dee90e21efc110560eb9ddb89b0d3af796113e9608c3af72626080330af

See more details on using hashes here.

File details

Details for the file StrawberryFields-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for StrawberryFields-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 01eeea7dda1c7a417983978f434e68938d197b68727bf78b2d98f8e090507484
MD5 dcbc168ff7d138f3b97a917466511d4e
BLAKE2b-256 212f49fd68f1fb80a6ebb792c9b718b4678eba172b3f1b90706189b08e5d8df9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page