See also

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

Pinch Off#

Setup#

First, we are going to import the required packages.

[ ]:
from __future__ import annotations

import matplotlib.pyplot as plt
import numpy as np
from qcodes.instrument import find_or_create_instrument

from qblox_instruments import Cluster, ClusterType

Scan For Clusters#

We scan for the available devices connected via ethernet using the Plug & Play functionality of the Qblox Instruments package (see Plug & Play for more info).

!qblox-pnp list

[ ]:
cluster_ip = "10.10.200.42"
cluster_name = "cluster0"

Connect to Cluster#

We now make a connection with the Cluster.

[ ]:
cluster: Cluster = find_or_create_instrument(
    Cluster,
    recreate=True,
    name=cluster_name,
    identifier=cluster_ip,
    dummy_cfg=(
        {
            2: ClusterType.CLUSTER_QCM,
            4: ClusterType.CLUSTER_QRM,
            6: ClusterType.CLUSTER_QCM_RF,
            8: ClusterType.CLUSTER_QRM_RF,
            10: ClusterType.CLUSTER_QTM,
            12: ClusterType.CLUSTER_QRC,
            16: ClusterType.CLUSTER_QSM,
        }
        if cluster_ip is None
        else None
    ),
)

cluster.reset()
print(cluster.get_system_status())

Get connected modules#

[ ]:
# QTM modules
modules = cluster.get_connected_modules(lambda mod: mod.is_qsm_type)
# This uses the module of the correct type with the lowest slot index
module = list(modules.values())[0]

Pinch off Measurement

[ ]:
gate_ch = module.io_channel2
drain_ch = module.io_channel0

v_ds_target = 0.1

v_gs_start = -2.0
v_gs_stop = 0.0

num_points = 26

settling_time = 0.5
compliance_current = 100e-9  # A; abort if > compliance

gate_ch.source_mode("v_source")
drain_ch.source_mode("v_source")
drain_ch.measure_mode("fine_nanoampere")

v_gs_points = np.linspace(v_gs_start, v_gs_stop, num_points)

data_v_gs = []
data_i_d = []


try:
    drain_ch.set_voltage_wait(v_ds_target)
    gate_ch.set_voltage_wait(v_gs_points[0])

    for v_g in v_gs_points:
        gate_ch.set_voltage_wait(v_g)
        drain_ch.low_pass_filter_cutoff(10)  ## 10Hz, 100KHz or 250 KHz to filter noise
        i_drain = drain_ch.measure_current()
        data_v_gs.append(v_g)

        if abs(i_drain) > compliance_current:
            break

except TypeError:
    pass  # Workaround for known issue with dummy module.


# Plot the pinch off curve by displaying the drain current as a function of the gate voltage
if len(data_v_gs) > 0:
    plt.figure(figsize=(8, 5))
    plt.plot(data_v_gs, data_i_d, "b-o", markersize=4)
    plt.xlabel("Gate Voltage (V)")
    plt.ylabel("Drain Current (A)")
    plt.title(f"Pinch-off Curve (V_DS={v_ds_target}V)")
    plt.grid(True)
    plt.tight_layout()
    plt.show()
[ ]:
# if you would like to check the current status of your module, you can print your module snapshot via uncommenting the following line
# qsm_module.print_readable_snapshot(update=True)