Skip to main content

Transformations between quantum weight enumerators

Project description

qsalto logo

transform your quantum weight enumerators

PyPI Package MIT License Tests

qsalto provides transformations between several (normalized) quantum weight enumerators, including

  • Shor-Laflamme enumerators[^1] $a$, $b$,
  • Rains unitary enumerators[^2] $a'$, $b'$,
  • and Rains shadow enumerators[^3] $a''$.

We provide both

Python package

The python package qsalto can be installed via pip install qsalto and features functions to generate nine classes of transformation matrices.

Matrix Function Transforms from ... ... to is self-inverse
$M$ M(n) $\mathbf{a}$ $\mathbf{b}$
$M'$ M1(n) $\mathbf{a'}$ $\mathbf{b'}$
$M''$ M2(n) $\mathbf{a''}$ $\mathbf{b''}$
$T'$ T1(n) $\mathbf{a}$, $\mathbf{b}$ $\mathbf{a'}$, $\mathbf{b'}$
$T'^{-1}$ iT1(n) $\mathbf{a'}$, $\mathbf{b'}$ $\mathbf{a}$, $\mathbf{b}$
$T''$ T2(n) $\mathbf{a}$, $\mathbf{b}$ $\mathbf{a''}$, $\mathbf{b''}$
$T''^{-1}$ iT2(n) $\mathbf{a''}$, $\mathbf{b''}$ $\mathbf{a}$, $\mathbf{b}$
$T'''$ T3(n) $\mathbf{a'}$, $\mathbf{b'}$ $\mathbf{a''}$, $\mathbf{b''}$
$T'''^{-1}$ iT3(n) $\mathbf{a''}$, $\mathbf{b''}$ $\mathbf{a'}$, $\mathbf{b'}$

To compute the full matrices, an optimized algorithm making use of recursive patterns is employed. Each matrix generator also features the computation of single elements through, e.g., M(100, entry=[3,4]) where entry specifies the row and column of the entry (in that order).

Single-shot estimators

Furthermore, the function single_shot_estimators(n) generates single-shot estimators for $a$, $b$, $a'$, $b'$, $a''$, and $b''$ for all possible numbers $m=0,...,n$ of singlets as an outcome of a two-copy Bell measurement. This function returns six 2D-arrays (one for each quantum weight enumerator in the order as given above) with the estimator for $m$ singlets in the $m$-th column.

High-precision transformation matrices

For some applications, a higher precision than 64 bit floating point is needed for the transformation matrices. For this purpose, each transformation features a precise argument (which defaults to false). If set to true, an mpmath.matrix is returned instead of an np.array. This requires mpmath to be installed. The precision can for example be set via mpmath.mp.dps = 120 (more on precision with mpmath, see here) before calling the transformation generator.

License

This library is distributed under the MIT License.

If you want to support work like this, please cite our paper: tba

[^1]: P. Shor and R. Laflamme, Phys. Rev. Lett. 78, 1600 (1997)

[^2]: E. M. Rains, IEEE Trans. Inf. Th., 44, 1388 (1998)

[^3]: E. M. Rains, IEEE Trans Inf. Th. 45, 2361 (1999)

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

qsalto-0.2.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

qsalto-0.2.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qsalto-0.2.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for qsalto-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4c054e07d7cf43ed627aa950972c5c9217b318a92e291a32b993d587dcadaadf
MD5 86ebfd9b03a0bdebff9a0570928ce33c
BLAKE2b-256 38f96db20546f416350d230985fc00cc23ad154b3e48d82de86f4c08d6e328a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qsalto-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for qsalto-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9af7ebf895ae144244ffea74d72165ee2fd50ca2794634c1ca5df5490c41bbe0
MD5 b074867a8c1ba529a82ab12d6b4dbf16
BLAKE2b-256 f98b0892898db5592005a03146008573a93f64df81c3eb3eec399a1c3cfd362e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page