Skip to navigation

Using the Coulomb Blockade Models

Installation

We recommend using pip, poetry, or uv to install the package.

pip install conductorquantum

Authentication

The SDK requires an API key for authentication. Sign in and create a new API key. Remember, your API key is your access secret - keep it safe with environment variables.

Using environment variables:

Python
from dotenv import load_dotenv
import os
from conductorquantum import ConductorQuantum
# Load API key from .env file
load_dotenv()
TOKEN = os.getenv("CONDUCTOR_API_KEY")
# Initialize client
client = ConductorQuantum(token=TOKEN)

Or provide the API key directly:

Python
from conductorquantum import ConductorQuantum
# Initialize client with API key
client = ConductorQuantum(token="YOUR_API_KEY")

Usage Examples

Using the Coulomb Blockade Classifier

The Coulomb Blockade Classifier is a model that can classify a given current measurement as either in the Coulomb Blockade regime or not.

You can download an example file to follow along with the example:

Python
from dotenv import load_dotenv
import os
import numpy as np
from conductorquantum import ConductorQuantum
# Load API key from .env file
load_dotenv()
TOKEN = os.getenv("CONDUCTOR_API_KEY")
# Initialize client
client = ConductorQuantum(token=TOKEN)
# Load Coulomb blockade data (current measurement)
data = np.load("coulomb-blockade-classifier-v0.npy") # shape (n, )
# Detect Coulomb blockade peaks
result = client.control.models.run(
model="coulomb-blockade-classifier-v0",
data=data
)
# Access the classification result
is_coulomb_blockade = result.output["classification"]
print(f"Is Coulomb blockade: {is_coulomb_blockade}")
Output
Is Coulomb blockade: True

Using the Coulomb Blockade Peak Detector

The Coulomb Blockade Peak Detector is a model that can detect the peaks in a given current measurement.

You can download an example file to follow along with the example:

Python
from dotenv import load_dotenv
import os
import numpy as np
from conductorquantum import ConductorQuantum
# Load API key from .env file
load_dotenv()
TOKEN = os.getenv("CONDUCTOR_API_KEY")
# Initialize client
client = ConductorQuantum(token=TOKEN)
# Load Coulomb blockade data (current measurement)
data = np.load("coulomb-blockade-peak-detector-v0.npy") # shape (n, )
# Detect Coulomb blockade peaks
result = client.control.models.run(
model="coulomb-blockade-peak-detector-v0",
data=data
)
# Access the peak locations (indices)
peak_indices = result.output["peak_indices"]
print(f"Detected peaks at: {peak_indices}")
Output
Detected peaks at: [30, 38, 47, 55, 64, 72, 81, 89, 98]

Plotting the Output

Python
import matplotlib.pyplot as plt
plt.figure(figsize=(10, 5), dpi=300)
plt.plot(data, 'k-')
count = 0
for peak_index in result.output["peak_indices"]:
if count == 0:
plt.axvline(x=peak_index, color='r', linestyle='--', label='Peaks')
elif count > 0:
plt.axvline(x=peak_index, color='r', linestyle='--')
count += 1
plt.xlabel('Voltages (Indices)')
plt.ylabel('Current (a.u.)')
plt.legend()
plt.show()
Coulomb Blockade Peak Detector
Coulomb Blockade Peak Detector v0 Output

Similarly, for v1 of the Coulomb Blockade Peak Detector, you can download an example file and replace the model name in the example above with coulomb-blockade-peak-detector-v1, and you should see the following output:

Output
Detected peaks at: [156, 176, 199, 223, 244, 267, 289, 311, 333, 356, 378, 400, 424, 445, 468, 490]
Coulomb Blockade Peak Detector
Coulomb Blockade Peak Detector v1 Output

v1 is typically more accurate than v0 for larger sweep sizes of one hundred or more points.

Important Notes for Coulomb Blockade Models

  • Input dimensions: Input dimensions should ideally match the specified resolution of the model for the best results. You may need to interpolate or downsample your data to match the required shape. You can find the required input shapes for each model on the models overview page.
  • Data format: Input data should be a 1D numpy array representing current measurements as a function of gate voltage.
  • Output format:
    • The classifier outputs a boolean value (True or False) indicating whether the measurement exhibits Coulomb Blockade phenomena.
    • The peak detector outputs a list of indices corresponding to the detected peak locations in the input array.
  • Model versions: Higher version numbers typically indicate improved accuracy and performance. For example, v1 of the peak detector is typically more accurate than v0 for larger sweep sizes (one hundred or more points). Check the models overview for the latest available versions.