Skip to main content

A Python package for quantum simulation with analog compilation

Project description

SimuQ

Latest Version Supported Python Versions

SimuQ is a domain-specific language for quantum simulation with analog compilation.

Our project website includes use cases and documentation of SimuQ.

We illustrate our design and benefits in our arXiv paper.

Installation

We recommend Python 3.9 or greater since many optional dependencies have a minimum Python version requirement.

We encourage using pip for SimuQ installation. To install the core components of SimuQ, run the following command in shell:

pip install simuq

Multiple platforms are supported by SimuQ through different APIs and you may optionally install them based on your needs. You may install all optional dependencies, though not recommended, by

pip install "simuq[all]"

Amazon Braket

SimuQ supports compilation to IonQ's trapped-ion devices and QuEra's neutral atom devices through Amazon Braket. Install the Amazon Braket provider and its dependencies by running

pip install "simuq[braket]"

If running on QPUs, make sure that your AWS account is onboarded to Amazon Braket, as per the instructions here (this isn't necessary for running on the local simulator).

IonQ Quantum Cloud

SimuQ supports compilation to IonQ's trapped-ion devices through IonQ Quantum Cloud. Install the IonQ provider and its dependencies by running

pip install "simuq[ionq]"

To run through IonQ Quantum Cloud, you must obtain an API key from IonQ. When creating IonQ providers in SimuQ, you must provide the API key either through a string or a file storing the key.

Qiskit

SimuQ supports compilation to IBM's superconducting devices through Qiskit and IBM Quantum. Install the Qiskit provider and its dependencies by running

pip install "simuq[qiskit]"

To run through IBM Quantum, you must obtain an API token from IBM.

QuTiP

You can simulate the dynamics of a SimuQ Hamiltonian with QuTiP. Install the QuTiP provider and its dependencies by running

pip install "simuq[qutip]"

Installing from source

You can also install from source by cloning this repository and running a pip install command in the root directory of the repository:

git clone git@github.com:PicksPeng/SimuQ.git
cd SimuQ
pip install .

If installing extras, remember to include quotes around the target (for example, pip install ".[dev]"). To install in editable mode, run pip install with the -e flag: pip install -e ".[dev]".

Examples

For examples of SimuQ usage, refer to the notebooks in the tutorials folder.

Project Structure

notebooks/: Example notebooks of running SimuQ and obtaining results.

notebooks/tutorials: Tutorial notebooks on usage of SimuQ.

notebooks/artifact_evaluation: AE notebooks to reproduce the data in our paper.

src/simuq/: The core compiler and language implementation of SimuQ.

src/simuq/aais/: AAIS of many backends in AAIS Specification Language.

src/simuq/backends/: The translation to API languages of different machine backends.

src/simuq/systems/: Hamiltonian systems implemented in Hamiltonian Modeling Language.

src/simuq/systems/benchmark/: A small benchmark of quantum Hamiltonian simulation as reported in our paper.

Citations

If you use SimuQ in your work, please cite our paper.

@article{peng2023simuq,
  title    = {SimuQ: A Domain-Specific Language For Quantum Simulation With Analog Compilation},
  author   = {Peng, Yuxiang and Young, Jacob and Liu, Pengyu and Wu, Xiaodi},
  journal  = {arXiv preprint arXiv:2303.02775},
  year     = {2023}
}

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

simuq-0.2.3.tar.gz (56.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simuq-0.2.3-py3-none-any.whl (84.4 kB view details)

Uploaded Python 3

File details

Details for the file simuq-0.2.3.tar.gz.

File metadata

  • Download URL: simuq-0.2.3.tar.gz
  • Upload date:
  • Size: 56.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for simuq-0.2.3.tar.gz
Algorithm Hash digest
SHA256 01038438633374a4c3e46fb9b7e4fa27e80c540ae7dd3e4dd0fa86b507a01582
MD5 631142c21bae204190ab369497629f35
BLAKE2b-256 d5e575c72bc07fbd18fb118c1bfbe407f72c8cf6871725cebf81b2e743598000

See more details on using hashes here.

File details

Details for the file simuq-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: simuq-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 84.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for simuq-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7935428ae0840d2bcb342edcea880f22e539dd2be7410cf5360e4e8393fc94ba
MD5 500146a06747d9188c941114c5985f81
BLAKE2b-256 fc9f5fadd820d43eeb1adc3049bc317cefe00763f498c447a8378781d2765a11

See more details on using hashes here.

Supported by

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