transform your quantum weight enumerators
qsalto provides transformations between several (normalized) quantum weight enumerators, including
- Shor-Laflamme enumerators1
$a$ ,$b$ , - Rains unitary enumerators2
$a'$ ,$b'$ , - and Rains shadow enumerators3
$\tilde{a}$ .
We provide both
- a python package, available on PyPI: https://pypi.org/project/qsalto,
- a web viewer for visualizing the transformation matrices at https://mc-zen.github.io/qsalto.
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(n) |
✅ | |||
M1(n) |
✅ | |||
M2(n) |
✅ | |||
T1(n) |
|
|
❌ | |
iT1(n) |
|
|
❌ | |
T2(n) |
|
|
❌ | |
iT2(n) |
|
|
❌ | |
T3(n) |
|
|
❌ | |
iT3(n) |
|
|
❌ |
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).
Furthermore, the function single_shot_estimators(n)
generates single-shot estimators for
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.
This library is distributed under the MIT License.
If you want to support work like this, please cite our paper: https://arxiv.org/abs/2408.16914