qiskit-documentation/docs/api/qiskit/0.36/qiskit.pulse.transforms.blo...

36 lines
1.1 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: block_to_schedule
description: API reference for qiskit.pulse.transforms.block_to_schedule
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.pulse.transforms.block_to_schedule
---
# qiskit.pulse.transforms.block\_to\_schedule
<Function id="qiskit.pulse.transforms.block_to_schedule" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.20/qiskit/pulse/transforms/canonicalization.py" signature="block_to_schedule(block)">
Convert `ScheduleBlock` to `Schedule`.
**Parameters**
**block** (`ScheduleBlock`) A `ScheduleBlock` to convert.
**Return type**
`Schedule`
**Returns**
Scheduled pulse program.
**Raises**
* **UnassignedDurationError** When any instruction duration is not assigned.
* [**PulseError**](pulse#qiskit.pulse.PulseError "qiskit.pulse.PulseError") When the alignment context duration is shorter than the schedule duration.
<Admonition title="Note" type="note">
This transform may insert barriers in between contexts.
</Admonition>
</Function>