Skip to main content

Many-body quantum score.

Project description

MBQS: Many-Body Quantum Score – A scalable benchmark for digital and analog quantum processors

This packages provides a set of tools to compute the Many-Body Quantum Score (MBQS), which is designed to benchmark the performance of quantum processors in simulating many-body quantum systems [arXiv:2601.03461][^1]. The score is obtained by comparing a given metric, called $P_2(L)$, with a threshold $\epsilon$.

The MBQS metric is parametrized by an initial state $\psi$ and computed according to the following protocol:

  1. Setup a spin chain with $L$ spin $\frac{1}{2}$ equally spaced on a $1d$ ring.
  2. Initialize the register with the state $\ket{\psi}$.
  3. Evolve the system (quench) with the Ising Hamiltonian at the critical point $g = 1$ for a duration $t_*(L)$ (“surge time”).
  4. Perform measurements ${ \sigma^z_i }$ and compute the connected 2-point functions:

$$ g^{(2)}\ell(t) := \Braket{\sigma^z_1 \sigma^z\ell}c := \Braket{\sigma^z_1 \sigma^z\ell} - \Braket{\sigma^z_1} \Braket{\sigma^z_\ell}. $$

  1. Compute the metric (average relative error with respect to the theoretical values in Ising model):

$$ P_2(L) := \frac{1}{\lfloor L/2 \rfloor - 1} \sum_{\ell = 2}^{\lfloor L/2 \rfloor} \left| \frac{g^{(2) \text{th}}{\ell}(t\ast) - g^{(2) \text{exp}}{\ell}(t\ast)}{g^{(2) \text{th}}{\ell}(t\ast)} \right|. $$

The MBQS score S with the initial state $\psi$ corresponds to the largest problem size $L$ reached before failing the test with a threshold $\epsilon$, but excluding system sizes below some cut-off:

$$ S = L \quad \Longrightarrow \quad \forall L' \le L: \quad P_2(L') \le \epsilon. $$

In this package, we provide the evaluation for the folloling initial states:

  • $\ket{+ \cdots +}$
  • $\ket{\downarrow \cdots \downarrow}$

The surge time is defined to be the time at which the antipodal connected 2-point function is maximum. The only exception is for $L = 3$ and with the down state: it is defined to be the time for which the 1-point function is maximum (because the 2-point function has a large plateau).

[!WARNING] The definition of the surge time for L = 3 is different compared to the original paper.

Usage

We provide the computations of the surge time and correlation functions at that time using three different methods:

  1. Exact simulation with qutip (for $L \lesssim 20$ on a laptop).
  2. Exact solution with free fermions (for any $L$; not yet implemented).
  3. Tabulated data from free fermions (for $L \le 50$).

The qutip method is provided as a way to check the results for low L but it is not scalable to large systems. The free fermions method is exact and can be used for any $L$. The tabulated data method is taken from the free fermions: for larger $L$, it falls back to free fermions.

We also provide utilities to map the critical Ising model on a neutral atom QPU.

As a Python package

You can use mbqs as a package. The most important classes are available as top-level imports: MBQS, MBQSProtocol, RydbergMapping. You can check the unit tests and CLI actions to find how to use them.

Command-line interface

  • Display in console the parameters needed to run the protocol for a given system size:
mbqs protocol -J 1. -L 4
  • Display in console the parameters needed to run the protocol for several system sizes:
mbqs protocol -J 1. -L {4..6}
  • Parameters for running the protocol on an neutral atom analog quantum simulator can be added using the --include-rydberg flag or using the interatomic distance as a parameter instead of the coupling constant:
mbqs protocol -J 1. -L 4 --include-rydberg
mbqs protocol -a 7.75 -L 4
  • Save a json file with the protocol parameters (use --verbose to also display in the console):
mbqs protocol -J 1. -L {4..6} --json protocol.json
  • Compute the theoretical correlations at the surge time:
mbqs correlations -L 3
  • Compute the correlations from a file of samples:
mbqs correlations -i samples.json
  • Evaluate the metric from correlations functions in a file:
# without parameters in file
mbqs scorer -i examples/correlations_samples.json -L 3 --threshold 0.3
# with parameters
mbqs scorer -i examples/correlations_exact.json
  • Evaluate the metric from samples in a file:
mbqs scorer -i examples/samples.json
  • Evaluate the score for a file containing correlations functions for different system sizes:
mbqs scorer -i examples/correlations_sequence.json

Examples of json files can be found in the examples directory.

Autocompletion can be enabled for the mbqs command by running the following command (only for the current session):

eval "$(register-python-argcomplete mbqs)"

To make it persistent (for example, for bash on Linux), you can execute the following commands:

mkdir -p ~/.local/share/bash-completion/completions
register-python-argcomplete mbqs > ~/.local/share/bash-completion/completions/mbqs

Contributing

To install all the dependencies including the development tools, run:

uv venv
make install-dev

Before performing a commit, ensure that the following returns no error or warning:

make check
make test

[^1]: Erbin, H., Burdeau, P.-L., Bertrand, C., Ayral, T., & Misguich, G. (2026). Many-body Quantum Score: a scalable benchmark for digital and analog quantum processors and first test on a commercial neutral atom device. arXiv: 2601.03461

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

mbqs-1.0.0.tar.gz (144.8 kB view details)

Uploaded Source

Built Distribution

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

mbqs-1.0.0-py3-none-any.whl (45.6 kB view details)

Uploaded Python 3

File details

Details for the file mbqs-1.0.0.tar.gz.

File metadata

  • Download URL: mbqs-1.0.0.tar.gz
  • Upload date:
  • Size: 144.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mbqs-1.0.0.tar.gz
Algorithm Hash digest
SHA256 aee270d18fae4a2f58b4d8869e3fea459b83f883f96a95fb1704a8839552c92a
MD5 b4a5e1eb2cd573dfd4a583e274bc9db4
BLAKE2b-256 06c012b0de772f1d9435845dc2e6fd733f9b895f6c68cea350259d14069e6bf0

See more details on using hashes here.

File details

Details for the file mbqs-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mbqs-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 45.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mbqs-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb239b109b0c5188bcc91b104abd14685a1e610becbada7ff069d0a2205a3ef6
MD5 0bed134638817b057aa92f89653982b3
BLAKE2b-256 9d8adc3bbad921305c8ef78dab38b82bf82b3835ce9d995db382c5a6ae00d5fa

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