mqt.qecc.circuit_synthesis.exact.verification¶
Independent verification of synthesized circuits.
Functions¶
|
Verify that circuit implements the target Clifford unitary up to input-qubit permutation. |
|
Verify that circuit prepares the target stabilizer state. |
|
Verify that circuit implements the target Clifford isometry. |
|
Verify that CNOT circuit prepares the target CSS state. |
|
Verify that CNOT circuit implements the target CSS isometry. |
Module Contents¶
- verify_clifford_unitary(circuit: CliffordIsometry, target: StabilizerTableau) bool[source]¶
Verify that circuit implements the target Clifford unitary up to input-qubit permutation.
The SAT encoding with allow_qubit_permutation=True finds circuits that implement the target Clifford composed with some input-qubit permutation. A permuted implementation is still valid (relabelling input wires costs no gates), so we check whether there exists a consistent permutation that maps actual rows to target rows with matching phases.
- Parameters:
circuit – Synthesized circuit.
target – Target Clifford unitary tableau (2n rows: n X-images then n Z-images).
- Returns:
True if circuit implements the target Clifford up to input-qubit permutation.
- verify_stabilizer_state(circuit: CliffordIsometry, stabilizers: StabilizerTableau) bool[source]¶
Verify that circuit prepares the target stabilizer state.
- Parameters:
circuit – Synthesized circuit.
stabilizers – Target stabilizer generators.
- Returns:
True if circuit prepares target state.
- verify_clifford_isometry(circuit: CliffordIsometry, target: StabilizerTableau, k: int) bool[source]¶
Verify that circuit implements the target Clifford isometry.
- Parameters:
circuit – Synthesized circuit.
target – Combined target tableau with logicals and stabilizers.
k – Number of logical qubits.
- Returns:
True if circuit implements target isometry.
- verify_css_state(circuit: CNOTCircuit, checks: CheckMatrix) bool[source]¶
Verify that CNOT circuit prepares the target CSS state.
- Parameters:
circuit – Synthesized CNOT circuit.
checks – Target CSS check matrix.
- Returns:
True if circuit prepares target CSS state.
- verify_css_isometry(circuit: CNOTCircuit, checks: CheckMatrix, logicals: CheckMatrix | StabilizerTableau | None, k: int) bool[source]¶
Verify that CNOT circuit implements the target CSS isometry.
- Parameters:
circuit – Synthesized CNOT circuit.
checks – Target CSS check matrix.
logicals – Target logical operators (CheckMatrix matching check type, or StabilizerTableau).
k – Number of logical qubits.
- Returns:
True if circuit implements target CSS isometry.