Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.pulse.builder.phase_offset

phase_offset(phase, *channels)

GitHub

Shift the phase of input channels on entry into context and undo on exit.

Examples:

import math
 
from qiskit import pulse
 
d0 = pulse.DriveChannel(0)
 
with pulse.build() as pulse_prog:
    with pulse.phase_offset(math.pi, d0):
        pulse.play(pulse.Constant(10, 1.0), d0)
 
assert len(pulse_prog.instructions) == 3

Parameters

  • phase (float) – Amount of phase offset in radians.
  • channels (PulseChannel) – Channels to offset phase of.

Yields

None

Return type

AbstractContextManager[None]

Was this page helpful?
Report a bug or request content on GitHub.