{ "cells": [ { "cell_type": "markdown", "id": "b4db0bfb-f716-41a4-a0e5-a7761c3ec941", "metadata": {}, "source": [ "# Tutorial 0) Arbok, a dynamicially generated qcodes driver" ] }, { "cell_type": "markdown", "id": "162bc0ec-9b00-48ea-871f-b38703a739d3", "metadata": {}, "source": [ "## 0.1 Introduction and overwiew" ] }, { "cell_type": "markdown", "id": "adaec79a-a403-4fce-ae88-72dd303cd149", "metadata": {}, "source": [ "Welcome to the `arbok_driver` tutorials!" ] }, { "cell_type": "markdown", "id": "4ccff823-1345-4220-85fe-6fa6350bfbe1", "metadata": {}, "source": [ "In this series we will explore how this python package generates a qcodes\n", "driver on the fly to modularize and parameterize our complex measurement sequences.\n", "\n", "Arbok is a top-level python control framework based on [QCoDeS](https://microsoft.github.io/Qcodes/index.html) compiling into FPGA instructions ([QM-QUA SDK](https://pypi.org/project/qm-qua/1.1.7/)) for [quantum machines hardware](https://www.quantum-machines.co/). The core idea behind arbok is to write **qubit control sequences in a device and measurement setup agnostic manner** that are configured/ scaled to larger systems by providing the respective **configurations that characterize that given system**.\n", "\n", "
\n",
"
\n",
"
\n",
"
\n",
"
class SquarePulse(SubSequence):\n",
" """\n",
" Class containing parameters and sequence for a simple square pulse\n",
" """\n",
" PARAMETER_CLASS = SquarePulseParameters\n",
" arbok_params: SquarePulseParameters\n",
" def qua_sequence(self):\n",
" """Macro that will be played within the qua.program() context"""\n",
" qua.align()\n",
" qua.play(\n",
" pulse = 'ramp'*qua.amp(self.arbok_params.amplitude.qua),\n",
" element = self.arbok_params.element.qua,\n",
" duration = self.arbok_params.t_ramp.qua\n",
" )\n",
" qua.wait(\n",
" self.arbok_params.t_square_pulse.qua,\n",
" self.arbok_params.element.qua)\n",
" qua.play(\n",
" pulse = 'ramp'*qua.amp(self.arbok_params.amplitude.qua),\n",
" element = self.arbok_params.element.qua,\n",
" duration = self.arbok_params.t_ramp.qua\n",
" )\n",
"\n",
" \n",
"
# Single QUA script generated at 2026-03-19 05:58:34.896999\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",
" with infinite_loop_():\n",
" pause()\n",
" assign(v1, 0)\n",
" align()\n",
" play("ramp"*amp(0.1), "gate_1", duration=200)\n",
" wait(100, "gate_1")\n",
" play("ramp"*amp(0.1), "gate_1", duration=200)\n",
" align()\n",
" assign(v1, (v1+1))\n",
" r0 = declare_stream()\n",
" save(v1, r0)\n",
" align()\n",
" with stream_processing():\n",
" r0.buffer(1).save("mock_driver_mock_measurement_shots")\n",
"\n",
"config = None\n",
"\n",
"loaded_config = None\n",
"