mqt.qecc.circuit_synthesis.exact.search¶
Search strategies for exact synthesis.
Functions¶
|
Synthesize optimal circuit for given target using exact methods. |
Module Contents¶
- synthesize_isometry_exact(target: StabilizerTableau | CheckMatrix, target_kind: TargetKind, objective: Objective, lower_bound: int = 0, upper_bound: int = 10, x_logicals: StabilizerTableau | CheckMatrix | None = None, z_logicals: StabilizerTableau | CheckMatrix | None = None, verify: bool = True, allow_qubit_permutation: bool = True, gate_set: dict[str, type[SymbolicGateOperation]] | None = None, use_symmetry_breaking: bool = False, max_two_qubit_gates: int | None = None, timeout: int | None = None, use_exponential_backoff: bool = False, min_timeout: int = 1) SynthesisResult[source]¶
Synthesize optimal circuit for given target using exact methods.
The gate family (Clifford vs CSS-CNOT) is inferred from
target_kind. The number of logical qubitskis derived from the provided logicals.- Parameters:
target – Target stabilizer generators (StabilizerTableau) or check matrix (CheckMatrix).
target_kind – Kind of synthesis problem.
objective – Optimization objective (gate count or depth).
lower_bound – Lower bound on resource count.
upper_bound – Upper bound on resource count.
x_logicals – Logical X operators. Required for CLIFFORD_UNITARY, CLIFFORD_ISOMETRY, and CSS_ISOMETRY with X-type checks. Must be a StabilizerTableau for Clifford synthesis.
z_logicals – Logical Z operators. Required for CLIFFORD_UNITARY, CLIFFORD_ISOMETRY, and CSS_ISOMETRY with Z-type checks. Must be a StabilizerTableau for Clifford synthesis.
verify – Whether to verify synthesized circuit.
allow_qubit_permutation – Allow qubit permutation in the terminal constraint.
gate_set – Custom gate set. If None, uses the standard gate set for the inferred family.
use_symmetry_breaking – Add symmetry-breaking constraints to prune the SAT search space.
max_two_qubit_gates – Maximum total number of two-qubit (CX/CNOT) gates allowed in the circuit. Only meaningful for depth-optimal synthesis, where it constrains the CNOT count while still minimizing depth. Ignored for gate-count synthesis (where the gate count already bounds the total).
timeout – Per-bound solver timeout in seconds. In the default fixed-timeout strategy the first timeout stops the search immediately. When
use_exponential_backoffis enabled this becomes the maximum per-bound budget.use_exponential_backoff – Use exponential-backoff search instead of the default fixed-timeout linear scan. The search starts at
min_timeoutseconds per bound and doubles the budget after each full pass over remaining (timed-out) bounds, up totimeout. Bounds proven UNSAT are dropped permanently. Once a SAT solution is found, a descending phase tries lower bounds at the maximum budget. Not guaranteed to find the optimum within the time budget, but often finds good solutions faster in practice.min_timeout – Starting per-bound timeout in seconds for the exponential-backoff strategy. Only used when
use_exponential_backoffis True.
- Returns:
SynthesisResult with circuit and metadata.
- Raises:
ValueError – If parameters are invalid.