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.5.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.5-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bqa-0.1.5.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.13 Linux/6.14.0-1017-azure

File hashes

Hashes for bqa-0.1.5.tar.gz
Algorithm Hash digest
SHA256 44d26e50338ba5867bc6ebcd97af986d4146ae4630ac6e0c4d469fd62ac38b57
MD5 69162c9fd0e7758aefec24c19a673f40
BLAKE2b-256 389c1ac303c242a3a9389ca3c510a245844827d10c2c745503880b1eae7846f2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bqa-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 57f4ef0e5c0a9b3b22cecb4a7d082e956006ed9c7ee0b625bf3f0aea9fe30c19
MD5 07cb5548454a26cdf665a52bc1709663
BLAKE2b-256 8d9c8c3792ea7f1b253662e49e1077645c242b559651b38fe212147f65846bc2

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