-
Notifications
You must be signed in to change notification settings - Fork 211
Error correction with stabilizer codes #1365
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
base: master
Are you sure you want to change the base?
Conversation
👋 Hey, looks like you've updated some demos! 🐘 Don't forget to update the Please hide this comment once the field(s) are updated. Thanks! |
Thank you for opening this pull request. You can find the built site at this link. Deployment Info:
Note: It may take several minutes for updates to this pull request to be reflected on the deployed site. |
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.
Such a nice and explanatory demo!
In this demo, we will introduce the stabilizer formalism using bottom-up approach. We construct and | ||
some well-known codes using the quantum circuit formalism and then derive their **stabilizer generators,** from which | ||
the code can be reconstructed. This enables the construction of a wide range of error correction codes | ||
directly from their stabilizer generators. |
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.
In this demo, we will introduce the stabilizer formalism using bottom-up approach. We construct and | |
some well-known codes using the quantum circuit formalism and then derive their **stabilizer generators,** from which | |
the code can be reconstructed. This enables the construction of a wide range of error correction codes | |
directly from their stabilizer generators. | |
In this demo, we will introduce the stabilizer formalism using bottom-up approach. We will start by constructing some well-known codes using the quantum circuit formalism. From these circuits, we'll derive their **stabilizer generators,** from which | |
the code can be reconstructed. This enables the construction of a wide range of error correction codes | |
directly from their stabilizer generators. |
~~~~~~~~~~~~~~~ | ||
|
||
The first step in an error correction code is **encoding** one abstract or **logical qubit** into a set of many on-device **physical qubits.** | ||
The rationale is that, if some external factor changes the state of one of the qubits, the remaining qubits still provide information about the original logical qubit. |
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.
The rationale is that, if some external factor changes the state of one of the qubits, the remaining qubits still provide information about the original logical qubit. | |
The rationale is that if an external factor changes the state of one of the qubits, the remaining qubits still provide information about the original logical qubit. |
|
||
.. | ||
|
||
Let's code this below and verify the output |
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.
Let's or let us? One is used above, the other here. Probably just change this one because it seems that 'let us' is the most used in the demo.
|
||
.. | ||
|
||
Let's code this below and verify the output |
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.
Let's code this below and verify the output | |
Let's code this below and verify the output. |
|
||
- Qubit encoding | ||
- Error detection | ||
- Error correction |
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.
do you want any punctuation here or it's fine as is?
############################################################################## | ||
# | ||
# .. note:: | ||
# In the literature, you may have come across an error correction code being called an ":math:`[n,k]`-stabilizer code." In this notation, the number :math:`n` represents |
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.
# In the literature, you may have come across an error correction code being called an ":math:`[n,k]`-stabilizer code." In this notation, the number :math:`n` represents | |
# In the literature, you may have come across an error correction code called an ":math:`[n,k]`-stabilizer code." In this notation, the number :math:`n` represents |
# .. math:: | ||
# | ||
# \begin{align*} | ||
# \vert \bar{0}\rangle = &\frac{1}{4}\left(\vert 00000 \rangle \vert 10010 \rangle + \vert 01001 \rangle + \vert 10100 \rangle + \vert 01010 \rangle - \vert 11011 \rangle - \vert 00110 \rangle \right.\\ |
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.
there is a missing sign here between the first two states
# S_2 = X_0 I_1 X_2 Z_3 Z_4,\\ | ||
# S_3 = Z_0 X_1 I_2 Z_3 X_4. | ||
# | ||
# The calculations are a bit cumbersome, but with some patience we can find the common :math:`+1`-eigenspace of the stabilizer generators, |
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.
# The calculations are a bit cumbersome, but with some patience we can find the common :math:`+1`-eigenspace of the stabilizer generators, | |
# The calculations are a bit cumbersome, but with patience, we can determine the common :math:`+1`-eigenspace of the stabilizer generators |
# | ||
# \vert \bar{1}\rangle = X\otimes X \otimes X \otimes X \otimes X \vert \bar{0} \rangle. | ||
# | ||
# The logical operators bit-flip and phase-flip are for this code are :math:`\bar{X}= X^{\otimes 5}` and :math:`\bar{Z}=Z^{\otimes 5}.` With these |
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.
# The logical operators bit-flip and phase-flip are for this code are :math:`\bar{X}= X^{\otimes 5}` and :math:`\bar{Z}=Z^{\otimes 5}.` With these | |
# The logical bit-flip and phase-flip operators for this code are :math:`\bar{X}= X^{\otimes 5}` and :math:`\bar{Z}=Z^{\otimes 5}.` With these |
print(f"{error} {wire}", five_qubit_code(1/2, np.sqrt(3)/2, error, wire)) | ||
############################################################################## | ||
# | ||
# The syndrome table is printed, and with we can apply the necessary operators to fix the corresponding Pauli errors. The script above is straightforward |
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.
# The syndrome table is printed, and with we can apply the necessary operators to fix the corresponding Pauli errors. The script above is straightforward | |
# The syndrome table is printed and with it, we can apply the necessary operators to fix the corresponding Pauli errors. The script above is straightforward |
Before submitting
Please complete the following checklist when submitting a PR:
Ensure that your tutorial executes correctly, and conforms to the
guidelines specified in the README.
Remember to do a grammar check of the content you include.
All tutorials conform to
PEP8 standards.
To auto format files, simply
pip install black
, and thenrun
black -l 100 path/to/file.py
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Title:
Summary:
Relevant references:
Possible Drawbacks:
Related GitHub Issues:
If you are writing a demonstration, please answer these questions to facilitate the marketing process.
GOALS — Why are we working on this now?
Eg. Promote a new PL feature or show a PL implementation of a recent paper.
AUDIENCE — Who is this for?
Eg. Chemistry researchers, PL educators, beginners in quantum computing.
KEYWORDS — What words should be included in the marketing post?
Which of the following types of documentation is most similar to your file?
(more details here)