-
Notifications
You must be signed in to change notification settings - Fork 68
[[2ʲ, 2ʲ - 2j - 2, 4]] Gottesman code
#282
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
Draft
Fe-r-oz
wants to merge
7
commits into
QuantumSavory:master
Choose a base branch
from
Fe-r-oz:GottesmanDistance4code
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2ab189d
Adding [[2ʲ, 2ʲ - 2j - 2, 4]] Gottesman codes to the ECC module
8d8a0bd
minor cleanup
18f0e5a
minor cleanup
2b95282
Polishing up
ef3f04e
Merge branch 'master' into GottesmanDistance4code
Fe-r-oz 8c126a0
misc cleanup
Fe-r-oz 6c05f93
Merge branch 'master' into GottesmanDistance4code
Fe-r-oz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| """The family of `[[2ʲ, 2ʲ - 2j - 2, 4]]` Gottesman codes, also known as a 'Class of Distance Four Codes', as described in [Gottesman's 1997 PhD thesis](@cite gottesman1997stabilizer) and in [gottesman1996class](@cite). | ||
|
|
||
| The stabilizer generators of the original `[[2ʲ, 2ʲ - j - 2, 3]]` Gottesman codes are incorporated to create a set of generators for this distance-four code. The resulting stabilizer set, denoted by S, incorporates the following elements: The first two generators are the Pauli-`X` and Pauli-`Z` operators acting on all qubits, represented by `Mₓ` and `Mz`, respectively. The next `j` generators correspond to `M₁` through `Mⱼ`, which are directly inherited from the `[[2ʲ, 2ʲ - j - 2, 3]]` Gottesman code's stabilizers. This inclusion ensures that `S` retains the inherent distance-three property of the original Gottesman code. The final `j` generators are defined as `Nᵢ = RMᵢR`, where `i` ranges from `1` to `j`. Here, `R` signifies a Hadamard Rotation operation applied to all `2ʲ` qubits, and `Mᵢ` refers to one of the existing generators from the second set `(M₁ to Mⱼ)`. By incorporating the stabilizers of a distance-three code, the constructed set `S` inherently guarantees a minimum distance of three for the resulting distance-four Gottesman code. | ||
| """ | ||
| struct Gottesman4 <: AbstractECC | ||
| j::Int | ||
| function Gottesman4(j) | ||
| (j >= 3 && j < 21) || error("In `Gottesman4(j)`, `j` must be ≥ 3 in order to obtain a valid code and < 21 to remain tractable") | ||
| new(j) | ||
| end | ||
| end | ||
|
|
||
| code_n(c::Gottesman4) = 2^c.j | ||
| code_k(c::Gottesman4) = 2^c.j - 2*c.j - 2 | ||
| distance(c::Gottesman4) = 4 | ||
|
|
||
| function parity_checks(c::Gottesman4) | ||
| H₁ = parity_checks(Gottesman(c.j)) | ||
| Hⱼ = H₁[3:end] | ||
| for qᵢ in 1:nqubits(Hⱼ) | ||
| apply!(Hⱼ, sHadamard(qᵢ)) | ||
| end | ||
| H = vcat(H₁, Hⱼ) | ||
| Stabilizer(H) | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
A see also to
Gottesmanand an explanation about the different would be useful.