-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add Steane-type and teleportation-based QEC for the Steane code #115
Conversation
Something funny is going on in my testing, so I'm going to mark this as a draft until I figure it out... UPDATE: I think I fixed it. I'm still not sure I'm setting classical registers correctly though. |
def qec(self, flag_bit: Bit | None = None): | ||
def qec(self, flag: Bit | None = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also renamed flag_bit
--> flag
in this PR, for consistency with conventions elsewhere in the repo.
I think this PR fixes #112, which appears to just be an incorrect type hint |
Good questions. At first glance everything looks good... but I'll comb over everything shortly. More future facing stuff (not this PR): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Teleportation-based QEC is essentially just one-bit teleportation, in which only one type of error (X or Z) is preserved in the teleported state. Teleporting in two different ways thereby corrects all errors.
I used state vector simulations to verify that these circuits correct all physical single-qubit errors by:
qubit.steane_qec
cycle.I am not entirely certain that I am using/storing classical registers correctly, so @ciaranra please take a look.
Finally: the methods here write a
flag
qubit to remember whether there were non-trivial syndromes. It may make sense to "guarantee" that this flag qubit is set correctly and remove this suggestive comment. Thoughts?