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:
object
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
Merge contiguous
Wait
instructions into one if they are separated only byBlock
instructions.Skip processing leading
Wait
instructions.Skip processing trailing
Wait
instructions.Qubits on which dynamical decoupling should be applied.
Available decoupling gate sequences to chose from in this strategy.
Methods
__eq__
(other)Return self==value.
__repr__
()Return repr(self).
- Parameters:
- merge_contiguous_waits: bool = True#
Merge contiguous
Wait
instructions into one if they are separated only byBlock
instructions.
- target_qubits: frozenset[str] | None = None#
Qubits on which dynamical decoupling should be applied. If
None
, all qubits are targeted.
- gate_sequences: list[tuple[int, str | list[tuple[float, float]], 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
ratio
in descending order. Then the longest fitting pattern is determined by comparingratio
with the duration of the time window divided by the PRX gate duration.