Connecting to M2j by Qutech in Python
Instrument Card
The M2j module is a low noise amplifier initially designed for use in reflectometry. It has been optimised for use with the F1d IQ Demodulator with a 40 MHz to 1.5 GHz frequency range. This is reflected in the gain flatness of M2j: within 3dB from 40 MHz to 1.4 GHz.
Device Specification: here
Manufacturer card: QUTECH
At QuTech, we work on a radically new technology with world-changing potential. Our mission: to develop scalable prototypes of a quantum computer and an inherently safe quantum internet, based on the fundamental laws of quantum mechanics.
- Headquarters: CJ Delft, Netherlands
- Yearly Revenue (millions, USD): 41.3
- Vendor Website: here
Connect to the M2j in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
To connect to an M2j Lockin Amplifier using Qcodes Community, you can use the following Python script:
from qcodes.instrument.base import Instrumentfrom qcodes.utils.validators import Numbersimport numpy as np
try: from spirack import M2j_module, SPI_rackexcept ImportError: raise ImportError(('The M2j_module class could not be found. ' 'Try installing it using pip install spirack'))
class M2j(Instrument): # The code for the M2j class is provided in the question
# Create an instance of the SPI_rack classspi_rack = SPI_rack()
# Connect to the M2j Lockin Amplifierm2j = M2j('m2j', spi_rack, module=1)
# Set the gain of the amplifierm2j.gain(50)
# Get the RF level after amplificationrf_level = m2j.RF_level()print(f"RF level: {rf_level} dBm")
# Clear RF clipm2j.clear_rf_clip()
# Check if RF is clippedis_rf_clipped = m2j.is_rf_clipped()print(f"RF clipped: {is_rf_clipped}")
This script creates an instance of the SPI_rack
class and then connects to the M2j Lockin Amplifier using the M2j
class. It sets the gain of the amplifier to 50 dB, measures the RF level after amplification, clears the RF clip, and checks if the RF is clipped.