spin_pulse.transpilation.instructions.idle¶
Pulse description of idle qubit.
Classes¶
Represent an idle (delay) operation applied to one or more qubits. |
Module Contents¶
- class spin_pulse.transpilation.instructions.idle.IdleInstruction(qubits, duration=1)[source]¶
Bases:
spin_pulse.transpilation.instructions.pulse_instruction.PulseInstructionRepresent an idle (delay) operation applied to one or more qubits.
This instruction models the absence of active control during a time interval. It is used both for explicit delays in pulse scheduling and as a building block for dynamical decoupling sequences. The duration is expressed in time steps.
- - name
Name of the instruction (“delay”).
- Type:
- - qubits
List of qubits on which the idle operation acts.
- Type:
list[qiskit.circuit.Qubit]
- - duration
Duration of the idle period in time steps.
- Type:
Initialize an idle instruction on the specified qubits.
- Parameters:
- Returns:
The idle instruction is stored in the created object.
- Return type:
None
- plot(ax=None, t_start=0, label_gates=True)[source]¶
Plot the idle instruction as a flat line segment.
- Parameters:
- Returns:
The idle segment is drawn on the provided axis.
- Return type:
None
- to_hamiltonian()[source]¶
Convert the idle operation to its Hamiltonian representation.
The idle period corresponds to zero Hamiltonian evolution, resulting in no phase accumulation. This method returns a zero Hamiltonian and a zero frequency array compatible with the simulation interface.
- Returns:
Array of zeros of length
duration.- Return type:
ndarray
- to_dynamical_decoupling(hardware_specs, mode=None)[source]¶
Expand the idle instruction into a dynamical decoupling sequence.
Depending on the hardware_specs dynamical decoupling mode, this method replaces the idle period with a sequence of rotations and shorter idle segments. Supported dynamical decoupling modes include:
SPIN_ECHO: Inserts two \(\pi\) rotations with symmetric idle periods.
FULL_DRIVE: Applies repeated \(2\pi\) rotations to average out noise.
None: Returns the idle instruction unchanged.
- Parameters:
hardware_specs (HardwareSpecs) – Hardware configuration specifying the dynamical decoupling mode and available pulse shapes.
mode (spin_pulse.transpilation.dynamical_decoupling.DynamicalDecoupling | None)
- Returns:
List of PulseInstruction objects implementing the chosen dynamical decoupling sequence.
- Return type: