Strawberry Fields is a full-stack Python library for designing, simulating, and optimizing continuous variable (CV) quantum optical circuits.
- 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
Strawberry Fields depends on the following Python packages:
- Python >=3.5
- NumPy >=1.13.3
- SciPy >=1.0.0
- NetworkX >=2.0
- Tensorflow >=1.3
These can be installed using pip, or, if on linux, using your package manager (i.e. apt
if on a Debian-based system.)
Installation of Strawberry Fields, as well as all required Python packages mentioned above, can be done using pip:
$ python -m pip install strawberryfields
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 gaussian
).
Individual test modules are run using
python tests/test_gate.py --backend=[backend]
The Strawberry Fields documentation is built automatically and hosted at Read the Docs.
To build the documentation locally, the following additional packages are required:
- Sphinx >=1.5
- graphviz >=2.38
- sphinxcontrib-bibtex >=0.3.6
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.
Nathan Killoran, Josh Izaac, Nicolás Quesada, Ville Bergholm, Matthew Amy, and Christian Weedbrook.
We welcome contributions - simply fork the Strawberry Fields repository, and then make a pull request containing your contribution.
If you are doing research using Strawberry Fields, please cite our whitepaper:
Nathan Killoran, Josh Izaac, Nicolás Quesada, Ville Bergholm, Matthew Amy, and Christian Weedbrook. Strawberry Fields: A Software Platform for Photonic Quantum Computing. arXiv, 2018. arXiv:1804.03159
- Source Code: https://github.com/XanaduAI/strawberryfields
- Issue Tracker: https://github.com/XanaduAI/strawberryfields/issues
If you are having issues, please let us know by posting the issue on our Github issue tracker.
Strawberry Fields is free and open source, released under the Apache License, Version 2.0.