Characterization (qiskit.ignis.characterization)


rabi_schedules(amp_list, qubits, pulse_width)

Generates schedules for a rabi experiment using a Gaussian pulse

drag_schedules(beta_list, qubits, pulse_amp, …)

Generates schedules for a drag experiment doing a pulse then the - pulse

RabiFitter(backend_result, xdata, qubits, fit_p0)

Rabi Experiment fitter

DragFitter(backend_result, xdata, qubits, fit_p0)

Drag Experiment fitter

get_single_q_pulse(inst_map, qubits)

Get the DRAG parameters for the single qubit pulse

update_u_gates(drag_params[, …])

Update the cmd_def with new single qubit gate values


Design and analyze experiments for characterizing device coherence (e.g. T1, T2). See the following example of T1 estimation.

Generation of coherence circuits: these circuits set the qubit in the excited state, wait different time intervals, then measure the qubit.

import numpy as np
from qiskit.ignis.characterization.coherence import t1_circuits

num_of_gates = np.linspace(10, 300, 5, dtype='int')
gate_time = 0.1

# Note that it is possible to measure several qubits in parallel
qubits = [0, 2]

t1_circs, t1_xdata = t1_circuits(num_of_gates, gate_time, qubits)

Backend execution: actually performing the experiment on the device (or simulator).

import qiskit
from qiskit.providers.aer.noise.errors.standard_errors \
            import thermal_relaxation_error
from qiskit.providers.aer.noise import NoiseModel

backend = qiskit.Aer.get_backend('qasm_simulator')
shots = 400

# Let the simulator simulate the following times for qubits 0 and 2:
t_q0 = 25.0
t_q2 = 15.0

# Define T\ :sub:`1` noise:
t1_noise_model = NoiseModel()
thermal_relaxation_error(t_q0, 2*t_q0, gate_time),
                        'id', [0])
    thermal_relaxation_error(t_q2, 2*t_q2, gate_time),
    'id', [2])

# Run the simulator
t1_backend_result = qiskit.execute(t1_circs, backend, shots=shots,

Analysis of results: deduction of T1, based on the experiments outcomes.

import matplotlib.pyplot as plt
from qiskit.ignis.characterization.coherence import T1Fitter

plt.figure(figsize=(15, 6))

t1_fit = T1Fitter(t1_backend_result, t1_xdata, qubits,
                  fit_p0=[1, t_q0, 0],
                  fit_bounds=([0, 0, -1], [2, 40, 1]))

for i in range(2):
    ax = plt.subplot(1, 2, i+1)
    t1_fit.plot(i, ax=ax)
[19.75629716129194, 16.486990665451838]
[3.358580488452602, 1.291599179133599]
{'0': [array([ 0.93664502, 19.75629716,  0.08727868]), array([ 1.08052514, 16.48699067, -0.06258161])]}
{'0': [array([0.07917277, 3.35858049, 0.08321784]), array([0.03314617, 1.29159918, 0.03609343])]}

Combine with new results:

t1_backend_result_new = qiskit.execute(t1_circs, backend,

plt.figure(figsize=(15, 6))
for i in range(2):
    ax = plt.subplot(1, 2, i+1)
    t1_fit.plot(i, ax=ax)

t1_circuits(num_of_gates, gate_time, qubits)

Generate circuits for T1 measurement.

t2_circuits(num_of_gates, gate_time, qubits)

Generate circuits for T2 (echo) measurement, by a CPMG sequence.

t2star_circuits(num_of_gates, gate_time, qubits)

Generate circuits for T2* measurement.

T1Fitter(backend_result, xdata, qubits, …)

Estimate T1, based on experiments outcomes,

T2Fitter(backend_result, xdata, qubits, …)

Estimate T2, based on experiments outcomes.

T2StarFitter(backend_result, xdata, qubits, …)

Estimate T2*, based on experiments outcomes.


ampcal_1Q_circuits(max_reps, qubits)

Generates circuit for measuring the amplitude error of the single qubit gates

anglecal_1Q_circuits(max_reps, qubits[, …])

Generates circuit for measuring the angle error of the single qubit gate

ampcal_cx_circuits(max_reps, qubits, …)

Generates circuit for measuring the amplitude error of the cx gate

anglecal_cx_circuits(max_reps, qubits, …)

Generates circuit for measuring the angle error of the cx gate

AmpCalFitter(backend_result, xdata, qubits, …)

Amplitude error fitter

AngleCalFitter(backend_result, xdata, …)

Amplitude error fitter

AmpCalCXFitter(backend_result, xdata, …)

Amplitude error fitter

AngleCalCXFitter(backend_result, xdata, …)

Amplitude error fitter


zz_circuits(num_of_gates, gate_time, qubits, …)

Generates circuit for measuring ZZ.

ZZFitter(backend_result, xdata, qubits, …)

ZZ fitter

Base Fitters

BaseCoherenceFitter(description, …[, …])

Base class for fitters of characteristic times

BaseGateFitter(description, backend_result, …)

Base class for fitters of gate errors