{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "c6958cee", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:01.258182Z", "iopub.status.busy": "2025-10-02T01:30:01.258018Z", "iopub.status.idle": "2025-10-02T01:30:01.262148Z", "shell.execute_reply": "2025-10-02T01:30:01.261024Z" }, "nbsphinx": "hidden" }, "outputs": [], "source": [ "# Copyright 2025 Keysight Technologies Inc." ] }, { "cell_type": "raw", "id": "8405d186", "metadata": { "lines_to_next_cell": 2, "raw_mimetype": "text/restructuredtext" }, "source": [ "Acquisition\n", "===========\n", "\n", "This section will discuss SDK features related to acquiring signals with the QCS.\n", "Signals are acquired by the M5200A digitizer, typically after being downconverted\n", "by the M5301A downconverter.\n", "\n", "See :doc:`../../advanced/hardware_specs/index` for more details on the M5200A\n", "and M5201A.\n", "\n", "Acquisitions can be added to a program to play on one of these channels with the\n", "method ``Program.add_acquisition(integration_filter, channels)``.\n", "\n", "In addition to specifying the channels to acquire on, this method also has\n", "``integration_filter`` as a required argument. For a simple acquisition, a float\n", "can be used as the integration filter to specify the acquisition time in seconds.\n", "\n", "Alternatively the ``integration_filter`` argument can be used to specify how to\n", "demodulate the acquired signal. Details on this and additional acquisition\n", "features are described in the following section.\n", "\n", "Demodulation\n", "------------\n", "\n", "In quantum experiments it is commonly the case that users do not need the full\n", "time trace of an acquired signal and would prefer to extract a single IQ point\n", "from each acquisition. This process is referred to as IQ demodulation, and\n", "involves three requirements:\n", "\n", "#. Filtering: There are many reasons that users may want to apply a filter to\n", " the data that they are acquiring. A bandpass filter can remove unwanted\n", " frequency components from the data, while various kinds of matched filters\n", " may give greater weight to parts of the signal that carry the highest\n", " signal-to-noise ratio.\n", "\n", "#. Digital Downconversion: Even if a downconverter is used to bring a microwave\n", " signal into the frequency range of a digitizer, the signal acquired by the\n", " digitizer may still be at some intermediate frequency (IF). The first\n", " requirement for demodulation is to downconvert this to 0 frequency so\n", " that the signal does not vanish when integrated.\n", "\n", "#. Integration: In order to reduce the data from a full time trace to a single\n", " IQ point, each data point is summed after downconversion and filtering.\n", "\n", "\n", "Multiplexed readout\n", "-------------------\n", "\n", "Superconducting qubits often use a shared readout line to measure the state of\n", "multiple qubits. This can be achieved by coupling the line to multiple readout\n", "resonators with different resonance frequencies. The measurement can then be\n", "performed by applying a readout pulse at many different frequencies, and then\n", "simultaneously filtering acquired signal at each frequency in order to analyze\n", "the I/Q signal from each tone independently.\n", "\n", "The QCS supports multiplexing of up to 5 different readout frequencies per\n", "control line. This is expressed in the SDK by using the channel mapper to map\n", "multiple virtual channels to a single physical channel as shown in the code\n", "snippets below:" ] }, { "cell_type": "code", "execution_count": 2, "id": "8a9379ff", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:01.264807Z", "iopub.status.busy": "2025-10-02T01:30:01.264491Z", "iopub.status.idle": "2025-10-02T01:30:04.434100Z", "shell.execute_reply": "2025-10-02T01:30:04.433302Z" }, "lines_to_next_cell": 2 }, "outputs": [], "source": [ "import keysight.qcs as qcs\n", "\n", "n_qubits = 5\n", "\n", "# virtual channels\n", "\n", "acquire_channels = qcs.Channels(\n", " range(n_qubits), \"acquire_channels\", absolute_phase=True\n", ")\n", "\n", "readout_channels = qcs.Channels(\n", " range(n_qubits), \"readout_channels\", absolute_phase=True\n", ")" ] }, { "cell_type": "raw", "id": "caf52f7e", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Here we are setting up a channel mapper with 5:1 readout multiplexing. First\n", "we create 5 virtual channels to represent the inputs and outputs to the\n", "different readout resonators that we can address." ] }, { "cell_type": "code", "execution_count": 3, "id": "56c525e8", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:04.437093Z", "iopub.status.busy": "2025-10-02T01:30:04.436409Z", "iopub.status.idle": "2025-10-02T01:30:04.441737Z", "shell.execute_reply": "2025-10-02T01:30:04.440824Z" } }, "outputs": [], "source": [ "# physical channels\n", "\n", "readout_awg_address = qcs.Address(chassis=1, slot=2, channel=1)\n", "\n", "dig_address = qcs.Address(1, 18, 1)" ] }, { "cell_type": "raw", "id": "442486f9", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Next, we create one physical channel for the readout AWG and one physical\n", "channel for the digitizer." ] }, { "cell_type": "code", "execution_count": 4, "id": "3fcd337f", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:04.444933Z", "iopub.status.busy": "2025-10-02T01:30:04.444653Z", "iopub.status.idle": "2025-10-02T01:30:04.514787Z", "shell.execute_reply": "2025-10-02T01:30:04.513652Z" } }, "outputs": [], "source": [ "# map virtual channels to physical channels\n", "\n", "channel_mapper = qcs.ChannelMapper()\n", "\n", "channel_mapper.add_channel_mapping(\n", " readout_channels, [readout_awg_address] * n_qubits, qcs.InstrumentEnum.M5300AWG\n", ")\n", "\n", "channel_mapper.add_channel_mapping(\n", " acquire_channels, [dig_address] * n_qubits, qcs.InstrumentEnum.M5200Digitizer\n", ")" ] }, { "cell_type": "raw", "id": "56e3e58c", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Finally, we map all 5 of the virtual channels that we created to the same\n", "physical channel." ] } ], "metadata": { "jupytext": { "cell_metadata_filter": "raw_mimetype,nbsphinx,-all", "main_language": "python", "notebook_metadata_filter": "-all", "text_representation": { "extension": ".py", "format_name": "percent" } }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 5 }