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

fix: random circuit codes are non-CSS so return iscss(...) = false instead of nothing #463

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Fe-r-oz
Copy link
Contributor

@Fe-r-oz Fe-r-oz commented Jan 20, 2025

Hi, @royess, The random_circuit codes are non-CSS so, I am wondering why the iscss(::Type{...}) returns nothing. Shouldn't it return false? Hopefully, that is not a bad proposition?

Could you explain if it was a typo or there is some reason behind it? Thanks! I agree with you that codes are non-CSS.

BP and BP-OSD in PyQDecoders.jl (PyMatchingDecoder ) are not applicable to random circuit codes because they are non-CSS.

iscss(::Type{CircuitCode}) = nothing

Bravyi introduces a Mixed Integer Programming for CSS/QLDPC codes so his approach don't work for non-CSS codes. Hence, I want to exclude non-CSS codes so user does not end up calculating distance for non-CSS codes which throw solver error.

iscss(::Type{...}) = false would be helpful here because in a later PR, I want to do something like

function distance(c::AbstractECC; kwargs...)
    if !iscss(c)
        throw(ArgumentError("Computing the minimum distance of QLDPC using Mixed Integer Programming works only for CSS codes."))
    end
    return distance(parity_checks(c); kwargs...)
end

@Krastanov, Please help review this PR, Thank you!

  • 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.

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.

1 participant