Qubit spectroscopy¶
Glad to have you here! In this section, we'll uncover:
- Parametric Waveform Generation:
- Intermediate Frequency Update
- Real-Time Processing:
- Processing of Acquired Waveforms
- Timing in QUA
- Element to PPU Cores
- align()
Eager to dive in?
The QUA program¶
The first parametric waveform adjustment we'll discuss is updating the frequency of the oscillator associated with qubit. The scanning of the signal driving the qubit enables performing spectroscopy.
| qubit_spectroscopy.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 | |
- The
update_frequency('qubit', f)function in QUA is translated by the compiler into PPU instructions, which modify the oscillator's frequency linked toqubit. The oscillator's frequency is determined by the QUA variablef, which the PPU can adjust in real-time. In this example,fchanges withinwith qua.for_()at line 30..
In line 37 (below), the final arguments of measure(...) instruct the PPU to dual demodulate the signal in real-time. This processed data, ready in tens of nanoseconds, is saved to I and Q QUA variables on the PPU. Demodulation and measure() helps retrieve information from your quantum device.
| qubit_spectroscopy.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 | |
- This code line performs dual demodulation on the digitized signal making use of the
integration weightsstored in the configuration dictionary. Note that the processed data is routed to theIandQQUA variables.
OPX+ or OPX1000 systems contain PPUs that support multiple threads, facilitating parallelism in QUA. Typically, qubit and resonator run on separate threads. To play their signals sequentially in qubit_spectroscopy.py, we must synchronize the timing between these threads.
| qubit_spectroscopy.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 | |
-
In our
configuration.py, thequbitelement is defined to work with include MWInput. This causes the compiler to allocate two threads specifically for the qubit in the QUA program. Additionally, the system ensures that different elements get different PPU threads. Consequently, thequbit_spectroscopy.pyuses by default 4 threads. -
Thread usage is also set by the number of real-time inputs to
qua.measure(). Here, twoqua.dual_demodinstructions use two threads, matching the threads the compiler allocates toresonator. However,qua.measure()could potentially use fourqua.dual_demodinstructions, requiring four threads.
The align() command aligns the qubit and resonator threads, ensuring synchronized, sequential execution.
| qubit_spectroscopy.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 | |
- This code ensures the qubit's thread finishes tasks like
update_frequencyandsaturationbefore starting the resonator'squa.measure(). Withqua.align(), manual timing adjustments aren't needed forqua.measure(). While this demonstrates a basic use ofqua.align(), its real power is in coordinating unpredictable quantum experiments, showcasing the strategic design of the PPU and QM platform.
QUA-libs
You can find the full qubit spectroscopy program in our qua-libs github repo in the following link.
Live Data Fetching
You will be learning more about live data fetching in the Power-Time Rabi module, but for now I want to share with you that you can't do live data fetching in simulations.
Other Real-Time Processing methods
It is worth highlighting that besides demodulation you also get access to time tagging (with nanoseconds and picosecond resolution) as well as integration. You just simply need to interchange the demod commands in measure() for the ones relevant to your experiment.
Linking QUA program to Configuration¶
In the QUA code qua.play('saturation', 'qubit') and qua.measure('readout', 'resonator', None, ...) directly use the dictionary. The outcome of spectroscopy is to have calibrated the qubit's intermediate frequency.
The Configuration
Below we point out where the intermediate frequencies for qubit and resonator can be adjusted for future use. In the QUA program, we modified the qubit frequency in real-time during calibration. However, due to the semi-static configuration, once we identify the resonance frequencies, we will updated them on the dictionary.
- At the start of this file, the
qubit_IFPython variable indicates the frequency in Hz for setting the oscillator. - For the
resonator, the frequency is given by theresonator_IFvariable. - Note that the QUA program uses the
readoutoperation, which should be paired with the real-time dual demodulation processing.
In lines 38 and 39 of the QUA program we instruct the PPU to dual demodulate the digitized signal and as part of the process the signal gets multiplied by cos, sin, and minus_sin which can be found in the integration weights dictionary below. The weights we used are the simplest one being constant for the duration of the demodulation window.
-
There is wide variety of integration weights that can be invoked during real-time processing in a
measure()command and are listed below. In the QUA code we usecos,sin, andminus_sinpointing toweightslisted in theintegration weightsdictionary. -
Each
weightcan have an arbitrary name (string) to fit your experimental needs, and as you can see here each weight has acosineandsinethus allowing introducing a rotation matrix to the digitized signal duringmeasure(). You can read more about the syntax of thewieghtsin the documentation.
Demod length and Pulse length
On the QM Platform, the output Pulse length (defining the microwave signal duration) and the raw ADC recording window are separate from the demodulation window. This means the demodulation window can be extended beyond the Pulse length. This is useful, for instance, when you want to capture the resonator's ring-down in the demodulation window. You could send a pulse for 1 microsecond and demodulate for 1.5 microseconds.
Now it is your turn¶
- Without using
qua.update_frequency(), create a spectroscopy sweep for the following frequencies [2, 3, 6, 8, 12] MHz. Verify that you succesfully created the five different pulses either usingsimulated_samplesor anoscilloscope. - Modify the real-time dual demodulation process to exclusively utilize
qua.demod.full()and still achieve identical result asIandQ. - Adjust the QUA program to generate the
qubitand theresonatorpulse to coincide in time as well as to have the same duration.
Test your knowledge¶
- Considering that the
qubitandresonatoroperate in separate threads having the possibility of generatingn paralellism, and needingqua.align()to make them sequential. How come at eachfor-loopiteration thequbitpulse always happens after theresonatorpulse?
Coming up¶
By working with the Rabi protocol, a fundamental experiment for qubits, you will learn to adjust pulse amplitudes and durations in real-time when sent to your qubit. Additionally, you'll explore real-time control flow techniques.