Plotting IQ Data in Qiskit

Foong Min Wong
2 min readApr 22, 2024

In radio frequency (RF) engineering, there is something called IQ data. IQ signals are commonly used in RF communication systems tasks such as modulation, demodulation, signal processing, and analysis. IQ data are complex signals that can be broken down into two components:

  • In-phase (I): It represents the real part and amplitude of the signal (Consine wave)
  • Quadrature (Q): It captures the imaginary part and phase of the signal (Sine wave)

Qubit control often involves applying microwave pulses or magnetic fields to manipulate the interaction between qubits. Analyzing the amplitude and phase shifts of the IQ data can reveal information such as the behavior of qubit (qubit state probabilities, either |0> or |1>), how effective the control pulse is (whether we should adjust the amplitude, frequency or duration of control pulses for better qubit state manipulation), systematic errors, etc.

IQ data plot is instrumental in characterizing and calibrating qubits. We could identify the resonant frequency, optimal pulse parameters, etc., as the plot indicates how a qubit responds to the microwave pulse.

Here’s an example of plotting randomly generated IQ data using Matplotlib:

Below is the IQ data plot generated from the code above. As shown in the color map, the qubit responds differently with varying pulse amplitudes/ excitation levels that rely on the strength of the microwave pulse. Since this plot is generated based on random data, the I and Q values scatter around.

Ideally, we should see a tight cluster of IQ points around the centroid with minimal fluctuations.

The plot above is generated via a plotter class in Qiskit, called IQPlotter, which visualizes IQ signal results. Here’s an example of plotting IQ data using Qiskit’s IQPlotter:

The IQ data points appear to be clustered in a roughly circular pattern, each point corresponds to the real and imaginary parts of the outcomes. Rather than being scattered randomly, this IQ plot shows distinct clusters and data dispersion.

--

--