Closed mittaltushant closed 6 months ago
So I haven't figured out what is going on or why, but the following code:
from qldpc import codes
dims = (30, 6)
terms_a = [("x", 9), ("y", 1), ("y", 2)]
terms_b = [("y", 3), ("x", 25), ("x", 26)]
code = codes.QCCode(dims, terms_a, terms_b)
for _ in range(10):
print("distance: <=", code.get_distance(upper=True))
consistently finds distances <= 12
on main
, but on this branch mostly finds <= 30
with occasional <= 16
or <= 14
. So something funny is going on...
Ah, I think I figured it out: changing ensure_nontrivial: bool = True
to ensure_nontrivial: bool = False
here seems to fix it.
@mittaltushant do you think it's fine to make this change? Technically it changes the experiments you've been running, but if you haven't been setting and tracking random number seeds at the distance calculation step for those experiments then I think it doesn't really matter.
Actually, I can no longer reproduce issue I was talking about in the above comments. I now pretty much always get distances >= 30. So I need to do some digging.
Closing. Everything here except random_methods.py
has been merged into main
through PRs #21 and #22, and random_methods.py
is in any case updated on the experiment_cyclic_hamming
branch.
Added module to generate and test