Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version


reference(name, *extra_keys)

GitHub(opens in a new tab)

Refer to undefined subroutine by string keys.

A Reference instruction is implicitly created and a schedule can be separately registered to the reference at a later stage.

from qiskit import pulse
with as main_prog:
    pulse.reference("x_gate", "q0")
with as subroutine:, 0.1, 40), pulse.DriveChannel(0))
main_prog.assign_references(subroutine_dict={("x_gate", "q0"): subroutine})


  • name (str) – Name of subroutine.
  • extra_keys (str) – Helper keys to uniquely specify the subroutine.
Was this page helpful?
Report a bug or request content on GitHub.