-
Notifications
You must be signed in to change notification settings - Fork 15
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
Automated Synthesis of Encoder Circuits for Stabilizer Codes #275
Draft
pehamTom
wants to merge
35
commits into
main
Choose a base branch
from
encoding-circuits
base: main
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.
Conversation
This file contains 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
burgholzer
added
feature
New feature or request
minor
Minor version update
refactor
Changes the refactor the code base
labels
Aug 30, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #275 +/- ##
=======================================
+ Coverage 83.5% 87.3% +3.7%
=======================================
Files 49 51 +2
Lines 4148 4318 +170
Branches 372 372
=======================================
+ Hits 3467 3770 +303
+ Misses 681 548 -133
*This pull request uses carry forward flags. Click here to find out more.
|
Comment on lines
75
to
88
# def gate_optimal_encoding_circuit(code: CSSCode) -> QuantumCircuit: | ||
# """Synthesize an encoding circuit for the given CSS code using the minimal number of gates. | ||
|
||
# Args: | ||
# code: The CSS code to synthesize the encoding circuit for. | ||
# optimize_depth: Whether to optimize the depth of the circuit. | ||
|
||
# Returns: | ||
# The synthesized encoding circuit and the qubits that are used to encode the logical qubits. | ||
# """ | ||
# logging.info("Starting optimal encoding circuit synthesis.") | ||
# checks, logicals, _ = _get_matrix_with_fewest_checks(code) | ||
# checks, cnots = heuristic_gaussian_elimination(np.vstack((checks, logicals)), parallel_elimination=optimize_depth) | ||
# cnots = cnots[::-1] |
Check notice
Code scanning / CodeQL
Commented-out code
This comment appears to contain commented-out code.
pehamTom
force-pushed
the
encoding-circuits
branch
from
September 9, 2024 11:35
c1e973b
to
28d48c8
Compare
These will be needed later for the encoder synthesis.
Encoding wasn't optimal before. Consider the logicals as a group.
pehamTom
force-pushed
the
encoding-circuits
branch
from
September 9, 2024 11:36
28d48c8
to
acec0b3
Compare
Also added example circuits for the five qubit code and the 8,3,3 Gottesman code. Also moved Notebooks to example folder.
Messed up in the merge.
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR introduces functionality to automatically synthesize encoder circuits for arbitrary stabilizer codes. Since this is closely related to state preparation circuit synthesis, this PR refactors and unifies the respective synthesis methods into a
circuit_synthesis
module.Planned Features:
Optimal (gate or depth) circuit synthesis for non-CSS ancilla statesHeuristic circuit synthesis for non-CSS ancilla statesThe last parts were canceled because qecc functionality already allows for the construction of such state preparation circuits.
Checklist: