-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minimum distance algorithms for calculating code distance for Quantum LDPC codes #353
Comments
There are BZ-type algorithms as implemented in MAGMA. This has currently not yet been pushed to a public branch and is relatively poor. Grassl published three minor updates to these algorithms last week, which I plan on adding. There are probabilistic algorithms, which for quantum are similar to QDistRand. There is a paper coming out this month by a group in England about improvements to this algorithm, which I also plan on implementing. Typical in the field after Bravyi's work is using BP (-OSD) or LP to repeatedly decode and record the smallest logical they see. Then finally there's the trellis approach, which I have found able to do codes of O(10k) qubits quite easily. There are several other classical approaches that have not yet been applied to the quantum setting, if they are even at all applicable. There has been little to no research on quantum minimum distance finding compared to the classical and there are clear directions in which to start. Note that I currently disabled the trellis code because I switched the entire library from using length As you mentioned, I do strongly support the use of the MacWilliams identities in computing distances. If the dual is significantly smaller and you know the weight enumerator, you can immediately know the distance of the code. The trellis makes computing the weight enumerator and the distance equal difficulty, so it made sense to set it up to compute the smaller of the two objects. |
Note that I have not implemented the LP solver yet. Feel free to do that and push it haha. See the JuMP extension where I use LP for classical LDPC codes for an example on using the solver. |
See also the function |
@esabo , sidenote FYI, we have a relatively fast computation of logical operators (and it can still be made much faster):
|
This is currently the default method in my package to compute this for binary codes. The canonical form is different for qudits. I would have to check, but I don't think ours allocates. The only way we could speed our implement of it up is to remove it from Oscar and make it pure Julia matrices. But then we sacrifice the correctness and robustness of using a finite field library (Flint via Oscar) and all algorithms become necessarily more complicated by having to implement our own finite fields (which will not be faster than Flint). |
I do not have the benchmarks to back this up, but some of what you said is surprising to me.
Pardon the tangent I went on here. Anyway, for fancy ECC algebraic operations, I am looking forward to just depending on your library. |
Is your feature request related to a problem? Please describe.
@esabo, pinging you as you are working on this! Please feel free to add more insights.
CodingTheory.jl has introduced the
Trellis
algorithm that usesMacWilliams
identity for the calculation of minimum distance. In theqdistrnd
branch, there is the newQDistRnd
algorithm that will be released by next month(tentative), for the calculation of the minimum distance. They have utilizedOscar->Nemo>
etc... for implementing minimum distance algorithms. For more details, see #14 (comment).There is a question that arose two days ago while designing
BBQLDPC
in #352 that was how do one find the code distance of general Quantum LDPC codes? This is because there is no easy way to calculate the combinationKernel(Hx)\rowspace(Hz)
. Eric notes that the latter isNP
-complete in classical and#P
in quantum sense. We can calculateker(Hx)
androwspace(Hz)
easily but not the combinationker(Hx)/rs(Hz).
For calculating the code distance of sophisticated codes, we require the use of minimum distance algorithms becaused = min {|v|: v ∈ ker(A)\rs(B)}
is NP-complete classical and#P
in the quantum case.Bravyi used the Integer Linear Programming technique (
ILP
) to calculate the minimum code distance. As Eric notes that "There’s not really a better way than standard enumeration-based algorithms like Brouwer-Zimmerman or probabilistic algorithms (under which the LP solution falls)". So, documenting all the approaches and utilizing the available ones for calculating code distance becomes an important correctness check.Describe the solution you’d like
First flesh out all the different approaches for calculating the code distance of Quantum LDPC codes. This will require some literature review. This will be helpful and provide a better perspective. The paper to start with is: Fault-tolerant quantum computing with color codes. This is the paper that is used by Bravyi for calculating the code distance. In this paper, the authors "present integer-program-based decoding algorithm for identifying the most likely error given the (possibly faulty) syndrome". Are there any
ILP
packages in julia that can be leveraged? See Fastest open-licensed solver for integer problems for a general overview.Note that the regular code distance algorithm that
BP+OSD
uses fails forn>10
, and that too is for generic codes.Try calculating the code distance from the minimum algorithms from
CodingTheory.jl
as they are implemented usingOscar
. Some are in the dev phase and will be released towards the end of this month(tentative). Try calculating code distance for simpler quantum codes first using these methods. Check outminimum_distance
fromCodingTheory.jl
. Note that suppose, you have your parity check matrix,H
which you can find usingstab_to_gf2(parity_checks(code)))
to use minimum distance fromCodingTheory.jl
because they have their ownStabilizerCode
representation, do the following:Make sure that you are using
matrix(GF(2), H)
for the binary check matrices.In addition, the
ILP
approach that is used by Bravyi requires the calculation of logical operators for theCSS
code. Given aCSS
code, we currently have the functionality to summonparity_check_x
andparity_check_z
which correspond tohx
andhz
. But we don't have the functionality to summonlx
andlz
which are logical operators ofCSS
code.A small task would be to calculate logical operators for any quantum code. Calculate and test for all the current quantum codes. See https://pypi.org/project/bposd/ as they provide examples for calculating logical operators for Steane code.
Describe alternatives you’ve considered
To be added soon.
Additional Context
Eric's PhD dissertation was on the Trellis Decoding And Applications For Quantum Error Correction. In it, he makes an interesting remark: "We present a state-of-the-art algorithm for computing the minimum distance for any stabilizer code over a finite field of prime dimension. We also define a new weight enumerator for stabilizer codes over F_2 incorporating the phases of each stabilizer and provide a trellis-based algorithm to compute it" For Binary Quantum LDPC codes, this would be helpful in finding the code distance. Trellis algorithm are already present in
CodingTheory.jl
The text was updated successfully, but these errors were encountered: