46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
---
|
|
title: align_right (v0.31)
|
|
description: API reference for qiskit.pulse.builder.align_right in qiskit v0.31
|
|
in_page_toc_min_heading_level: 1
|
|
python_api_type: function
|
|
python_api_name: qiskit.pulse.builder.align_right
|
|
---
|
|
|
|
<span id="qiskit-pulse-builder-align-right" />
|
|
|
|
# qiskit.pulse.builder.align\_right
|
|
|
|
<Function id="qiskit.pulse.builder.align_right" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.18/qiskit/pulse/builder.py" signature="align_right()">
|
|
Right alignment pulse scheduling context.
|
|
|
|
Pulse instructions within this context are scheduled as late as possible by shifting them right to the latest available time.
|
|
|
|
Examples:
|
|
|
|
```python
|
|
from qiskit import pulse
|
|
|
|
d0 = pulse.DriveChannel(0)
|
|
d1 = pulse.DriveChannel(1)
|
|
|
|
with pulse.build() as pulse_prog:
|
|
with pulse.align_right():
|
|
# this pulse will start at t=0
|
|
pulse.play(pulse.Constant(100, 1.0), d0)
|
|
# this pulse will start at t=80
|
|
pulse.play(pulse.Constant(20, 1.0), d1)
|
|
pulse_prog = pulse.transforms.block_to_schedule(pulse_prog)
|
|
|
|
assert pulse_prog.ch_stop_time(d0) == pulse_prog.ch_stop_time(d1)
|
|
```
|
|
|
|
**Yields**
|
|
|
|
None
|
|
|
|
**Return type**
|
|
|
|
`AlignmentKind`
|
|
</Function>
|
|
|