Skip to content
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

QuantumCliffordJuMPExt: compute the minimum distance of QLDPC using Mixed Integer Programming #439

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

Fe-r-oz
Copy link
Contributor

@Fe-r-oz Fe-r-oz commented Nov 30, 2024

This PR implements the Mixed Integer programming (MIP) approach to compute the minimum distance of QLDPC using GNU's Linear Programming Kit. This method is used by Panteleev and Kalachev and by Bravyi et. al.. The latter reference mentioned that this MIP approach was originally developed in 2011 and used in this reference

This PR allows the users to compute the minimum distance with ease and also provide the necessary documentation along with the relevant modern usecases. The tests have been conducted in #435

ILP/MILP methods: https://quantumcomputing.stackexchange.com/questions/37289/compute-the-exact-minimum-distance-of-a-qecc-with-integer-linear-programming-met

P.S. Mixed Integer Programming (MIP) or mixed integer linear program refer to same thing in the literature, in this context.

Edit:

  • The code is properly formatted and commented.
  • Substantial new functionality is documented within the docs.
  • All new functionality is tested.
  • All of the automated tests on github pass.
  • We recently started enforcing formatting checks. If formatting issues are reported in the new code you have written, please correct them.

@Fe-r-oz Fe-r-oz changed the title QuantumCliffordJuMPExt: compute the minimum distance of QLDPC using Mixed Integer Programming (MIP) QuantumCliffordJuMPExt: compute the minimum distance of QLDPC using Mixed Integer Programming (MIP) via GNU Linear Programming Kit Nov 30, 2024
Copy link

codecov bot commented Nov 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.06%. Comparing base (43febd9) to head (6337419).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #439      +/-   ##
==========================================
+ Coverage   82.79%   83.06%   +0.26%     
==========================================
  Files          69       72       +3     
  Lines        4558     4636      +78     
==========================================
+ Hits         3774     3851      +77     
- Misses        784      785       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Fe-r-oz Fe-r-oz marked this pull request as ready for review December 5, 2024 13:41
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Dec 5, 2024

Please help review this PR, thank you :)

Thanks to GNU for open-souring GLPK. I have tested all the instances of 2bga codes using distance and added other tests for correctness. Many more tests are in #435. Referring to #353 as it's related a issue. This PR aims to provide the first reasonable step. This MIP method is used by Panteleev and Kalachev and by Bravyi et. al.. This MILP method that Bravyi used was also asked on stack exchange. The end goal is to be able to compute minimum distance of QECC/QLDPC codes with n being $10^3$ or $10^4$: QDistRnd or MaxSAT solvers or upcoming algorithms appear to be helpful for that. There is a lot more work to be done in this direction. I will be happy if this PR is one of my PRs you are most excited about, along with in-place Ted's Pauli measurement algorithm PR. :)

Possible Future TODOs include:

@Fe-r-oz Fe-r-oz marked this pull request as draft December 20, 2024 10:30
@Fe-r-oz Fe-r-oz marked this pull request as ready for review December 20, 2024 10:30
@Krastanov
Copy link
Member

This is really interesting and deserving of a bounty.

Regrettably there are a few merge conflicts related to the doc fixes in an earlier PR. Could you fix those?

I also probably would suggest looking into a slightly different API, or at least some easier way to support independent solvers. But that can be discussed after the first round of review.

@Krastanov Krastanov added bounty:100 bug bounty There is an award for solving this issue. needs rebase A PR that is nearly done, but a merge conflict needs to be fixed. labels Dec 21, 2024
@Krastanov
Copy link
Member

I will mark it as a draft, just to make managing my review queue a bit easier. Just re-request review and mark it as ready after the fixes.

@Krastanov Krastanov marked this pull request as draft December 21, 2024 18:27
@Fe-r-oz Fe-r-oz changed the title QuantumCliffordJuMPExt: compute the minimum distance of QLDPC using Mixed Integer Programming (MIP) via GNU Linear Programming Kit QuantumCliffordJuMPExt: compute the minimum distance of QLDPC using Mixed Integer Programming Dec 21, 2024
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Dec 21, 2024

Some easier way to support independent solvers.

That's a great suggestion (solver = ). I have been reading the JuMP discourse recently about MIP. User can use HiGHs.jl, GLPK.jl, the underlying solver for these is free, but Gurobi.jl or CPLEX.jl have some underlying solver that require obtaining license. If people want to use closed sourced solvers for faster performance maybe, we can give them that choice. In addition, I found these posts interesting:

From Gurobi.jl documentation: The underlying solver is a closed-source commercial product for which you must [obtain a license](https://www.gurobi.com/). Free Gurobi licenses are available for [academics and students](https://www.gurobi.com/academia/academic-program-and-licenses/).

A̶s̶ a̶ f̶u̶t̶u̶r̶e̶ T̶O̶D̶O̶:̶ C̶e̶r̶t̶a̶i̶n̶ M̶L̶E̶ d̶e̶c̶o̶d̶e̶r̶s̶ r̶e̶q̶u̶i̶r̶e̶ M̶I̶P̶ s̶o̶l̶v̶e̶r̶s̶ a̶s̶ w̶e̶l̶l̶. T̶h̶i̶s̶ w̶e̶e̶k̶, [̶C̶o̶r̶r̶e̶l̶a̶t̶e̶d̶ d̶e̶c̶o̶d̶i̶n̶g̶ o̶f̶ l̶o̶g̶i̶c̶a̶l̶ a̶l̶g̶o̶r̶i̶t̶h̶m̶s̶ w̶i̶t̶h̶ t̶r̶a̶n̶s̶v̶e̶r̶s̶a̶l̶ g̶a̶t̶e̶]̶(̶h̶t̶t̶p̶s̶:̶//a̶r̶x̶i̶v̶.o̶r̶g̶/p̶d̶f̶/2̶4̶0̶3̶.0̶3̶2̶7̶2̶)̶ a̶p̶p̶e̶a̶r̶e̶d̶ o̶n̶ a̶r̶X̶i̶v̶, a̶n̶d̶ i̶t̶ u̶s̶e̶d̶ M̶L̶E̶ d̶e̶c̶o̶d̶e̶r̶ t̶h̶a̶t̶ u̶s̶e̶ M̶I̶P̶ a̶p̶p̶r̶o̶a̶c̶h̶. T̶h̶i̶s̶ p̶a̶p̶e̶r̶ r̶e̶f̶e̶r̶e̶n̶c̶e̶s̶ t̶h̶e̶ s̶a̶m̶e̶ 2̶0̶1̶1̶ p̶a̶p̶e̶r̶ t̶h̶a̶t̶ i̶n̶t̶r̶o̶d̶u̶c̶e̶d̶ t̶h̶e̶s̶e̶ M̶L̶E̶ d̶e̶c̶o̶d̶e̶r̶s̶ u̶s̶i̶n̶g̶ m̶i̶x̶e̶d̶-̶i̶n̶t̶e̶g̶e̶r̶-̶p̶r̶o̶g̶r̶a̶m̶. The MLE decoder if we implement it using Linear Programming approach is 1000x slower than Chromobius and 300x slower than NN decoder (Reference), so I don't think that going within LP formulation (MLE decoders using LP) approach sounds appealing.

We can allow to user to select from these solvers (based on recent trends):

  • SCIP.jl (open-source)
  • HIGHS.jl (open-source)
  • GLPK.jl (open-source)
  • Gurobi.jl (~open-source)
  • Cbc.jl (maybe this as well) (~open-source)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:100 bug bounty There is an award for solving this issue. needs rebase A PR that is nearly done, but a merge conflict needs to be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants