Quantum Computing: Understanding Pulses and Qiskit Calibration

Shravan Patel
6 min readMay 18, 2024

Quantum computing has emerged as a transformative field with the potential to solve complex problems that classical computers can’t. Central to quantum computing are qubits, the fundamental units of information. Unlike classical bits, qubits can exist in superpositions and exhibit quantum entanglement, enabling quantum computers to perform parallel computations at a level not achievable with classical systems.

To control these qubits, quantum computers use a variety of quantum gates, which operate in a fundamentally different way than classical logic gates. Quantum gates manipulate qubits through carefully crafted pulses of electromagnetic energy, designed to induce specific quantum states. These operations, often represented abstractly as unitary matrices, are used by quantum algorithms to perform complex tasks like Shor’s algorithm for factoring large numbers or Grover’s algorithm for searching unsorted databases.

In quantum computing platforms like IBM’s Qiskit, pulse-level control has emerged as a powerful tool for precise manipulation of qubits. Pulse-level programming allows for direct control over the signals sent to the quantum hardware, offering users the flexibility to create custom gates, optimize existing ones, and calibrate circuits for improved accuracy. With pulse schedules in Qiskit, you can fine-tune the pulses to manage issues like qubit decoherence and gate errors, ultimately leading to more reliable quantum computations.

This article explores how quantum computing works at the pulse level, detailing how quantum circuits are constructed and optimized using Qiskit’s pulse capabilities. We will discuss how calibration at the pulse level is essential for maintaining quantum coherence and reducing error rates. We’ll also examine real-world examples of pulse schedules in Qiskit, showcasing their role in achieving high-fidelity quantum gates and supporting advanced quantum algorithms. But before we delve into the exciting stuff, lets first look at what are quantum gates on pulse level.

Quantum Gates and Pulses

Quantum gates manipulate qubits by applying precise pulses of electromagnetic radiation, typically in the microwave frequency range. These pulses, often referred to as control pulses or control signals, are carefully tailored to interact with specific physical properties of the qubits, such as their energy levels.

Single-qubit gates in superconducting qubits are implemented by applying a brief pulse of microwave radiation. If the frequency of the microwave pulse precisely matches the resonant frequency of the qubit, it induces a rotation of the qubit state. By modulating the frequency, amplitude, and duration of these pulses, quantum gates can induce controlled transitions between quantum states, enabling complex quantum computations. In addition to this, we can manipulate the amplitude and phase of the qubit’s wavefunction, enabling the creation of superposition states. This precise control over microwave pulses allows for the implementation of various single-qubit gates with high fidelity and accuracy in superconducting qubit systems.

Now we will see how qiskit interprets some of the common gates that are used in quantum circuits in terms of pulses:

  1. X-gate

The Figure 1 below shows what is a X-gate in terms of microwave pulse (or pulse schedule) and Figure 2 shows what happens when we apply a X-gate in our quantum circuit.

Figure 1: X-gate in a quantum circuit is just a X-pulse (sometimes called π-pulse) applied at the qubit resonance frequency to rotate the qubit state about X-axis by 180 degrees
Figure 2: Qubit transitions from |0⟩ to |1⟩ after applying a X-pulse.

2. HGate and ZGate on a single qubit

For second example, we will look at a quantum circuit that has a Hadamard gate (HGate) and a ZGate applied on a single qubit, and see how it looks like in terms of pulses. But because HGate and ZGate are not basis gates in the backends provided by qiskit, we will have to first transpile the circuit as shown in Figure 3(a). Once the circuit is transpiled we can look at the pulse schedule shown in Figure 3(b) to understand how qiskit treats our quantum circuit in terms of pulses.

Figure 3: (a) Quantum circuit after transpiling using a backend, (b) The pulse representation of the transpiled circuit. The small circular arrows represent a phase shift (of π/2 and -π/2).

3. A general quantum circuit with measurements:

