iqm.error_reduction_tools.readout_characterization.data_collection.create_calibration_circuits#
- iqm.error_reduction_tools.readout_characterization.data_collection.create_calibration_circuits(qubits, number_of_circuits, symmetrize=True, seed=None, equatorial_randomization=False)#
Generate readout error characterization (REC) circuits and preparation strings.
Creates circuits that prepare qubits in computational basis states (|0> or |1>) using I (identity) or X gates, then measure all qubits. Optionally applies equatorial randomization to X gates for improved error characterization.
- Parameters:
qubits (list[str]) – IQM qubit names to characterize (e.g., [‘QB1’, ‘QB2’]).
number_of_circuits (int) – Number of calibration circuits to generate.
symmetrize (bool) – If
True, generates complementary circuit pairs (I↔X) to balance |0> and |1> state preparations across all qubits.seed (int | None) – Random seed for reproducible circuit generation.
equatorial_randomization (bool) – If
True, randomize X gate phase angles (phi) around the Bloch sphere equator. This distributes state preparation over the XY plane.
- Returns:
- Raises:
ValueError – If qubits list is empty or
number_of_circuits< 1.- Return type:
Example
>>> circuits, preps = create_calibration_circuits(['QB1', 'QB2'], 4, symmetrize=True) >>> len(circuits), len(preps) (4, 4)