Add Tanner graph type to qecp dialect#2563
Conversation
Also update tests accordingly.
Reason: The verifier test that checks for these warnings crashes the quantum-lsp-server! Also, from a QEC and program-design perspective, extracting an aux qubit from a codeblock (or inserting) should really be an error, since it violates a fundamental design principle that physical codeblocks consist of QEC physical qubits with the 'data' role.
055b98a to
0664025
Compare
This placates the Python type checker.
71b00d9 to
ca22a18
Compare
multiphaseCFD
left a comment
There was a problem hiding this comment.
Nice work Joey! A couple of Qs
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2563 +/- ##
=======================================
Coverage 97.01% 97.01%
=======================================
Files 156 156
Lines 17622 17662 +40
Branches 1692 1692
=======================================
+ Hits 17096 17135 +39
- Misses 388 389 +1
Partials 138 138 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
multiphaseCFD
left a comment
There was a problem hiding this comment.
Thanks @joeycarter . One more question: what is the reason that IntegerType is adopted here instead of IndexType here? I think all components in the type and ops would be signless.
Good question. It's partly a matter of taste and partly a matter of precedent already established in MLIR. From the
It's not just a question of signedness, When MLIR says that The reason being that dynamically shaped tensors need a way to signal that they are dynamic, and under the hood they use a negative number, specifically All that to say, I've opted to use integer values here to follow what's already done in the definition of |
A quick dive into the xDSL repository confirms that |
Context: This PR is one in a series of PRs to build a prototype QEC compilation pipeline in Catalyst.
Description of the Change: This PRs adds two abstractions relating to Tanner graphs to the
qecpdialect:!qecp.tanner_graphto represent a Tanner graph by its adjacency matrix in Compressed Sparse Column (CSC) form.qecp.assemble_tannerto assemblerow_idxandcol_ptrarrays into a CSC adjacency matrix representing a Tanner graph.Example:
The equivalent type and operation have also been added to the xDSL python interface to Catalyst.
Note
This dialect is experimental and subject to change extensively in the future.
[sc-111756]