-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #275 +/- ##
=======================================
+ Coverage 84.9% 88.0% +3.1%
=======================================
Files 51 53 +2
Lines 4664 4834 +170
Branches 372 372
=======================================
+ Hits 3961 4257 +296
+ Misses 703 577 -126
*This pull request uses carry forward flags. Click here to find out more.
|
# 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
c1e973b
to
28d48c8
Compare
These will be needed later for the encoder synthesis.
Encoding wasn't optimal before. Consider the logicals as a group.
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.
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: