{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "d584a8e5", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:24.320092Z", "iopub.status.busy": "2024-10-11T06:16:24.319373Z", "iopub.status.idle": "2024-10-11T06:16:24.326020Z", "shell.execute_reply": "2024-10-11T06:16:24.325242Z" }, "nbsphinx": "hidden" }, "outputs": [], "source": [ "# Copyright 2024 Keysight Technologies Inc." ] }, { "cell_type": "raw", "id": "27064fd1", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Managing calibration data and linkers\n", "=====================================\n", "\n", ".. note:: This guide requires the asset\n", " :download:`calibration set <../../assets/calibration.qcs>`\\.\n", "\n", "In this guide, we show how to use a :py:class:`~keysight.qcs.programs.CalibrationSet`\n", "to manage calibration data and the operation definitions provided by\n", ":py:class:`Linkers `\\s. The\n", ":py:class:`~keysight.qcs.programs.CalibrationSet` object provides a way to store and\n", "update calibration data across multiple objects simultaneously. The\n", ":py:class:`~keysight.qcs.programs.CalibrationSet` used in this and other guides has\n", "the parameters listed below.\n", "\n", ".. image:: ../../figures/calibration_set_variables.png\n", " :align: center\n", " :width: 60%\n", "\n", "We work with :py:class:`Linkers `\n", "for single-qubit :math:`XY` rotations and multi-qubit cross-resonance gates, both\n", "common in superconducting systems. See :doc:`parameterized_linker_native_gates_sq`\\,\n", ":doc:`parameterized_linker_native_gates_mq`\\, and :doc:`parameterized_linker_msmt` to\n", "learn how to create these objects in detail." ] }, { "cell_type": "raw", "id": "fe7ed695", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Native gates to compile\n", "-----------------------\n", "\n", "We first define the native gates we want to compile, represented by the following\n", ":py:class:`~keysight.qcs.quantum.ParametricGate`\\s:" ] }, { "cell_type": "code", "execution_count": 2, "id": "3e9a6005", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:24.329765Z", "iopub.status.busy": "2024-10-11T06:16:24.329205Z", "iopub.status.idle": "2024-10-11T06:16:27.521059Z", "shell.execute_reply": "2024-10-11T06:16:27.520162Z" } }, "outputs": [], "source": [ "import keysight.qcs as qcs\n", "import numpy as np\n", "\n", "# euler decomposition for XY rotations\n", "layers = [-qcs.PAULIS.sigma_z, qcs.PAULIS.sigma_x, qcs.PAULIS.sigma_z]\n", "zxz = qcs.ParametricGate(layers, [\"phi\", \"theta\", \"phi\"])\n", "\n", "# cross-resonance multi-qubit gate\n", "zx_ham = qcs.PAULIS.sigma_z & qcs.PAULIS.sigma_x\n", "cr = qcs.ParametricGate([zx_ham], [\"beta\"])" ] }, { "cell_type": "raw", "id": "204380eb", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Anatomy of a CalibrationSet\n", "---------------------------\n", "\n", "A :py:class:`~keysight.qcs.programs.CalibrationSet` contains a\n", ":py:class:`~keysight.qcs.variables.VariableSet` and a dictionary of\n", ":py:class:`Linkers `\\s. We load one with single-\n", "and multi-qubit linkers for our native gates." ] }, { "cell_type": "code", "execution_count": 3, "id": "60bcbaa8", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:27.525392Z", "iopub.status.busy": "2024-10-11T06:16:27.524855Z", "iopub.status.idle": "2024-10-11T06:16:27.925863Z", "shell.execute_reply": "2024-10-11T06:16:27.924953Z" } }, "outputs": [], "source": [ "calibration_set = qcs.load(\"../../assets/calibration.qcs\")" ] }, { "cell_type": "raw", "id": "0ffb9df7", "metadata": { "lines_to_next_cell": 0, "raw_mimetype": "text/restructuredtext" }, "source": [ "Variables\n", "^^^^^^^^^\n", "\n", "The calibration variables can be accessed via\n", ":py:attr:`~keysight.qcs.programs.CalibrationSet.variables`\\." ] }, { "cell_type": "code", "execution_count": 4, "id": "37971b58", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:27.929653Z", "iopub.status.busy": "2024-10-11T06:16:27.929310Z", "iopub.status.idle": "2024-10-11T06:16:27.960053Z", "shell.execute_reply": "2024-10-11T06:16:27.959269Z" } }, "outputs": [ { "data": { "text/plain": [ "[Array(name=single_qubit_frequencies, shape=(4,), dtype=float, unit=Hz),\n", " Array(name=single_qubit_amplitudes, shape=(4,), dtype=float, unit=none),\n", " Array(name=multi_qubit_amplitudes, shape=(2,), dtype=float, unit=none),\n", " Scalar(name=single_qubit_duration, value=3e-08, dtype=float, unit=s),\n", " Scalar(name=multi_qubit_duration, value=3e-08, dtype=float, unit=s),\n", " Array(name=readout_frequencies, shape=(4,), dtype=float, unit=Hz),\n", " Scalar(name=readout_frequency_detuning, value=0.0, dtype=float, unit=Hz),\n", " Array(name=readout_amplitudes, shape=(4,), dtype=float, unit=none),\n", " Array(name=readout_phases, shape=(4,), dtype=float, unit=rad),\n", " Scalar(name=readout_plateau_time, value=1e-07, dtype=float, unit=s),\n", " Scalar(name=readout_rise_time, value=3e-08, dtype=float, unit=s),\n", " Scalar(name=readout_pulse_delay, value=4e-08, dtype=float, unit=s),\n", " Scalar(name=acquisition_duration, value=2e-07, dtype=float, unit=s),\n", " Array(name=ref_pts, shape=(4, 2), dtype=complex, unit=none),\n", " Array(name=phis, shape=(4,), dtype=float, unit=rad),\n", " Array(name=thetas, shape=(4,), dtype=float, unit=none),\n", " Array(name=beta, shape=(2,), dtype=float, unit=none),\n", " Scalar(name=alpha, value=0.33, dtype=float, unit=none)]" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list(calibration_set.variables.variables)" ] }, { "cell_type": "raw", "id": "21e65d2a", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "While it is convenient to save the full calibration set with variables and linkers\n", "in a single file, it is also possible to save the variables separately using the\n", ":py:meth:`~keysight.qcs.programs.CalibrationSet.export_values` method, which creates\n", "a json file that can easily be edited.\n", "\n", "This can be integrated into a workflow where calibration variables can be saved at\n", "certain times to track their history." ] }, { "cell_type": "code", "execution_count": 5, "id": "45a1a052", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:27.963609Z", "iopub.status.busy": "2024-10-11T06:16:27.963296Z", "iopub.status.idle": "2024-10-11T06:16:27.968899Z", "shell.execute_reply": "2024-10-11T06:16:27.968102Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{\n", " \"qudits_0\": {\n", " \"phis\": 0.0,\n", " \"thetas\": 0.0,\n", " \"single_qubit_duration\": 3E-08,\n", " \"single_qubit_amplitudes\": 0.1,\n", " \"single_qubit_frequencies\": 5000000000.0,\n", " \"readout_pulse_delay\": 4E-08,\n", " \"readout_rise_time\": 3E-08,\n", " \"readout_amplitudes\": 0.1,\n", " \"readout_frequencies\": 5800000000.0,\n", " \"readout_frequency_detuning\": 0.0,\n", " \"readout_phases\": 0.0,\n", " \"readout_plateau_time\": 1E-07,\n", " \"acquisition_duration\": 2E-07,\n", " \"ref_pts\": {\n", " \"real\": [\n", " 1.0,\n", " 1.0\n", " ],\n", " \"imag\": [\n", " 1.0,\n", " -1.0\n", " ]\n", " }\n", " },\n", " \"qudits_1\": {\n", " \"phis\": 0.0,\n", " \"thetas\": 0.0,\n", " \"single_qubit_duration\": 3E-08,\n", " \"single_qubit_amplitudes\": 0.1,\n", " \"single_qubit_frequencies\": 5100000000.0,\n", " \"readout_pulse_delay\": 4E-08,\n", " \"readout_rise_time\": 3E-08,\n", " \"readout_amplitudes\": 0.1,\n", " \"readout_frequencies\": 5850000000.0,\n", " \"readout_frequency_detuning\": 0.0,\n", " \"readout_phases\": 0.0,\n", " \"readout_plateau_time\": 1E-07,\n", " \"acquisition_duration\": 2E-07,\n", " \"ref_pts\": {\n", " \"real\": [\n", " 1.0,\n", " 1.0\n", " ],\n", " \"imag\": [\n", " 1.0,\n", " -1.0\n", " ]\n", " }\n", " },\n", " \"qudits_2\": {\n", " \"phis\": 0.0,\n", " \"thetas\": 0.0,\n", " \"single_qubit_duration\": 3E-08,\n", " \"single_qubit_amplitudes\": 0.1,\n", " \"single_qubit_frequencies\": 5200000000.0,\n", " \"readout_pulse_delay\": 4E-08,\n", " \"readout_rise_time\": 3E-08,\n", " \"readout_amplitudes\": 0.1,\n", " \"readout_frequencies\": 5900000000.0,\n", " \"readout_frequency_detuning\": 0.0,\n", " \"readout_phases\": 0.0,\n", " \"readout_plateau_time\": 1E-07,\n", " \"acquisition_duration\": 2E-07,\n", " \"ref_pts\": {\n", " \"real\": [\n", " 1.0,\n", " 1.0\n", " ],\n", " \"imag\": [\n", " 1.0,\n", " -1.0\n", " ]\n", " }\n", " },\n", " \"qudits_3\": {\n", " \"phis\": 0.0,\n", " \"thetas\": 0.0,\n", " \"single_qubit_duration\": 3E-08,\n", " \"single_qubit_amplitudes\": 0.1,\n", " \"single_qubit_frequencies\": 5300000000.0,\n", " \"readout_pulse_delay\": 4E-08,\n", " \"readout_rise_time\": 3E-08,\n", " \"readout_amplitudes\": 0.1,\n", " \"readout_frequencies\": 5950000000.0,\n", " \"readout_frequency_detuning\": 0.0,\n", " \"readout_phases\": 0.0,\n", " \"readout_plateau_time\": 1E-07,\n", " \"acquisition_duration\": 2E-07,\n", " \"ref_pts\": {\n", " \"real\": [\n", " 1.0,\n", " 1.0\n", " ],\n", " \"imag\": [\n", " 1.0,\n", " -1.0\n", " ]\n", " }\n", " },\n", " \"couplings_0\": {\n", " \"beta\": 0.0,\n", " \"multi_qubit_duration\": 3E-08,\n", " \"multi_qubit_amplitudes\": 0.1,\n", " \"single_qubit_frequencies\": 5000000000.0,\n", " \"alpha\": 0.33\n", " },\n", " \"couplings_1\": {\n", " \"beta\": 0.0,\n", " \"multi_qubit_duration\": 3E-08,\n", " \"multi_qubit_amplitudes\": 0.1,\n", " \"single_qubit_frequencies\": 5100000000.0,\n", " \"alpha\": 0.33\n", " }\n", "}\n", "\n" ] } ], "source": [ "# calibration_set.export_values(\"calibration_values_Jan_01_2024.qcs\")\n", "\n", "# the variables stored in this format are sorted by qudit:\n", "print(open(\"calibration_values_Jan_01_2024.qcs\").read())" ] }, { "cell_type": "raw", "id": "e9a979ff", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "We can edit the exported file and load the edits back in using the\n", ":py:meth:`~keysight.qcs.programs.CalibrationSet.import_values` method:" ] }, { "cell_type": "code", "execution_count": 6, "id": "dcf820e5", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:27.972141Z", "iopub.status.busy": "2024-10-11T06:16:27.971824Z", "iopub.status.idle": "2024-10-11T06:16:28.017089Z", "shell.execute_reply": "2024-10-11T06:16:28.016185Z" }, "lines_to_next_cell": 2 }, "outputs": [], "source": [ "calibration_set.import_values(\"calibration_values_Jan_01_2024.qcs\")" ] }, { "cell_type": "raw", "id": "d068ceae", "metadata": { "lines_to_next_cell": 0, "raw_mimetype": "text/restructuredtext" }, "source": [ "Linkers\n", "^^^^^^^\n", "The dictionary of linkers can be accessed via\n", ":py:meth:`~keysight.qcs.programs.CalibrationSet.linkers`\\." ] }, { "cell_type": "code", "execution_count": 7, "id": "97591410", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:28.021680Z", "iopub.status.busy": "2024-10-11T06:16:28.021114Z", "iopub.status.idle": "2024-10-11T06:16:28.028852Z", "shell.execute_reply": "2024-10-11T06:16:28.028068Z" } }, "outputs": [ { "data": { "text/plain": [ "['single_qubit_linker', 'multi_qubit_linker_suppression', 'measurement_linker']" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list(calibration_set.linkers.keys())" ] }, { "cell_type": "raw", "id": "1bb15358", "metadata": { "lines_to_next_cell": 0, "raw_mimetype": "text/restructuredtext" }, "source": [ "A :py:class:`~keysight.qcs.programs.CalibrationSet` also has an\n", ":py:attr:`~keysight.qcs.programs.CalibrationSet.active_linkers` property that can be\n", "used to specify a subset of all available linkers.\n", "By default, all linkers are active and can be set using their names." ] }, { "cell_type": "code", "execution_count": 8, "id": "8ea9e02d", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:28.032344Z", "iopub.status.busy": "2024-10-11T06:16:28.031819Z", "iopub.status.idle": "2024-10-11T06:16:28.040280Z", "shell.execute_reply": "2024-10-11T06:16:28.039374Z" } }, "outputs": [ { "data": { "text/plain": [ "['single_qubit_linker', 'measurement_linker']" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "calibration_set.active_linkers = [\"single_qubit_linker\", \"measurement_linker\"]\n", "list(calibration_set.active_linkers.keys())" ] }, { "cell_type": "raw", "id": "3e1bbb06", "metadata": { "lines_to_next_cell": 0, "raw_mimetype": "text/restructuredtext" }, "source": [ "Using the Linkers\n", "-----------------\n", "\n", "Now, using the linkers within, we can define gate-level programs and compile them:" ] }, { "cell_type": "code", "execution_count": 9, "id": "80cdf329", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:28.043858Z", "iopub.status.busy": "2024-10-11T06:16:28.043313Z", "iopub.status.idle": "2024-10-11T06:16:28.141875Z", "shell.execute_reply": "2024-10-11T06:16:28.141044Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
\n", " \n", "\tkeysight-logo-svg\n", "\t\n", "\t\n", "\t\t\n", "\t\n", "\n", "\n", " \n", "
\n", " Program\n", "
\n", " \n", "\n", "\n", "\n", "
\n", " Program\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Durationundefined
Layers2
Targets2
Repetitions\n", "
\n", "
\n", "\n", "
\n", "
\n", "
\n", "
\n", " Layer #0\n", "
\n", " \n", "\n", "\n", "\n", "
\n", " Layer #0 \n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Durationundefined
\n", "
\n", "\n", "
\n", "
\n", "
\n", "
\n", " Layer #1\n", "
\n", " \n", "\n", "\n", "\n", "
\n", " Layer #1 \n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Durationundefined
\n", "
\n", "\n", "
\n", "
\n", "
\n", " qudits\n", " \n", " 0\n", " \n", " \n", "
\n", " PGATE\n", "
\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\n", " ParameterizedGate on ('qudits', 0)\n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Parametersphi, theta, phi
ValuesArray(name=phis, shape=(2,), dtype=float, unit=none)
Array(name=thetas, shape=(2,), dtype=float, unit=none)
\n", "
\n", " Matrices\n", "
\n", "
\n", " \n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
-10
01
\n", "\n", "
\n", "
\n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
01
10
\n", "\n", "
\n", "
\n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
10
0-1
\n", "\n", "
\n", "
\n", "
\n", "
\n", "\n", "\n", "
\n", "
\n", "
\n", " \n", "
\n", " MULTIGATE\n", "
\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\n", " ParameterizedGate on (('qudits', 0), ('qudits', 1))\n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Parametersbeta
ValuesScalarRef(name=beta, value=1.5707963267948966, dtype=float, unit=none)
\n", "
\n", " Matrices\n", "
\n", "
\n", " \n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
0100
1000
000-1
00-10
\n", "\n", "
\n", "
\n", "
\n", "
\n", "\n", "\n", "
\n", "
\n", "
\n", " 1\n", " \n", " \n", "
\n", " PGATE\n", "
\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\n", " ParameterizedGate on ('qudits', 1)\n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Parametersphi, theta, phi
ValuesArray(name=phis, shape=(2,), dtype=float, unit=none)
Array(name=thetas, shape=(2,), dtype=float, unit=none)
\n", "
\n", " Matrices\n", "
\n", "
\n", " \n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
-10
01
\n", "\n", "
\n", "
\n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
01
10
\n", "\n", "
\n", "
\n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
10
0-1
\n", "\n", "
\n", "
\n", "
\n", "
\n", "\n", "\n", "
\n", "
\n", "
\n", " \n", "
\n", " MULTIGATE\n", "
\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\n", " ParameterizedGate on (('qudits', 1), ('qudits', 0))\n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Parametersbeta
ValuesScalarRef(name=beta, value=1.5707963267948966, dtype=float, unit=none)
\n", "
\n", " Matrices\n", "
\n", "
\n", " \n", "
\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
0100
1000
000-1
00-10
\n", "\n", "
\n", "
\n", "
\n", "
\n", "\n", "\n", "
\n", "
\n", "
\n", "\n", "\n", " \n", "
\n", " \n", "
\n", " \n", "
\n", " \n", "
\n", " \n", "
\n", " \n", "
\n", " \n", "
\n", " \n", "
\n", " \n", "
\n", " \n", "
\n", " \n", "
\n", " \n", "
\n", "\n", "\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": { "text/html": { "isolated": true } }, "output_type": "display_data" } ], "source": [ "qubits = qcs.Qudits(range(2))\n", "\n", "# define a sample program\n", "program_to_compile = qcs.Program()\n", "\n", "# apply X90 on qubit 0 and an X on qubit 1\n", "phis = qcs.Array(\"phis\", value=[0.0, 0.0])\n", "thetas = qcs.Array(\"thetas\", value=[np.pi / 2, np.pi])\n", "program_to_compile.add_parametric_gate(zxz, [phis, thetas], qubits)\n", "\n", "# apply (ZX)^1/2 on qubits (0, 1)\n", "beta = qcs.Array(\"beta\", value=[np.pi / 2])\n", "multiqudits = qcs.MultiQudits.from_qudits((qubits[0], qubits[1]))\n", "program_to_compile.add_parametric_gate(cr, [beta], multiqudits)\n", "\n", "program_to_compile.draw()" ] }, { "cell_type": "raw", "id": "9d1269a9", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Next, we define a :py:class:`~keysight.qcs.executor.LinkerPass` to compile the\n", "program:" ] }, { "cell_type": "code", "execution_count": 10, "id": "dfb7e9bd", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:28.145734Z", "iopub.status.busy": "2024-10-11T06:16:28.145160Z", "iopub.status.idle": "2024-10-11T06:16:28.242164Z", "shell.execute_reply": "2024-10-11T06:16:28.241220Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
\n", " \n", "\tkeysight-logo-svg\n", "\t\n", "\t\n", "\t\t\n", "\t\n", "\n", "\n", " \n", "
\n", " Program\n", "
\n", " \n", "\n", "\n", "\n", "
\n", " Program\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Duration60 ns
Layers2
Targets2
Repetitions\n", "
\n", "
\n", "\n", "
\n", "
\n", "
\n", "
\n", " Layer #0\n", "
\n", " \n", "\n", "\n", "\n", "
\n", " Layer #0 \n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Duration30 ns
\n", "
\n", "\n", "
\n", "
\n", "
\n", "
\n", " Layer #1\n", "
\n", " \n", "\n", "\n", "\n", "
\n", " Layer #1 \n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Duration30 ns
\n", "
\n", "\n", "
\n", "
\n", "
\n", " xy_channels\n", " \n", " 0\n", " \n", " \n", "
\n", " \n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\n", " RFWaveform on ('xy_channels', 0)\n", "
\n", "
\n", " Parameters\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DurationScalar(name=single_qubit_duration, value=30 ns, dtype=float, unit=s)
AmplitudeArraySlice(name=_implicit, shape=(2,), dtype=float, unit=none, value=[0.1571, 0.3142])
FrequencyArraySlice(name=single_qubit_frequencies, shape=(2,), dtype=float, unit=Hz, value=[5 GHz, 5.1 GHz])
EnvelopeGaussianEnvelope(2.0)
Instantaneous PhaseArraySlice(name=_implicit, shape=(2,), dtype=float, unit=rad, value=[0 rad, 0 rad])
Post-phase0 rad
\n", "
\n", "\n", "\n", "
\n", "
\n", "
\n", " \n", "
\n", " \n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\n", " RFWaveform on ('xy_channels', 0)\n", "
\n", "
\n", " Parameters\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DurationScalar(name=multi_qubit_duration, value=30 ns, dtype=float, unit=s)
AmplitudeScalarRef(name=_implicit, value=0.1571, dtype=float, unit=none)
FrequencyScalarRef(name=single_qubit_frequencies, value=5.1 GHz, dtype=float, unit=Hz)
EnvelopeGaussianEnvelope(2.0)
Instantaneous Phase0 rad
Post-phase0 rad
\n", "
\n", "\n", "\n", "
\n", "
\n", "
\n", " 1\n", " \n", " \n", "
\n", " \n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\n", " RFWaveform on ('xy_channels', 1)\n", "
\n", "
\n", " Parameters\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DurationScalar(name=single_qubit_duration, value=30 ns, dtype=float, unit=s)
AmplitudeArraySlice(name=_implicit, shape=(2,), dtype=float, unit=none, value=[0.1571, 0.3142])
FrequencyArraySlice(name=single_qubit_frequencies, shape=(2,), dtype=float, unit=Hz, value=[5 GHz, 5.1 GHz])
EnvelopeGaussianEnvelope(2.0)
Instantaneous PhaseArraySlice(name=_implicit, shape=(2,), dtype=float, unit=rad, value=[0 rad, 0 rad])
Post-phase0 rad
\n", "
\n", "\n", "\n", "
\n", "
\n", "
\n", " \n", "
\n", " \n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\n", " RFWaveform on ('xy_channels', 1)\n", "
\n", "
\n", " Parameters\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DurationScalar(name=multi_qubit_duration, value=30 ns, dtype=float, unit=s)
AmplitudeScalarRef(name=_implicit, value=0.0518, dtype=float, unit=none)
FrequencyScalarRef(name=single_qubit_frequencies, value=5.1 GHz, dtype=float, unit=Hz)
EnvelopeGaussianEnvelope(2.0)
Instantaneous Phase0 rad
Post-phase0 rad
\n", "
\n", "\n", "\n", "
\n", "
\n", "
\n", "\n", "\n", "\n", "\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": { "text/html": { "isolated": true } }, "output_type": "display_data" } ], "source": [ "linker_pass = qcs.LinkerPass(*calibration_set.linkers.values())\n", "program_compiled = linker_pass.apply(program_to_compile)\n", "program_compiled.draw()" ] }, { "cell_type": "raw", "id": "bf8ec322", "metadata": { "lines_to_next_cell": 0, "raw_mimetype": "text/restructuredtext" }, "source": [ "As this program now only contains waveforms, we render it:" ] }, { "cell_type": "code", "execution_count": 11, "id": "699c5c67", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:28.246146Z", "iopub.status.busy": "2024-10-11T06:16:28.245551Z", "iopub.status.idle": "2024-10-11T06:16:28.775428Z", "shell.execute_reply": "2024-10-11T06:16:28.774691Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 4.166666666666667e-10, "legendgroup": "xy_channels, labels: (0,)", "legendgrouptitle": { "text": "xy_channels, labels: (0,)" }, "name": "Drive pulse for xy_channels, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 0.0013945023540263561, 0.004358204371851776, 0.007560621032245574, 0.011007334783039103, 0.01470215696462164, 0.018646888701953513, 0.0228410891387098, 0.02728185627015961, 0.03196362588235896, 0.03687799423928047, 0.04201357016122393, 0.04735586199461185, 0.05288720467592069, 0.05858673163598236, 0.06443039567483763, 0.07039104216640765, 0.07643853703647735, 0.08253995091223469, 0.08865979968751043, 0.09476034051044974, 0.10080192090949308, 0.10674337746272451, 0.11254247912097079, 0.11815640905417134, 0.12354227774147981, 0.12865765900531967, 0.13346113983292732, 0.13791287416689452, 0.14197513040516632, 0.14561282215123406, 0.14879401181042973, 0.15149037694429313, 0.15367762987001704, 0.15533588181594665, 0.1564499439990428, 0.15700955925065357, 0.15700955925065357, 0.1564499439990428, 0.15533588181594665, 0.153677629870017, 0.15149037694429313, 0.14879401181042975, 0.14561282215123406, 0.14197513040516635, 0.13791287416689452, 0.13346113983292732, 0.12865765900531964, 0.12354227774147981, 0.11815640905417132, 0.11254247912097079, 0.10674337746272454, 0.10080192090949308, 0.09476034051044978, 0.08865979968751043, 0.08253995091223469, 0.07643853703647735, 0.07039104216640765, 0.06443039567483759, 0.05858673163598236, 0.0528872046759207, 0.04735586199461185, 0.04201357016122393, 0.03687799423928047, 0.03196362588235896, 0.027281856270159575, 0.0228410891387098, 0.018646888701953503, 0.01470215696462164, 0.01100733478303912, 0.007560621032245574, 0.004358204371851789, 0.0013945023540263561, 0.001382572193073113, 0.004026455817655065, 0.005998243950608193, 0.0067008408521002805, 0.00562627189039172, 0.002433907379017095, -0.002981360391434564, -0.010440314398755722, -0.019458222568444965, -0.029257279912974086, -0.03881547755968171, -0.04695072603048526, -0.052434747308366544, -0.05412708223521563, -0.05111606962491843, -0.04285135141863548, -0.029251761718085238, -0.01077362549860401, 0.011572426056203226, 0.03626321235862355, 0.06136432141968705, 0.08468521506402067, 0.10397569299794379, 0.11714556459514021, 0.12248535642920633, 0.1188641778558314, 0.10588184108552863, 0.0839560383565387, 0.05433153021393038, 0.01900628721381627, -0.0194215157867607, -0.057972857419323315, -0.09355301356634482, -0.12323624070576585, -0.1445409011232527, -0.15566632070562741, -0.15566632070562747, -0.14454090112325282, -0.12323624070576598, -0.09355301356634498, -0.057972857419323516, -0.019421515786760917, 0.01900628721381606, 0.05433153021393022, 0.08395603835653856, 0.10588184108552853, 0.11886417785583132, 0.12248535642920635, 0.11714556459514026, 0.10397569299794389, 0.08468521506402082, 0.0613643214196872, 0.036263212358623724, 0.01157242605620337, -0.010773625498603886, -0.029251761718085138, -0.04285135141863542, -0.05111606962491837, -0.05412708223521563, -0.052434747308366586, -0.0469507260304853, -0.038815477559681774, -0.029257279912974145, -0.01945822256844502, -0.010440314398755753, -0.002981360391434597, 0.002433907379017073, 0.0056262718903917095, 0.006700840852100288, 0.005998243950608194, 0.00402645581765508, 0.0013825721930731142 ], "yaxis": "y" }, { "dx": 4.166666666666667e-10, "legendgroup": "xy_channels, labels: (1,)", "legendgrouptitle": { "text": "xy_channels, labels: (1,)" }, "name": "Drive pulse for xy_channels, labels: (1,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 0.002765144386146226, 0.00805291163531013, 0.011996487901216386, 0.013401681704200561, 0.01125254378078344, 0.00486781475803419, -0.005962720782869128, -0.020880628797511444, -0.03891644513688993, -0.05851455982594817, -0.07763095511936342, -0.09390145206097052, -0.10486949461673309, -0.10825416447043126, -0.10223213924983686, -0.08570270283727097, -0.058503523436170476, -0.02154725099720802, 0.023144852112406453, 0.0725264247172471, 0.1227286428393741, 0.16937043012804134, 0.20795138599588758, 0.23429112919028042, 0.24497071285841265, 0.2377283557116628, 0.21176368217105726, 0.1679120767130774, 0.10866306042786077, 0.03801257442763254, -0.0388430315735214, -0.11594571483864663, -0.18710602713268965, -0.2464724814115317, -0.2890818022465054, -0.31133264141125483, -0.31133264141125494, -0.28908180224650565, -0.24647248141153197, -0.18710602713268995, -0.11594571483864703, -0.038843031573521834, 0.03801257442763212, 0.10866306042786043, 0.16791207671307712, 0.21176368217105707, 0.23772835571166265, 0.2449707128584127, 0.23429112919028053, 0.20795138599588778, 0.16937043012804165, 0.1227286428393744, 0.07252642471724745, 0.02314485211240674, -0.02154725099720777, -0.058503523436170275, -0.08570270283727084, -0.10223213924983673, -0.10825416447043126, -0.10486949461673317, -0.0939014520609706, -0.07763095511936355, -0.05851455982594829, -0.03891644513689004, -0.020880628797511507, -0.005962720782869194, 0.004867814758034146, 0.011252543780783419, 0.013401681704200577, 0.011996487901216388, 0.00805291163531016, 0.0027651443861462285, 0.0004562488237141273, 0.0013287304198261714, 0.0019794205037007035, 0.0022112774811930925, 0.0018566697238292678, 0.0008031894350756413, -0.0009838489291734062, -0.003445303751589388, -0.00642121344758684, -0.009654902371281448, -0.012809107594694965, -0.015493739590060136, -0.01730346661176096, -0.01786193713762116, -0.016868302976223083, -0.014140945968149708, -0.009653081366968129, -0.0035552964145393233, 0.0038189005985470653, 0.011966860078345774, 0.02025022606849673, 0.02794612097112682, 0.034311978689321454, 0.03865803631639628, 0.04042016762163809, 0.03922517869242436, 0.03494100755822445, 0.027705492657657774, 0.01792940497059703, 0.006272074780559369, -0.006409100209631031, -0.019131042948376694, -0.0308724944768938, -0.04066795943290273, -0.04769849737067341, -0.05136988583285706, -0.051369885832857065, -0.04769849737067344, -0.04066795943290278, -0.030872494476893848, -0.01913104294837676, -0.006409100209631104, 0.006272074780559299, 0.017929404970596974, 0.02770549265765773, 0.03494100755822442, 0.03922517869242434, 0.040420167621638095, 0.03865803631639629, 0.03431197868932149, 0.027946120971126868, 0.02025022606849678, 0.01196686007834583, 0.003818900598547113, -0.0035552964145392826, -0.009653081366968097, -0.014140945968149687, -0.016868302976223062, -0.017861937137621162, -0.017303466611760975, -0.01549373959006015, -0.012809107594694984, -0.009654902371281467, -0.006421213447586858, -0.0034453037515893986, -0.000983848929173417, 0.000803189435075634, 0.0018566697238292643, 0.002211277481193095, 0.001979420503700704, 0.0013287304198261764, 0.00045624882371412775 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "program_compiled.render(\n", " channel_subplots=False,\n", " lo_frequency=5e9,\n", " sample_rate=qcs.SAMPLE_RATES[qcs.InstrumentEnum.M5300AWG],\n", ")" ] }, { "cell_type": "raw", "id": "3cb5d7e3", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Updating calibration data\n", "-------------------------\n", "\n", "We can update the values of the variables in the\n", ":py:class:`~keysight.qcs.programs.CalibrationSet` to update all the variables in\n", ":py:class:`Linkers `\\s that use them. Since the\n", "cross-resonance gate uses the single-qubit frequencies, both waveforms are updated\n", "to reflect the new value." ] }, { "cell_type": "code", "execution_count": 12, "id": "5421e406", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:28.811831Z", "iopub.status.busy": "2024-10-11T06:16:28.811424Z", "iopub.status.idle": "2024-10-11T06:16:28.901321Z", "shell.execute_reply": "2024-10-11T06:16:28.900602Z" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 4.166666666666667e-10, "legendgroup": "xy_channels, labels: (0,)", "legendgrouptitle": { "text": "xy_channels, labels: (0,)" }, "name": "Drive pulse for xy_channels, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 0.0013945023540263561, 0.004358204371851776, 0.007560621032245574, 0.011007334783039103, 0.01470215696462164, 0.018646888701953513, 0.0228410891387098, 0.02728185627015961, 0.03196362588235896, 0.03687799423928047, 0.04201357016122393, 0.04735586199461185, 0.05288720467592069, 0.05858673163598236, 0.06443039567483763, 0.07039104216640765, 0.07643853703647735, 0.08253995091223469, 0.08865979968751043, 0.09476034051044974, 0.10080192090949308, 0.10674337746272451, 0.11254247912097079, 0.11815640905417134, 0.12354227774147981, 0.12865765900531967, 0.13346113983292732, 0.13791287416689452, 0.14197513040516632, 0.14561282215123406, 0.14879401181042973, 0.15149037694429313, 0.15367762987001704, 0.15533588181594665, 0.1564499439990428, 0.15700955925065357, 0.15700955925065357, 0.1564499439990428, 0.15533588181594665, 0.153677629870017, 0.15149037694429313, 0.14879401181042975, 0.14561282215123406, 0.14197513040516635, 0.13791287416689452, 0.13346113983292732, 0.12865765900531964, 0.12354227774147981, 0.11815640905417132, 0.11254247912097079, 0.10674337746272454, 0.10080192090949308, 0.09476034051044978, 0.08865979968751043, 0.08253995091223469, 0.07643853703647735, 0.07039104216640765, 0.06443039567483759, 0.05858673163598236, 0.0528872046759207, 0.04735586199461185, 0.04201357016122393, 0.03687799423928047, 0.03196362588235896, 0.027281856270159575, 0.0228410891387098, 0.018646888701953503, 0.01470215696462164, 0.01100733478303912, 0.007560621032245574, 0.004358204371851789, 0.0013945023540263561, 0.001382572193073113, 0.004026455817655065, 0.005998243950608193, 0.0067008408521002805, 0.00562627189039172, 0.002433907379017095, -0.002981360391434564, -0.010440314398755722, -0.019458222568444965, -0.029257279912974086, -0.03881547755968171, -0.04695072603048526, -0.052434747308366544, -0.05412708223521563, -0.05111606962491843, -0.04285135141863548, -0.029251761718085238, -0.01077362549860401, 0.011572426056203226, 0.03626321235862355, 0.06136432141968705, 0.08468521506402067, 0.10397569299794379, 0.11714556459514021, 0.12248535642920633, 0.1188641778558314, 0.10588184108552863, 0.0839560383565387, 0.05433153021393038, 0.01900628721381627, -0.0194215157867607, -0.057972857419323315, -0.09355301356634482, -0.12323624070576585, -0.1445409011232527, -0.15566632070562741, -0.15566632070562747, -0.14454090112325282, -0.12323624070576598, -0.09355301356634498, -0.057972857419323516, -0.019421515786760917, 0.01900628721381606, 0.05433153021393022, 0.08395603835653856, 0.10588184108552853, 0.11886417785583132, 0.12248535642920635, 0.11714556459514026, 0.10397569299794389, 0.08468521506402082, 0.0613643214196872, 0.036263212358623724, 0.01157242605620337, -0.010773625498603886, -0.029251761718085138, -0.04285135141863542, -0.05111606962491837, -0.05412708223521563, -0.052434747308366586, -0.0469507260304853, -0.038815477559681774, -0.029257279912974145, -0.01945822256844502, -0.010440314398755753, -0.002981360391434597, 0.002433907379017073, 0.0056262718903917095, 0.006700840852100288, 0.005998243950608194, 0.00402645581765508, 0.0013825721930731142 ], "yaxis": "y" }, { "dx": 4.166666666666667e-10, "legendgroup": "xy_channels, labels: (1,)", "legendgrouptitle": { "text": "xy_channels, labels: (1,)" }, "name": "Drive pulse for xy_channels, labels: (1,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 0.002765144386146226, 0.00805291163531013, 0.011996487901216386, 0.013401681704200561, 0.01125254378078344, 0.00486781475803419, -0.005962720782869128, -0.020880628797511444, -0.03891644513688993, -0.05851455982594817, -0.07763095511936342, -0.09390145206097052, -0.10486949461673309, -0.10825416447043126, -0.10223213924983686, -0.08570270283727097, -0.058503523436170476, -0.02154725099720802, 0.023144852112406453, 0.0725264247172471, 0.1227286428393741, 0.16937043012804134, 0.20795138599588758, 0.23429112919028042, 0.24497071285841265, 0.2377283557116628, 0.21176368217105726, 0.1679120767130774, 0.10866306042786077, 0.03801257442763254, -0.0388430315735214, -0.11594571483864663, -0.18710602713268965, -0.2464724814115317, -0.2890818022465054, -0.31133264141125483, -0.31133264141125494, -0.28908180224650565, -0.24647248141153197, -0.18710602713268995, -0.11594571483864703, -0.038843031573521834, 0.03801257442763212, 0.10866306042786043, 0.16791207671307712, 0.21176368217105707, 0.23772835571166265, 0.2449707128584127, 0.23429112919028053, 0.20795138599588778, 0.16937043012804165, 0.1227286428393744, 0.07252642471724745, 0.02314485211240674, -0.02154725099720777, -0.058503523436170275, -0.08570270283727084, -0.10223213924983673, -0.10825416447043126, -0.10486949461673317, -0.0939014520609706, -0.07763095511936355, -0.05851455982594829, -0.03891644513689004, -0.020880628797511507, -0.005962720782869194, 0.004867814758034146, 0.011252543780783419, 0.013401681704200577, 0.011996487901216388, 0.00805291163531016, 0.0027651443861462285, 0.0004562488237141273, 0.0013287304198261714, 0.0019794205037007035, 0.0022112774811930925, 0.0018566697238292678, 0.0008031894350756413, -0.0009838489291734062, -0.003445303751589388, -0.00642121344758684, -0.009654902371281448, -0.012809107594694965, -0.015493739590060136, -0.01730346661176096, -0.01786193713762116, -0.016868302976223083, -0.014140945968149708, -0.009653081366968129, -0.0035552964145393233, 0.0038189005985470653, 0.011966860078345774, 0.02025022606849673, 0.02794612097112682, 0.034311978689321454, 0.03865803631639628, 0.04042016762163809, 0.03922517869242436, 0.03494100755822445, 0.027705492657657774, 0.01792940497059703, 0.006272074780559369, -0.006409100209631031, -0.019131042948376694, -0.0308724944768938, -0.04066795943290273, -0.04769849737067341, -0.05136988583285706, -0.051369885832857065, -0.04769849737067344, -0.04066795943290278, -0.030872494476893848, -0.01913104294837676, -0.006409100209631104, 0.006272074780559299, 0.017929404970596974, 0.02770549265765773, 0.03494100755822442, 0.03922517869242434, 0.040420167621638095, 0.03865803631639629, 0.03431197868932149, 0.027946120971126868, 0.02025022606849678, 0.01196686007834583, 0.003818900598547113, -0.0035552964145392826, -0.009653081366968097, -0.014140945968149687, -0.016868302976223062, -0.017861937137621162, -0.017303466611760975, -0.01549373959006015, -0.012809107594694984, -0.009654902371281467, -0.006421213447586858, -0.0034453037515893986, -0.000983848929173417, 0.000803189435075634, 0.0018566697238292643, 0.002211277481193095, 0.001979420503700704, 0.0013287304198261764, 0.00045624882371412775 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "calibration_set.variables.single_qubit_frequencies.value[1] += 100e6\n", "\n", "program_compiled.render(\n", " channel_subplots=False,\n", " lo_frequency=5e9,\n", " sample_rate=qcs.SAMPLE_RATES[qcs.InstrumentEnum.M5300AWG],\n", ")" ] }, { "cell_type": "raw", "id": "21c4c2a7", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Adding new linkers\n", "------------------\n", "\n", "Finally, we can create new linkers with the variables in and add new variables to the\n", "calibration set, then use the\n", ":py:meth:`~keysight.qcs.programs.CalibrationSet.add_linker` method to so it can\n", "be saved, loaded, and updated across multiple sessions." ] }, { "cell_type": "code", "execution_count": 13, "id": "a371d871", "metadata": { "execution": { "iopub.execute_input": "2024-10-11T06:16:28.909557Z", "iopub.status.busy": "2024-10-11T06:16:28.909229Z", "iopub.status.idle": "2024-10-11T06:16:28.925058Z", "shell.execute_reply": "2024-10-11T06:16:28.924213Z" } }, "outputs": [], "source": [ "operation = calibration_set.linkers[\"multi_qubit_linker_suppression\"].operation\n", "targets = calibration_set.linkers[\"multi_qubit_linker_suppression\"].targets\n", "\n", "mq_amp_cals = calibration_set.variables.multi_qubit_amplitudes\n", "frequency_cals = calibration_set.variables.single_qubit_frequencies\n", "\n", "# # define a new duration for this gate\n", "mq_dur = qcs.Scalar(\"multi_qubit_duration_new\", value=20e-9, dtype=float)\n", "calibration_set.variables.declare(mq_dur)\n", "\n", "gamma = qcs.Array(name=\"gamma\", shape=mq_amp_cals.shape, dtype=float)\n", "\n", "prog = qcs.Program()\n", "channels = qcs.Channels([0, 2], \"xy_channels\")\n", "envelope = qcs.GaussianEnvelope()\n", "pulse = qcs.RFWaveform(mq_dur, envelope, gamma * mq_amp_cals, frequency_cals[1::2])\n", "\n", "prog.add_waveform(pulse, channels)\n", "\n", "calibration_set.add_linker(\n", " \"multi_qubit_linker\", qcs.ParameterizedLinker(operation, targets, prog)\n", ")" ] } ], "metadata": { "jupytext": { "cell_metadata_filter": "nbsphinx,raw_mimetype,-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.9.6" } }, "nbformat": 4, "nbformat_minor": 5 }