Path: blob/main/notebooks/ch-quantum-hardware/accessing_higher_energy_states.ipynb
3855 views
Accessing higher energy states with Qiskit Pulse
In most quantum algorithms/applications, computations are carried out over a 2-dimensional space spanned by and . In IBM's hardware, however, there also exist higher energy states which are not typically used. The focus of this section is to explore these states using Qiskit Pulse. In particular, we demonstrate how to excite the state and build a discriminator to classify the , and states.
We recommend reviewing the prior chapter before going through this notebook. We also suggest reading the Qiskit Pulse specifications (Ref 1).
Physics Background
We now give some additional background on the physics of transmon qubits, the basis for much of IBM's quantum hardware. These systems contain superconducting circuits composed of a Josephson junction and capacitor. For those unfamiliar with superconducting circuits, see the review here (Ref. 2). The Hamiltonian of this system is given by
where denote the capacitor and Josephson energies, is the reduced charge number operator and is the reduced flux across the junction. We work in units with .
Transmon qubits are defined in the regime where is small, so we may expand in a Taylor series (ignoring constant terms)
The quadratic term defines the standard harmonic oscillator. Each additional term contributes an anharmonicity.
Using the relations (for raising, lowering operators ), it can be shown that the system resembles a Duffing oscillator with Hamiltonian
where gives the excitation frequency () and is the anharmonicity between the and frequencies (). Drive terms can be added as needed.
If we choose to specialize to the standard 2-dimensional subspace, we can make sufficiently large or use special control techniques to suppress the higher energy states.
We begin by importing dependencies and defining some default variable values. We choose qubit 0 to run our experiments. We perform our experiments on the publicly available single qubit device ibmq_armonk.
We define some additional helper functions.
Next we include some default parameters for drive pulses.
given we have already calibrated X gate in the qubit subspace, which is available as XGate instruction in the quantum circuit. Here we calibrate transition in the higher energy subspace with pulse gate.
We focus on exciting the state and building a discriminator to classify , and states from their respective IQ data points. The procedure for even higher states (, , etc.) should be similar, but we have not tested them explicitly.
The process for building the higher state discriminator is as follows:
Compute the frequency.
Conduct a Rabi experiment to obtain the pulse amplitude for . To do this, we first apply a pulse to get from the to the state. Then, we do a sweep of drive amplitudes at the frequency obtained above.
Construct 3 schedules: a. Zero schedule: just measure the ground state. b. One schedule: apply a pulse and measure. c. Two schedule: apply a pulse, then a pulse and measure.
Separate the data from each schedule into training and testing sets and construct an LDA model for discrimination.
The first step in our calibration is to compute the frequency needed to go from the state. There are two methods to do this:
Do a frequency sweep from the ground state and apply very high power. If the applied power is large enough, two peaks should be observed. One at the frequency found in section 1 and one at the frequency. The frequency can be obtained by taking the difference of the two. Unfortunately, for
ibmq_armonk, the maximum drive power of is not sufficient to see this transition. Instead, we turn to the second method.Excite the state by applying a pulse. Then perform the frequency sweep over excitations of the state. A single peak should be observed at a frequency lower than the frequency which corresponds to the frequency.
We follow the second method described above.
Let's plot and fit the refined signal, using the standard Lorentzian curve.
Now that we have a good estimate for the frequency, we perform a Rabi experiment to obtain the pulse amplitude for the transition. To do so, we apply a pulse and then sweep over drive amplitudes at the frequency.
We plot and fit our data as before.
Finally, we build our discriminator for the , and states.
As a review, our three circuits are (again, recalling that our system starts in the state):
Measure the state directly (obtain centroid).
Apply pulse and then measure (obtain centroid).
Apply pulse, then pulse, then measure (obtain centroid).
We construct the program and plot the centroids in the IQ plane.
Now it is time to actually build the discriminator. We will use a machine learning technique called Linear Discriminant Analysis (LDA). LDA classifies an arbitrary data set into a set of categories (here , and ) by maximizing the distance between the means of each category and minimizing the variance within each category. For further detail, see here (Ref. 3).
LDA generates a line called a separatrix. Depending on which side of the separatrix a given data point is on, we can determine which category it belongs to.
We use scikit.learn for an implementation of LDA; in a future release, this functionality will be added released directly into Qiskit-Ignis (see here).
We observe a third centroid corresponding to the state. (Note: If the plot looks off, rerun the notebook.)
We begin by reshaping our result data into a format suitable for discrimination.
We begin by shaping the data for LDA.
Next, we split our training and testing data. The testing data is a vector containing an array of 0's (for the zero schedule, 1's (for the one schedule) and 2's (for the two schedule).
Finally, we set up our model and train it. The accuracy of our fit is printed.
The last step is to plot the separatrix.
Now that we have 3 centroids, the separatrix is no longer a line, but rather a curve containing a combination of two lines. In order to discriminate between , and states, our model checks where the IQ point lies relative to the separatrix and classifies the point accordingly.
D. C. McKay, T. Alexander, L. Bello, M. J. Biercuk, L. Bishop, J. Chen, J. M. Chow, A. D. C ́orcoles, D. Egger, S. Filipp, J. Gomez, M. Hush, A. Javadi-Abhari, D. Moreda, P. Nation, B. Paulovicks, E. Winston, C. J. Wood, J. Wootton, and J. M. Gambetta, “Qiskit backend specifications for OpenQASM and OpenPulse experiments,” 2018, https://arxiv.org/abs/1809.03452.
Krantz, P. et al. “A Quantum Engineer’s Guide to Superconducting Qubits.” Applied Physics Reviews 6.2 (2019): 021318, https://arxiv.org/abs/1904.06560.
Scikit-learn: Machine Learning in Python, Pedregosa et al., JMLR 12, pp. 2825-2830, 2011, https://scikit-learn.org/stable/modules/lda_qda.html#id4.