uniqc.calibration.xeb.patterns module

Parallel pattern generation for 2-qubit XEB.

Provides two modes: - auto mode: Given chip topology (list of edges), computes the minimum

parallel schedule using DSatur graph coloring on the conflict graph.

  • circuit mode: Given a compiled OriginIR circuit, extracts all 2-qubit gates and computes its effective parallelism schedule.

The conflict graph has one vertex per 2-qubit gate (or per edge in the chip topology for auto mode). Two vertices conflict if they share a qubit, meaning they cannot be executed in the same parallel round.

class uniqc.calibration.xeb.patterns.ParallelPatternGenerator(topology)[source]

Bases: object

Generator for parallel execution patterns of 2-qubit gates.

Supports two modes: - auto: Given a chip topology, partition all edges into parallel

groups that can be executed simultaneously.

  • circuit: Given an OriginIR string, extract all 2-qubit gates and compute the minimal parallel schedule for that circuit.

Parameters:

topology (list[tuple[int, int]])

auto_generate()[source]

Auto-generate parallel patterns for all edges in the topology.

Uses DSatur graph coloring on the conflict graph to find a minimal parallel schedule.

Returns:

ParallelPatternResult with groups of edges that can be executed in parallel in each round.

Return type:

ParallelPatternResult

from_circuit(originir)[source]

Analyze an OriginIR circuit and extract its parallel pattern.

Parses all 2-qubit gates, builds a conflict graph from qubit overlap, and DSatur-colors it to get the minimal parallel schedule.

Parameters:

originir (str) – Compiled circuit in OriginIR format.

Returns:

ParallelPatternResult describing the circuit’s effective parallelism.

Return type:

ParallelPatternResult

class uniqc.calibration.xeb.patterns.ParallelPatternResult(groups, n_rounds, chromatic_number, source)[source]

Bases: object

Result of a parallel pattern generation computation.

Parameters:
chromatic_number: int
groups: tuple[tuple[tuple[int, int], ...], ...]
n_rounds: int
source: str
to_dict()[source]
Return type:

dict[str, Any]