See also

A Jupyter notebook version of this tutorial can be downloaded here.

image0

Coupled qubits characterization#

This coupled-qubits characterization experiment aims to demonstrate two-qubit interactions between flux-tunable transmons. At the start of the experiment, two neighboring qubits with different \(f_{01}\) frequencies are prepared in the |1⟩ state. By playing a pulse on the flux line of the qubit with the highest frequency (\(q_0\) in this example), we can bring the |20⟩ and |11⟩ levels into resonance, which causes the two-qubit state to oscillate between the |11⟩ and |20⟩ states at a rate proportional to the coupling \(g\). For each full rotation \(\ket{11}\rightarrow\ket{20}\rightarrow\ket{11}\), the state picks up a global phase \(\pi\), which allows for the implementation of two-qubit gates. The goal of the characterization is to find the correct amplitude and duration of the pulse that should be played on the flux line of the high-frequency qubit, such that a \(\pi\) phase shift is accumulated, resulting in a CZ gate.

[1]:
import numpy as np
from xarray import open_dataset

from qblox_scheduler import HardwareAgent, Schedule
from qblox_scheduler.analysis.helpers import acq_coords_to_dims
from qblox_scheduler.operations import Measure, Reset, SquarePulse, X
from qblox_scheduler.operations.expressions import DType
from qblox_scheduler.operations.loop_domains import arange

Setup#

The hardware agent manages the connection to the instrument and ensures that pulses and acquisitions happen over the appropriate input and output channels of the Cluster. The cell below creates an instance of the HardwareAgent based on the hardware- and device-under-test configuration files in the ./dependencies/configs folder, allowing us to start doing measurements. We also define some convenient aliases to use throughout our measurements. For a more thorough discussion of the hardware- and device-under-test configuration files, check out this tutorial.

[2]:
# Set up hardware agent, this automatically connects to the instrument
hw_agent = HardwareAgent(
    hardware_configuration="./dependencies/configs/hw_config.json",
    quantum_device_configuration="./dependencies/configs/dut_config.json",
)

# convenience aliases
q0 = hw_agent.quantum_device.get_element("q0")
q2 = hw_agent.quantum_device.get_element("q2")
cluster = hw_agent.get_clusters()["cluster"]
hw_options = hw_agent.hardware_configuration.hardware_options
qubit = q0
/builds/0/.venv/lib/python3.10/site-packages/qblox_scheduler/qblox/hardware_agent.py:460: UserWarning: cluster: Trying to instantiate cluster with ip 'None'.Creating a dummy cluster.
  warnings.warn(

Experiment settings#

[3]:
# Flux settings
flux_start = 0.148
flux_stop = 0.155
flux_step = 0.000125

# Time settings
time_start = 25e-9
time_stop = 250e-9
time_step = 1e-9

repetitions = 1

Experiment schedule#

[4]:
coupled_qubits_sched = Schedule("coupled_qubits")

with (
    coupled_qubits_sched.loop(arange(0, repetitions, 1, DType.NUMBER)),
    coupled_qubits_sched.loop(arange(flux_start, flux_stop, flux_step, DType.AMPLITUDE)) as amp,
    coupled_qubits_sched.loop(arange(time_start, time_stop, time_step, DType.TIME)) as time,
):
    # Prepare both qubits in |0>
    start = coupled_qubits_sched.add(Reset(q0.name, q2.name))

    # Prepare both qubits in |1>
    coupled_qubits_sched.add(X(q0.name), ref_op=start)
    coupled_qubits_sched.add(X(q2.name), ref_op=start)

    # Play square pulse over the flux line of q0
    flux_pulse = coupled_qubits_sched.add(SquarePulse(amp=amp, duration=time, port=f"{q0.name}:fl"))

    # Measure q0
    coupled_qubits_sched.add(
        Measure(q0.name, coords={"amplitude": amp, "time": time}, acq_channel="S_21"),
        ref_op=flux_pulse,
    )

# Execute the experiment
coupled_qubits_data = hw_agent.run(coupled_qubits_sched)
if cluster.is_dummy:
    example_data = open_dataset("./dependencies/datasets/cphase_chevrons.hdf5", engine="h5netcdf")
    coupled_qubits_data.update({"S_21": example_data.S_21})

Analyze the experiment#

[5]:
coupled_qubits_data = acq_coords_to_dims(coupled_qubits_data, ["amplitude", "time"], "S_21")
np.abs(coupled_qubits_data.S_21).plot()
[5]:
<matplotlib.collections.QuadMesh at 0x7fbc8e134f70>
../../../_images/applications_superconducting_flux_tunable_transmon_120_cphase_chevron_10_1.png