Skip to main content

Logical Qubit Simulator (LoQS)

Project description

LoQS v1.1

tests coverage

The Logical Qubit Simulator (LoQS) is designed to simulate a few logical qubits with arbitrary noise models and arbitrary quantum and classical operations.

Installation

The following installation instructions can be used on M1/M2 Macs using Anaconda/Miniconda to create a local virtual environment.

conda create -n loqs-env python=3.14
conda activate loqs-env
pip install loqs
# pip install -e . ## for "editable" cloned repo install

There are various optional requirements that are available, including:

  • dask: Enables usage of Dask for parallelizing over shots.
  • dev: Allows the use of black and flake8 prior to committing (see Code Formatting and Linting below).
  • docs: Allows building of the documentation (see Documentation below).
  • quantumsim: Enables the QuantumSim (state) backend.
  • pygsti: Enables the PyGSTi (circuit, model, state) backend.
  • pymatching: Enables the PyMatching (minimum-weight perfect matching) decoder for certain codepacks.
  • stim: Enables the STIM (state) backend.
  • test: Allows testing (see Testing below)
  • visualization: Enables some of the visualization tools in loqs.tools. Note that pdflatex is also required for full visualization support.

There are several helper "categories" for optional dependencies, including:

  • backends: Packages needed to enable all backends
  • nobackends: The complement of backends, i.e. all developer packages with no backends (useful for testing)
  • all: All optional dependencies

To use these, simply modify the last line of the installation instructions. For example:

pip install -e ".[all]"

(where the quotes are only needed if using zsh instead of bash).

For developers who may want an editable version of pyGSTi, you can run:

pip install -e git+https://github.com/sandialabs/pyGSTi.git@v0.9.14#egg=pyGSTi

to get the 0.9.14 release of pyGSTi, which will be located in src. Alternatively, you can use any other tag or commit hash instead of v0.9.14 if you are working off of a feature branch.

Documentation

This project uses MkDocs and Jupytext-compatible Markdown notebooks under docs/notebooks/ for its documentation and interactive tutorials. In order to build or preview the documentation locally, do at least an installation of loqs[docs].

Local Building & Preview

To build and serve the documentation locally, run:

python docs/serve.py

This will launch a local server typically accessible at http://127.0.0.1:8000/.

More details on the documentation structure and Jupytext workflow are available in docs/DOCS_README.

Interactive Cloud Notebooks (Binder)

The tutorials and examples are configured to be run interactively in the cloud using Binder! You can open any of the tutorial or example notebooks directly in your browser by clicking the "Launch Binder" badges on the generated documentation pages.

Note that the first launch may take up to 5-10 minutes to build the Binder environment.

Contributing Interactive Notebooks

The easiest way to modify and add interactive notebooks is to use Jupytext.

  1. Navigate to docs/notebooks, where all interactive notebooks are kept as Markdown for easy source control.
  2. Generate the corresponding Jupyter notebook via jupytext --to ipynb <target_to_edit>.md
  3. Edit the notebooks, e.g. jupyter lab to start a server, edit, and save.
  4. Sync them back to Markdown via jupytext --to myst <target_to_edit>.md
  5. Commit your changes!

Project details


Release history Release notifications | RSS feed

This version

1.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

loqs-1.1.tar.gz (178.4 kB view details)

Uploaded Source

Built Distribution

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

loqs-1.1-py3-none-any.whl (221.2 kB view details)

Uploaded Python 3

File details

Details for the file loqs-1.1.tar.gz.

File metadata

  • Download URL: loqs-1.1.tar.gz
  • Upload date:
  • Size: 178.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for loqs-1.1.tar.gz
Algorithm Hash digest
SHA256 4103a88286b49ffca86b19a2c04a309f1fab0730a0e9fad3c25a50b715976d8c
MD5 789b9bea2168e9a2958d833678f19c31
BLAKE2b-256 27bf7d016e513c87ffbb47bfcc6ffc3bbd631a706d19828cda53ab7814f4be42

See more details on using hashes here.

Provenance

The following attestation bundles were made for loqs-1.1.tar.gz:

Publisher: publish.yml on sandialabs/LoQS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file loqs-1.1-py3-none-any.whl.

File metadata

  • Download URL: loqs-1.1-py3-none-any.whl
  • Upload date:
  • Size: 221.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for loqs-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 44fe71151c90a6744b8c84db25add6be56676cab74f605ba76602ea02a3d74a5
MD5 8435eba3e71f01233307856c6937ca5f
BLAKE2b-256 680981c5b6da54ad4b3956623f98fdd7069afbcebcf25c1c149b4dbd0c1480d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for loqs-1.1-py3-none-any.whl:

Publisher: publish.yml on sandialabs/LoQS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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