pyquil
pyquil copied to clipboard
Make working with devices a major component of pyQuil
There is much we can do to improve the "device" component of pyQuil. In the README, we write that pyQuil is for:
- Easily generating Quil programs from quantum gates and classical operations
- Compiling and simulating Quil programs using the Quil Compiler (quilc) and the Quantum Virtual Machine (QVM)
- Executing Quil programs on real quantum processors (QPUs) using Quantum Cloud Services (QCS)
In addition, we have added a lot of other functionality to pyQuil that doesn't fall into those 3 buckets. Some of these additional buckets include:
- Generating LaTeX circuits from Quil programs
- Working with Pauli terms and sums
- Python-based quantum simulation tools (as an alternative to using the Lisp QVM)
- Determining expectation values from noisy bitstring outcomes
- Building noise models from benchmarking info and applying them to Quil programs
- Schemas for device topologies, gatesets, and performance specifications
The last bucket, "Schemas for device topologies, gatesets, and performance specifications", is captured nearly entirely in device.py
and is hardly mentioned in the pyQuil docs. A good quantum programming library should make it easy to target a particular device configuration, as this is a critical step in the typical workflow for either running on a real QPU or simulating the operation of a quantum computer. That being said, I think it is time to promote device.py
to its own directory, start adding some helpful tools (beginning with #1025), and give it a section in the docs. It would probably also make sense to pull some of the device-specific logic out of api/_quantum_computer.py
and put it in this new folder.