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.

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 evolution implemented in Hamiltonian Modeling Language.

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

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.1.tar.gz (51.7 kB view hashes)

Uploaded Source

Built Distribution

simuq-0.2.1-py3-none-any.whl (79.5 kB view hashes)

Uploaded Python 3

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