qiskit-documentation/docs/api/qiskit/0.40/qiskit.pulse.transforms.fla...

31 lines
940 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: flatten
description: API reference for qiskit.pulse.transforms.flatten
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.pulse.transforms.flatten
---
# qiskit.pulse.transforms.flatten
<Function id="qiskit.pulse.transforms.flatten" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.23/qiskit/pulse/transforms/canonicalization.py" signature="flatten(program)">
Flatten (inline) any called nodes into a Schedule tree with no nested children.
**Parameters**
**program** ([`Schedule`](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")) Pulse program to remove nested structure.
**Return type**
[`Schedule`](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")
**Returns**
Flatten pulse program.
**Raises**
[**PulseError**](pulse#qiskit.pulse.PulseError "qiskit.pulse.PulseError") When invalid data format is given.
</Function>