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 up to 1,000,000 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 env activate && 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.2.0.tar.gz (27.2 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.2.0-py3-none-any.whl (32.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bqa-0.2.0.tar.gz
Algorithm Hash digest
SHA256 55cdbc9931948bdeeade0d9108772a712dccc1184b1d8f57b6c0487f81fb1a68
MD5 43b083a985ae68f7a5d518fb24f961c7
BLAKE2b-256 9ccae24e91edd2751e38e14fd21d71e003b8aa05390953ab7eb9f4a2956902c2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bqa-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30f2187863877a9912f75d6844899b604acc9dc8dfaa02ad7b28229a876544b5
MD5 68671f567262340057a3bc87ed3e30d6
BLAKE2b-256 913843bd29494aa3558f7e7958fd068079662fcd6d7622e3ad2552041ea97b01

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