iqm.iqm_client.models.DDStrategy#
- class iqm.iqm_client.models.DDStrategy(*, merge_contiguous_waits: bool = True, target_qubits: frozenset[str] | None = None, skip_leading_wait: bool = True, skip_trailing_wait: bool = True, gate_sequences: list[tuple[int, str | list[tuple[float, float]], str]] = <factory>)#
- Bases: - BaseModel- Describes a particular dynamical decoupling strategy. - The current standard DD stategy can be found in - STANDARD_DD_STRATEGY, but users can use this class to provide their own dynamical decoupling strategies.- See Ezzell et al., Phys. Rev. Appl. 20, 064027 (2022) for information on DD sequences. - Attributes - Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - Merge contiguous - Waitinstructions into one if they are separated only by- Blockinstructions.- Qubits on which dynamical decoupling should be applied. - Skip processing leading - Waitinstructions.- Skip processing trailing - Waitinstructions.- Available decoupling gate sequences to chose from in this strategy. - Methods - Parameters:
 - merge_contiguous_waits: bool#
- Merge contiguous - Waitinstructions into one if they are separated only by- Blockinstructions.
 - target_qubits: frozenset[str] | None#
- Qubits on which dynamical decoupling should be applied. If - None, all qubits are targeted.
 - gate_sequences: list[tuple[int, str | PRXSequence, str]]#
- Available decoupling gate sequences to chose from in this strategy. - Each sequence is defined by a tuple of - (ratio, gate pattern, align):- ratio: Minimal duration for the sequence (in PRX gate durations) as integer. 
- gate pattern: Gate pattern can be defined in two ways. It can be a string containing “X” and “Y” characters, encoding a PRX gate sequence. For example, “YXYX” corresponds to the XY4 sequence, “XYXYYXYX” to the EDD sequence, etc. If more flexibility is needed, a gate pattern can be defined as a sequence of PRX gate argument tuples (that contain a rotation angle and a phase angle). For example, sequence “YX” could be written as - [(math.pi, math.pi / 2), (math.pi, 0)].
- align: Controls the alignment of the sequence within the time window it is inserted in. Supported values: - “asap”: Corresponds to a ASAP-aligned sequence with no waiting time before the first pulse. 
- “center”: Corresponds to a symmetric sequence. 
- “alap”: Corresponds to a ALAP-aligned sequence. 
 
 - The Dynamical Decoupling algorithm uses the best fitting gate sequence by first sorting them by - ratioin descending order. Then the longest fitting pattern is determined by comparing- ratiowith the duration of the time window divided by the PRX gate duration.
 - model_config: ClassVar[ConfigDict] = {}#
- Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. 
 
