Site Tools


qiskit-pulse

Pulse Programming

Pulse programming gives fine-grained control over quantum gates by specifying the microwave pulses sent to qubits. Instead of abstract gates like H or CNOT, you define the exact electromagnetic pulse shape, frequency, and duration.

Pulse programming is used for gate optimization, debugging hardware, and custom gates not in the standard set. It requires calibration data (gate times, frequencies) from the backend.

Gate-Level Pulse Definition

Gates are typically defined as pulses. Use Qiskit Experiments to calibrate optimal pulse parameters (amplitude, phase, duration):

from qiskit import QuantumCircuit, pulse, transpile
from qiskit.primitives import Estimator
 
# Access calibrated pulses
backend = ...  # IBM backend with calibration
 
# Get the instruction schedule for a gate
instruction_schedule = backend.defaults().instruction_schedule_map.get('x', (0,))
print(instruction_schedule.draw())
 
# Define a custom pulse-level instruction
with pulse.build() as custom_x:
    pulse.play(
        pulse.Gaussian(duration=160, amp=0.1, sigma=40),
        pulse.DriveChannel(0)
    )

Pulse Optimization

Calibrate gates to minimize error using Qiskit Experiments:

from qiskit_experiments.library import RoughXSXAmplitudeCal
 
# Find optimal X gate amplitude
exp = RoughXSXAmplitudeCal((0,), backend)
result = exp.run(backend).block_for_results()
 
# Extract calibrated value
calibrated_amp = result.analysis_results('xgate_amp').value
print(f"Optimal X amplitude: {calibrated_amp}")

Pulse programming is advanced and backend-specific. Most users work at the gate level; pulse programming is for researchers optimizing hardware or designing custom gates.

qiskit-pulse.md · Last modified: by 127.0.0.1