Skip to content

measurement

tergite_autocalibration.lib.nodes.coupler.tqg_randomized_benchmarking.measurement

Classes:

Name Description
CZRBMeasurement

CZRBMeasurement

CZRBMeasurement(transmons: dict[str, ExtendedTransmon], couplers: dict[str, ExtendedCompositeSquareEdge])

Bases: BaseMeasurement

Methods:

Name Description
add_coupler_clock_resources

Add a clock resource for the coupler's "CZ" (controlled-Z) gate to the schedule

align_cliffords

The initial TwoQubitClifford decomposition,

schedule_function

Generates a schedule for performing randomized benchmarking (RB) experiments using Clifford gates

add_coupler_clock_resources

add_coupler_clock_resources(schedule: Schedule, coupler: str) -> None

Add a clock resource for the coupler's "CZ" (controlled-Z) gate to the schedule The frequency is adjusted by subtracting the coupler's "CZ" frequency from the downconversion factor

Parameters:

Name Type Description Default
schedule Schedule

The schedule to add resources to

required
coupler str

Name identifier for the coupler

required

align_cliffords

align_cliffords(coupler: str, clifford_sequence: list) -> list

The initial TwoQubitClifford decomposition, returns decompositions of Operations that look like: q0 O1 -- O2 -- O5 q1 -- O3 -- O6 coupler -- O4=CZ

i.e. the single qubit Operations are run consequantly for both qubits. This method aligns the single qubit operations, so they are run in parallel while padding with Identity operations where necessary: q0 O1 -- O2 -- O5 q1 O3 -- I -- O6 coupler -- O4=CZ

schedule_function

schedule_function(seeds: dict[str, int], loop_repetitions: int, number_of_cliffords: dict[str, ndarray], interleave_modes: dict[str, ndarray], coupler_dict: dict[str, dict], interleaving_clifford_id: Optional[int] = None, apply_inverse_gate: bool = True) -> Schedule

Generates a schedule for performing randomized benchmarking (RB) experiments using Clifford gates to measure qubit error rates. The schedule creates a sequence of operations including state preparation, random Clifford operations, inverse operations, and measurement.

The basic sequence for each shot is
  1. Reset qubits to ground state
  2. Apply random sequence of Clifford operations
  3. Apply inverse Clifford operations (optional)
  4. Measure qubit states
  5. Reset for next iteration
Parameters

seed : int Random seed for generating Clifford sequences, ensuring reproducibility. loop_repetitions : int Number of times to repeat the entire schedule for statistical averaging. number_of_cliffords : dict[str, np.ndarray] Dictionary mapping qubit names to arrays of Clifford operation counts. Each array specifies the number of random Clifford operations to apply in different experimental sequences. interleaving_clifford_id : Optional[int], default=None If provided, specifies the ID of a Clifford gate to interleave between random Clifford operations. Used for interleaved RB experiments to characterize specific gate fidelities. apply_inverse_gate : bool, default=True Whether to apply inverse Clifford operations after the random sequence. The inverse operations should return the qubits to their initial state in the absence of errors.

Returns

Schedule A complete experimental schedule containing all pulses, measurements, and control flow for the RB experiment.

Notes
  • The schedule includes proper clock resource initialization for both qubits and couplers to ensure correct timing and frequency control.
  • Measurements use three-state optimized readout for improved fidelity.
  • The schedule includes buffer times and idle pulses to ensure proper timing alignment between operations.
  • The last three elements of the Clifford sequence lengths are currently excluded (marked as TODO for investigation).