Skip to content

[Demo] qLDPC codes#1714

Merged
drdren merged 51 commits intodevfrom
qldpc-codes
Apr 13, 2026
Merged

[Demo] qLDPC codes#1714
drdren merged 51 commits intodevfrom
qldpc-codes

Conversation

@obliviateandsurrender
Copy link
Copy Markdown
Contributor

Title: Quantum low-density parity-check (qLDPC) codes for quantum error correction

Summary: Explain the motivation, construction and decoding of various types of qLDPC codes.

Relevant references: [Will add]

Possible Drawbacks: N/A

Related GitHub Issues:


If you are writing a demonstration, please answer these questions to facilitate the marketing process.

  • GOALS — Why are we working on this now?
    Eg. Promote a new PL feature or show a PL implementation of a recent paper.

    • To have resources regarding quantum error correction.
  • AUDIENCE — Who is this for?
    Eg. Chemistry researchers, PL educators, and beginners in quantum computing.

    • Error correction researchers and enthusiasts.
  • KEYWORDS — What words should be included in the marketing post?

    • qLDPC codes, quantum error correction
  • Which of the following types of documentation is most similar to your file?
    (more details here)

  • Tutorial
  • Demo
  • How-to

@obliviateandsurrender obliviateandsurrender requested review from a team as code owners March 3, 2026 12:48
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

👋 Hey, looks like you've updated some demos!

🐘 Don't forget to update the dateOfLastModification in the associated metadata files so your changes are reflected in Glass Onion (search and recommendations).

Please hide this comment once the field(s) are updated. Thanks!

@obliviateandsurrender obliviateandsurrender removed request for a team March 3, 2026 12:49
@obliviateandsurrender obliviateandsurrender changed the base branch from master to dev March 3, 2026 13:04
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

Your preview is ready 🎉!

You can view your changes here

Deployed at: 2026-04-13 18:00:00 UTC

Copy link
Copy Markdown
Collaborator

@Qottmann Qottmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice demo and overview of the qLDPC landscape, @obliviateandsurrender !

My main concerns are about being able to understanding the topics in a self-consistent way. Because the demo is covering a wide range of topics, it naturally cannot go into full details. I think sometimes some examples could do wonders though, so suggested to add some here and there.

Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py
Comment thread demonstrations_v2/tutorial_qldpc_codes/metadata.json Outdated
Copy link
Copy Markdown
Collaborator

@Qottmann Qottmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great demo @obliviateandsurrender !

just some small things left to polish, otherwise seems good to go as my major concerns are all lifted :)

Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Copy link
Copy Markdown
Contributor

@daniela-angulo daniela-angulo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments to polish minor things.
This is great work! very informative demo.

Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py
Comment thread demonstrations_v2/tutorial_qldpc_codes/metadata.json
Copy link
Copy Markdown
Contributor

@drdren drdren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, @obliviateandsurrender ! I left a few formatting suggestions.

Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py
Copy link
Copy Markdown
Contributor

@drdren drdren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @obliviateandsurrender , I like your changes. I misled you previously about how to format links. I fixed those and some other minor formatting issues. If you click through those, I will submit the demo for legal vetting. Thanks!

Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
Comment thread demonstrations_v2/tutorial_qldpc_codes/demo.py Outdated
@drdren drdren merged commit 2291b26 into dev Apr 13, 2026
12 checks passed
@drdren drdren deleted the qldpc-codes branch April 13, 2026 17:59
drdren pushed a commit that referenced this pull request Apr 13, 2026
**Summary:** Ports qLDPC demo #1714 from `dev` to `master` with manual
implementation of `binary_matrix_rank` function, which is currently
available only in PL's latest branch.

```py
def binary_matrix_rank(binary_matrix: np.ndarray) -> int:
    r"""Returns the rank of a binary matrix over :math:`\mathbb{Z}_2`."""
    rank, matrix = 0, np.asarray(binary_matrix, dtype=bool).copy()
    while len(matrix):
        matrix, pivot = matrix[:-1], matrix[-1]
        if not pivot.any():
            continue
        rank += 1 # New pivot found
        rows_with_bit = matrix[:, np.flatnonzero(pivot)[-1]]
        matrix[rows_with_bit] ^= pivot
    return rank
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants