mqt.qecc.circuit_synthesis.exact.vars

Variable containers for Clifford exact synthesis encodings.

Classes

CliffordGateCountVars

SAT variables for a Clifford gate-count encoding instance.

CliffordDepthVars

SAT variables for a Clifford depth encoding instance.

Module Contents

class CliffordGateCountVars[source]

SAT variables for a Clifford gate-count encoding instance.

solver

Configured Z3 solver with all encoding constraints already added.

gate_sel

Map from gate name to per-slot selection booleans. Exactly one entry across all gate names is True per slot (enforced by a PbEq constraint in the encoding). The identity gate "ID" is never present — it is a depth-only concept.

alpha

Per-slot first-qubit index (target for single-qubit gates, control for two-qubit gates).

beta

Per-slot second-qubit index (only meaningful for two-qubit gates).

gate_set

Gate classes used during encoding, keyed by gate name. Needed by consumers (symmetry breaking, extraction) to determine gate properties such as IS_SELF_INVERSE and IS_TWO_QUBIT.

class CliffordDepthVars[source]

SAT variables for a Clifford depth encoding instance.

solver

Configured Z3 solver with all encoding constraints already added.

gate_vars

Map from gate name to [layer][idx] boolean arrays. The length of the inner list encodes the gate’s index structure:

  • n entries → single-qubit gate; idx is the qubit index.

  • n*(n-1) entries → ordered two-qubit gate (CX-like); idx encodes the ordered pair as ctrl*(n-1) + (tgt if tgt < ctrl else tgt-1).

  • n*(n-1)//2 entries → symmetric two-qubit gate (CZ-like); idx encodes the unordered pair as i*(2n-i-1)//2 + (j-i-1) with i < j.

n

Number of qubits; needed by consumers to decode pair indices.

gate_set

Gate classes used during encoding, keyed by gate name. Needed by consumers (symmetry breaking, extraction) to determine gate properties such as IS_SELF_INVERSE.