-
Notifications
You must be signed in to change notification settings - Fork 47
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
BoundsError when calling naive_encoding_circuit
and naive_syndrome_circuit
#306
Comments
If the parity check matrices are not full rank then probably some assumptions get broken (a number of rows somewhere is being assumed to be the rank, etc.) Probably the error is in this line: https://github.com/QuantumSavory/QuantumClifford.jl/blob/master/src/ecc/circuits.jl#L20 I guess In other locations we have warnings for situations like that: QuantumClifford.jl/src/ecc/ECC.jl Line 296 in 59e399d
|
I forgot to mention that this code is constructed as CSS code here for easier reproduction. In my tests, I used another code struct with the correct function code_k(c::LPCode)
hx, hz = parity_checks_xz(c)
code_n(c) - rank(hx) - rank(hz) # redundant rows exist
end The error is exactly the same for |
For now, try out the evaluation methods that do not require encoding (the ones that use just a commutativity check and do not simulate the whole encoding circuit at all) |
If I may add something that might be of interest, I hope this helps: Some months back, I got similar error, so what I did was to go to QuantumClifford.jl/src/ecc/circuits.jl Lines 21 to 25 in 59e399d
In my case, this error is occuring because Please check manually that whether I wanted to discuss this issue but I paused because I am suspicious of my code. I still am (I will go back to it) but may for debugging sake, this information and findings about the observed behaviour maybe helpful to you.
It's noted that for Smaller circuits, there is no such error:
Best Regards. |
Spotted the error, @royess, @Krastanov, It's the same error that occurs that I presented in the above message. I hope this helps!
|
Reproduce with lp04_7x.txt and lp04_7z.txt by the following code:
Error reads
Note: The parity-check matrix for the code for reproduction is not full-rank.
The text was updated successfully, but these errors were encountered: