qiskit-documentation/docs/api/qiskit/0.39/qiskit.pulse.transforms.inl...

33 lines
1.4 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: inline_subroutines
description: API reference for qiskit.pulse.transforms.inline_subroutines
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.pulse.transforms.inline_subroutines
---
# qiskit.pulse.transforms.inline\_subroutines
<Function id="qiskit.pulse.transforms.inline_subroutines" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.22/qiskit/pulse/transforms/canonicalization.py" signature="inline_subroutines(program)">
Recursively remove call instructions and inline the respective subroutine instructions.
Assigned parameter values, which are stored in the parameter table, are also applied. The subroutine is copied before the parameter assignment to avoid mutation problem.
**Parameters**
**program** (`Union`\[[`Schedule`](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule"), [`ScheduleBlock`](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock")]) A program which may contain the subroutine, i.e. `Call` instruction.
**Return type**
`Union`\[[`Schedule`](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule"), [`ScheduleBlock`](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock")]
**Returns**
A schedule without subroutine.
**Raises**
[**PulseError**](pulse#qiskit.pulse.PulseError "qiskit.pulse.PulseError") When input program is not valid data format.
</Function>