{ "cells": [ { "cell_type": "markdown", "id": "d93bc378-64af-4aae-9d61-9d227e5e0f60", "metadata": {}, "source": [ "# Tutorial 2) Readout Sequences" ] }, { "cell_type": "markdown", "id": "49c48298-f88a-46f4-93a9-6e9ec9b644ef", "metadata": {}, "source": [ "## 0. Introduction" ] }, { "cell_type": "markdown", "id": "118d6201-e4e3-4227-a878-48082f955622", "metadata": {}, "source": [ "The first tutorial demonstrated sequence writing and parameterisation with configuration files.\n", "This enables users to apply and quantify arbitrary waveforms on instrument outputs.\n", "\n", "Playing waveforms is one part of qubit experiments. Reading out the result is equally important.\n", "This tutorial explains how `ReadSequence`s work and how to configure and use them.\n", "\n", "The tutorial is structured as follows:\n", "\n", "1. The `ReadSequence` architecture\n", "2. Writing a custom `ReadSequence`\n", "3. Configuring a readout sequence\n", "4. Instantiation and inspection\n", "5. Compiling to QUA code\n", "6. Scaling readout sequences to larger systems" ] }, { "cell_type": "markdown", "id": "878a631b-4d2f-4970-ae53-1952bbbd2d1f", "metadata": {}, "source": [ "## 1. The `ReadSequence` Architecture" ] }, { "cell_type": "markdown", "id": "517bcdb6-c3a3-4071-98bd-521c187c8a47", "metadata": {}, "source": [ "A `ReadSequence` is built around three core concepts:\n", "\n", "### 1.1 `Signal`\n", "\n", "A `Signal` is a logical container for measurement results belonging to a single physical entity (e.g. a qubit, quantum dot, or SET).\n", "\n", "- A `ReadSequence` can hold multiple signals\n", "- Signals carry no configuration beyond their name\n", "- They are used purely to group related results\n", "\n", "---\n", "\n", "### 1.2. `AbstractReadout`\n", "\n", "An `AbstractReadout` represents a single measurement operation.\n", "\n", "- Each subclass (e.g. `DcAverage`, `Difference`, `Threshold`) defines:\n", " - the QUA code to execute\n", " - the results it produces\n", "- A readout can produce one or more `GettableParameter`s (QCoDeS parameters)\n", "- Each `AbstractReadout` is assigned to exactly one `Signal`\n", "\n", "---\n", "\n", "### 1.3. `readout_groups`\n", "\n", "Readout groups are named collections of `AbstractReadout` instances defined in the configuration.\n", "\n", "- Calling a group inside `qua_sequence` executes all contained readouts in sequence\n", "- Enables extensibility:\n", " - add new physical entities by extending the configuration\n", " - no changes required to the `ReadSequence` class\n", "\n", "---\n", "\n", "### Dependent readouts\n", "\n", "A key feature of this design is that `AbstractReadout`s can depend on each other.\n", "\n", "- A readout can consume the `GettableParameter` produced by a previous readout\n", "- This enables real-time, on-FPGA processing chains\n", "\n", "**Example:**\n", "1. `ref` measurement\n", "2. `read` measurement \n", "3. `Difference` → subtracts `ref` from `read`\n", "4. `Threshold` → classifies result into a binary state\n", "\n", "The `ReadSequence` author does not need to manually define QUA variables or streams — these are handled automatically." ] }, { "cell_type": "markdown", "id": "21d733d8", "metadata": {}, "source": [ "## 2. Writing a Custom `ReadSequence`" ] }, { "cell_type": "markdown", "id": "b18cd319", "metadata": {}, "source": [ "A `ReadSequence` subclass needs to provide two methods.\n", "\n", "`__init__` calls the parent constructor with the parent instrument, the sequence name and the configuration dictionary. Any sequence-level setup, such as collecting the full list of QUA elements, is done here.\n", "\n", "`qua_sequence` contains the QUA commands that define the physical measurement. Readout groups are invoked by iterating over `self.readout_groups[group_name]` and calling `qua_measure()` on each entry. The sequence does not need to know how many physical entities are present. Adding more entries to a group in the configuration is sufficient to extend the measurement.\n", "\n", "Below is the `ParityRead` class used throughout this tutorial." ] }, { "cell_type": "code", "execution_count": 1, "id": "b22127f1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2026-04-15 10:19:48,443 - qm - INFO - Starting session: 71167a05-17ea-40f6-88eb-2c0e63578ab6\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[31mInit signature:\u001b[39m\n", "ParityRead(\n", " parent: arbok_driver.sequence_base.SequenceBase,\n", " name: str,\n", " sequence_config: dict,\n", ")\n", "\u001b[31mSource:\u001b[39m \n", "\u001b[38;5;28;01mclass\u001b[39;00m ParityRead(ReadSequence):\n", " \u001b[33m\"\"\"\u001b[39m\n", "\u001b[33m Class containing parameters and sequence for spin parity readout\u001b[39m\n", "\u001b[33m Args:\u001b[39m\n", "\u001b[33m param_config (dict): Dict containing all program parameters \u001b[39m\n", "\u001b[33m \"\"\"\u001b[39m\n", " PARAMETER_CLASS= ParityReadParameters\n", " arbok_params: ParityReadParameters\n", "\n", " \u001b[38;5;28;01mdef\u001b[39;00m __init__(\n", " self,\n", " parent: SequenceBase,\n", " name: str,\n", " sequence_config: dict,\n", " ):\n", " \u001b[33m\"\"\"\u001b[39m\n", "\u001b[33m Constructor method for 'ParityRead' class\u001b[39m\n", "\u001b[33m \u001b[39m\n", "\u001b[33m Args:\u001b[39m\n", "\u001b[33m parent (SequenceBase): Parent instrument module\u001b[39m\n", "\u001b[33m or instrument\u001b[39m\n", "\u001b[33m name (str): name of the sequence\u001b[39m\n", "\u001b[33m sequence_config (dict): Configuration for sequence\u001b[39m\n", "\u001b[33m \"\"\"\u001b[39m\n", " super().__init__(\n", " parent = parent,\n", " name = name,\n", " sequence_config = sequence_config,\n", " )\n", " self.elements = list(self.arbok_params.gate_elements.get())\n", " self.elements += list(self.arbok_params.readout_elements.get())\n", "\n", " \u001b[38;5;28;01mdef\u001b[39;00m qua_declare(self):\n", " \u001b[33m\"\"\"\u001b[39m\n", "\u001b[33m Declares variables before execution of the main program. All mandatory\u001b[39m\n", "\u001b[33m qua variables for auto generated readouts from the config are introduced\u001b[39m\n", "\u001b[33m by the parent class (super)\u001b[39m\n", "\u001b[33m \"\"\"\u001b[39m\n", " \u001b[38;5;28;01mreturn\u001b[39;00m super().qua_declare()\n", "\n", " \u001b[38;5;28;01mdef\u001b[39;00m qua_sequence(self):\n", " \u001b[33m\"\"\"\u001b[39m\n", "\u001b[33m QUA sequence to perform spin parity readout\u001b[39m\n", "\u001b[33m \u001b[39m\n", "\u001b[33m The sequence is as follows:\u001b[39m\n", "\u001b[33m 1. Move to REFERENCE measurement point\u001b[39m\n", "\u001b[33m 2. Take physical REFERENCE measurement\u001b[39m\n", "\u001b[33m 3. Move to READ measurement point\u001b[39m\n", "\u001b[33m 4. Take physical READ measurement\u001b[39m\n", "\u001b[33m \"\"\"\u001b[39m\n", " qua.align()\n", " qua.align(*self.elements)\n", " qua.wait(self.arbok_params.t_wait_home_before.qua, *self.elements)\n", " \u001b[38;5;66;03m### Move to REFERENCE measurement point\u001b[39;00m\n", " arbok.ramp(\n", " elements = self.arbok_params.gate_elements.get(),\n", " reference = self.arbok_params.v_home,\n", " target = self.arbok_params.v_reference,\n", " duration = self.t_ramp_to_reference,\n", " operation = \u001b[33m'unit_ramp'\u001b[39m,\n", " )\n", " qua.wait(self.arbok_params.t_wait_pre_read.qua, *self.elements)\n", " qua.align(*self.elements)\n", " \u001b[38;5;66;03m### Take physical REFERENCE measurement\u001b[39;00m\n", " \u001b[38;5;28;01mfor\u001b[39;00m _, readout \u001b[38;5;28;01min\u001b[39;00m self.readout_groups[\u001b[33m\"ref\"\u001b[39m].items():\n", " readout.qua_measure()\n", " qua.align(*self.elements)\n", " qua.wait(self.t_wait_post_read.qua, *self.elements)\n", "\n", " \u001b[38;5;66;03m### Move to READ measurement point\u001b[39;00m\n", " arbok.ramp(\n", " elements = self.arbok_params.gate_elements.get(),\n", " reference = self.arbok_params.v_reference,\n", " target = self.arbok_params.v_read,\n", " duration = self.arbok_params.t_ramp_to_read,\n", " operation = \u001b[33m'unit_ramp'\u001b[39m,\n", " )\n", " qua.wait(self.arbok_params.t_wait_pre_read.qua, *self.elements)\n", " qua.align(*self.elements)\n", " \u001b[38;5;66;03m### take physical READ measurement\u001b[39;00m\n", " \u001b[38;5;28;01mfor\u001b[39;00m _, readout \u001b[38;5;28;01min\u001b[39;00m self.readout_groups[\u001b[33m\"read\"\u001b[39m].items():\n", " readout.qua_measure()\n", " qua.align(*self.elements)\n", " qua.align()\n", "\n", " \u001b[38;5;66;03m### Process raw data in abstract readouts\u001b[39;00m\n", " \u001b[38;5;28;01mfor\u001b[39;00m _, readout \u001b[38;5;28;01min\u001b[39;00m self.readout_groups[\u001b[33m\"diff\"\u001b[39m].items():\n", " readout.qua_measure()\n", " \u001b[38;5;28;01mfor\u001b[39;00m _, readout \u001b[38;5;28;01min\u001b[39;00m self.readout_groups[\u001b[33m\"state\"\u001b[39m].items():\n", " readout.qua_measure()\n", " qua.align(*self.elements)\n", " qua.wait(self.arbok_params.t_wait_post_read.qua, *self.elements)\n", "\n", " \u001b[38;5;66;03m### Reset elements\u001b[39;00m\n", " arbok.reset_sticky_elements(self.arbok_params.gate_elements.get())\n", " qua.wait(self.arbok_params.t_wait_after_reset.qua, *self.elements)\n", " qua.align(*self.elements)\n", "\n", " \u001b[38;5;66;03m### Apply feedback if given in configuration\u001b[39;00m\n", " \u001b[38;5;28;01mif\u001b[39;00m \u001b[33m'set_feedback'\u001b[39m \u001b[38;5;28;01min\u001b[39;00m self.readout_groups:\n", " \u001b[38;5;28;01mfor\u001b[39;00m _, readout \u001b[38;5;28;01min\u001b[39;00m self.readout_groups[\u001b[33m\"set_feedback\"\u001b[39m].items():\n", " readout.qua_measure()\n", " qua.align()\n", "\n", " \u001b[38;5;28;01mdef\u001b[39;00m qua_after_sequence(self):\n", " \u001b[33m\"\"\"Saves variables to the respective streams after the sequence\"\"\"\u001b[39m\n", " self.measurement.qua_check_step_requirements(self.save_variables)\n", "\n", " \u001b[38;5;28;01mdef\u001b[39;00m save_variables(self):\n", " \u001b[33m\"\"\"Saves all variables to the respective streams\"\"\"\u001b[39m\n", " \u001b[38;5;28;01mfor\u001b[39;00m _, readout \u001b[38;5;28;01min\u001b[39;00m self.abstract_readouts.items():\n", " readout.qua_save_variables()\n", "\u001b[31mFile:\u001b[39m ~/git-repos/arbok_driver/arbok_driver/examples/sequences/parity_readout.py\n", "\u001b[31mType:\u001b[39m ABCMeta\n", "\u001b[31mSubclasses:\u001b[39m " ] } ], "source": [ "from arbok_driver.examples.sequences import ParityRead\n", "ParityRead??" ] }, { "cell_type": "markdown", "id": "b323bb8d", "metadata": {}, "source": [ "Looking at `qua_sequence`, the structure is straightforward. The gates are ramped to the reference voltage, the `ref` group fires, the gates are ramped to the read voltage, the `read` group fires. After both physical measurements are complete, the `diff` and `state` groups execute the on-FPGA processing. Finally an optional `set_feedback` group allows conditional feedback operations if it is present in the configuration.\n", "\n", "Notice that `ParityRead` never mentions `p1p2`, `SET1`, or any other device-specific name. All of that lives in the configuration. The same class works unchanged for any number of signals and sensors." ] }, { "cell_type": "markdown", "id": "08e408ee-4a70-4d1d-89b8-d347fb1c47ee", "metadata": {}, "source": [ "## 3. Configuring a Readout Sequence" ] }, { "cell_type": "markdown", "id": "6b332994", "metadata": {}, "source": [ "Now lets configure the `ParityRead` sequence step through all the mentioned objects with a given example. In section 6 we will use the same sequence with a configuration for an 8 qubit device, demonstrating the scaling capabilities of readouts in arbok." ] }, { "cell_type": "markdown", "id": "4fe8d5df-9bda-44ab-82da-6c3de7e1c472", "metadata": {}, "source": [ "### 3.1 The structure of the configuration dictionary" ] }, { "cell_type": "markdown", "id": "a6633382-3a7a-4d0a-9148-1e308a18bdc9", "metadata": {}, "source": [ "A readout sequence configuration has four top-level keys.\n", "\n", "`sequence` names the `ReadSequence` class that will be instantiated.\n", "\n", "`parameters` defines the settable QCoDeS parameters of the sequence, such as timing and voltage values. These behave identically to parameters in a plain `SubSequence`.\n", "\n", "`signals` is a plain list of strings. Each string names a logical signal container. No further information is required here.\n", "\n", "`readout_groups` is a dictionary of named groups. Each group is itself a dictionary whose keys identify individual `AbstractReadout` entries. Every entry specifies the readout class to use, which signal the result belongs to, any keyword arguments the readout class requires and any additional settable parameters specific to that readout." ] }, { "cell_type": "markdown", "id": "2.2-heading", "metadata": {}, "source": [ "### 3.2 Readout group entries and result naming" ] }, { "cell_type": "markdown", "id": "2.2-body", "metadata": {}, "source": [ "Each entry in a readout group produces one or more `GettableParameter`s. The name of a gettable follows a fixed pattern:\n", "\n", "```\n", "..__\n", "```\n", "\n", "For example, an entry with key `p1p2` inside the group `ref` belonging to a `ReadSequence` named `parity_read` and signal `p1p2` produces a gettable accessible at:\n", "\n", "```\n", "parity_read.p1p2.ref__p1p2\n", "```\n", "\n", "This dotted path is also how earlier results are referenced in later readout entries. A `Difference` readout, for instance, takes `minuend` and `subtrahend` arguments that are these dotted path strings. The framework resolves them to the correct QUA variables at compile time. This makes it possible to build processing chains entirely within the configuration, with no manual variable management." ] }, { "cell_type": "markdown", "id": "2.3-heading", "metadata": {}, "source": [ "### 3.3 A complete single-signal configuration" ] }, { "cell_type": "markdown", "id": "2.3-body", "metadata": {}, "source": [ "The configuration below sets up a parity readout for one signal `p1p2` measured via `SET1`. The readout chain has four groups that execute in sequence inside `qua_sequence`:\n", "\n", "The `ref` group takes a DC-averaged reference measurement and stores it under `p1p2`.\n", "The `read` group takes a DC-averaged readout measurement and stores it under `p1p2`.\n", "The `diff` group subtracts the read result from the reference result on the FPGA in real time.\n", "The `state` group applies a voltage threshold to the difference to produce a binary spin state." ] }, { "cell_type": "code", "execution_count": 2, "id": "4d74203e-ce08-43ec-8445-b605dca8393d", "metadata": {}, "outputs": [], "source": [ "from arbok_driver.parameter_types import Time, Voltage, List\n", "from arbok_driver.examples.readout_classes import DcAverage, Difference, Threshold\n", "\n", "parity_read_p1p2_conf = {\n", " 'sequence': ParityRead,\n", " 'parameters': {\n", " 'gate_elements': {\n", " 'type': List,\n", " 'value': ['P1', 'J1', 'P2', 'J2', 'P3']\n", " },\n", " 'readout_elements': {\n", " 'type': List,\n", " 'value': ['SET1']\n", " },\n", " 't_wait_home_before': {\n", " 'type': Time,\n", " 'label': 'Wait time at the home point before readout',\n", " 'value': int(1e3 / 4)\n", " },\n", " 't_wait_pre_read': {\n", " 'type': Time,\n", " 'value': int(10e3 / 4)\n", " },\n", " 't_wait_post_read': {\n", " 'type': Time,\n", " 'value': int(10e3 / 4)\n", " },\n", " 't_ramp_to_reference': {\n", " 'type': Time,\n", " 'var_type': 'fixed',\n", " 'value': int(1e3 / 4)\n", " },\n", " 't_ramp_to_read': {\n", " 'type': Time,\n", " 'value': int(0.05e3 / 4)\n", " },\n", " 't_wait_after_reset': {\n", " 'type': Time,\n", " 'value': int(10e3 / 4)\n", " },\n", " 'v_home': {\n", " 'type': Voltage,\n", " 'label': 'Home voltage point',\n", " 'elements': {\n", " 'P1': 0.0, 'J1': 0.0,\n", " 'P2': 0.0, 'J2': 0.0,\n", " 'P3': 0.0,\n", " }\n", " },\n", " 'v_reference': {\n", " 'type': Voltage,\n", " 'label': 'Reference voltage point',\n", " 'elements': {\n", " 'P1': 0.0, 'J1': 0.0,\n", " 'P2': 0.0, 'J2': 0.0,\n", " 'P3': 0.0,\n", " }\n", " },\n", " 'v_read': {\n", " 'type': Voltage,\n", " 'label': 'Readout voltage point',\n", " 'elements': {\n", " 'P1': 0.0, 'J1': 0.0,\n", " 'P2': 0.0, 'J2': 0.0,\n", " 'P3': 0.0,\n", " }\n", " },\n", " },\n", " 'signals': ['p1p2'],\n", " 'readout_groups': {\n", " 'ref': {\n", " 'p1p2': {\n", " 'readout_class': DcAverage,\n", " 'signal': 'p1p2',\n", " 'kwargs': {\n", " 'qua_element': 'SET1'\n", " },\n", " },\n", " },\n", " 'read': {\n", " 'p1p2': {\n", " 'readout_class': DcAverage,\n", " 'signal': 'p1p2',\n", " 'kwargs': {\n", " 'qua_element': 'SET1'\n", " },\n", " },\n", " },\n", " 'diff': {\n", " 'p1p2': {\n", " 'readout_class': Difference,\n", " 'signal': 'p1p2',\n", " 'kwargs': {\n", " 'minuend': 'parity_read.p1p2.ref__p1p2',\n", " 'subtrahend': 'parity_read.p1p2.read__p1p2',\n", " },\n", " },\n", " },\n", " 'state': {\n", " 'p1p2': {\n", " 'readout_class': Threshold,\n", " 'signal': 'p1p2',\n", " 'kwargs': {\n", " 'charge_readout': 'p1p2.diff__p1p2',\n", " },\n", " 'parameters': {\n", " 'threshold': {'type': Voltage, 'value': 0.0}\n", " }\n", " },\n", " },\n", " },\n", "}" ] }, { "cell_type": "markdown", "id": "2.4-heading", "metadata": {}, "source": [ "### 3.4 The processing chain in detail" ] }, { "cell_type": "markdown", "id": "2.4-body", "metadata": {}, "source": [ "It is worth pausing on how the four groups form a chain.\n", "\n", "`DcAverage` in `ref` measures the SET voltage and stores the result as a QUA fixed-point variable. Its gettable is registered under the path `parity_read.p1p2.ref__p1p2`.\n", "\n", "`DcAverage` in `read` does the same at the readout voltage point and registers under `parity_read.p1p2.read__p1p2`.\n", "\n", "`Difference` in `diff` receives the two paths above as `minuend` and `subtrahend`. It resolves them to the underlying QUA variables at compile time and subtracts them on the FPGA, producing a new gettable at `parity_read.p1p2.diff__p1p2`.\n", "\n", "`Threshold` in `state` receives the output of `diff` as its `charge_readout` argument and compares it against the settable `threshold` parameter to produce a binary result.\n", "\n", "No manual QUA variable declarations or stream bookkeeping are needed anywhere in this chain. Everything is resolved from the configuration." ] }, { "cell_type": "markdown", "id": "4-heading", "metadata": {}, "source": [ "## 4. Instantiation and Inspection" ] }, { "cell_type": "markdown", "id": "4-body", "metadata": {}, "source": [ "### 4.1 Setting up the driver stack" ] }, { "cell_type": "markdown", "id": "4-body2", "metadata": {}, "source": [ "As in Tutorial 1, a `Device`, an `ArbokDriver` and a `Measurement` are created first. `Measurement` replaces the old `Sequence` class. The `ParityRead` sequence is then added to the measurement by instantiating it with the measurement as parent." ] }, { "cell_type": "code", "execution_count": 3, "id": "663fe219", "metadata": {}, "outputs": [], "source": [ "from arbok_driver import ArbokDriver, Device, Measurement\n", "from arbok_driver.examples.configurations.hardware import (\n", " opx1000_config, divider_config)\n", "\n", "mock_device = Device(\n", " name='mock_device',\n", " opx_config=opx1000_config,\n", " divider_config=divider_config,\n", ")\n", "qm_driver = ArbokDriver('qm_driver', mock_device)\n", "mock_measurement = Measurement(qm_driver, 'mock_measurement')" ] }, { "cell_type": "code", "execution_count": 4, "id": "9de6b87b-03a0-4710-bce8-e7e53261aeee", "metadata": {}, "outputs": [], "source": [ "parity_read = ParityRead(\n", " parent=mock_measurement,\n", " name='parity_read',\n", " sequence_config=parity_read_p1p2_conf,\n", ")" ] }, { "cell_type": "markdown", "id": "4.2-heading", "metadata": {}, "source": [ "### 4.2 Inspecting parameters with `print_readable_snapshot`" ] }, { "cell_type": "markdown", "id": "4.2-body", "metadata": {}, "source": [ "The quickest way to inspect any QCoDeS instrument is `print_readable_snapshot`. For a `ReadSequence` this shows two kinds of parameters.\n", "\n", "Settable parameters such as `t_wait_pre_read` or the per-element voltages appear with their current values.\n", "\n", "Gettable parameters appear with the value `Not available` until the hardware has returned results. Their names encode where in the readout chain the result comes from, following the `..__` convention described above." ] }, { "cell_type": "code", "execution_count": 5, "id": "4455b28b-f93a-4ab7-9a01-a0eacc446a41", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "qm_driver_mock_measurement_parity_read:\n", "\tparameter value\n", "--------------------------------------------------------------------------------\n", "diff__p1p2 :\tNot available \n", "gate_elements :\t['P1', 'J1', 'P2', 'J2', 'P3'] (N/A)\n", "read__p1p2 :\tNot available \n", "readout_elements :\t['SET1'] (N/A)\n", "ref__p1p2 :\tNot available \n", "state__p1p2 :\tNot available \n", "state__p1p2__threshold :\t0 (V)\n", "t_ramp_to_read :\t12 (s)\n", "t_ramp_to_reference :\t250 (s)\n", "t_wait_after_reset :\t2500 (s)\n", "t_wait_home_before :\t250 (s)\n", "t_wait_post_read :\t2500 (s)\n", "t_wait_pre_read :\t2500 (s)\n", "v_home_J1 :\t0 (V)\n", "v_home_J2 :\t0 (V)\n", "v_home_P1 :\t0 (V)\n", "v_home_P2 :\t0 (V)\n", "v_home_P3 :\t0 (V)\n", "v_read_J1 :\t0 (V)\n", "v_read_J2 :\t0 (V)\n", "v_read_P1 :\t0 (V)\n", "v_read_P2 :\t0 (V)\n", "v_read_P3 :\t0 (V)\n", "v_reference_J1 :\t0 (V)\n", "v_reference_J2 :\t0 (V)\n", "v_reference_P1 :\t0 (V)\n", "v_reference_P2 :\t0 (V)\n", "v_reference_P3 :\t0 (V)\n" ] } ], "source": [ "parity_read.print_readable_snapshot()" ] }, { "cell_type": "markdown", "id": "4.3-heading", "metadata": {}, "source": [ "### 4.3 Accessing gettables directly" ] }, { "cell_type": "markdown", "id": "4.3-body", "metadata": {}, "source": [ "The `gettables` attribute of a `ReadSequence` lists all `GettableParameter`s it owns. Calling a gettable returns its current value." ] }, { "cell_type": "code", "execution_count": 6, "id": "fb01afcf-7a3d-496e-810c-c2a4ac749f62", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[,\n", " ,\n", " ,\n", " ]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "parity_read.gettables" ] }, { "cell_type": "markdown", "id": "4.3-body2", "metadata": {}, "source": [ "Individual gettables are accessed via the signal and group path directly on the `ReadSequence` object. Double underscores in the attribute name indicate nesting." ] }, { "cell_type": "code", "execution_count": 7, "id": "8583b9a7-3a6d-4df3-8376-1afa47949f9e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "parity_read.p1p2.diff__p1p2" ] }, { "cell_type": "markdown", "id": "4.4-heading", "metadata": {}, "source": [ "### 4.4 All gettables across a measurement" ] }, { "cell_type": "markdown", "id": "4.4-body", "metadata": {}, "source": [ "When a `Measurement` contains multiple `ReadSequence`s, `available_gettables` gives a flat view of every gettable across all of them." ] }, { "cell_type": "code", "execution_count": 10, "id": "aa7acd8f-2def-401a-828c-236ffab3efae", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[,\n", " ,\n", " ,\n", " ]" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mock_measurement.available_gettables" ] }, { "cell_type": "markdown", "id": "4.5-heading", "metadata": {}, "source": [ "### 4.5 Inspecting signals and readout groups" ] }, { "cell_type": "markdown", "id": "4.5-body", "metadata": {}, "source": [ "The signals present in a `ReadSequence` are accessible via its `signals` attribute. Readout groups are accessible via `readout_groups`." ] }, { "cell_type": "code", "execution_count": 11, "id": "88385a3a-e561-46d4-b6ea-5967821fd7f4", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'p1p2': }" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "parity_read.signals" ] }, { "cell_type": "code", "execution_count": 12, "id": "94577396-9191-42d0-9d36-e4a5edbeb3f2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'ref': {'p1p2': },\n", " 'read': {'p1p2': },\n", " 'diff': {'p1p2': },\n", " 'state': {'p1p2': }}" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "parity_read.readout_groups" ] }, { "cell_type": "markdown", "id": "5-heading", "metadata": {}, "source": [ "## 5. Compiling to QUA Code" ] }, { "cell_type": "markdown", "id": "5-body", "metadata": {}, "source": [ "Once the `ReadSequence` is instantiated and configured, the full QUA program can be compiled and inspected as a string. The framework inserts all variable declarations and stream definitions automatically based on the gettables that are actually used." ] }, { "cell_type": "code", "execution_count": 14, "id": "875c61a5-8af8-49c3-b951-f70db8a73b4a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n",
       "# Single QUA script generated at 2026-04-15 10:21:13.091399\n",
       "# QUA library version: 1.2.5\n",
       "\n",
       "\n",
       "from qm import CompilerOptionArguments\n",
       "from qm.qua import *\n",
       "\n",
       "with program() as prog:\n",
       "    v1 = declare(int, value=0)\n",
       "    v2 = declare(fixed, )\n",
       "    v3 = declare(fixed, )\n",
       "    v4 = declare(fixed, )\n",
       "    v5 = declare(bool, )\n",
       "    with infinite_loop_():\n",
       "        pause()\n",
       "        assign(v1, 0)\n",
       "        align()\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        wait(250, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\")\n",
       "        wait(2500, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        measure(\"measure\", \"SET1\", integration.full(\"x_const\", v2, \"\"))\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        wait(2500, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\")\n",
       "        wait(2500, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        measure(\"measure\", \"SET1\", integration.full(\"x_const\", v3, \"\"))\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        align()\n",
       "        assign(v4, (v2-v3))\n",
       "        assign(v5, (v4>0.0))\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        wait(2500, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        ramp_to_zero(\"P1\")\n",
       "        ramp_to_zero(\"J1\")\n",
       "        ramp_to_zero(\"P2\")\n",
       "        ramp_to_zero(\"J2\")\n",
       "        ramp_to_zero(\"P3\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\")\n",
       "        wait(2500, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"SET1\")\n",
       "        align()\n",
       "        r2 = declare_stream()\n",
       "        save(v2, r2)\n",
       "        r3 = declare_stream()\n",
       "        save(v3, r3)\n",
       "        r4 = declare_stream()\n",
       "        save(v4, r4)\n",
       "        r5 = declare_stream()\n",
       "        save(v5, r5)\n",
       "        align()\n",
       "        assign(v1, (v1+1))\n",
       "        r1 = declare_stream()\n",
       "        save(v1, r1)\n",
       "        align()\n",
       "    with stream_processing():\n",
       "        r1.buffer(1).save(\"qm_driver_mock_measurement_shots\")\n",
       "        r2.buffer(1).save(\"qm_driver_mock_measurement_parity_read_ref__p1p2\")\n",
       "        r3.buffer(1).save(\"qm_driver_mock_measurement_parity_read_read__p1p2\")\n",
       "        r4.buffer(1).save(\"qm_driver_mock_measurement_parity_read_diff__p1p2\")\n",
       "        r5.buffer(1).save(\"qm_driver_mock_measurement_parity_read_state__p1p2\")\n",
       "\n",
       "config = None\n",
       "\n",
       "loaded_config = None\n",
       "\n",
       "\n",
       "
\n" ], "text/plain": [ "\n", "# Single QUA script generated at \u001b[1;36m2026\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m15\u001b[0m \u001b[1;92m10:21:13\u001b[0m.\u001b[1;36m091399\u001b[0m\n", "# QUA library version: \u001b[1;36m1.2\u001b[0m.\u001b[1;36m5\u001b[0m\n", "\n", "\n", "from qm import CompilerOptionArguments\n", "from qm.qua import *\n", "\n", "with \u001b[1;35mprogram\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m as prog:\n", " v1 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mint, \u001b[33mvalue\u001b[0m=\u001b[1;36m0\u001b[0m\u001b[1m)\u001b[0m\n", " v2 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v3 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v4 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v5 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mbool, \u001b[1m)\u001b[0m\n", " with \u001b[1;35minfinite_loop_\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m:\n", " \u001b[1;35mpause\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv1, \u001b[1;36m0\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m250\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m2500\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mmeasure\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"measure\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[1;35mintegration.full\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"x_const\"\u001b[0m, v2, \u001b[32m\"\"\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m2500\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m2500\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mmeasure\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"measure\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[1;35mintegration.full\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"x_const\"\u001b[0m, v3, \u001b[32m\"\"\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv4, \u001b[1m(\u001b[0mv2-v3\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv5, \u001b[1m(\u001b[0mv4>\u001b[1;36m0.0\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m2500\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"J1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P2\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"J2\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P3\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m2500\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " r2 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv2, r2\u001b[1m)\u001b[0m\n", " r3 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv3, r3\u001b[1m)\u001b[0m\n", " r4 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv4, r4\u001b[1m)\u001b[0m\n", " r5 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv5, r5\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv1, \u001b[1m(\u001b[0mv1+\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " r1 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv1, r1\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " with \u001b[1;35mstream_processing\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m:\n", " \u001b[1;35mr1.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_mock_measurement_shots\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr2.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_mock_measurement_parity_read_ref__p1p2\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr3.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_mock_measurement_parity_read_read__p1p2\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr4.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_mock_measurement_parity_read_diff__p1p2\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr5.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_mock_measurement_parity_read_state__p1p2\"\u001b[0m\u001b[1m)\u001b[0m\n", "\n", "config = \u001b[3;35mNone\u001b[0m\n", "\n", "loaded_config = \u001b[3;35mNone\u001b[0m\n", "\n", "\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from rich import print as rprint\n", "rprint(mock_measurement.get_qua_program_as_str())" ] }, { "cell_type": "markdown", "id": "5-body2", "metadata": {}, "source": [ "The output shows that variable declarations for the QUA fixed-point results and the binary state, as well as the corresponding result streams, are all present without the user having written a single line of QUA resource management code." ] }, { "cell_type": "markdown", "id": "6-heading", "metadata": {}, "source": [ "## 6. Scaling to Larger Systems" ] }, { "cell_type": "markdown", "id": "6-body", "metadata": {}, "source": [ "The design philosophy of arbok is that sequence classes are written once and scaled by configuration alone. To extend the single-signal `parity_read_p1p2_conf` to a four-sensor system with signals `p1p2`, `p3p4`, `p5p6` and `p7p8`, the only change required is in the configuration. The `ParityRead` class is reused without modification." ] }, { "cell_type": "code", "execution_count": 15, "id": "2ac9f318-854c-4e57-90f1-989c4b3b8d20", "metadata": {}, "outputs": [], "source": [ "parity_read_4signal_conf = {\n", " 'sequence': ParityRead,\n", " 'parameters': {\n", " 'gate_elements': {\n", " 'type': List,\n", " 'value': [\n", " 'P1', 'J1', 'P2', 'J2', 'P3',\n", " 'P3', 'J3', 'P4', 'J4', 'P5',\n", " 'P5', 'J5', 'P6', 'J6', 'P7',\n", " 'P7', 'J7', 'P8'\n", " ]\n", " },\n", " 'readout_elements': {\n", " 'type': List,\n", " 'value': ['SET1', 'SET2', 'SET3', 'SET4']\n", " },\n", " 't_wait_home_before': {'type': Time, 'value': int(1e3 / 4)},\n", " 't_wait_pre_read': {'type': Time, 'value': int(10e3 / 4)},\n", " 't_wait_post_read': {'type': Time, 'value': int(10e3 / 4)},\n", " 't_ramp_to_reference':{'type': Time, 'var_type': 'fixed', 'value': int(1e3 / 4)},\n", " 't_ramp_to_read': {'type': Time, 'value': int(0.05e3 / 4)},\n", " 't_wait_after_reset': {'type': Time, 'value': int(10e3 / 4)},\n", " 'v_home': {\n", " 'type': Voltage,\n", " 'elements': {\n", " 'P1': 0.0, 'J1': 0.0, 'P2': 0.0, 'J2': 0.0,\n", " 'P3': 0.0, 'J3': 0.0, 'P4': 0.0, 'J4': 0.0, \n", " 'P5': 0.0, 'J5': 0.0, 'P6': 0.0, 'J6': 0.0,\n", " 'P7': 0.0, 'J7': 0.0, 'P8': 0.0, \n", " }\n", " },\n", " 'v_reference': {\n", " 'type': Voltage,\n", " 'elements': {\n", " 'P1': 0.0, 'J1': 0.0, 'P2': 0.0, 'J2': 0.0,\n", " 'P3': 0.0, 'J3': 0.0, 'P4': 0.0, 'J4': 0.0, \n", " 'P5': 0.0, 'J5': 0.0, 'P6': 0.0, 'J6': 0.0,\n", " 'P7': 0.0, 'J7': 0.0, 'P8': 0.0, \n", " }\n", " },\n", " 'v_read': {\n", " 'type': Voltage,\n", " 'elements': {\n", " 'P1': 0.0, 'J1': 0.0, 'P2': 0.0, 'J2': 0.0,\n", " 'P3': 0.0, 'J3': 0.0, 'P4': 0.0, 'J4': 0.0, \n", " 'P5': 0.0, 'J5': 0.0, 'P6': 0.0, 'J6': 0.0,\n", " 'P7': 0.0, 'J7': 0.0, 'P8': 0.0, \n", " }\n", " },\n", " },\n", " 'signals': ['p1p2', 'p3p4', 'p5p6', 'p7p8'],\n", " 'readout_groups': {\n", " 'ref': {\n", " 'p1p2': {'readout_class': DcAverage, 'signal': 'p1p2', 'kwargs': {'qua_element': 'SET1'}},\n", " 'p3p4': {'readout_class': DcAverage, 'signal': 'p3p4', 'kwargs': {'qua_element': 'SET2'}},\n", " 'p5p6': {'readout_class': DcAverage, 'signal': 'p5p6', 'kwargs': {'qua_element': 'SET3'}},\n", " 'p7p8': {'readout_class': DcAverage, 'signal': 'p7p8', 'kwargs': {'qua_element': 'SET4'}},\n", " },\n", " 'read': {\n", " 'p1p2': {'readout_class': DcAverage, 'signal': 'p1p2', 'kwargs': {'qua_element': 'SET1'}},\n", " 'p3p4': {'readout_class': DcAverage, 'signal': 'p3p4', 'kwargs': {'qua_element': 'SET2'}},\n", " 'p5p6': {'readout_class': DcAverage, 'signal': 'p5p6', 'kwargs': {'qua_element': 'SET3'}},\n", " 'p7p8': {'readout_class': DcAverage, 'signal': 'p7p8', 'kwargs': {'qua_element': 'SET4'}},\n", " },\n", " 'diff': {\n", " 'p1p2': {\n", " 'readout_class': Difference, 'signal': 'p1p2',\n", " 'kwargs': {\n", " 'minuend': 'parity_read.p1p2.ref__p1p2',\n", " 'subtrahend': 'parity_read.p1p2.read__p1p2',\n", " },\n", " },\n", " 'p3p4': {\n", " 'readout_class': Difference, 'signal': 'p3p4',\n", " 'kwargs': {\n", " 'minuend': 'parity_read.p3p4.ref__p3p4',\n", " 'subtrahend': 'parity_read.p3p4.read__p3p4',\n", " },\n", " },\n", " 'p5p6': {\n", " 'readout_class': Difference, 'signal': 'p5p6',\n", " 'kwargs': {\n", " 'minuend': 'parity_read.p5p6.ref__p5p6',\n", " 'subtrahend': 'parity_read.p5p6.read__p5p6',\n", " },\n", " },\n", " 'p7p8': {\n", " 'readout_class': Difference, 'signal': 'p7p8',\n", " 'kwargs': {\n", " 'minuend': 'parity_read.p7p8.ref__p7p8',\n", " 'subtrahend': 'parity_read.p7p8.read__p7p8',\n", " },\n", " },\n", " },\n", " 'state': {\n", " 'p1p2': {\n", " 'readout_class': Threshold, 'signal': 'p1p2',\n", " 'kwargs': {'charge_readout': 'p1p2.diff__p1p2'},\n", " 'parameters': {'threshold': {'type': Voltage, 'value': 0.0}}\n", " },\n", " 'p3p4': {\n", " 'readout_class': Threshold, 'signal': 'p3p4',\n", " 'kwargs': {'charge_readout': 'p3p4.diff__p3p4'},\n", " 'parameters': {'threshold': {'type': Voltage, 'value': 0.0}}\n", " },\n", " 'p5p6': {\n", " 'readout_class': Threshold, 'signal': 'p5p6',\n", " 'kwargs': {'charge_readout': 'p5p6.diff__p5p6'},\n", " 'parameters': {'threshold': {'type': Voltage, 'value': 0.0}}\n", " },\n", " 'p7p8': {\n", " 'readout_class': Threshold, 'signal': 'p7p8',\n", " 'kwargs': {'charge_readout': 'p7p8.diff__p7p8'},\n", " 'parameters': {'threshold': {'type': Voltage, 'value': 0.0}}\n", " },\n", " },\n", " },\n", "}" ] }, { "cell_type": "markdown", "id": "6-body2", "metadata": {}, "source": [ "The four-signal measurement is instantiated in exactly the same way as the single-signal one. A new `Measurement` and a new `ArbokDriver` are created and a fresh `ParityRead` is instantiated with the extended configuration." ] }, { "cell_type": "code", "execution_count": 16, "id": "946de62c-a08a-45c8-b286-31db7ef273a8", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Deleting measurement: mock_measurement\n" ] } ], "source": [ "qm_driver.reset_measurements()\n", "measurement_8q = Measurement(qm_driver, 'measurement_8q')\n", "\n", "parity_read2 = ParityRead(\n", " parent=measurement_8q,\n", " name='parity_read',\n", " sequence_config=parity_read_4signal_conf,\n", ")" ] }, { "cell_type": "markdown", "id": "6-body3", "metadata": {}, "source": [ "The snapshot now shows gettable parameters for all four signals across all four processing steps, with no changes to `ParityRead` required." ] }, { "cell_type": "code", "execution_count": 17, "id": "ce724b25-54ce-4378-9de8-57be54c94db5", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "qm_driver_measurement_8q_parity_read:\n", "\tparameter value\n", "--------------------------------------------------------------------------------\n", "diff__p1p2 :\tNot available \n", "diff__p3p4 :\tNot available \n", "diff__p5p6 :\tNot available \n", "diff__p7p8 :\tNot available \n", "gate_elements :\t['P1', 'J1', 'P2', 'J2', 'P3', 'P3', 'J3', 'P4', 'J4...\n", "read__p1p2 :\tNot available \n", "read__p3p4 :\tNot available \n", "read__p5p6 :\tNot available \n", "read__p7p8 :\tNot available \n", "readout_elements :\t['SET1', 'SET2', 'SET3', 'SET4'] (N/A)\n", "ref__p1p2 :\tNot available \n", "ref__p3p4 :\tNot available \n", "ref__p5p6 :\tNot available \n", "ref__p7p8 :\tNot available \n", "state__p1p2 :\tNot available \n", "state__p1p2__threshold :\t0 (V)\n", "state__p3p4 :\tNot available \n", "state__p3p4__threshold :\t0 (V)\n", "state__p5p6 :\tNot available \n", "state__p5p6__threshold :\t0 (V)\n", "state__p7p8 :\tNot available \n", "state__p7p8__threshold :\t0 (V)\n", "t_ramp_to_read :\t12 (s)\n", "t_ramp_to_reference :\t250 (s)\n", "t_wait_after_reset :\t2500 (s)\n", "t_wait_home_before :\t250 (s)\n", "t_wait_post_read :\t2500 (s)\n", "t_wait_pre_read :\t2500 (s)\n", "v_home_J1 :\t0 (V)\n", "v_home_J2 :\t0 (V)\n", "v_home_J3 :\t0 (V)\n", "v_home_J4 :\t0 (V)\n", "v_home_J5 :\t0 (V)\n", "v_home_J6 :\t0 (V)\n", "v_home_J7 :\t0 (V)\n", "v_home_P1 :\t0 (V)\n", "v_home_P2 :\t0 (V)\n", "v_home_P3 :\t0 (V)\n", "v_home_P4 :\t0 (V)\n", "v_home_P5 :\t0 (V)\n", "v_home_P6 :\t0 (V)\n", "v_home_P7 :\t0 (V)\n", "v_home_P8 :\t0 (V)\n", "v_read_J1 :\t0 (V)\n", "v_read_J2 :\t0 (V)\n", "v_read_J3 :\t0 (V)\n", "v_read_J4 :\t0 (V)\n", "v_read_J5 :\t0 (V)\n", "v_read_J6 :\t0 (V)\n", "v_read_J7 :\t0 (V)\n", "v_read_P1 :\t0 (V)\n", "v_read_P2 :\t0 (V)\n", "v_read_P3 :\t0 (V)\n", "v_read_P4 :\t0 (V)\n", "v_read_P5 :\t0 (V)\n", "v_read_P6 :\t0 (V)\n", "v_read_P7 :\t0 (V)\n", "v_read_P8 :\t0 (V)\n", "v_reference_J1 :\t0 (V)\n", "v_reference_J2 :\t0 (V)\n", "v_reference_J3 :\t0 (V)\n", "v_reference_J4 :\t0 (V)\n", "v_reference_J5 :\t0 (V)\n", "v_reference_J6 :\t0 (V)\n", "v_reference_J7 :\t0 (V)\n", "v_reference_P1 :\t0 (V)\n", "v_reference_P2 :\t0 (V)\n", "v_reference_P3 :\t0 (V)\n", "v_reference_P4 :\t0 (V)\n", "v_reference_P5 :\t0 (V)\n", "v_reference_P6 :\t0 (V)\n", "v_reference_P7 :\t0 (V)\n", "v_reference_P8 :\t0 (V)\n" ] } ], "source": [ "parity_read2.print_readable_snapshot()" ] }, { "cell_type": "markdown", "id": "6-body4", "metadata": {}, "source": [ "Compiling the four-signal program shows that the framework has automatically allocated all required QUA variables and streams for all four sensors." ] }, { "cell_type": "code", "execution_count": 20, "id": "b760d23c", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ]" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "measurement_8q.available_gettables" ] }, { "cell_type": "code", "execution_count": 19, "id": "784f1062-93c8-4d2e-a700-15a24445286e", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n",
       "# Single QUA script generated at 2026-04-15 10:21:50.490758\n",
       "# QUA library version: 1.2.5\n",
       "\n",
       "\n",
       "from qm import CompilerOptionArguments\n",
       "from qm.qua import *\n",
       "\n",
       "with program() as prog:\n",
       "    v1 = declare(int, value=0)\n",
       "    v2 = declare(fixed, )\n",
       "    v3 = declare(fixed, )\n",
       "    v4 = declare(fixed, )\n",
       "    v5 = declare(fixed, )\n",
       "    v6 = declare(fixed, )\n",
       "    v7 = declare(fixed, )\n",
       "    v8 = declare(fixed, )\n",
       "    v9 = declare(fixed, )\n",
       "    v10 = declare(fixed, )\n",
       "    v11 = declare(fixed, )\n",
       "    v12 = declare(fixed, )\n",
       "    v13 = declare(fixed, )\n",
       "    v14 = declare(bool, )\n",
       "    v15 = declare(bool, )\n",
       "    v16 = declare(bool, )\n",
       "    v17 = declare(bool, )\n",
       "    with infinite_loop_():\n",
       "        pause()\n",
       "        assign(v1, 0)\n",
       "        align()\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        wait(250, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \n",
       "\"J7\", \"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\")\n",
       "        wait(2500, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \n",
       "\"J7\", \"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        measure(\"measure\", \"SET1\", integration.full(\"x_const\", v2, \"\"))\n",
       "        measure(\"measure\", \"SET2\", integration.full(\"x_const\", v3, \"\"))\n",
       "        measure(\"measure\", \"SET3\", integration.full(\"x_const\", v4, \"\"))\n",
       "        measure(\"measure\", \"SET4\", integration.full(\"x_const\", v5, \"\"))\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        wait(2500, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \n",
       "\"J7\", \"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\")\n",
       "        wait(2500, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \n",
       "\"J7\", \"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        measure(\"measure\", \"SET1\", integration.full(\"x_const\", v6, \"\"))\n",
       "        measure(\"measure\", \"SET2\", integration.full(\"x_const\", v7, \"\"))\n",
       "        measure(\"measure\", \"SET3\", integration.full(\"x_const\", v8, \"\"))\n",
       "        measure(\"measure\", \"SET4\", integration.full(\"x_const\", v9, \"\"))\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        align()\n",
       "        assign(v10, (v2-v6))\n",
       "        assign(v11, (v3-v7))\n",
       "        assign(v12, (v4-v8))\n",
       "        assign(v13, (v5-v9))\n",
       "        assign(v14, (v10>0.0))\n",
       "        assign(v15, (v11>0.0))\n",
       "        assign(v16, (v12>0.0))\n",
       "        assign(v17, (v13>0.0))\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        wait(2500, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \n",
       "\"J7\", \"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        ramp_to_zero(\"P1\")\n",
       "        ramp_to_zero(\"J1\")\n",
       "        ramp_to_zero(\"P2\")\n",
       "        ramp_to_zero(\"J2\")\n",
       "        ramp_to_zero(\"P3\")\n",
       "        ramp_to_zero(\"P3\")\n",
       "        ramp_to_zero(\"J3\")\n",
       "        ramp_to_zero(\"P4\")\n",
       "        ramp_to_zero(\"J4\")\n",
       "        ramp_to_zero(\"P5\")\n",
       "        ramp_to_zero(\"P5\")\n",
       "        ramp_to_zero(\"J5\")\n",
       "        ramp_to_zero(\"P6\")\n",
       "        ramp_to_zero(\"J6\")\n",
       "        ramp_to_zero(\"P7\")\n",
       "        ramp_to_zero(\"P7\")\n",
       "        ramp_to_zero(\"J7\")\n",
       "        ramp_to_zero(\"P8\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\")\n",
       "        wait(2500, \"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \n",
       "\"J7\", \"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        align(\"P1\", \"J1\", \"P2\", \"J2\", \"P3\", \"P3\", \"J3\", \"P4\", \"J4\", \"P5\", \"P5\", \"J5\", \"P6\", \"J6\", \"P7\", \"P7\", \"J7\",\n",
       "\"P8\", \"SET1\", \"SET2\", \"SET3\", \"SET4\")\n",
       "        align()\n",
       "        r2 = declare_stream()\n",
       "        save(v2, r2)\n",
       "        r3 = declare_stream()\n",
       "        save(v3, r3)\n",
       "        r4 = declare_stream()\n",
       "        save(v4, r4)\n",
       "        r5 = declare_stream()\n",
       "        save(v5, r5)\n",
       "        r6 = declare_stream()\n",
       "        save(v6, r6)\n",
       "        r7 = declare_stream()\n",
       "        save(v7, r7)\n",
       "        r8 = declare_stream()\n",
       "        save(v8, r8)\n",
       "        r9 = declare_stream()\n",
       "        save(v9, r9)\n",
       "        r10 = declare_stream()\n",
       "        save(v10, r10)\n",
       "        r11 = declare_stream()\n",
       "        save(v11, r11)\n",
       "        r12 = declare_stream()\n",
       "        save(v12, r12)\n",
       "        r13 = declare_stream()\n",
       "        save(v13, r13)\n",
       "        r14 = declare_stream()\n",
       "        save(v14, r14)\n",
       "        r15 = declare_stream()\n",
       "        save(v15, r15)\n",
       "        r16 = declare_stream()\n",
       "        save(v16, r16)\n",
       "        r17 = declare_stream()\n",
       "        save(v17, r17)\n",
       "        align()\n",
       "        assign(v1, (v1+1))\n",
       "        r1 = declare_stream()\n",
       "        save(v1, r1)\n",
       "        align()\n",
       "    with stream_processing():\n",
       "        r1.buffer(1).save(\"qm_driver_measurement_8q_shots\")\n",
       "        r2.buffer(1).save(\"qm_driver_measurement_8q_parity_read_ref__p1p2\")\n",
       "        r3.buffer(1).save(\"qm_driver_measurement_8q_parity_read_ref__p3p4\")\n",
       "        r4.buffer(1).save(\"qm_driver_measurement_8q_parity_read_ref__p5p6\")\n",
       "        r5.buffer(1).save(\"qm_driver_measurement_8q_parity_read_ref__p7p8\")\n",
       "        r6.buffer(1).save(\"qm_driver_measurement_8q_parity_read_read__p1p2\")\n",
       "        r7.buffer(1).save(\"qm_driver_measurement_8q_parity_read_read__p3p4\")\n",
       "        r8.buffer(1).save(\"qm_driver_measurement_8q_parity_read_read__p5p6\")\n",
       "        r9.buffer(1).save(\"qm_driver_measurement_8q_parity_read_read__p7p8\")\n",
       "        r10.buffer(1).save(\"qm_driver_measurement_8q_parity_read_diff__p1p2\")\n",
       "        r11.buffer(1).save(\"qm_driver_measurement_8q_parity_read_diff__p3p4\")\n",
       "        r12.buffer(1).save(\"qm_driver_measurement_8q_parity_read_diff__p5p6\")\n",
       "        r13.buffer(1).save(\"qm_driver_measurement_8q_parity_read_diff__p7p8\")\n",
       "        r14.buffer(1).save(\"qm_driver_measurement_8q_parity_read_state__p1p2\")\n",
       "        r15.buffer(1).save(\"qm_driver_measurement_8q_parity_read_state__p3p4\")\n",
       "        r16.buffer(1).save(\"qm_driver_measurement_8q_parity_read_state__p5p6\")\n",
       "        r17.buffer(1).save(\"qm_driver_measurement_8q_parity_read_state__p7p8\")\n",
       "\n",
       "config = None\n",
       "\n",
       "loaded_config = None\n",
       "\n",
       "\n",
       "
\n" ], "text/plain": [ "\n", "# Single QUA script generated at \u001b[1;36m2026\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m15\u001b[0m \u001b[1;92m10:21:50\u001b[0m.\u001b[1;36m490758\u001b[0m\n", "# QUA library version: \u001b[1;36m1.2\u001b[0m.\u001b[1;36m5\u001b[0m\n", "\n", "\n", "from qm import CompilerOptionArguments\n", "from qm.qua import *\n", "\n", "with \u001b[1;35mprogram\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m as prog:\n", " v1 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mint, \u001b[33mvalue\u001b[0m=\u001b[1;36m0\u001b[0m\u001b[1m)\u001b[0m\n", " v2 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v3 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v4 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v5 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v6 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v7 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v8 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v9 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v10 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v11 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v12 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v13 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mfixed, \u001b[1m)\u001b[0m\n", " v14 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mbool, \u001b[1m)\u001b[0m\n", " v15 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mbool, \u001b[1m)\u001b[0m\n", " v16 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mbool, \u001b[1m)\u001b[0m\n", " v17 = \u001b[1;35mdeclare\u001b[0m\u001b[1m(\u001b[0mbool, \u001b[1m)\u001b[0m\n", " with \u001b[1;35minfinite_loop_\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m:\n", " \u001b[1;35mpause\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv1, \u001b[1;36m0\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m250\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \n", "\u001b[32m\"J7\"\u001b[0m, \u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m2500\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \n", "\u001b[32m\"J7\"\u001b[0m, \u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mmeasure\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"measure\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[1;35mintegration.full\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"x_const\"\u001b[0m, v2, \u001b[32m\"\"\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mmeasure\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"measure\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[1;35mintegration.full\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"x_const\"\u001b[0m, v3, \u001b[32m\"\"\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mmeasure\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"measure\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[1;35mintegration.full\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"x_const\"\u001b[0m, v4, \u001b[32m\"\"\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mmeasure\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"measure\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m, \u001b[1;35mintegration.full\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"x_const\"\u001b[0m, v5, \u001b[32m\"\"\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m2500\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \n", "\u001b[32m\"J7\"\u001b[0m, \u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m2500\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \n", "\u001b[32m\"J7\"\u001b[0m, \u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mmeasure\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"measure\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[1;35mintegration.full\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"x_const\"\u001b[0m, v6, \u001b[32m\"\"\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mmeasure\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"measure\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[1;35mintegration.full\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"x_const\"\u001b[0m, v7, \u001b[32m\"\"\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mmeasure\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"measure\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[1;35mintegration.full\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"x_const\"\u001b[0m, v8, \u001b[32m\"\"\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mmeasure\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"measure\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m, \u001b[1;35mintegration.full\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"x_const\"\u001b[0m, v9, \u001b[32m\"\"\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv10, \u001b[1m(\u001b[0mv2-v6\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv11, \u001b[1m(\u001b[0mv3-v7\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv12, \u001b[1m(\u001b[0mv4-v8\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv13, \u001b[1m(\u001b[0mv5-v9\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv14, \u001b[1m(\u001b[0mv10>\u001b[1;36m0.0\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv15, \u001b[1m(\u001b[0mv11>\u001b[1;36m0.0\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv16, \u001b[1m(\u001b[0mv12>\u001b[1;36m0.0\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv17, \u001b[1m(\u001b[0mv13>\u001b[1;36m0.0\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m2500\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \n", "\u001b[32m\"J7\"\u001b[0m, \u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"J1\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P2\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"J2\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P3\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P3\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"J3\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"J4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P5\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P5\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"J5\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P6\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"J6\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P7\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P7\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"J7\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mramp_to_zero\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P8\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mwait\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m2500\u001b[0m, \u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \n", "\u001b[32m\"J7\"\u001b[0m, \u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"P1\"\u001b[0m, \u001b[32m\"J1\"\u001b[0m, \u001b[32m\"P2\"\u001b[0m, \u001b[32m\"J2\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"P3\"\u001b[0m, \u001b[32m\"J3\"\u001b[0m, \u001b[32m\"P4\"\u001b[0m, \u001b[32m\"J4\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"P5\"\u001b[0m, \u001b[32m\"J5\"\u001b[0m, \u001b[32m\"P6\"\u001b[0m, \u001b[32m\"J6\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"P7\"\u001b[0m, \u001b[32m\"J7\"\u001b[0m,\n", "\u001b[32m\"P8\"\u001b[0m, \u001b[32m\"SET1\"\u001b[0m, \u001b[32m\"SET2\"\u001b[0m, \u001b[32m\"SET3\"\u001b[0m, \u001b[32m\"SET4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " r2 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv2, r2\u001b[1m)\u001b[0m\n", " r3 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv3, r3\u001b[1m)\u001b[0m\n", " r4 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv4, r4\u001b[1m)\u001b[0m\n", " r5 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv5, r5\u001b[1m)\u001b[0m\n", " r6 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv6, r6\u001b[1m)\u001b[0m\n", " r7 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv7, r7\u001b[1m)\u001b[0m\n", " r8 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv8, r8\u001b[1m)\u001b[0m\n", " r9 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv9, r9\u001b[1m)\u001b[0m\n", " r10 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv10, r10\u001b[1m)\u001b[0m\n", " r11 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv11, r11\u001b[1m)\u001b[0m\n", " r12 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv12, r12\u001b[1m)\u001b[0m\n", " r13 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv13, r13\u001b[1m)\u001b[0m\n", " r14 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv14, r14\u001b[1m)\u001b[0m\n", " r15 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv15, r15\u001b[1m)\u001b[0m\n", " r16 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv16, r16\u001b[1m)\u001b[0m\n", " r17 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv17, r17\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35massign\u001b[0m\u001b[1m(\u001b[0mv1, \u001b[1m(\u001b[0mv1+\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " r1 = \u001b[1;35mdeclare_stream\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35msave\u001b[0m\u001b[1m(\u001b[0mv1, r1\u001b[1m)\u001b[0m\n", " \u001b[1;35malign\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n", " with \u001b[1;35mstream_processing\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m:\n", " \u001b[1;35mr1.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_shots\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr2.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_ref__p1p2\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr3.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_ref__p3p4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr4.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_ref__p5p6\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr5.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_ref__p7p8\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr6.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_read__p1p2\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr7.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_read__p3p4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr8.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_read__p5p6\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr9.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_read__p7p8\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr10.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_diff__p1p2\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr11.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_diff__p3p4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr12.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_diff__p5p6\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr13.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_diff__p7p8\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr14.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_state__p1p2\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr15.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_state__p3p4\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr16.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_state__p5p6\"\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[1;35mr17.buffer\u001b[0m\u001b[1m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1;35m.save\u001b[0m\u001b[1m(\u001b[0m\u001b[32m\"qm_driver_measurement_8q_parity_read_state__p7p8\"\u001b[0m\u001b[1m)\u001b[0m\n", "\n", "config = \u001b[3;35mNone\u001b[0m\n", "\n", "loaded_config = \u001b[3;35mNone\u001b[0m\n", "\n", "\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "rprint(measurement_8q.get_qua_program_as_str())" ] }, { "cell_type": "markdown", "id": "6-summary", "metadata": {}, "source": [ "Going from one sensor to four required only additions to the configuration dictionary. The `signals` list grew from one entry to four, each readout group gained three new entries, and the `ReadSequence` class was left completely untouched. This is the central scaling principle of arbok." ] } ], "metadata": { "kernelspec": { "display_name": "arbok-driver", "language": "python", "name": "python3" }, "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.13.5" } }, "nbformat": 4, "nbformat_minor": 5 }