mqt.qecc.circuit_synthesis.transvection¶
Transvection-based candidate generation for non-CSS stabilizer codes.
Classes¶
Generates transvection candidates using greedy heuristic. |
Functions¶
|
Perform lexicographical comparison of two NumPy arrays using Numba. |
|
Compute R1 and R2 matrices from a symplectic matrix using Numba. |
|
Check if the given stabilizer tableau is in terminal form for transvection elimination. |
|
Score the given symplectic matrix using the default symplectic heuristic with Numba. |
|
Numba-optimized score_symplectic function. |
|
Reduce a TERMINAL symplectic matrix by applying SWAPs to align blocks on diagonal. |
|
Reduce diagonal blocks to identity using single-qubit Cliffords and Paulis. |
|
Reduce a TERMINAL symplectic matrix to identity using SWAP/H/S/Pauli gates. |
|
Reduce a TERMINAL symplectic matrix to a permuted identity using only single-qubit gates. |
|
Determine Pauli corrections so that the tableau matches the desired sign bits. |
Module Contents¶
- class GreedyTransvectionGenerator(filters: Sequence[OperationFilter] | None = None)[source]¶
Bases:
mqt.qecc.circuit_synthesis.elimination.CandidateGeneratorGenerates transvection candidates using greedy heuristic.
- get_candidates(tableau: mqt.qecc.circuit_synthesis.types.BinaryMatrix) Sequence[tuple[TableauOperation, int | tuple[int, ...]]][source]¶
Generate transvection candidates sorted by heuristic score.
- update(op: TableauOperation, tableau: mqt.qecc.circuit_synthesis.types.BinaryMatrix) None[source]¶
Update operation history and filters after applying an operation.
- lexicographical_compare_np(arr1: ndarray, arr2: ndarray) bool[source]¶
Perform lexicographical comparison of two NumPy arrays using Numba.
- r1_r2(symplectic: ndarray) tuple[ndarray, ndarray][source]¶
Compute R1 and R2 matrices from a symplectic matrix using Numba.
- is_terminal_transvection(tableau: PauliTableau) bool[source]¶
Check if the given stabilizer tableau is in terminal form for transvection elimination.
- score_symplectic_numba(symplectic: ndarray, n: int) tuple[ndarray, int][source]¶
Score the given symplectic matrix using the default symplectic heuristic with Numba.
- score_symplectic(tableau: PauliTableau) tuple[ndarray, int][source]¶
Numba-optimized score_symplectic function.
- reduce_with_swaps(tableau: PauliTableau) tuple[EliminationSequence, PauliTableau][source]¶
Reduce a TERMINAL symplectic matrix by applying SWAPs to align blocks on diagonal.
- reduce_with_single_qubit_cliffords(tableau: PauliTableau) tuple[EliminationSequence, PauliTableau][source]¶
Reduce diagonal blocks to identity using single-qubit Cliffords and Paulis.
- reduce_single_qubit_gates_and_swaps(operations: EliminationSequence, tableau: PauliTableau) tuple[EliminationSequence, PauliTableau][source]¶
Reduce a TERMINAL symplectic matrix to identity using SWAP/H/S/Pauli gates.
- reduce_without_swaps(tableau: PauliTableau) tuple[EliminationSequence, PauliTableau][source]¶
Reduce a TERMINAL symplectic matrix to a permuted identity using only single-qubit gates.
- fix_tableau_signs_in_place(tableau: PauliTableau) list[PauliOperation][source]¶
Determine Pauli corrections so that the tableau matches the desired sign bits.