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.2.tar.gz (55.7 kB view details)

Uploaded Source

Built Distribution

simuq-0.2.2-py3-none-any.whl (83.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simuq-0.2.2.tar.gz
  • Upload date:
  • Size: 55.7 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.2.tar.gz
Algorithm Hash digest
SHA256 402f173da2f3a061d89bdbbef9977fa8fb4b980f89c448b3301f9659f7ec1891
MD5 656d57918249c01147a46604c7d9382f
BLAKE2b-256 1c5d55ce5b65e93441fca93d43702fdcaa4128383a3c9c6a4b3af8d277da5002

See more details on using hashes here.

File details

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

File metadata

  • Download URL: simuq-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 83.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7959ee49c0d82f5223bc51460a439243d22e85bde71b4bf90f4043379db11234
MD5 d0a343c93e58b19906d508ec3b653bd9
BLAKE2b-256 2a9fe8b2c080d12ccf69cb81feac46815f1ca145c12cac47ad359d9438c70742

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