iqm.error_reduction_tools.utils.readout_twirling_strings.generate_rot_strings#
- iqm.error_reduction_tools.utils.readout_twirling_strings.generate_rot_strings(qpu_topology=None, active_qubits=None, strategy='LOCAL', max_twirling=None)#
Generate readout twirling strings for the requested strategy.
- Parameters:
qpu_topology (QPUTopology | None) – Topology object providing qubits, neighbors, and control lines. Required for the
LOCALandPROBELINESstrategies. May beNoneforHADAMARDandMINIMALwhen active_qubits is provided explicitly.active_qubits (list[str] | None) – Subset of qubits to include. If
None, labels are derived from qpu_topology (which must then be provided).strategy (str) – Twirling strategy name. Matching is case-insensitive and ignores surrounding whitespace.
max_twirling (int | None) – Maximum number of strings for strategies that can be expanded.
- Returns:
A list of dictionaries mapping each active qubit label to
"I"or"X".- Raises:
ValueError – If the strategy is unknown, size constraints are not satisfied, or required arguments are missing.
- Return type: