qiskit-documentation/docs/api/qiskit/0.41/qiskit.pulse.builder.phase_...

44 lines
1.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: phase_offset
description: API reference for qiskit.pulse.builder.phase_offset
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.pulse.builder.phase_offset
---
# qiskit.pulse.builder.phase\_offset
<Function id="qiskit.pulse.builder.phase_offset" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.23/qiskit/pulse/builder.py" signature="phase_offset(phase, *channels)">
Shift the phase of input channels on entry into context and undo on exit.
Examples:
```python
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`]
</Function>