Phase and Frame in QUA¶
This page will discuss the concepts of frame and phase, how they affect the OPX's output, and the API that
relates to them, namely, the reset_frame()
and reset_phase()
commands.
Every time we use the play()
command on a specific element, the output pulse will have a total phase calculated from two
separate contributions:
- The global phase associated with the rotating frame of the element, based on its intermediate frequency (IF) and time passed from the beginning of the sequence
, . - The frame phase,
, which is the phase within the rotating frame. By default, but we can control it using the commandframe_rotation_2pi()
(It is also possible to useframe_rotation()
, but not recommended).
Global Phase¶
Unless we actively change the global phase, update_frequency()
.
There are a few ways in which the global phase associated with an element can be changed. Using the command
reset_phase()
we effectively define a constant phase reset_phase()
was applied. From that point forward the phase
Note
This means that the global phase after the reset_phase()
command will be reset_phase()
command used in the sequence.
It is not possible to set reset_phase()
command is used.
Another command that will change the global phase is
update_frequency()
. When using the flag
keep_phase=True
, the phase of the pulse will be continuous through the frequency change, as can be seen in figure 1 indicated by the first dashed black line. The phase continuity results in a change to the global phase, reset_phase()
, so if we update to the frequency with the flag keep_phase=False
afterward, the global phase will be reevaluated from the beginning of the sequence (or the last phase reset), as can be seen in figure 1 indicated by the second
dashed black line.
Note
Phase behavior of update_frequency
By default keep_phase=False
, in this case the phase of the signal
where
To maintain a continuous phase through the transition, use keep_phase=True
. This will update the phase according to the rule:
Frame Phase¶
The frame phase is constant in relation to the element's global phase, i.e., the phase in the rotating frame.
At the beginning of a sequence, the frame phase is defined as frame_rotation()
and frame_rotation_2pi()
, we can control reset_frame()
we set the frame phase
back to zero,
Note
Resetting the global phase will not reset the frame phase. So if we want to reset the total phase of an element
to zero, we need to use both reset_phase()
and reset_frame()
.
Fig. 2: Simulation of the OPX+ output showing, a frame_rotation_2pi(0.5, element) - first dashed line, a reset_frame(element) - second dashed line, and reset_phase(element) - third dashed line. The blue signal is the reference signal, and all operations are performed on the orange signal.
Further Examples¶
QUA code examples illustrating these concepts can be found in our GitHub Repository