Skip to main content

A framework for tensor-network–based quantum annealing simulation powered by belief propagation.

Project description

What is it?

This package provides large-scale tensor-network-based emulator of quantum annealing, powered by belief-propagation-based inference. This implementation introduces a compilation step that classifies graph nodes by degree, groups the corresponding tensors into batched representations, groups the associated messages, enabling massively parallel belief propagation and related subroutines easelly deployable on a GPU. This design enables scaling to 100,000 qubits and beyond for a range of nontrivial problem instances.

How to use it?

There is a wiki page with the documentation.

How to install?

  1. Clone this repo;
  2. Run poetry install from the root of the clonned repo.

To validate the computation results, some examples and tests rely on an exact quantum circuit simulator available at https://github.com/LuchnikovI/qem. To install it, follow the steps below:

  1. Clone the repo https://github.com/LuchnikovI/qem;
  2. Install rust (see https://rust-lang.org/tools/install/);
  3. Install maturin by running pip install maturin .;
  4. Run pip install . from the clonned repo under your python environment.

How to run benchmarks against MQLib?

First, one need to install an MQLib wrapper awailable here, follow the instruction of README there. Now one can execute scripts in ./benchmarks_against_mqlib, every script saves a result into a separate directory with time stamp.

NumPy backend

To run quantum annealing emulation using numpy backend, one does not need any extra configuration steps. One can control the precision of the numpy backend by setting the environment variable export BQA_PECISION=single for the single precision and export BQA_PRECISION=double for the double precision.

CuPy backend

To use cupy backend one needs to install cupy sepraratelly since it is not in the dependancies list. One also need cuTENSOR to enable fast tensor contraction. The precision of the cupy backend is always single.

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

bqa-0.1.6.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

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

bqa-0.1.6-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file bqa-0.1.6.tar.gz.

File metadata

  • Download URL: bqa-0.1.6.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.12.13 Linux/6.17.0-1010-azure

File hashes

Hashes for bqa-0.1.6.tar.gz
Algorithm Hash digest
SHA256 e52acd8d54c6acaa2c57e69faacd2e17943aba7f9d986fafe5b0d50eefc4ce57
MD5 e615266d897747ca54f6a74b1f4cfd7e
BLAKE2b-256 697dacdf4c75a44c279d75a4d9150d59f20b68e50fba5632cd109273970c63d6

See more details on using hashes here.

File details

Details for the file bqa-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: bqa-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.12.13 Linux/6.17.0-1010-azure

File hashes

Hashes for bqa-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0c498919aad73f41ebfa40011b3c51e4cbc218cf5a097d3e29a8b37fae34d09a
MD5 6c286806322cd48cf6276c849dd065b0
BLAKE2b-256 b874499c25f127e174ae621b4ad0126318090b41738b5e3a643fbc7e73dc8f05

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