Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.pulse.builder.reference

reference(name, *extra_keys)

GitHub

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 pulse.build() as main_prog:
    pulse.reference("x_gate", "q0")
 
with pulse.build() as subroutine:
    pulse.play(pulse.Gaussian(160, 0.1, 40), pulse.DriveChannel(0))
 
main_prog.assign_references(subroutine_dict={("x_gate", "q0"): subroutine})

Parameters

  • 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.