Chevron-Ramsey¶
Welcome aboard! This module will guide us through:
- Parametric Waveform Generation:
- Phase Update
- Real-Time Processing:
- Mathematics
Excited to get going?
The QUA program¶
The PPU's design allows you to easily adjust both the global and relative phases of the pulses sent to your qubits using QUA commands. In this example it will be the relative phase between two pi-half pulses. Kevin needs to explain frame_rotation().
| chevron_ramsey.py | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
- This code line adjusts the oscillator's relative phase compared to the qubit's reference frame. This allows you to perform rotations on the Bloch sphere along any axis that's relevant to your experiment. Moreover, the rotation axis can be determined by a measurement outcome, enabling dynamic circuit operations.
- If you need to reset the relative phase of the pulses to its initial state in relation to the qubit during your quantum experiment, you can use the
reset_frame()function in the element qubit thread.
The PPU stores variables and performs math operations, enabling real-time waveform adjustments. These operations can interact with QUA variables influenced by quantum measurements. We'll explore a phase calculation using the incrementing delay QUA variable.
| chevron_ramsey.py | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
- Every QUA variable is represented using 32 bits. The PPU doesn't automatically handle type casting between them. To smoothly handle casting between various variable types, you can utilize the Cast function in the Math library.
- In this example, we're multiplying fixed-value variables by a QUA variable, which changes with each iteration of the for-loops.
QUA-libs
You can find the full program in our qua-libs github repo in the following link.
In the reference frame of your qubit
Each element is linked to an oscillator in its associated PPU core. When a new QUA program begins, the phase of these oscillators is reset to a specific value. Throughout the QUA program's execution, the phase of the oscillators remains continuous. This distinctive trait ensures automatic coherence with the qubit you're working on. As a result, you stay in the qubit's rotating frame without needing any calculations for subsequent pulse manipulations. Skillfully managing pulse phases is an inherent feature of the QM platform.
Now it is your turn¶
- The function
frame_rotation_2pi(Cast.mul_fixed_by_int(Cast.mul_fixed_by_int(1e-9, f), 4 * delay),"qubit")has three inner operations:Cast.mul_fixed_by_int(1e-9, f),4 * delay, andCast.mul_fixed_by_int(). Decompose these operations, perform them individually, and save the results into QUA variables and pass them to a data stream. Retrieve the results onto your computer and verify that the PPU executed the calculations correctly. - Implement the
frame_rotation_2pi()function using theamplitude matrixand employ real-time mathematical operations to calculate both cosine and sine.
Test your knowledge¶
- How can you utilize real-time mathematics together with
frame_rotation()to replicate the functionality offrame_rotation_2pi()? - How would include
delay = 0into the QUA program to createqua.play('x90', 'qubit') - qua.wait(0) - qua.play('x90', 'qubit')? Do not use QUA if-statement. - What would the result be if you were to remove
qua.reset_frame()in line 60 of the QUA program?
Coming up¶
In the upcoming module, we'll elevate a routine experiment by introducing advanced techniques. You'll navigate through the process of performing an Active Reset, making real-time decisions based on the outcomes from your device.