autoqasm.pulse.pulse module
Pulse instructions that apply to frames or qubits.
- autoqasm.pulse.pulse.set_frequency(frame: Frame, frequency: float) None[source]
Adds an instruction to set the frequency of the frame to the specified
frequencyvalue.- Parameters:
frame (Frame) – Frame for which the frequency needs to be set.
frequency (float) – Frequency value to set for the specified frame.
- autoqasm.pulse.pulse.shift_frequency(frame: Frame, frequency: float) None[source]
Adds an instruction to shift the frequency of the frame by the specified
frequencyvalue.- Parameters:
frame (Frame) – Frame for which the frequency needs to be shifted.
frequency (float) – Frequency value by which to shift the frequency for the specified frame.
- autoqasm.pulse.pulse.set_phase(frame: Frame, phase: float) None[source]
Adds an instruction to set the phase of the frame to the specified
phasevalue.- Parameters:
frame (Frame) – Frame for which the frequency needs to be set.
phase (float) – Phase value to set for the specified frame.
- autoqasm.pulse.pulse.shift_phase(frame: Frame, phase: float) None[source]
Adds an instruction to shift the phase of the frame by the specified
phasevalue.- Parameters:
frame (Frame) – Frame for which the phase needs to be shifted.
phase (float) – Phase value by which to shift the phase for the specified frame.
- autoqasm.pulse.pulse.set_scale(frame: Frame, scale: float) None[source]
Adds an instruction to set the scale on the frame to the specified
scalevalue.- Parameters:
frame (Frame) – Frame for which the scale needs to be set.
scale (float) – scale value to set on the specified frame.
- autoqasm.pulse.pulse.play(frame: Frame, waveform: Waveform) None[source]
Adds an instruction to play the specified waveform on the supplied frame.
- Parameters:
frame (Frame) – Frame on which the specified waveform signal would be output.
waveform (Waveform) – Waveform envelope specifying the signal to output on the specified frame.
- autoqasm.pulse.pulse.capture_v0(frame: Frame) BitVar[source]
Adds an instruction to capture the bit output from measuring the specified frame.
- Parameters:
frame (Frame) – Frame on which the capture operation needs to be performed.
- Returns:
BitVar – A BitVar with the result of the capture.
- autoqasm.pulse.pulse.delay(qubits_or_frames: Frame | list[Frame] | int | str | Qubit | _ClassicalVar | OQPyExpression | Qubit | list[int | str | Qubit | _ClassicalVar | OQPyExpression | Qubit], duration: float | FloatVar | FreeParameterExpression) None[source]
Adds an instruction to advance the frame clock by the specified
durationvalue.- Parameters:
qubits_or_frames (Frame | list[Frame] | QubitIdentifierType | list[QubitIdentifierType]) – Qubits or frame(s) on which the delay needs to be introduced.
duration (float | FloatVar | FreeParameterExpression) – Value (in seconds) defining the duration of the delay.
- autoqasm.pulse.pulse.barrier(qubits_or_frames: Frame | list[Frame] | int | str | Qubit | _ClassicalVar | OQPyExpression | Qubit | list[int | str | Qubit | _ClassicalVar | OQPyExpression | Qubit]) None[source]
Adds an instruction to align the frame clocks to the latest time across all the specified frames. When applied on qubits, it prevents compilations across the barrier, if the compiler supports barrier.
- Parameters:
qubits_or_frames (Frame | list[Frame] | QubitIdentifierType | list[QubitIdentifierType]) – Qubits or frame(s) on which the barrier needs to be introduced.