qiskit-documentation/docs/api/qiskit/0.26/qiskit.pulse.builder.set_ph...

34 lines
965 B
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: set_phase
description: API reference for qiskit.pulse.builder.set_phase
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.pulse.builder.set_phase
---
# qiskit.pulse.builder.set\_phase
<Function id="qiskit.pulse.builder.set_phase" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/pulse/builder.py" signature="set_phase(phase, channel, name=None)">
Set the `phase` of a pulse `channel`.
Examples:
```python
import math
from qiskit import pulse
d0 = pulse.DriveChannel(0)
with pulse.build() as pulse_prog:
pulse.set_phase(math.pi, d0)
```
**Parameters**
* **phase** (`float`) Phase in radians to set channel carrier signal to.
* **channel** ([`PulseChannel`](qiskit.pulse.channels#pulsechannel "qiskit.pulse.channels.PulseChannel")) Channel to set phase of.
* **name** (`Optional`\[`str`]) Name of the instruction.
</Function>