Here we will consider a quantum circuit that has one XGate, one CXGate, and two measurements carried out on both qubits. The Figure 4 shows how the circuit looks like in terms of pulses, or more appropriately how Qiskit interprets the quantum gates as pulses. This pulse schedule shows the exact sequence of pulses (starting from left and going to right) that are sent to the qubits inside the quantum computer to implement our quantum circuit. In this pulse schedule, pulses with light color represent real (in-phase) component of the pulse and the darker colored pulses represent the imaginary (quadrature) component of the pulses. Also we can see that for measurements roughly constant pulses (shown in pink color) are applied at the end to read-out the states of qubits.

Figure 4: Pulse schedule for quantum circuit. The dashed lines are separators (just for visual clarity) which separates the pulses for XGate, CXGate, and measurements.

Quantum gate calibration

In all the above cases, you’ll notice that the pulses were applied for a fixed duration. This is crucial because applying a pulse for a longer or shorter time can introduce errors in our quantum circuit and reduce quantum coherence. To improve the performance, fidelity, and robustness of the qubits, the quantum gates need to be calibrated by fine-tuning various pulse parameters.

Gate calibration is also crucial for mitigating the effects of drift, cross-talk, and other hardware-related issues that can impact gate fidelity. Drift refers to the gradual change in the performance of quantum components over time, which can lead to inconsistencies in gate operations if not regularly corrected. Cross-talk occurs when signals intended for one qubit inadvertently affect neighboring qubits, leading to unintended interactions and errors. Additionally, hardware-related issues such as thermal fluctuations, electromagnetic interference, and manufacturing imperfections can all degrade the precision and reliability of quantum gates.

To implement gate calibrations in our quantum circuit, Qiskit offers pulse-level programming, allowing users to have finer control over the time dynamics of the input signals.

Pulse Schedules

Most quantum algorithms can be described by using circuit operations alone i.e. users don’t have to worry too much about how a quantum gate is implemented at pulse level. However, when more control over low-level program implementation is needed, pulse gates can be used. With pulse gates, you can map a logical quantum circuit gate (like XGate) to a time-ordered sequence of pulses and alignment context called a ScheduleBlock.

A ScheduleBlock allows users to specify exact time dynamics by using the following set of instructions:

All of these instructions control certain signal lines (referred to as channels) going to the qubit inside the quantum computer. There are 4 different kinds of channels called Drive channel, Measure channel, Control channel, and Acquire channel.

  • Drive channel: Used to induce rotation of qubit state
  • Measure channel: Used to send in the read-out pulse to measure the qubit
  • Control channel: Used to control additional drive lines (like flux lines) for a a tunable qubits.
  • Acquire channel: Used to trigger ADCs (Analog to Digital Converters) to record the read-out signal.

An example of a pulse schedule is:

freq = 5.04e9 # frequency in Hz
drive_sigma = 10
drive_duration = 120
drive_amp = 0.05

with pulse.build(backend=backend, default_alignment='sequential', name='example schedule') as sched:
drive_chan = pulse.drive_channel(0)
pulse.set_frequency(freq, drive_chan)

# Drive pulse samples
pulse.play(pulse.Gaussian(duration=drive_duration,
sigma=drive_sigma,
amp=drive_amp), drive_chan)

Other than calibrating gates, pulse schedules can also be used to implement custom gates or implement complex gate sequences that may not be readily available in higher-level circuit design.

Conclusion

In summary, by leveraging pulse-level programming, users can optimize and customize gate operations beyond the constraints of basis gates, ensuring that logical quantum operations are faithfully implemented. The detailed exploration of pulse schedules, as demonstrated through examples of common gates like the XGate and complex gate sequences, illustrates the power and flexibility of pulse-level control in Qiskit. As the field of quantum computing continues to advance, mastering pulse programming and gate calibration will be key to unlocking the full potential of quantum hardware, paving the way for more robust and sophisticated quantum applications. To learn more about the pulse capabilities in Qiskit refer to the following links:

Qiskit documentation and the research paper on qiskit pulse

--

--