Skip to main content

qLDPC

This package contains tools for constructing and analyzing quantum low density parity check (qLDPC) codes. At least, that was the original motivation for this package. In practice, the tools here work just as well with more general error-correcting codes.

📦 Installation

This package requires Python>=3.10, and can be installed from the Python Package Index (PyPI) with

pip install qldpc

If you use macOS, you may need to install cvxpy manually by following the instructions here before installing qLDPC.

To install a local version of qLDPC from source:

git clone git@github.com:Infleqtion/qLDPC.git
pip install -e qLDPC

You can also pip install -e 'qLDPC[dev]' to additionally install some development tools.

🚀 Features

Notable features include:

  • ClassicalCode: class for representing classical linear error-correcting codes over finite fields.
  • QuditCode: general class for constructing Galois-qudit codes.
    • Automatic construction of all SWAP-transversal logical Clifford gates in one code block of a qubit code, with qldpc.circuits.get_transversal_ops (see arXiv:2409.18175; requires GAP and GUAVA).
    • QuditCode.get_logical_ops: method to construct a complete basis of nontrivial logical Pauli operators for a QuditCode.
    • QuditCode.concatenate: method to concatenate QuditCodes in various ways.
  • CSSCode: subclass of QuditCode for the special case of constructing a quantum CSS code out of two mutually compatible ClassicalCodes.
    • CSSCode.get_distance: method to compute the code distance (i.e., the minimum weight of a nontrivial logical operator) of a CSSCode. Includes options for computing the exact code distance by brute force, as well as an estimate (or upper bound) with the method of arXiv:2308.07915.
    • Includes options for applying local Hadamard transformations, which is useful for tailoring a CSSCode to biased noise (see arXiv:2202.01702).
  • TBCode: class for constructing two-block quantum codes.
  • BBCode: class for constructing the bivariate bicycle codes in arXiv:2308.07915 and arXiv:2311.16980.
    • Includes methods to identify "toric layouts" of a BBCode, in which the code looks like a toric code augmented by some long-distance checks, as in discussed in arXiv:2308.07915.
  • HGPCode: class for constructing hypergraph product codes out of two ClassicalCodes.
  • LPCode: class for constructing lifted product codes out of two protographs (i.e., matrices whose entries are elements of a group algebra). See arXiv:2012.04068 and arXiv:2202.01702.
  • QTCode: class for constructing quantum Tanner codes out of (a) two symmetric subsets A and B of a group G, and (b) two ClassicalCodes with block lengths |A| and |B|. See arXiv:2202.13641 and arXiv:2206.07571.
    • Random QTCodes can be constructed out of a choice of group G and one ClassicalCode only.
  • abstract.py: module for basic abstract algebra (groups, algebras, and representations thereof).
  • objects.py: module for constructing helper objects such as Cayley complexes and chain complexes, which are instrumental for the construction of various quantum codes.

🤔 Questions and issues

This project technically has a documentation page, but at the moment the documentation is largely auto-generated from source code and comments that were written to be readable in a text editor. For now, I recommend looking at the source code (and comments therein) directly, as well as the examples directory. Test files (such as qldpc/codes/quantum_test.py) also contain some examples of using the classes and methods in this library.

If you have any questions, feedback, or requests, please open an issue on GitHub or email me at mika.perlin@gmail.com!

⚓ Attribution

If you use this software in your work, please cite with:

@misc{perlin2023qldpc,
  author = {Perlin, Michael A.},
  title = {{qLDPC}},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Infleqtion/qLDPC}},
}

This may require adding \usepackage{url} to your LaTeX file header. Alternatively, you can cite

Michael A. Perlin. qLDPC. https://github.com/Infleqtion/qLDPC, 2023.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qldpc-0.0.25.tar.gz (89.4 kB view details)

Uploaded Source

Built Distribution

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

qldpc-0.0.25-cp312-cp312-macosx_15_0_arm64.whl (197.7 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

Details for the file qldpc-0.0.25.tar.gz.

File metadata

  • Download URL: qldpc-0.0.25.tar.gz
  • Upload date:
  • Size: 89.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.8 Darwin/24.2.0

File hashes

Hashes for qldpc-0.0.25.tar.gz
Algorithm Hash digest
SHA256 372026e5721c192b342ef1bf3062d111f2708f6a2c05988f5d51e2ecfae95819
MD5 a826937c2c6c00cbef1abe12fc7603da
BLAKE2b-256 ab57569f6c61e3d2597ce128c42f7b301c279eb8b787a58e4d9643b46e20df8b

See more details on using hashes here.

File details

Details for the file qldpc-0.0.25-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

  • Download URL: qldpc-0.0.25-cp312-cp312-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 197.7 kB
  • Tags: CPython 3.12, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.8 Darwin/24.2.0

File hashes

Hashes for qldpc-0.0.25-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1cb3cd05767caac3c0f98547e3e2e33cd8df05d7a73691df9f6bcd77b891f439
MD5 f1ced91d9320c92c8bf76532b2631011
BLAKE2b-256 99d3eb55019c0287c6b0194d5bc2982b1750c3fcf5fa7fe046c35fe74f324580

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.29

2 files

0.0.28

2 files

0.0.27

2 files

0.0.26

2 files

This release

0.0.25 This release

2 files

0.0.24

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page