From 7128cc4a3de7180bbbc1e92f4830e6bda118c98f Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:11:06 +0400 Subject: [PATCH 01/22] Squashed commit of the following: commit 27d5c46a6b5843b97e9e3a46e2a38a578dd47034 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue Oct 1 16:36:56 2024 +0400 build: update pyproject commit 02e2313096ffaef2e0d49007609f3cc98630392a Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri Sep 20 14:26:42 2024 +0400 fix: resonator spectroscopy errors commit 56a4a03fca9ab6442c0f29b539ee72271da88924 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri Sep 20 13:43:39 2024 +0400 fix: drop create_sequence commit f70cfa6e97cfc55c6580863600d57e5eb74c5c9c Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri Sep 20 13:25:12 2024 +0400 fix: drop ExecutionParameters from Parameters commit dc48c6e99ae19992258578a5893493c54c9e90c0 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri Sep 20 13:22:54 2024 +0400 chore: drop usage of ExecutionParameters commit 188caf54fcb0dae4d8f757a79deda9983b6892c3 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Wed Sep 18 19:21:26 2024 +0400 fix: fixes for hardware execution commit 140b76500c3b4772612ec965e1116b618ce0e4d6 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Wed Sep 18 19:16:17 2024 +0400 refactor: use sequence creation helpers in single shot routine commit b3714b9423234d0277204472d88633740035bf82 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Wed Sep 18 19:02:18 2024 +0400 chore: update for new qibolab public API commit 0b5fb601b5b91da23b58c257ba00f92846e36ee5 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Wed Sep 18 18:56:52 2024 +0400 chore: move QubitId and QubitPairId to qibocal commit 9ffd79b2a30cfc953ddb329302c64c238731aaea Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri Sep 13 16:30:08 2024 +0400 fix: Rabi length for new result shapes commit c6482aa4615eee9ae9ebda0e2624c746b6437fed Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Mon Sep 9 18:08:09 2024 +0400 chore: update resonator spectroscopy after moving results to qibocal commit 36d38cda8a34731d5471394e58750658d2524d55 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue Sep 3 19:47:45 2024 +0400 chore: move result manipulation functions from qibolab commit 9dd49a48cb9541666de894be6535f5da8cf807a9 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue Sep 3 19:47:25 2024 +0400 chore: update for new result structure commit 57503ffd0e21dc754c078cf046cafe696dc78bdb Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue Sep 3 14:03:52 2024 +0400 chore: update resonator spectroscopy commit 6468d925eb871b3d0e064702f522cf80483a9b5a Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun Sep 1 02:53:07 2024 +0400 chore: update Rabi routines commit fef91b9e66bb58c8ef736241059820fe26028598 Author: Alessandro Candido Date: Fri Aug 30 20:34:47 2024 +0200 fix: Add delays on acquisition in classification commit 5b6611df547abaab4fd3eb2ed7de70b824b25953 Author: Alessandro Candido Date: Mon Aug 26 15:17:32 2024 +0200 fix: Use readout id, not acquisition commit a80712b41300c518cea710617e817d5b6e26130a Author: Alessandro Candido Date: Mon Aug 26 13:19:15 2024 +0200 fix: Update channel names retrieval in classification commit 36a9339a8d50d35bd2c2f456f884adc5db8c1560 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun Sep 1 02:29:06 2024 +0400 chore: convert Rabi amplitude to absolute sweeper commit 0b522082368b68ebb74b1b2b43050b380b68bc72 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Thu Aug 29 01:04:00 2024 +0400 chore: drop sweeper type from rabi commit 1f33656bc7d7ab3a965d4766b1a66ab41c34ba9a Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Thu Aug 29 01:03:38 2024 +0400 chore: drop outdated updates commit 9e86b1d5b23792d2679efce99d8bdf8aa9ff7de8 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Wed Aug 28 23:49:02 2024 +0300 chore: drop SweeperType commit b874a42b348ab2dc80b2e747f7da6d660b60c7ce Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Wed Aug 28 23:44:18 2024 +0300 chore: update QubitId and QubitPairId imports to identifier commit 222da2ba2ea5f7678eb2d0ca33bb167429c9cdd3 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue Aug 27 21:06:25 2024 +0400 fix: unrolling result indexing commit 28d3cd20ef890b1b26d7f12f19698471e873d61a Author: Alessandro Candido Date: Sun Aug 25 11:37:45 2024 +0200 build: Update qibolab version with git dependency commit 544bd67b3311b15a52924a3578231d77369cb55a Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Thu Aug 22 22:27:30 2024 +0400 chore: update Rabi routines for acquisition commit 2f9f1ea279c3300166c7257b01c25c521d6e9972 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Thu Aug 22 22:07:03 2024 +0400 chore: implement duration interpolated sweeper commit 1f937268e25b2d3577b9b240915b39e1ef31d527 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue Aug 20 21:59:08 2024 +0400 chore: update with new acquisition format commit 5e3cbe6d2a927fcbe3e74c0187dd6d944850c9b5 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun Aug 18 14:56:31 2024 +0400 chore: update Rabi routines commit 0984ba8014cbec78be53ef07da531eeb00c80eab Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun Aug 18 13:36:58 2024 +0300 chore: change PulseSequence import to qibolab.sequence commit 77e36846f424ad69392e7f8b2d0a0d2f789d6225 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri Aug 16 21:09:57 2024 +0400 chore: update single shot for new qibolab serialization commit 47a5d48e7f6a9f37c2f3f0e67cc8ba3605e339ca Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue Aug 13 20:33:24 2024 +0400 fix: update Rabi length signal for new sequence layout commit 0a269b4c2d94b88d4347ca3d18492e5793e10e2f Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue Aug 13 20:33:07 2024 +0400 fix: update Rabi length for new sequence layout commit 6964785715488adeac3aa8066500ac01afa7a73e Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun Aug 11 15:05:59 2024 +0400 chore: update routines for the new sequence layout commit eee321e33866f4d5e3ce9f319507043fe0055829 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue Aug 6 23:57:34 2024 +0400 chore: update resonator spectroscopy commit 5c9838b4ef811cac68ef706d1a97cb8528b6ab04 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue Aug 6 23:57:08 2024 +0400 chore: update rabi amplitude commit ceed1c7396f45a634da58a3eb599f68bd6fc0a67 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Tue Aug 6 23:09:21 2024 +0400 chore: update single shot commit 9c7da03c986b51201225d3ab6e9ced713f0a57af Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Mon Jul 15 16:44:16 2024 +0400 chore: update T1, T2 signal and rabi length routines commit 502cd2dddf24a99c73435d4a6645a3a35f2d58e6 Author: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun Jul 14 01:27:51 2024 +0400 refactor: update classification, rabi amplitude and resonator spectroscopy routines --- .../protocols/signal/time_of_flight.rst | 2 +- doc/source/tutorials/advanced.rst | 12 +- poetry.lock | 540 +++++++++--------- pyproject.toml | 2 +- src/qibocal/auto/execute.py | 3 +- src/qibocal/auto/operation.py | 10 +- src/qibocal/auto/output.py | 3 +- src/qibocal/auto/runcard.py | 2 +- src/qibocal/auto/task.py | 5 +- src/qibocal/auto/transpile.py | 3 +- src/qibocal/cli/report.py | 2 +- src/qibocal/fitting/classifier/run.py | 3 +- src/qibocal/protocols/allxy/allxy.py | 7 +- .../allxy/allxy_drag_pulse_tuning.py | 7 +- .../allxy/allxy_resonator_depletion_tuning.py | 7 +- src/qibocal/protocols/classification.py | 83 +-- src/qibocal/protocols/coherence/spin_echo.py | 7 +- .../protocols/coherence/spin_echo_signal.py | 7 +- src/qibocal/protocols/coherence/t1.py | 15 +- .../protocols/coherence/t1_sequences.py | 7 +- src/qibocal/protocols/coherence/t1_signal.py | 44 +- src/qibocal/protocols/coherence/t2.py | 17 +- .../protocols/coherence/t2_sequences.py | 7 +- src/qibocal/protocols/coherence/t2_signal.py | 56 +- src/qibocal/protocols/coherence/zeno.py | 7 +- .../protocols/coherence/zeno_signal.py | 7 +- .../protocols/couplers/coupler_chevron.py | 15 +- .../couplers/coupler_qubit_spectroscopy.py | 17 +- .../coupler_resonator_spectroscopy.py | 15 +- src/qibocal/protocols/couplers/utils.py | 3 +- src/qibocal/protocols/dispersive_shift.py | 15 +- .../protocols/dispersive_shift_qutrit.py | 15 +- src/qibocal/protocols/drag.py | 7 +- .../protocols/fast_reset/fast_reset.py | 7 +- src/qibocal/protocols/flipping.py | 7 +- src/qibocal/protocols/flipping_signal.py | 7 +- .../flux_dependence/avoided_crossing.py | 5 +- .../flux_dependence/qubit_crosstalk.py | 15 +- .../flux_dependence/qubit_flux_dependence.py | 15 +- .../flux_dependence/qubit_flux_tracking.py | 15 +- .../flux_dependence/resonator_crosstalk.py | 15 +- .../resonator_flux_dependence.py | 15 +- .../protocols/flux_dependence/utils.py | 5 +- .../protocols/qubit_power_spectroscopy.py | 17 +- src/qibocal/protocols/qubit_spectroscopy.py | 7 +- .../protocols/qubit_spectroscopy_ef.py | 7 +- .../protocols/qutrit_classification.py | 7 +- src/qibocal/protocols/rabi/amplitude.py | 45 +- .../protocols/rabi/amplitude_frequency.py | 7 +- .../rabi/amplitude_frequency_signal.py | 7 +- .../protocols/rabi/amplitude_signal.py | 58 +- src/qibocal/protocols/rabi/ef.py | 15 +- src/qibocal/protocols/rabi/length.py | 61 +- .../protocols/rabi/length_frequency.py | 7 +- .../protocols/rabi/length_frequency_signal.py | 7 +- .../protocols/rabi/length_sequences.py | 6 +- src/qibocal/protocols/rabi/length_signal.py | 63 +- src/qibocal/protocols/rabi/utils.py | 68 ++- src/qibocal/protocols/ramsey/ramsey.py | 15 +- src/qibocal/protocols/ramsey/ramsey_signal.py | 15 +- src/qibocal/protocols/ramsey/utils.py | 5 +- .../randomized_benchmarking/filtered_rb.py | 5 +- .../randomized_benchmarking/standard_rb.py | 5 +- .../randomized_benchmarking/standard_rb_2q.py | 5 +- .../standard_rb_2q_inter.py | 5 +- .../randomized_benchmarking/utils.py | 5 +- .../protocols/readout_characterization.py | 7 +- .../protocols/readout_mitigation_matrix.py | 7 +- .../resonator_amplitude.py | 7 +- .../resonator_frequency.py | 8 +- .../twpa_calibration/frequency.py | 5 +- .../twpa_calibration/frequency_SNR.py | 5 +- .../twpa_calibration/frequency_power.py | 5 +- .../twpa_calibration/power.py | 5 +- .../twpa_calibration/power_SNR.py | 5 +- src/qibocal/protocols/resonator_punchout.py | 15 +- .../resonator_punchout_attenuation.py | 15 +- .../protocols/resonator_spectroscopy.py | 80 ++- .../calibrate_state_discrimination.py | 7 +- .../time_of_flight_readout.py | 7 +- src/qibocal/protocols/state_tomography.py | 5 +- .../two_qubit_interaction/chevron/chevron.py | 7 +- .../chevron/chevron_signal.py | 7 +- .../two_qubit_interaction/chevron/utils.py | 6 +- .../two_qubit_interaction/chsh/protocol.py | 15 +- .../two_qubit_interaction/chsh/pulses.py | 2 +- .../two_qubit_interaction/optimize.py | 14 +- .../protocols/two_qubit_interaction/utils.py | 5 +- .../two_qubit_interaction/virtual_z_phases.py | 23 +- .../virtual_z_phases_signal.py | 7 +- .../protocols/two_qubit_state_tomography.py | 14 +- src/qibocal/protocols/utils.py | 3 +- src/qibocal/result.py | 88 +++ src/qibocal/update.py | 53 +- src/qibocal/web/compared_report.py | 2 +- tests/test_executor.py | 3 +- tests/test_update.py | 3 +- 97 files changed, 1018 insertions(+), 917 deletions(-) create mode 100644 src/qibocal/result.py diff --git a/doc/source/protocols/signal/time_of_flight.rst b/doc/source/protocols/signal/time_of_flight.rst index 0d2561b60..8fc93c626 100644 --- a/doc/source/protocols/signal/time_of_flight.rst +++ b/doc/source/protocols/signal/time_of_flight.rst @@ -37,7 +37,7 @@ Acquisition .. testcode:: :hide: - from qibolab.execution_parameters import AcquisitionType + from qibolab import AcquisitionType It is important to note that this experiment makes use of the RAW acquisition mode (see `Qibolab documentation `_), which may require some specific care depending on the instrument employed (for some devices demodulation could be used, or this mode could be available for just a single qubit at a time). diff --git a/doc/source/tutorials/advanced.rst b/doc/source/tutorials/advanced.rst index 3b9a99ca4..eb27f068d 100644 --- a/doc/source/tutorials/advanced.rst +++ b/doc/source/tutorials/advanced.rst @@ -190,8 +190,8 @@ In the acquisition function we are going to perform the experiment. .. code-block:: python - from qibolab.platform import Platform - from qibolab.qubits import QubitId, QubitPairId + from qibolab import Platform + from qibocal.auto.operation import QubitId, QubitPairId from typing import Union def acquisition(params: RoutineParameters, platform: Platform, targets: Union[list[QubitId], list[QubitPairId], list[list[QubitId]]]) -> RoutineData @@ -200,8 +200,8 @@ In the acquisition function we are going to perform the experiment. .. code-block:: python - from qibolab.platform import Platform - from qibolab.qubits import QubitId + from qibolab import Platform + from qibocal.auto.operation import QubitId def acquisition( params: RotationParameters, @@ -252,7 +252,7 @@ parameters for each qubit. .. code-block:: python - from qibolab.qubits import QubitId + from qibocal.auto.operation import QubitId @dataclass class RotationResults(Results): @@ -344,7 +344,7 @@ Here is the plotting function for the protocol that we are coding: .. code-block:: python import plotly.graph_objects as go - from qibolab.qubits import QubitId + from qibocal.auto.operation import QubitId def plot(data: RotationData, fit: RotationResults, target: QubitId): """Plotting function for rotation.""" diff --git a/poetry.lock b/poetry.lock index e6778687a..3dcd8947c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "alabaster" @@ -864,13 +864,13 @@ lxml = ["lxml"] [[package]] name = "huggingface-hub" -version = "0.24.5" +version = "0.24.6" description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" optional = false python-versions = ">=3.8.0" files = [ - {file = "huggingface_hub-0.24.5-py3-none-any.whl", hash = "sha256:d93fb63b1f1a919a22ce91a14518974e81fc4610bf344dfe7572343ce8d3aced"}, - {file = "huggingface_hub-0.24.5.tar.gz", hash = "sha256:7b45d6744dd53ce9cbf9880957de00e9d10a9ae837f1c9b7255fc8fa4e8264f3"}, + {file = "huggingface_hub-0.24.6-py3-none-any.whl", hash = "sha256:a990f3232aa985fe749bc9474060cbad75e8b2f115f6665a9fda5b9c97818970"}, + {file = "huggingface_hub-0.24.6.tar.gz", hash = "sha256:cc2579e761d070713eaa9c323e3debe39d5b464ae3a7261c39a9195b27bb8000"}, ] [package.dependencies] @@ -939,13 +939,13 @@ sparktrials = ["pyspark"] [[package]] name = "idna" -version = "3.7" +version = "3.8" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" files = [ - {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, - {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, + {file = "idna-3.8-py3-none-any.whl", hash = "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac"}, + {file = "idna-3.8.tar.gz", hash = "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603"}, ] [[package]] @@ -961,13 +961,13 @@ files = [ [[package]] name = "importlib-metadata" -version = "8.2.0" +version = "8.4.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-8.2.0-py3-none-any.whl", hash = "sha256:11901fa0c2f97919b288679932bb64febaeacf289d18ac84dd68cb2e74213369"}, - {file = "importlib_metadata-8.2.0.tar.gz", hash = "sha256:72e8d4399996132204f9a16dcc751af254a48f8d1b20b9ff0f98d4a8f901e73d"}, + {file = "importlib_metadata-8.4.0-py3-none-any.whl", hash = "sha256:66f342cc6ac9818fc6ff340576acd24d65ba0b3efabb2b4ac08b598965a4a2f1"}, + {file = "importlib_metadata-8.4.0.tar.gz", hash = "sha256:9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5"}, ] [package.dependencies] @@ -980,21 +980,25 @@ test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "p [[package]] name = "importlib-resources" -version = "6.4.0" +version = "6.4.4" description = "Read resources from Python packages" optional = true python-versions = ">=3.8" files = [ - {file = "importlib_resources-6.4.0-py3-none-any.whl", hash = "sha256:50d10f043df931902d4194ea07ec57960f66a80449ff867bfe782b4c486ba78c"}, - {file = "importlib_resources-6.4.0.tar.gz", hash = "sha256:cdb2b453b8046ca4e3798eb1d84f3cce1446a0e8e7b5ef4efb600f19fc398145"}, + {file = "importlib_resources-6.4.4-py3-none-any.whl", hash = "sha256:dda242603d1c9cd836c3368b1174ed74cb4049ecd209e7a1a0104620c18c5c11"}, + {file = "importlib_resources-6.4.4.tar.gz", hash = "sha256:20600c8b7361938dc0bb2d5ec0297802e575df486f5a544fa414da65e13721f7"}, ] [package.dependencies] zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["jaraco.test (>=5.4)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)", "zipp (>=3.17)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["jaraco.test (>=5.4)", "pytest (>=6,!=8.1.*)", "zipp (>=3.17)"] +type = ["pytest-mypy"] [[package]] name = "iniconfig" @@ -1288,153 +1292,149 @@ files = [ [[package]] name = "lxml" -version = "5.2.2" +version = "5.3.0" description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." optional = false python-versions = ">=3.6" files = [ - {file = "lxml-5.2.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:364d03207f3e603922d0d3932ef363d55bbf48e3647395765f9bfcbdf6d23632"}, - {file = "lxml-5.2.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:50127c186f191b8917ea2fb8b206fbebe87fd414a6084d15568c27d0a21d60db"}, - {file = "lxml-5.2.2-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:74e4f025ef3db1c6da4460dd27c118d8cd136d0391da4e387a15e48e5c975147"}, - {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:981a06a3076997adf7c743dcd0d7a0415582661e2517c7d961493572e909aa1d"}, - {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aef5474d913d3b05e613906ba4090433c515e13ea49c837aca18bde190853dff"}, - {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e275ea572389e41e8b039ac076a46cb87ee6b8542df3fff26f5baab43713bca"}, - {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5b65529bb2f21ac7861a0e94fdbf5dc0daab41497d18223b46ee8515e5ad297"}, - {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:bcc98f911f10278d1daf14b87d65325851a1d29153caaf146877ec37031d5f36"}, - {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_ppc64le.whl", hash = "sha256:b47633251727c8fe279f34025844b3b3a3e40cd1b198356d003aa146258d13a2"}, - {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_s390x.whl", hash = "sha256:fbc9d316552f9ef7bba39f4edfad4a734d3d6f93341232a9dddadec4f15d425f"}, - {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:13e69be35391ce72712184f69000cda04fc89689429179bc4c0ae5f0b7a8c21b"}, - {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:3b6a30a9ab040b3f545b697cb3adbf3696c05a3a68aad172e3fd7ca73ab3c835"}, - {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:a233bb68625a85126ac9f1fc66d24337d6e8a0f9207b688eec2e7c880f012ec0"}, - {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:dfa7c241073d8f2b8e8dbc7803c434f57dbb83ae2a3d7892dd068d99e96efe2c"}, - {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1a7aca7964ac4bb07680d5c9d63b9d7028cace3e2d43175cb50bba8c5ad33316"}, - {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ae4073a60ab98529ab8a72ebf429f2a8cc612619a8c04e08bed27450d52103c0"}, - {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:ffb2be176fed4457e445fe540617f0252a72a8bc56208fd65a690fdb1f57660b"}, - {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e290d79a4107d7d794634ce3e985b9ae4f920380a813717adf61804904dc4393"}, - {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:96e85aa09274955bb6bd483eaf5b12abadade01010478154b0ec70284c1b1526"}, - {file = "lxml-5.2.2-cp310-cp310-win32.whl", hash = "sha256:f956196ef61369f1685d14dad80611488d8dc1ef00be57c0c5a03064005b0f30"}, - {file = "lxml-5.2.2-cp310-cp310-win_amd64.whl", hash = "sha256:875a3f90d7eb5c5d77e529080d95140eacb3c6d13ad5b616ee8095447b1d22e7"}, - {file = "lxml-5.2.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:45f9494613160d0405682f9eee781c7e6d1bf45f819654eb249f8f46a2c22545"}, - {file = "lxml-5.2.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b0b3f2df149efb242cee2ffdeb6674b7f30d23c9a7af26595099afaf46ef4e88"}, - {file = "lxml-5.2.2-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d28cb356f119a437cc58a13f8135ab8a4c8ece18159eb9194b0d269ec4e28083"}, - {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:657a972f46bbefdbba2d4f14413c0d079f9ae243bd68193cb5061b9732fa54c1"}, - {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b74b9ea10063efb77a965a8d5f4182806fbf59ed068b3c3fd6f30d2ac7bee734"}, - {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:07542787f86112d46d07d4f3c4e7c760282011b354d012dc4141cc12a68cef5f"}, - {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:303f540ad2dddd35b92415b74b900c749ec2010e703ab3bfd6660979d01fd4ed"}, - {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:2eb2227ce1ff998faf0cd7fe85bbf086aa41dfc5af3b1d80867ecfe75fb68df3"}, - {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_ppc64le.whl", hash = "sha256:1d8a701774dfc42a2f0b8ccdfe7dbc140500d1049e0632a611985d943fcf12df"}, - {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_s390x.whl", hash = "sha256:56793b7a1a091a7c286b5f4aa1fe4ae5d1446fe742d00cdf2ffb1077865db10d"}, - {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:eb00b549b13bd6d884c863554566095bf6fa9c3cecb2e7b399c4bc7904cb33b5"}, - {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a2569a1f15ae6c8c64108a2cd2b4a858fc1e13d25846be0666fc144715e32ab"}, - {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:8cf85a6e40ff1f37fe0f25719aadf443686b1ac7652593dc53c7ef9b8492b115"}, - {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:d237ba6664b8e60fd90b8549a149a74fcc675272e0e95539a00522e4ca688b04"}, - {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0b3f5016e00ae7630a4b83d0868fca1e3d494c78a75b1c7252606a3a1c5fc2ad"}, - {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:23441e2b5339bc54dc949e9e675fa35efe858108404ef9aa92f0456929ef6fe8"}, - {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:2fb0ba3e8566548d6c8e7dd82a8229ff47bd8fb8c2da237607ac8e5a1b8312e5"}, - {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:79d1fb9252e7e2cfe4de6e9a6610c7cbb99b9708e2c3e29057f487de5a9eaefa"}, - {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6dcc3d17eac1df7859ae01202e9bb11ffa8c98949dcbeb1069c8b9a75917e01b"}, - {file = "lxml-5.2.2-cp311-cp311-win32.whl", hash = "sha256:4c30a2f83677876465f44c018830f608fa3c6a8a466eb223535035fbc16f3438"}, - {file = "lxml-5.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:49095a38eb333aaf44c06052fd2ec3b8f23e19747ca7ec6f6c954ffea6dbf7be"}, - {file = "lxml-5.2.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:7429e7faa1a60cad26ae4227f4dd0459efde239e494c7312624ce228e04f6391"}, - {file = "lxml-5.2.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:50ccb5d355961c0f12f6cf24b7187dbabd5433f29e15147a67995474f27d1776"}, - {file = "lxml-5.2.2-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dc911208b18842a3a57266d8e51fc3cfaccee90a5351b92079beed912a7914c2"}, - {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33ce9e786753743159799fdf8e92a5da351158c4bfb6f2db0bf31e7892a1feb5"}, - {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ec87c44f619380878bd49ca109669c9f221d9ae6883a5bcb3616785fa8f94c97"}, - {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:08ea0f606808354eb8f2dfaac095963cb25d9d28e27edcc375d7b30ab01abbf6"}, - {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75a9632f1d4f698b2e6e2e1ada40e71f369b15d69baddb8968dcc8e683839b18"}, - {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74da9f97daec6928567b48c90ea2c82a106b2d500f397eeb8941e47d30b1ca85"}, - {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_ppc64le.whl", hash = "sha256:0969e92af09c5687d769731e3f39ed62427cc72176cebb54b7a9d52cc4fa3b73"}, - {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_s390x.whl", hash = "sha256:9164361769b6ca7769079f4d426a41df6164879f7f3568be9086e15baca61466"}, - {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:d26a618ae1766279f2660aca0081b2220aca6bd1aa06b2cf73f07383faf48927"}, - {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab67ed772c584b7ef2379797bf14b82df9aa5f7438c5b9a09624dd834c1c1aaf"}, - {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:3d1e35572a56941b32c239774d7e9ad724074d37f90c7a7d499ab98761bd80cf"}, - {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:8268cbcd48c5375f46e000adb1390572c98879eb4f77910c6053d25cc3ac2c67"}, - {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e282aedd63c639c07c3857097fc0e236f984ceb4089a8b284da1c526491e3f3d"}, - {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6dfdc2bfe69e9adf0df4915949c22a25b39d175d599bf98e7ddf620a13678585"}, - {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4aefd911793b5d2d7a921233a54c90329bf3d4a6817dc465f12ffdfe4fc7b8fe"}, - {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:8b8df03a9e995b6211dafa63b32f9d405881518ff1ddd775db4e7b98fb545e1c"}, - {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f11ae142f3a322d44513de1018b50f474f8f736bc3cd91d969f464b5bfef8836"}, - {file = "lxml-5.2.2-cp312-cp312-win32.whl", hash = "sha256:16a8326e51fcdffc886294c1e70b11ddccec836516a343f9ed0f82aac043c24a"}, - {file = "lxml-5.2.2-cp312-cp312-win_amd64.whl", hash = "sha256:bbc4b80af581e18568ff07f6395c02114d05f4865c2812a1f02f2eaecf0bfd48"}, - {file = "lxml-5.2.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e3d9d13603410b72787579769469af730c38f2f25505573a5888a94b62b920f8"}, - {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38b67afb0a06b8575948641c1d6d68e41b83a3abeae2ca9eed2ac59892b36706"}, - {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c689d0d5381f56de7bd6966a4541bff6e08bf8d3871bbd89a0c6ab18aa699573"}, - {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_28_x86_64.whl", hash = "sha256:cf2a978c795b54c539f47964ec05e35c05bd045db5ca1e8366988c7f2fe6b3ce"}, - {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:739e36ef7412b2bd940f75b278749106e6d025e40027c0b94a17ef7968d55d56"}, - {file = "lxml-5.2.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:d8bbcd21769594dbba9c37d3c819e2d5847656ca99c747ddb31ac1701d0c0ed9"}, - {file = "lxml-5.2.2-cp36-cp36m-musllinux_1_2_x86_64.whl", hash = "sha256:2304d3c93f2258ccf2cf7a6ba8c761d76ef84948d87bf9664e14d203da2cd264"}, - {file = "lxml-5.2.2-cp36-cp36m-win32.whl", hash = "sha256:02437fb7308386867c8b7b0e5bc4cd4b04548b1c5d089ffb8e7b31009b961dc3"}, - {file = "lxml-5.2.2-cp36-cp36m-win_amd64.whl", hash = "sha256:edcfa83e03370032a489430215c1e7783128808fd3e2e0a3225deee278585196"}, - {file = "lxml-5.2.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:28bf95177400066596cdbcfc933312493799382879da504633d16cf60bba735b"}, - {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3a745cc98d504d5bd2c19b10c79c61c7c3df9222629f1b6210c0368177589fb8"}, - {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b590b39ef90c6b22ec0be925b211298e810b4856909c8ca60d27ffbca6c12e6"}, - {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b336b0416828022bfd5a2e3083e7f5ba54b96242159f83c7e3eebaec752f1716"}, - {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:c2faf60c583af0d135e853c86ac2735ce178f0e338a3c7f9ae8f622fd2eb788c"}, - {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:4bc6cb140a7a0ad1f7bc37e018d0ed690b7b6520ade518285dc3171f7a117905"}, - {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7ff762670cada8e05b32bf1e4dc50b140790909caa8303cfddc4d702b71ea184"}, - {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:57f0a0bbc9868e10ebe874e9f129d2917750adf008fe7b9c1598c0fbbfdde6a6"}, - {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:a6d2092797b388342c1bc932077ad232f914351932353e2e8706851c870bca1f"}, - {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:60499fe961b21264e17a471ec296dcbf4365fbea611bf9e303ab69db7159ce61"}, - {file = "lxml-5.2.2-cp37-cp37m-win32.whl", hash = "sha256:d9b342c76003c6b9336a80efcc766748a333573abf9350f4094ee46b006ec18f"}, - {file = "lxml-5.2.2-cp37-cp37m-win_amd64.whl", hash = "sha256:b16db2770517b8799c79aa80f4053cd6f8b716f21f8aca962725a9565ce3ee40"}, - {file = "lxml-5.2.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7ed07b3062b055d7a7f9d6557a251cc655eed0b3152b76de619516621c56f5d3"}, - {file = "lxml-5.2.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f60fdd125d85bf9c279ffb8e94c78c51b3b6a37711464e1f5f31078b45002421"}, - {file = "lxml-5.2.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8a7e24cb69ee5f32e003f50e016d5fde438010c1022c96738b04fc2423e61706"}, - {file = "lxml-5.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23cfafd56887eaed93d07bc4547abd5e09d837a002b791e9767765492a75883f"}, - {file = "lxml-5.2.2-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:19b4e485cd07b7d83e3fe3b72132e7df70bfac22b14fe4bf7a23822c3a35bff5"}, - {file = "lxml-5.2.2-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:7ce7ad8abebe737ad6143d9d3bf94b88b93365ea30a5b81f6877ec9c0dee0a48"}, - {file = "lxml-5.2.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e49b052b768bb74f58c7dda4e0bdf7b79d43a9204ca584ffe1fb48a6f3c84c66"}, - {file = "lxml-5.2.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d14a0d029a4e176795cef99c056d58067c06195e0c7e2dbb293bf95c08f772a3"}, - {file = "lxml-5.2.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:be49ad33819d7dcc28a309b86d4ed98e1a65f3075c6acd3cd4fe32103235222b"}, - {file = "lxml-5.2.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:a6d17e0370d2516d5bb9062c7b4cb731cff921fc875644c3d751ad857ba9c5b1"}, - {file = "lxml-5.2.2-cp38-cp38-win32.whl", hash = "sha256:5b8c041b6265e08eac8a724b74b655404070b636a8dd6d7a13c3adc07882ef30"}, - {file = "lxml-5.2.2-cp38-cp38-win_amd64.whl", hash = "sha256:f61efaf4bed1cc0860e567d2ecb2363974d414f7f1f124b1df368bbf183453a6"}, - {file = "lxml-5.2.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:fb91819461b1b56d06fa4bcf86617fac795f6a99d12239fb0c68dbeba41a0a30"}, - {file = "lxml-5.2.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d4ed0c7cbecde7194cd3228c044e86bf73e30a23505af852857c09c24e77ec5d"}, - {file = "lxml-5.2.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54401c77a63cc7d6dc4b4e173bb484f28a5607f3df71484709fe037c92d4f0ed"}, - {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:625e3ef310e7fa3a761d48ca7ea1f9d8718a32b1542e727d584d82f4453d5eeb"}, - {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:519895c99c815a1a24a926d5b60627ce5ea48e9f639a5cd328bda0515ea0f10c"}, - {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c7079d5eb1c1315a858bbf180000757db8ad904a89476653232db835c3114001"}, - {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:343ab62e9ca78094f2306aefed67dcfad61c4683f87eee48ff2fd74902447726"}, - {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:cd9e78285da6c9ba2d5c769628f43ef66d96ac3085e59b10ad4f3707980710d3"}, - {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_ppc64le.whl", hash = "sha256:546cf886f6242dff9ec206331209db9c8e1643ae642dea5fdbecae2453cb50fd"}, - {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_s390x.whl", hash = "sha256:02f6a8eb6512fdc2fd4ca10a49c341c4e109aa6e9448cc4859af5b949622715a"}, - {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:339ee4a4704bc724757cd5dd9dc8cf4d00980f5d3e6e06d5847c1b594ace68ab"}, - {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0a028b61a2e357ace98b1615fc03f76eb517cc028993964fe08ad514b1e8892d"}, - {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:f90e552ecbad426eab352e7b2933091f2be77115bb16f09f78404861c8322981"}, - {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:d83e2d94b69bf31ead2fa45f0acdef0757fa0458a129734f59f67f3d2eb7ef32"}, - {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a02d3c48f9bb1e10c7788d92c0c7db6f2002d024ab6e74d6f45ae33e3d0288a3"}, - {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:6d68ce8e7b2075390e8ac1e1d3a99e8b6372c694bbe612632606d1d546794207"}, - {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:453d037e09a5176d92ec0fd282e934ed26d806331a8b70ab431a81e2fbabf56d"}, - {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:3b019d4ee84b683342af793b56bb35034bd749e4cbdd3d33f7d1107790f8c472"}, - {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:cb3942960f0beb9f46e2a71a3aca220d1ca32feb5a398656be934320804c0df9"}, - {file = "lxml-5.2.2-cp39-cp39-win32.whl", hash = "sha256:ac6540c9fff6e3813d29d0403ee7a81897f1d8ecc09a8ff84d2eea70ede1cdbf"}, - {file = "lxml-5.2.2-cp39-cp39-win_amd64.whl", hash = "sha256:610b5c77428a50269f38a534057444c249976433f40f53e3b47e68349cca1425"}, - {file = "lxml-5.2.2-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b537bd04d7ccd7c6350cdaaaad911f6312cbd61e6e6045542f781c7f8b2e99d2"}, - {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4820c02195d6dfb7b8508ff276752f6b2ff8b64ae5d13ebe02e7667e035000b9"}, - {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2a09f6184f17a80897172863a655467da2b11151ec98ba8d7af89f17bf63dae"}, - {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:76acba4c66c47d27c8365e7c10b3d8016a7da83d3191d053a58382311a8bf4e1"}, - {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b128092c927eaf485928cec0c28f6b8bead277e28acf56800e972aa2c2abd7a2"}, - {file = "lxml-5.2.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ae791f6bd43305aade8c0e22f816b34f3b72b6c820477aab4d18473a37e8090b"}, - {file = "lxml-5.2.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a2f6a1bc2460e643785a2cde17293bd7a8f990884b822f7bca47bee0a82fc66b"}, - {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e8d351ff44c1638cb6e980623d517abd9f580d2e53bfcd18d8941c052a5a009"}, - {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bec4bd9133420c5c52d562469c754f27c5c9e36ee06abc169612c959bd7dbb07"}, - {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:55ce6b6d803890bd3cc89975fca9de1dff39729b43b73cb15ddd933b8bc20484"}, - {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:8ab6a358d1286498d80fe67bd3d69fcbc7d1359b45b41e74c4a26964ca99c3f8"}, - {file = "lxml-5.2.2-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:06668e39e1f3c065349c51ac27ae430719d7806c026fec462e5693b08b95696b"}, - {file = "lxml-5.2.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9cd5323344d8ebb9fb5e96da5de5ad4ebab993bbf51674259dbe9d7a18049525"}, - {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89feb82ca055af0fe797a2323ec9043b26bc371365847dbe83c7fd2e2f181c34"}, - {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e481bba1e11ba585fb06db666bfc23dbe181dbafc7b25776156120bf12e0d5a6"}, - {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:9d6c6ea6a11ca0ff9cd0390b885984ed31157c168565702959c25e2191674a14"}, - {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3d98de734abee23e61f6b8c2e08a88453ada7d6486dc7cdc82922a03968928db"}, - {file = "lxml-5.2.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:69ab77a1373f1e7563e0fb5a29a8440367dec051da6c7405333699d07444f511"}, - {file = "lxml-5.2.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:34e17913c431f5ae01d8658dbf792fdc457073dcdfbb31dc0cc6ab256e664a8d"}, - {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05f8757b03208c3f50097761be2dea0aba02e94f0dc7023ed73a7bb14ff11eb0"}, - {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a520b4f9974b0a0a6ed73c2154de57cdfd0c8800f4f15ab2b73238ffed0b36e"}, - {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:5e097646944b66207023bc3c634827de858aebc226d5d4d6d16f0b77566ea182"}, - {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b5e4ef22ff25bfd4ede5f8fb30f7b24446345f3e79d9b7455aef2836437bc38a"}, - {file = "lxml-5.2.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:ff69a9a0b4b17d78170c73abe2ab12084bdf1691550c5629ad1fe7849433f324"}, - {file = "lxml-5.2.2.tar.gz", hash = "sha256:bb2dc4898180bea79863d5487e5f9c7c34297414bad54bcd0f0852aee9cfdb87"}, + {file = "lxml-5.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:dd36439be765e2dde7660212b5275641edbc813e7b24668831a5c8ac91180656"}, + {file = "lxml-5.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ae5fe5c4b525aa82b8076c1a59d642c17b6e8739ecf852522c6321852178119d"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:501d0d7e26b4d261fca8132854d845e4988097611ba2531408ec91cf3fd9d20a"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb66442c2546446944437df74379e9cf9e9db353e61301d1a0e26482f43f0dd8"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9e41506fec7a7f9405b14aa2d5c8abbb4dbbd09d88f9496958b6d00cb4d45330"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f7d4a670107d75dfe5ad080bed6c341d18c4442f9378c9f58e5851e86eb79965"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41ce1f1e2c7755abfc7e759dc34d7d05fd221723ff822947132dc934d122fe22"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:44264ecae91b30e5633013fb66f6ddd05c006d3e0e884f75ce0b4755b3e3847b"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_ppc64le.whl", hash = "sha256:3c174dc350d3ec52deb77f2faf05c439331d6ed5e702fc247ccb4e6b62d884b7"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_s390x.whl", hash = "sha256:2dfab5fa6a28a0b60a20638dc48e6343c02ea9933e3279ccb132f555a62323d8"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b1c8c20847b9f34e98080da785bb2336ea982e7f913eed5809e5a3c872900f32"}, + {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2c86bf781b12ba417f64f3422cfc302523ac9cd1d8ae8c0f92a1c66e56ef2e86"}, + {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:c162b216070f280fa7da844531169be0baf9ccb17263cf5a8bf876fcd3117fa5"}, + {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:36aef61a1678cb778097b4a6eeae96a69875d51d1e8f4d4b491ab3cfb54b5a03"}, + {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f65e5120863c2b266dbcc927b306c5b78e502c71edf3295dfcb9501ec96e5fc7"}, + {file = "lxml-5.3.0-cp310-cp310-win32.whl", hash = "sha256:ef0c1fe22171dd7c7c27147f2e9c3e86f8bdf473fed75f16b0c2e84a5030ce80"}, + {file = "lxml-5.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:052d99051e77a4f3e8482c65014cf6372e61b0a6f4fe9edb98503bb5364cfee3"}, + {file = "lxml-5.3.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:74bcb423462233bc5d6066e4e98b0264e7c1bed7541fff2f4e34fe6b21563c8b"}, + {file = "lxml-5.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a3d819eb6f9b8677f57f9664265d0a10dd6551d227afb4af2b9cd7bdc2ccbf18"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b8f5db71b28b8c404956ddf79575ea77aa8b1538e8b2ef9ec877945b3f46442"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2c3406b63232fc7e9b8783ab0b765d7c59e7c59ff96759d8ef9632fca27c7ee4"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ecdd78ab768f844c7a1d4a03595038c166b609f6395e25af9b0f3f26ae1230f"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:168f2dfcfdedf611eb285efac1516c8454c8c99caf271dccda8943576b67552e"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa617107a410245b8660028a7483b68e7914304a6d4882b5ff3d2d3eb5948d8c"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:69959bd3167b993e6e710b99051265654133a98f20cec1d9b493b931942e9c16"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_ppc64le.whl", hash = "sha256:bd96517ef76c8654446fc3db9242d019a1bb5fe8b751ba414765d59f99210b79"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_s390x.whl", hash = "sha256:ab6dd83b970dc97c2d10bc71aa925b84788c7c05de30241b9e96f9b6d9ea3080"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:eec1bb8cdbba2925bedc887bc0609a80e599c75b12d87ae42ac23fd199445654"}, + {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6a7095eeec6f89111d03dabfe5883a1fd54da319c94e0fb104ee8f23616b572d"}, + {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6f651ebd0b21ec65dfca93aa629610a0dbc13dbc13554f19b0113da2e61a4763"}, + {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:f422a209d2455c56849442ae42f25dbaaba1c6c3f501d58761c619c7836642ec"}, + {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:62f7fdb0d1ed2065451f086519865b4c90aa19aed51081979ecd05a21eb4d1be"}, + {file = "lxml-5.3.0-cp311-cp311-win32.whl", hash = "sha256:c6379f35350b655fd817cd0d6cbeef7f265f3ae5fedb1caae2eb442bbeae9ab9"}, + {file = "lxml-5.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:9c52100e2c2dbb0649b90467935c4b0de5528833c76a35ea1a2691ec9f1ee7a1"}, + {file = "lxml-5.3.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:e99f5507401436fdcc85036a2e7dc2e28d962550afe1cbfc07c40e454256a859"}, + {file = "lxml-5.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:384aacddf2e5813a36495233b64cb96b1949da72bef933918ba5c84e06af8f0e"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:874a216bf6afaf97c263b56371434e47e2c652d215788396f60477540298218f"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65ab5685d56914b9a2a34d67dd5488b83213d680b0c5d10b47f81da5a16b0b0e"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aac0bbd3e8dd2d9c45ceb82249e8bdd3ac99131a32b4d35c8af3cc9db1657179"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b369d3db3c22ed14c75ccd5af429086f166a19627e84a8fdade3f8f31426e52a"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c24037349665434f375645fa9d1f5304800cec574d0310f618490c871fd902b3"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:62d172f358f33a26d6b41b28c170c63886742f5b6772a42b59b4f0fa10526cb1"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_ppc64le.whl", hash = "sha256:c1f794c02903c2824fccce5b20c339a1a14b114e83b306ff11b597c5f71a1c8d"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_s390x.whl", hash = "sha256:5d6a6972b93c426ace71e0be9a6f4b2cfae9b1baed2eed2006076a746692288c"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:3879cc6ce938ff4eb4900d901ed63555c778731a96365e53fadb36437a131a99"}, + {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:74068c601baff6ff021c70f0935b0c7bc528baa8ea210c202e03757c68c5a4ff"}, + {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:ecd4ad8453ac17bc7ba3868371bffb46f628161ad0eefbd0a855d2c8c32dd81a"}, + {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:7e2f58095acc211eb9d8b5771bf04df9ff37d6b87618d1cbf85f92399c98dae8"}, + {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e63601ad5cd8f860aa99d109889b5ac34de571c7ee902d6812d5d9ddcc77fa7d"}, + {file = "lxml-5.3.0-cp312-cp312-win32.whl", hash = "sha256:17e8d968d04a37c50ad9c456a286b525d78c4a1c15dd53aa46c1d8e06bf6fa30"}, + {file = "lxml-5.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:c1a69e58a6bb2de65902051d57fde951febad631a20a64572677a1052690482f"}, + {file = "lxml-5.3.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8c72e9563347c7395910de6a3100a4840a75a6f60e05af5e58566868d5eb2d6a"}, + {file = "lxml-5.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e92ce66cd919d18d14b3856906a61d3f6b6a8500e0794142338da644260595cd"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d04f064bebdfef9240478f7a779e8c5dc32b8b7b0b2fc6a62e39b928d428e51"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c2fb570d7823c2bbaf8b419ba6e5662137f8166e364a8b2b91051a1fb40ab8b"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0c120f43553ec759f8de1fee2f4794452b0946773299d44c36bfe18e83caf002"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:562e7494778a69086f0312ec9689f6b6ac1c6b65670ed7d0267e49f57ffa08c4"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:423b121f7e6fa514ba0c7918e56955a1d4470ed35faa03e3d9f0e3baa4c7e492"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:c00f323cc00576df6165cc9d21a4c21285fa6b9989c5c39830c3903dc4303ef3"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_ppc64le.whl", hash = "sha256:1fdc9fae8dd4c763e8a31e7630afef517eab9f5d5d31a278df087f307bf601f4"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_s390x.whl", hash = "sha256:658f2aa69d31e09699705949b5fc4719cbecbd4a97f9656a232e7d6c7be1a367"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:1473427aff3d66a3fa2199004c3e601e6c4500ab86696edffdbc84954c72d832"}, + {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a87de7dd873bf9a792bf1e58b1c3887b9264036629a5bf2d2e6579fe8e73edff"}, + {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:0d7b36afa46c97875303a94e8f3ad932bf78bace9e18e603f2085b652422edcd"}, + {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:cf120cce539453ae086eacc0130a324e7026113510efa83ab42ef3fcfccac7fb"}, + {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:df5c7333167b9674aa8ae1d4008fa4bc17a313cc490b2cca27838bbdcc6bb15b"}, + {file = "lxml-5.3.0-cp313-cp313-win32.whl", hash = "sha256:c802e1c2ed9f0c06a65bc4ed0189d000ada8049312cfeab6ca635e39c9608957"}, + {file = "lxml-5.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:406246b96d552e0503e17a1006fd27edac678b3fcc9f1be71a2f94b4ff61528d"}, + {file = "lxml-5.3.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:8f0de2d390af441fe8b2c12626d103540b5d850d585b18fcada58d972b74a74e"}, + {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1afe0a8c353746e610bd9031a630a95bcfb1a720684c3f2b36c4710a0a96528f"}, + {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56b9861a71575f5795bde89256e7467ece3d339c9b43141dbdd54544566b3b94"}, + {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_28_x86_64.whl", hash = "sha256:9fb81d2824dff4f2e297a276297e9031f46d2682cafc484f49de182aa5e5df99"}, + {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:2c226a06ecb8cdef28845ae976da407917542c5e6e75dcac7cc33eb04aaeb237"}, + {file = "lxml-5.3.0-cp36-cp36m-musllinux_1_2_x86_64.whl", hash = "sha256:7d3d1ca42870cdb6d0d29939630dbe48fa511c203724820fc0fd507b2fb46577"}, + {file = "lxml-5.3.0-cp36-cp36m-win32.whl", hash = "sha256:094cb601ba9f55296774c2d57ad68730daa0b13dc260e1f941b4d13678239e70"}, + {file = "lxml-5.3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:eafa2c8658f4e560b098fe9fc54539f86528651f61849b22111a9b107d18910c"}, + {file = "lxml-5.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cb83f8a875b3d9b458cada4f880fa498646874ba4011dc974e071a0a84a1b033"}, + {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25f1b69d41656b05885aa185f5fdf822cb01a586d1b32739633679699f220391"}, + {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23e0553b8055600b3bf4a00b255ec5c92e1e4aebf8c2c09334f8368e8bd174d6"}, + {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ada35dd21dc6c039259596b358caab6b13f4db4d4a7f8665764d616daf9cc1d"}, + {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:81b4e48da4c69313192d8c8d4311e5d818b8be1afe68ee20f6385d0e96fc9512"}, + {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:2bc9fd5ca4729af796f9f59cd8ff160fe06a474da40aca03fcc79655ddee1a8b"}, + {file = "lxml-5.3.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:07da23d7ee08577760f0a71d67a861019103e4812c87e2fab26b039054594cc5"}, + {file = "lxml-5.3.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:ea2e2f6f801696ad7de8aec061044d6c8c0dd4037608c7cab38a9a4d316bfb11"}, + {file = "lxml-5.3.0-cp37-cp37m-win32.whl", hash = "sha256:5c54afdcbb0182d06836cc3d1be921e540be3ebdf8b8a51ee3ef987537455f84"}, + {file = "lxml-5.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:f2901429da1e645ce548bf9171784c0f74f0718c3f6150ce166be39e4dd66c3e"}, + {file = "lxml-5.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c56a1d43b2f9ee4786e4658c7903f05da35b923fb53c11025712562d5cc02753"}, + {file = "lxml-5.3.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ee8c39582d2652dcd516d1b879451500f8db3fe3607ce45d7c5957ab2596040"}, + {file = "lxml-5.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fdf3a3059611f7585a78ee10399a15566356116a4288380921a4b598d807a22"}, + {file = "lxml-5.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:146173654d79eb1fc97498b4280c1d3e1e5d58c398fa530905c9ea50ea849b22"}, + {file = "lxml-5.3.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:0a7056921edbdd7560746f4221dca89bb7a3fe457d3d74267995253f46343f15"}, + {file = "lxml-5.3.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:9e4b47ac0f5e749cfc618efdf4726269441014ae1d5583e047b452a32e221920"}, + {file = "lxml-5.3.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:f914c03e6a31deb632e2daa881fe198461f4d06e57ac3d0e05bbcab8eae01945"}, + {file = "lxml-5.3.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:213261f168c5e1d9b7535a67e68b1f59f92398dd17a56d934550837143f79c42"}, + {file = "lxml-5.3.0-cp38-cp38-win32.whl", hash = "sha256:218c1b2e17a710e363855594230f44060e2025b05c80d1f0661258142b2add2e"}, + {file = "lxml-5.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:315f9542011b2c4e1d280e4a20ddcca1761993dda3afc7a73b01235f8641e903"}, + {file = "lxml-5.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1ffc23010330c2ab67fac02781df60998ca8fe759e8efde6f8b756a20599c5de"}, + {file = "lxml-5.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2b3778cb38212f52fac9fe913017deea2fdf4eb1a4f8e4cfc6b009a13a6d3fcc"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b0c7a688944891086ba192e21c5229dea54382f4836a209ff8d0a660fac06be"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:747a3d3e98e24597981ca0be0fd922aebd471fa99d0043a3842d00cdcad7ad6a"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86a6b24b19eaebc448dc56b87c4865527855145d851f9fc3891673ff97950540"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b11a5d918a6216e521c715b02749240fb07ae5a1fefd4b7bf12f833bc8b4fe70"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68b87753c784d6acb8a25b05cb526c3406913c9d988d51f80adecc2b0775d6aa"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:109fa6fede314cc50eed29e6e56c540075e63d922455346f11e4d7a036d2b8cf"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_ppc64le.whl", hash = "sha256:02ced472497b8362c8e902ade23e3300479f4f43e45f4105c85ef43b8db85229"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_s390x.whl", hash = "sha256:6b038cc86b285e4f9fea2ba5ee76e89f21ed1ea898e287dc277a25884f3a7dfe"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:7437237c6a66b7ca341e868cda48be24b8701862757426852c9b3186de1da8a2"}, + {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7f41026c1d64043a36fda21d64c5026762d53a77043e73e94b71f0521939cc71"}, + {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:482c2f67761868f0108b1743098640fbb2a28a8e15bf3f47ada9fa59d9fe08c3"}, + {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:1483fd3358963cc5c1c9b122c80606a3a79ee0875bcac0204149fa09d6ff2727"}, + {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2dec2d1130a9cda5b904696cec33b2cfb451304ba9081eeda7f90f724097300a"}, + {file = "lxml-5.3.0-cp39-cp39-win32.whl", hash = "sha256:a0eabd0a81625049c5df745209dc7fcef6e2aea7793e5f003ba363610aa0a3ff"}, + {file = "lxml-5.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:89e043f1d9d341c52bf2af6d02e6adde62e0a46e6755d5eb60dc6e4f0b8aeca2"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7b1cd427cb0d5f7393c31b7496419da594fe600e6fdc4b105a54f82405e6626c"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51806cfe0279e06ed8500ce19479d757db42a30fd509940b1701be9c86a5ff9a"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee70d08fd60c9565ba8190f41a46a54096afa0eeb8f76bd66f2c25d3b1b83005"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:8dc2c0395bea8254d8daebc76dcf8eb3a95ec2a46fa6fae5eaccee366bfe02ce"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:6ba0d3dcac281aad8a0e5b14c7ed6f9fa89c8612b47939fc94f80b16e2e9bc83"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:6e91cf736959057f7aac7adfc83481e03615a8e8dd5758aa1d95ea69e8931dba"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:94d6c3782907b5e40e21cadf94b13b0842ac421192f26b84c45f13f3c9d5dc27"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c300306673aa0f3ed5ed9372b21867690a17dba38c68c44b287437c362ce486b"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78d9b952e07aed35fe2e1a7ad26e929595412db48535921c5013edc8aa4a35ce"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:01220dca0d066d1349bd6a1726856a78f7929f3878f7e2ee83c296c69495309e"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:2d9b8d9177afaef80c53c0a9e30fa252ff3036fb1c6494d427c066a4ce6a282f"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:20094fc3f21ea0a8669dc4c61ed7fa8263bd37d97d93b90f28fc613371e7a875"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ace2c2326a319a0bb8a8b0e5b570c764962e95818de9f259ce814ee666603f19"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:92e67a0be1639c251d21e35fe74df6bcc40cba445c2cda7c4a967656733249e2"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd5350b55f9fecddc51385463a4f67a5da829bc741e38cf689f38ec9023f54ab"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:4c1fefd7e3d00921c44dc9ca80a775af49698bbfd92ea84498e56acffd4c5469"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:71a8dd38fbd2f2319136d4ae855a7078c69c9a38ae06e0c17c73fd70fc6caad8"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:97acf1e1fd66ab53dacd2c35b319d7e548380c2e9e8c54525c6e76d21b1ae3b1"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:68934b242c51eb02907c5b81d138cb977b2129a0a75a8f8b60b01cb8586c7b21"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b710bc2b8292966b23a6a0121f7a6c51d45d2347edcc75f016ac123b8054d3f2"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18feb4b93302091b1541221196a2155aa296c363fd233814fa11e181adebc52f"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:3eb44520c4724c2e1a57c0af33a379eee41792595023f367ba3952a2d96c2aab"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:609251a0ca4770e5a8768ff902aa02bf636339c5a93f9349b48eb1f606f7f3e9"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:516f491c834eb320d6c843156440fe7fc0d50b33e44387fcec5b02f0bc118a4c"}, + {file = "lxml-5.3.0.tar.gz", hash = "sha256:4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f"}, ] [package.extras] @@ -1442,17 +1442,17 @@ cssselect = ["cssselect (>=0.7)"] html-clean = ["lxml-html-clean"] html5 = ["html5lib"] htmlsoup = ["BeautifulSoup4"] -source = ["Cython (>=3.0.10)"] +source = ["Cython (>=3.0.11)"] [[package]] name = "markdown" -version = "3.6" +version = "3.7" description = "Python implementation of John Gruber's Markdown." optional = false python-versions = ">=3.8" files = [ - {file = "Markdown-3.6-py3-none-any.whl", hash = "sha256:48f276f4d8cfb8ce6527c8f79e2ee29708508bf4d40aa410fbc3b4ee832c850f"}, - {file = "Markdown-3.6.tar.gz", hash = "sha256:ed4f41f6daecbeeb96e576ce414c41d2d876daa9a16cb35fa8ed8c2ddfad0224"}, + {file = "Markdown-3.7-py3-none-any.whl", hash = "sha256:7eb6df5690b81a1d7942992c97fad2938e956e79df20cbc6186e9c3a77b1c803"}, + {file = "markdown-3.7.tar.gz", hash = "sha256:2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2"}, ] [package.dependencies] @@ -1533,40 +1533,51 @@ files = [ [[package]] name = "matplotlib" -version = "3.9.1.post1" +version = "3.9.2" description = "Python plotting package" optional = true python-versions = ">=3.9" files = [ - {file = "matplotlib-3.9.1.post1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3779ad3e8b72df22b8a622c5796bbcfabfa0069b835412e3c1dec8ee3de92d0c"}, - {file = "matplotlib-3.9.1.post1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ec400340f8628e8e2260d679078d4e9b478699f386e5cc8094e80a1cb0039c7c"}, - {file = "matplotlib-3.9.1.post1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82c18791b8862ea095081f745b81f896b011c5a5091678fb33204fef641476af"}, - {file = "matplotlib-3.9.1.post1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:621a628389c09a6b9f609a238af8e66acecece1cfa12febc5fe4195114ba7446"}, - {file = "matplotlib-3.9.1.post1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:9a54734ca761ebb27cd4f0b6c2ede696ab6861052d7d7e7b8f7a6782665115f5"}, - {file = "matplotlib-3.9.1.post1-cp310-cp310-win_amd64.whl", hash = "sha256:0721f93db92311bb514e446842e2b21c004541dcca0281afa495053e017c5458"}, - {file = "matplotlib-3.9.1.post1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:b08b46058fe2a31ecb81ef6aa3611f41d871f6a8280e9057cb4016cb3d8e894a"}, - {file = "matplotlib-3.9.1.post1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:22b344e84fcc574f561b5731f89a7625db8ef80cdbb0026a8ea855a33e3429d1"}, - {file = "matplotlib-3.9.1.post1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4b49fee26d64aefa9f061b575f0f7b5fc4663e51f87375c7239efa3d30d908fa"}, - {file = "matplotlib-3.9.1.post1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89eb7e89e2b57856533c5c98f018aa3254fa3789fcd86d5f80077b9034a54c9a"}, - {file = "matplotlib-3.9.1.post1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c06e742bade41fda6176d4c9c78c9ea016e176cd338e62a1686384cb1eb8de41"}, - {file = "matplotlib-3.9.1.post1-cp311-cp311-win_amd64.whl", hash = "sha256:c44edab5b849e0fc1f1c9d6e13eaa35ef65925f7be45be891d9784709ad95561"}, - {file = "matplotlib-3.9.1.post1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:bf28b09986aee06393e808e661c3466be9c21eff443c9bc881bce04bfbb0c500"}, - {file = "matplotlib-3.9.1.post1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:92aeb8c439d4831510d8b9d5e39f31c16c7f37873879767c26b147cef61e54cd"}, - {file = "matplotlib-3.9.1.post1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f15798b0691b45c80d3320358a88ce5a9d6f518b28575b3ea3ed31b4bd95d009"}, - {file = "matplotlib-3.9.1.post1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d59fc6096da7b9c1df275f9afc3fef5cbf634c21df9e5f844cba3dd8deb1847d"}, - {file = "matplotlib-3.9.1.post1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ab986817a32a70ce22302438691e7df4c6ee4a844d47289db9d583d873491e0b"}, - {file = "matplotlib-3.9.1.post1-cp312-cp312-win_amd64.whl", hash = "sha256:0d78e7d2d86c4472da105d39aba9b754ed3dfeaeaa4ac7206b82706e0a5362fa"}, - {file = "matplotlib-3.9.1.post1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:bd07eba6431b4dc9253cce6374a28c415e1d3a7dc9f8aba028ea7592f06fe172"}, - {file = "matplotlib-3.9.1.post1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ca230cc4482010d646827bd2c6d140c98c361e769ae7d954ebf6fff2a226f5b1"}, - {file = "matplotlib-3.9.1.post1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ace27c0fdeded399cbc43f22ffa76e0f0752358f5b33106ec7197534df08725a"}, - {file = "matplotlib-3.9.1.post1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a4f3aeb7ba14c497dc6f021a076c48c2e5fbdf3da1e7264a5d649683e284a2f"}, - {file = "matplotlib-3.9.1.post1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:23f96fbd4ff4cfa9b8a6b685a65e7eb3c2ced724a8d965995ec5c9c2b1f7daf5"}, - {file = "matplotlib-3.9.1.post1-cp39-cp39-win_amd64.whl", hash = "sha256:2808b95452b4ffa14bfb7c7edffc5350743c31bda495f0d63d10fdd9bc69e895"}, - {file = "matplotlib-3.9.1.post1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ffc91239f73b4179dec256b01299d46d0ffa9d27d98494bc1476a651b7821cbe"}, - {file = "matplotlib-3.9.1.post1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:f965ebca9fd4feaaca45937c4849d92b70653057497181100fcd1e18161e5f29"}, - {file = "matplotlib-3.9.1.post1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:801ee9323fd7b2da0d405aebbf98d1da77ea430bbbbbec6834c0b3af15e5db44"}, - {file = "matplotlib-3.9.1.post1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:50113e9b43ceb285739f35d43db36aa752fb8154325b35d134ff6e177452f9ec"}, - {file = "matplotlib-3.9.1.post1.tar.gz", hash = "sha256:c91e585c65092c975a44dc9d4239ba8c594ba3c193d7c478b6d178c4ef61f406"}, + {file = "matplotlib-3.9.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:9d78bbc0cbc891ad55b4f39a48c22182e9bdaea7fc0e5dbd364f49f729ca1bbb"}, + {file = "matplotlib-3.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c375cc72229614632c87355366bdf2570c2dac01ac66b8ad048d2dabadf2d0d4"}, + {file = "matplotlib-3.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d94ff717eb2bd0b58fe66380bd8b14ac35f48a98e7c6765117fe67fb7684e64"}, + {file = "matplotlib-3.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab68d50c06938ef28681073327795c5db99bb4666214d2d5f880ed11aeaded66"}, + {file = "matplotlib-3.9.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:65aacf95b62272d568044531e41de26285d54aec8cb859031f511f84bd8b495a"}, + {file = "matplotlib-3.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:3fd595f34aa8a55b7fc8bf9ebea8aa665a84c82d275190a61118d33fbc82ccae"}, + {file = "matplotlib-3.9.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d8dd059447824eec055e829258ab092b56bb0579fc3164fa09c64f3acd478772"}, + {file = "matplotlib-3.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c797dac8bb9c7a3fd3382b16fe8f215b4cf0f22adccea36f1545a6d7be310b41"}, + {file = "matplotlib-3.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d719465db13267bcef19ea8954a971db03b9f48b4647e3860e4bc8e6ed86610f"}, + {file = "matplotlib-3.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8912ef7c2362f7193b5819d17dae8629b34a95c58603d781329712ada83f9447"}, + {file = "matplotlib-3.9.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7741f26a58a240f43bee74965c4882b6c93df3e7eb3de160126d8c8f53a6ae6e"}, + {file = "matplotlib-3.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:ae82a14dab96fbfad7965403c643cafe6515e386de723e498cf3eeb1e0b70cc7"}, + {file = "matplotlib-3.9.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:ac43031375a65c3196bee99f6001e7fa5bdfb00ddf43379d3c0609bdca042df9"}, + {file = "matplotlib-3.9.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:be0fc24a5e4531ae4d8e858a1a548c1fe33b176bb13eff7f9d0d38ce5112a27d"}, + {file = "matplotlib-3.9.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf81de2926c2db243c9b2cbc3917619a0fc85796c6ba4e58f541df814bbf83c7"}, + {file = "matplotlib-3.9.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6ee45bc4245533111ced13f1f2cace1e7f89d1c793390392a80c139d6cf0e6c"}, + {file = "matplotlib-3.9.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:306c8dfc73239f0e72ac50e5a9cf19cc4e8e331dd0c54f5e69ca8758550f1e1e"}, + {file = "matplotlib-3.9.2-cp312-cp312-win_amd64.whl", hash = "sha256:5413401594cfaff0052f9d8b1aafc6d305b4bd7c4331dccd18f561ff7e1d3bd3"}, + {file = "matplotlib-3.9.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:18128cc08f0d3cfff10b76baa2f296fc28c4607368a8402de61bb3f2eb33c7d9"}, + {file = "matplotlib-3.9.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4876d7d40219e8ae8bb70f9263bcbe5714415acfdf781086601211335e24f8aa"}, + {file = "matplotlib-3.9.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d9f07a80deab4bb0b82858a9e9ad53d1382fd122be8cde11080f4e7dfedb38b"}, + {file = "matplotlib-3.9.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7c0410f181a531ec4e93bbc27692f2c71a15c2da16766f5ba9761e7ae518413"}, + {file = "matplotlib-3.9.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:909645cce2dc28b735674ce0931a4ac94e12f5b13f6bb0b5a5e65e7cea2c192b"}, + {file = "matplotlib-3.9.2-cp313-cp313-win_amd64.whl", hash = "sha256:f32c7410c7f246838a77d6d1eff0c0f87f3cb0e7c4247aebea71a6d5a68cab49"}, + {file = "matplotlib-3.9.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:37e51dd1c2db16ede9cfd7b5cabdfc818b2c6397c83f8b10e0e797501c963a03"}, + {file = "matplotlib-3.9.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b82c5045cebcecd8496a4d694d43f9cc84aeeb49fe2133e036b207abe73f4d30"}, + {file = "matplotlib-3.9.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f053c40f94bc51bc03832a41b4f153d83f2062d88c72b5e79997072594e97e51"}, + {file = "matplotlib-3.9.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dbe196377a8248972f5cede786d4c5508ed5f5ca4a1e09b44bda889958b33f8c"}, + {file = "matplotlib-3.9.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5816b1e1fe8c192cbc013f8f3e3368ac56fbecf02fb41b8f8559303f24c5015e"}, + {file = "matplotlib-3.9.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:cef2a73d06601437be399908cf13aee74e86932a5ccc6ccdf173408ebc5f6bb2"}, + {file = "matplotlib-3.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e0830e188029c14e891fadd99702fd90d317df294c3298aad682739c5533721a"}, + {file = "matplotlib-3.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:03ba9c1299c920964e8d3857ba27173b4dbb51ca4bab47ffc2c2ba0eb5e2cbc5"}, + {file = "matplotlib-3.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1cd93b91ab47a3616b4d3c42b52f8363b88ca021e340804c6ab2536344fad9ca"}, + {file = "matplotlib-3.9.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:6d1ce5ed2aefcdce11904fc5bbea7d9c21fff3d5f543841edf3dea84451a09ea"}, + {file = "matplotlib-3.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:b2696efdc08648536efd4e1601b5fd491fd47f4db97a5fbfd175549a7365c1b2"}, + {file = "matplotlib-3.9.2-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:d52a3b618cb1cbb769ce2ee1dcdb333c3ab6e823944e9a2d36e37253815f9556"}, + {file = "matplotlib-3.9.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:039082812cacd6c6bec8e17a9c1e6baca230d4116d522e81e1f63a74d01d2e21"}, + {file = "matplotlib-3.9.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6758baae2ed64f2331d4fd19be38b7b4eae3ecec210049a26b6a4f3ae1c85dcc"}, + {file = "matplotlib-3.9.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:050598c2b29e0b9832cde72bcf97627bf00262adbc4a54e2b856426bb2ef0697"}, + {file = "matplotlib-3.9.2.tar.gz", hash = "sha256:96ab43906269ca64a6366934106fa01534454a69e471b7bf3d79083981aaab92"}, ] [package.dependencies] @@ -1609,17 +1620,6 @@ files = [ {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] -[[package]] -name = "more-itertools" -version = "9.1.0" -description = "More routines for operating on iterables, beyond itertools" -optional = false -python-versions = ">=3.7" -files = [ - {file = "more-itertools-9.1.0.tar.gz", hash = "sha256:cabaa341ad0389ea83c17a94566a53ae4c9d07349861ecb14dc6d0345cf9ac5d"}, - {file = "more_itertools-9.1.0-py3-none-any.whl", hash = "sha256:d2bc7f02446e86a68911e58ded76d6561eea00cddfb2a91e7019bbb586c799f3"}, -] - [[package]] name = "mpmath" version = "1.3.0" @@ -1772,42 +1772,42 @@ protobuf = "*" [[package]] name = "onnxruntime" -version = "1.18.1" +version = "1.19.0" description = "ONNX Runtime is a runtime accelerator for Machine Learning models" optional = true python-versions = "*" files = [ - {file = "onnxruntime-1.18.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:29ef7683312393d4ba04252f1b287d964bd67d5e6048b94d2da3643986c74d80"}, - {file = "onnxruntime-1.18.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fc706eb1df06ddf55776e15a30519fb15dda7697f987a2bbda4962845e3cec05"}, - {file = "onnxruntime-1.18.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b7de69f5ced2a263531923fa68bbec52a56e793b802fcd81a03487b5e292bc3a"}, - {file = "onnxruntime-1.18.1-cp310-cp310-win32.whl", hash = "sha256:221e5b16173926e6c7de2cd437764492aa12b6811f45abd37024e7cf2ae5d7e3"}, - {file = "onnxruntime-1.18.1-cp310-cp310-win_amd64.whl", hash = "sha256:75211b619275199c861ee94d317243b8a0fcde6032e5a80e1aa9ded8ab4c6060"}, - {file = "onnxruntime-1.18.1-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:f26582882f2dc581b809cfa41a125ba71ad9e715738ec6402418df356969774a"}, - {file = "onnxruntime-1.18.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ef36f3a8b768506d02be349ac303fd95d92813ba3ba70304d40c3cd5c25d6a4c"}, - {file = "onnxruntime-1.18.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:170e711393e0618efa8ed27b59b9de0ee2383bd2a1f93622a97006a5ad48e434"}, - {file = "onnxruntime-1.18.1-cp311-cp311-win32.whl", hash = "sha256:9b6a33419b6949ea34e0dc009bc4470e550155b6da644571ecace4b198b0d88f"}, - {file = "onnxruntime-1.18.1-cp311-cp311-win_amd64.whl", hash = "sha256:5c1380a9f1b7788da742c759b6a02ba771fe1ce620519b2b07309decbd1a2fe1"}, - {file = "onnxruntime-1.18.1-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:31bd57a55e3f983b598675dfc7e5d6f0877b70ec9864b3cc3c3e1923d0a01919"}, - {file = "onnxruntime-1.18.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b9e03c4ba9f734500691a4d7d5b381cd71ee2f3ce80a1154ac8f7aed99d1ecaa"}, - {file = "onnxruntime-1.18.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:781aa9873640f5df24524f96f6070b8c550c66cb6af35710fd9f92a20b4bfbf6"}, - {file = "onnxruntime-1.18.1-cp312-cp312-win32.whl", hash = "sha256:3a2d9ab6254ca62adbb448222e630dc6883210f718065063518c8f93a32432be"}, - {file = "onnxruntime-1.18.1-cp312-cp312-win_amd64.whl", hash = "sha256:ad93c560b1c38c27c0275ffd15cd7f45b3ad3fc96653c09ce2931179982ff204"}, - {file = "onnxruntime-1.18.1-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:3b55dc9d3c67626388958a3eb7ad87eb7c70f75cb0f7ff4908d27b8b42f2475c"}, - {file = "onnxruntime-1.18.1-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f80dbcfb6763cc0177a31168b29b4bd7662545b99a19e211de8c734b657e0669"}, - {file = "onnxruntime-1.18.1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f1ff2c61a16d6c8631796c54139bafea41ee7736077a0fc64ee8ae59432f5c58"}, - {file = "onnxruntime-1.18.1-cp38-cp38-win32.whl", hash = "sha256:219855bd272fe0c667b850bf1a1a5a02499269a70d59c48e6f27f9c8bcb25d02"}, - {file = "onnxruntime-1.18.1-cp38-cp38-win_amd64.whl", hash = "sha256:afdf16aa607eb9a2c60d5ca2d5abf9f448e90c345b6b94c3ed14f4fb7e6a2d07"}, - {file = "onnxruntime-1.18.1-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:128df253ade673e60cea0955ec9d0e89617443a6d9ce47c2d79eb3f72a3be3de"}, - {file = "onnxruntime-1.18.1-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9839491e77e5c5a175cab3621e184d5a88925ee297ff4c311b68897197f4cde9"}, - {file = "onnxruntime-1.18.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ad3187c1faff3ac15f7f0e7373ef4788c582cafa655a80fdbb33eaec88976c66"}, - {file = "onnxruntime-1.18.1-cp39-cp39-win32.whl", hash = "sha256:34657c78aa4e0b5145f9188b550ded3af626651b15017bf43d280d7e23dbf195"}, - {file = "onnxruntime-1.18.1-cp39-cp39-win_amd64.whl", hash = "sha256:9c14fd97c3ddfa97da5feef595e2c73f14c2d0ec1d4ecbea99c8d96603c89589"}, + {file = "onnxruntime-1.19.0-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:6ce22a98dfec7b646ae305f52d0ce14a189a758b02ea501860ca719f4b0ae04b"}, + {file = "onnxruntime-1.19.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:19019c72873f26927aa322c54cf2bf7312b23451b27451f39b88f57016c94f8b"}, + {file = "onnxruntime-1.19.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8eaa16df99171dc636e30108d15597aed8c4c2dd9dbfdd07cc464d57d73fb275"}, + {file = "onnxruntime-1.19.0-cp310-cp310-win32.whl", hash = "sha256:0eb0f8dbe596fd0f4737fe511fdbb17603853a7d204c5b2ca38d3c7808fc556b"}, + {file = "onnxruntime-1.19.0-cp310-cp310-win_amd64.whl", hash = "sha256:616092d54ba8023b7bc0a5f6d900a07a37cc1cfcc631873c15f8c1d6e9e184d4"}, + {file = "onnxruntime-1.19.0-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:a2b53b3c287cd933e5eb597273926e899082d8c84ab96e1b34035764a1627e17"}, + {file = "onnxruntime-1.19.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e94984663963e74fbb468bde9ec6f19dcf890b594b35e249c4dc8789d08993c5"}, + {file = "onnxruntime-1.19.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6f379d1f050cfb55ce015d53727b78ee362febc065c38eed81512b22b757da73"}, + {file = "onnxruntime-1.19.0-cp311-cp311-win32.whl", hash = "sha256:4ccb48faea02503275ae7e79e351434fc43c294c4cb5c4d8bcb7479061396614"}, + {file = "onnxruntime-1.19.0-cp311-cp311-win_amd64.whl", hash = "sha256:9cdc8d311289a84e77722de68bd22b8adfb94eea26f4be6f9e017350faac8b18"}, + {file = "onnxruntime-1.19.0-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:1b59eaec1be9a8613c5fdeaafe67f73a062edce3ac03bbbdc9e2d98b58a30617"}, + {file = "onnxruntime-1.19.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be4144d014a4b25184e63ce7a463a2e7796e2f3df931fccc6a6aefa6f1365dc5"}, + {file = "onnxruntime-1.19.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10d7e7d4ca7021ce7f29a66dbc6071addf2de5839135339bd855c6d9c2bba371"}, + {file = "onnxruntime-1.19.0-cp312-cp312-win32.whl", hash = "sha256:87f2c58b577a1fb31dc5d92b647ecc588fd5f1ea0c3ad4526f5f80a113357c8d"}, + {file = "onnxruntime-1.19.0-cp312-cp312-win_amd64.whl", hash = "sha256:8a1f50d49676d7b69566536ff039d9e4e95fc482a55673719f46528218ecbb94"}, + {file = "onnxruntime-1.19.0-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:71423c8c4b2d7a58956271534302ec72721c62a41efd0c4896343249b8399ab0"}, + {file = "onnxruntime-1.19.0-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9d63630d45e9498f96e75bbeb7fd4a56acb10155de0de4d0e18d1b6cbb0b358a"}, + {file = "onnxruntime-1.19.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f3bfd15db1e8794d379a86c1a9116889f47f2cca40cc82208fc4f7e8c38e8522"}, + {file = "onnxruntime-1.19.0-cp38-cp38-win32.whl", hash = "sha256:3b098003b6b4cb37cc84942e5f1fe27f945dd857cbd2829c824c26b0ba4a247e"}, + {file = "onnxruntime-1.19.0-cp38-cp38-win_amd64.whl", hash = "sha256:cea067a6541d6787d903ee6843401c5b1332a266585160d9700f9f0939443886"}, + {file = "onnxruntime-1.19.0-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:c4fcff12dc5ca963c5f76b9822bb404578fa4a98c281e8c666b429192799a099"}, + {file = "onnxruntime-1.19.0-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f6dcad8a4db908fbe70b98c79cea1c8b6ac3316adf4ce93453136e33a524ac59"}, + {file = "onnxruntime-1.19.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4bc449907c6e8d99eee5ae5cc9c8fdef273d801dcd195393d3f9ab8ad3f49522"}, + {file = "onnxruntime-1.19.0-cp39-cp39-win32.whl", hash = "sha256:947febd48405afcf526e45ccff97ff23b15e530434705f734870d22ae7fcf236"}, + {file = "onnxruntime-1.19.0-cp39-cp39-win_amd64.whl", hash = "sha256:f60be47eff5ee77fd28a466b0fd41d7debc42a32179d1ddb21e05d6067d7b48b"}, ] [package.dependencies] coloredlogs = "*" flatbuffers = "*" -numpy = ">=1.21.6,<2.0" +numpy = ">=1.21.6" packaging = "*" protobuf = "*" sympy = "*" @@ -2393,13 +2393,13 @@ testutils = ["gitpython (>3)"] [[package]] name = "pyparsing" -version = "3.1.2" +version = "3.1.3" description = "pyparsing module - Classes and methods to define and execute parsing grammars" optional = true python-versions = ">=3.6.8" files = [ - {file = "pyparsing-3.1.2-py3-none-any.whl", hash = "sha256:f9db75911801ed778fe61bb643079ff86601aca99fcae6345aa67292038fb742"}, - {file = "pyparsing-3.1.2.tar.gz", hash = "sha256:a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad"}, + {file = "pyparsing-3.1.3-py3-none-any.whl", hash = "sha256:1e80fdf93e6c1aeaf4702523f1d48f66d52fa6459096a8f812591157270a5896"}, + {file = "pyparsing-3.1.3.tar.gz", hash = "sha256:5d549d2a1b5e1c3e952bb55ea247bfb5ad427ea307566a350db2b3c34d4ce181"}, ] [package.extras] @@ -2599,13 +2599,13 @@ files = [ [[package]] name = "qibo" -version = "0.2.7" +version = "0.2.11" description = "A framework for quantum computing with hardware acceleration." optional = false -python-versions = "<3.12,>=3.9" +python-versions = "<3.13,>=3.9" files = [ - {file = "qibo-0.2.7-py3-none-any.whl", hash = "sha256:20e42ad27f7a9795f84565ab5645e3b24d4af62a0a8c6de5110b5ae6894b35a2"}, - {file = "qibo-0.2.7.tar.gz", hash = "sha256:a57e98a3eccfc3c43c4a697448a4618c9a158f72645d5c93b0b2bdd3ace882ef"}, + {file = "qibo-0.2.11-py3-none-any.whl", hash = "sha256:67e900364e62642c0c8c3c69fbfaea3e81bef5da53b4547b67516a11dcbe099d"}, + {file = "qibo-0.2.11.tar.gz", hash = "sha256:312037020ddfc82bcb92d698e960e5c3749fbbd61d16944b91d0ba15d6cc7931"}, ] [package.dependencies] @@ -2616,38 +2616,41 @@ networkx = ">=3.2.1,<4.0.0" numpy = ">=1.26.4,<2.0.0" openqasm3 = {version = ">=0.5.0", extras = ["parser"]} scipy = ">=1.10.1,<2.0.0" +setuptools = ">=69.1.1,<71.0.0" sympy = ">=1.11.1,<2.0.0" tabulate = ">=0.9.0,<0.10.0" [package.extras] -qinfo = ["cvxpy (>=1.4.2,<2.0.0)"] -tensorflow = ["tensorflow (>=2.14.1,<2.16)"] -torch = ["torch (>=2.1.1,<3.0.0)"] +qulacs = ["qulacs (>=0.6.4,<0.7.0)"] +tensorflow = ["tensorflow (>=2.16.1,<3.0.0)"] +torch = ["torch (>=2.1.1,<2.4)"] [[package]] name = "qibolab" -version = "0.1.8" +version = "0.2.0" description = "Quantum hardware module and drivers for Qibo" optional = false -python-versions = "<3.12,>=3.9" +python-versions = "<3.13,>=3.9" files = [ - {file = "qibolab-0.1.8-py3-none-any.whl", hash = "sha256:101271a379e6148f9a61258639da38bf87b0a80bddefa21823b1561204a3d8ed"}, - {file = "qibolab-0.1.8.tar.gz", hash = "sha256:a49fef8442404f4c4116d0d308a4840aff2ff00fc985bf81c76ede13b33e41b0"}, + {file = "qibolab-0.2.0-py3-none-any.whl", hash = "sha256:8b01a675e292b23cd12ddbc813c27d7f37f3b6e5c84bcb058fe220a40e7f6568"}, + {file = "qibolab-0.2.0.tar.gz", hash = "sha256:6aa60741b3adf06f12a8435ab85d107584e5fc23389597e884c4ba9fe7284445"}, ] [package.dependencies] -more-itertools = ">=9.1.0,<10.0.0" -networkx = ">=3.0,<4.0" numpy = ">=1.26.4,<2.0.0" -qibo = ">=0.2.6" +pydantic = ">=2.6.4,<3.0.0" +qibo = ">=0.2.8,<0.3.0" +scipy = ">=1.13.0,<2.0.0" setuptools = ">67.0.0" [package.extras] -emulator = ["qutip (==4.7.5)", "scipy (<1.13.0)"] +bluefors = ["pyyaml (>=6.0.2,<7.0.0)"] +emulator = ["qutip (>=5.0.2,<6.0.0)"] los = ["pyvisa-py (==0.5.3)", "qcodes (>=0.37.0,<0.38.0)", "qcodes_contrib_drivers (==0.18.0)"] qblox = ["pyvisa-py (==0.5.3)", "qblox-instruments (==0.12.0)", "qcodes (>=0.37.0,<0.38.0)", "qcodes_contrib_drivers (==0.18.0)"] qm = ["qm-qua (==1.1.6)", "qualang-tools (>=0.15.0,<0.16.0)"] rfsoc = ["qibosoq (>=0.1.2,<0.2)"] +twpa = ["pyvisa-py (==0.5.3)", "qcodes (>=0.37.0,<0.38.0)", "qcodes_contrib_drivers (==0.18.0)"] zh = ["laboneq (==2.25.0)"] [[package]] @@ -2811,19 +2814,18 @@ stats = ["scipy (>=1.3)", "statsmodels (>=0.10)"] [[package]] name = "setuptools" -version = "72.1.0" +version = "70.3.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-72.1.0-py3-none-any.whl", hash = "sha256:5a03e1860cf56bb6ef48ce186b0e557fdba433237481a9a625176c2831be15d1"}, - {file = "setuptools-72.1.0.tar.gz", hash = "sha256:8d243eff56d095e5817f796ede6ae32941278f542e0f941867cc05ae52b162ec"}, + {file = "setuptools-70.3.0-py3-none-any.whl", hash = "sha256:fe384da74336c398e0d956d1cae0669bc02eed936cdb1d49b57de1990dc11ffc"}, + {file = "setuptools-70.3.0.tar.gz", hash = "sha256:f171bab1dfbc86b132997f26a119f6056a57950d058587841a0082e8830f9dc5"}, ] [package.extras] -core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.text (>=3.7)", "more-itertools (>=8.8)", "ordered-set (>=3.1.1)", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.11.*)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (<0.4)", "pytest-ruff (>=0.2.1)", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.10.0)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "six" @@ -2887,13 +2889,13 @@ files = [ [[package]] name = "soupsieve" -version = "2.5" +version = "2.6" description = "A modern CSS selector implementation for Beautiful Soup." optional = false python-versions = ">=3.8" files = [ - {file = "soupsieve-2.5-py3-none-any.whl", hash = "sha256:eaa337ff55a1579b6549dc679565eac1e3d000563bcb1c8ab0d0fefbc0c2cdc7"}, - {file = "soupsieve-2.5.tar.gz", hash = "sha256:5663d5a7b3bfaeee0bc4372e7fc48f9cff4940b3eec54a6451cc5299f1097690"}, + {file = "soupsieve-2.6-py3-none-any.whl", hash = "sha256:e72c4ff06e4fb6e4b5a9f0f55fe6e81514581fca1515028625d0f299c602ccc9"}, + {file = "soupsieve-2.6.tar.gz", hash = "sha256:e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb"}, ] [[package]] @@ -3113,13 +3115,13 @@ tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] [[package]] name = "sympy" -version = "1.13.1" +version = "1.13.2" description = "Computer algebra system (CAS) in Python" optional = false python-versions = ">=3.8" files = [ - {file = "sympy-1.13.1-py3-none-any.whl", hash = "sha256:db36cdc64bf61b9b24578b6f7bab1ecdd2452cf008f34faa33776680c26d66f8"}, - {file = "sympy-1.13.1.tar.gz", hash = "sha256:9cebf7e04ff162015ce31c9c6c9144daa34a93bd082f54fd8f12deca4f47515f"}, + {file = "sympy-1.13.2-py3-none-any.whl", hash = "sha256:c51d75517712f1aed280d4ce58506a4a88d635d6b5dd48b39102a7ae1f3fcfe9"}, + {file = "sympy-1.13.2.tar.gz", hash = "sha256:401449d84d07be9d0c7a46a64bd54fe097667d5e7181bfe67ec777be9e01cb13"}, ] [package.dependencies] @@ -3181,13 +3183,13 @@ files = [ [[package]] name = "tomlkit" -version = "0.13.0" +version = "0.13.2" description = "Style preserving TOML library" optional = false python-versions = ">=3.8" files = [ - {file = "tomlkit-0.13.0-py3-none-any.whl", hash = "sha256:7075d3042d03b80f603482d69bf0c8f345c2b30e41699fd8883227f89972b264"}, - {file = "tomlkit-0.13.0.tar.gz", hash = "sha256:08ad192699734149f5b97b45f1f18dad7eb1b6d16bc72ad0c2335772650d7b72"}, + {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, + {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, ] [[package]] @@ -3288,13 +3290,13 @@ files = [ [[package]] name = "werkzeug" -version = "3.0.3" +version = "3.0.4" description = "The comprehensive WSGI web application library." optional = false python-versions = ">=3.8" files = [ - {file = "werkzeug-3.0.3-py3-none-any.whl", hash = "sha256:fc9645dc43e03e4d630d23143a04a7f947a9a3b5727cd535fdfe155a17cc48c8"}, - {file = "werkzeug-3.0.3.tar.gz", hash = "sha256:097e5bfda9f0aba8da6b8545146def481d06aa7d3266e7448e2cccf67dd8bd18"}, + {file = "werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c"}, + {file = "werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306"}, ] [package.dependencies] @@ -3401,13 +3403,13 @@ files = [ [[package]] name = "zipp" -version = "3.19.2" +version = "3.20.0" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" files = [ - {file = "zipp-3.19.2-py3-none-any.whl", hash = "sha256:f091755f667055f2d02b32c53771a7a6c8b47e1fdbc4b72a8b9072b3eef8015c"}, - {file = "zipp-3.19.2.tar.gz", hash = "sha256:bf1dcf6450f873a13e952a29504887c89e6de7506209e5b1bcc3460135d4de19"}, + {file = "zipp-3.20.0-py3-none-any.whl", hash = "sha256:58da6168be89f0be59beb194da1250516fdaa062ccebd30127ac65d30045e10d"}, + {file = "zipp-3.20.0.tar.gz", hash = "sha256:0145e43d89664cfe1a2e533adc75adafed82fe2da404b4bbb6b026c0157bdb31"}, ] [package.extras] diff --git a/pyproject.toml b/pyproject.toml index f75b491e7..476de4338 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ classifiers = [ [tool.poetry.dependencies] python = ">=3.9,<3.12" -qibolab = "^0.1.8" +qibolab = ">=0.2.0" qibo = "^0.2.6" numpy = "^1.26.4" scipy = "^1.10.1" diff --git a/src/qibocal/auto/execute.py b/src/qibocal/auto/execute.py index 018354892..120102996 100644 --- a/src/qibocal/auto/execute.py +++ b/src/qibocal/auto/execute.py @@ -11,8 +11,7 @@ from typing import Optional, Union from qibo.backends import construct_backend -from qibolab import create_platform -from qibolab.platform import Platform +from qibolab import Platform, create_platform from qibocal import protocols from qibocal.config import log diff --git a/src/qibocal/auto/operation.py b/src/qibocal/auto/operation.py index 8b1f602eb..b00eb6003 100644 --- a/src/qibocal/auto/operation.py +++ b/src/qibocal/auto/operation.py @@ -9,21 +9,21 @@ import numpy as np import numpy.typing as npt -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import Qubit, QubitId, QubitPair, QubitPairId +from qibolab import AcquisitionType, AveragingMode, Platform, Qubit from qibocal.config import log from .serialize import deserialize, load, serialize +QubitId = Union[str, int] +QubitPairId = tuple[QubitId, QubitId] + OperationId = NewType("OperationId", str) """Identifier for a calibration routine.""" ParameterValue = Union[float, int] """Valid value for a routine and runcard parameter.""" Qubits = dict[QubitId, Qubit] """Convenient way of passing qubit pairs in the routines.""" -QubitsPairs = dict[tuple[QubitId, QubitId], QubitPair] DATAFILE = "data" @@ -112,7 +112,7 @@ def execution_parameters(self): if self.classify else AcquisitionType.INTEGRATION ) - return ExecutionParameters( + return dict( nshots=self.nshots, relaxation_time=self.relaxation_time, acquisition_type=acquisition_type, diff --git a/src/qibocal/auto/output.py b/src/qibocal/auto/output.py index 275c4cfd8..2b8bdf194 100644 --- a/src/qibocal/auto/output.py +++ b/src/qibocal/auto/output.py @@ -8,7 +8,6 @@ from qibo.backends import construct_backend from qibolab import Platform -from qibolab.serialize import dump_platform from ..config import log from ..version import __version__ @@ -213,7 +212,7 @@ def update_platform(platform: Platform, path: Path): platpath = path / UPDATED_PLATFORM platpath.mkdir(parents=True, exist_ok=True) - dump_platform(platform, platpath) + # dump_platform(platform, platpath) def _export_stats(self): """Export task statistics. diff --git a/src/qibocal/auto/runcard.py b/src/qibocal/auto/runcard.py index 409306de6..e4b64dc45 100644 --- a/src/qibocal/auto/runcard.py +++ b/src/qibocal/auto/runcard.py @@ -7,7 +7,7 @@ import yaml from pydantic.dataclasses import dataclass -from qibolab.platform import Platform +from qibolab import Platform from .. import protocols from .execute import Executor diff --git a/src/qibocal/auto/task.py b/src/qibocal/auto/task.py index c8a07d9fc..7f5f4d003 100644 --- a/src/qibocal/auto/task.py +++ b/src/qibocal/auto/task.py @@ -8,8 +8,9 @@ import yaml from qibo import Circuit -from qibolab.platform import Platform -from qibolab.qubits import QubitId, QubitPairId +from qibolab import Platform + +from qibocal.auto.operation import QubitId, QubitPairId from .. import protocols from ..config import log diff --git a/src/qibocal/auto/transpile.py b/src/qibocal/auto/transpile.py index 63f09464d..c971b8515 100644 --- a/src/qibocal/auto/transpile.py +++ b/src/qibocal/auto/transpile.py @@ -4,7 +4,8 @@ from qibo.backends.abstract import Backend from qibo.transpiler.pipeline import Passes from qibo.transpiler.unroller import NativeGates, Unroller -from qibolab.qubits import QubitId + +from qibocal.auto.operation import QubitId def transpile_circuits( diff --git a/src/qibocal/cli/report.py b/src/qibocal/cli/report.py index b6c4e6e20..a31b93b77 100644 --- a/src/qibocal/cli/report.py +++ b/src/qibocal/cli/report.py @@ -4,9 +4,9 @@ import plotly.graph_objects as go from jinja2 import Environment, FileSystemLoader -from qibolab.qubits import QubitId, QubitPairId from qibocal.auto.history import History +from qibocal.auto.operation import QubitId, QubitPairId from qibocal.auto.output import Output from qibocal.auto.task import Completed from qibocal.config import log diff --git a/src/qibocal/fitting/classifier/run.py b/src/qibocal/fitting/classifier/run.py index 02c466b53..0af4f2191 100644 --- a/src/qibocal/fitting/classifier/run.py +++ b/src/qibocal/fitting/classifier/run.py @@ -8,9 +8,10 @@ import numpy as np import pandas as pd -from qibolab.qubits import QubitId from sklearn.metrics import accuracy_score +from qibocal.auto.operation import QubitId + from . import data CLS_MODULES = [ diff --git a/src/qibocal/protocols/allxy/allxy.py b/src/qibocal/protocols/allxy/allxy.py index 3c52b4f72..d2c89b935 100644 --- a/src/qibocal/protocols/allxy/allxy.py +++ b/src/qibocal/protocols/allxy/allxy.py @@ -3,12 +3,9 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AveragingMode, Platform, PulseSequence -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine @dataclass diff --git a/src/qibocal/protocols/allxy/allxy_drag_pulse_tuning.py b/src/qibocal/protocols/allxy/allxy_drag_pulse_tuning.py index df76e1ca1..deb4ee6b7 100644 --- a/src/qibocal/protocols/allxy/allxy_drag_pulse_tuning.py +++ b/src/qibocal/protocols/allxy/allxy_drag_pulse_tuning.py @@ -4,12 +4,9 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AveragingMode, Platform, PulseSequence -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from . import allxy diff --git a/src/qibocal/protocols/allxy/allxy_resonator_depletion_tuning.py b/src/qibocal/protocols/allxy/allxy_resonator_depletion_tuning.py index 6807ab993..11de25b95 100644 --- a/src/qibocal/protocols/allxy/allxy_resonator_depletion_tuning.py +++ b/src/qibocal/protocols/allxy/allxy_resonator_depletion_tuning.py @@ -4,12 +4,9 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AveragingMode, Platform, PulseSequence -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from . import allxy diff --git a/src/qibocal/protocols/classification.py b/src/qibocal/protocols/classification.py index 9898adfc2..59eb3dc9a 100644 --- a/src/qibocal/protocols/classification.py +++ b/src/qibocal/protocols/classification.py @@ -7,14 +7,18 @@ import numpy.typing as npt import pandas as pd import plotly.graph_objects as go -from qibolab import AcquisitionType, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, Platform, PulseSequence from sklearn.metrics import roc_auc_score, roc_curve from qibocal import update -from qibocal.auto.operation import RESULTSFILE, Data, Parameters, Results, Routine +from qibocal.auto.operation import ( + RESULTSFILE, + Data, + Parameters, + QubitId, + Results, + Routine, +) from qibocal.auto.serialize import serialize from qibocal.fitting.classifier import run from qibocal.protocols.utils import ( @@ -40,14 +44,19 @@ class SingleShotClassificationParameters(Parameters): """SingleShotClassification runcard inputs.""" unrolling: bool = False - """If ``True`` it uses sequence unrolling to deploy multiple sequences in a single instrument call. - Defaults to ``False``.""" + """Whether to unroll the sequences. + + If ``True`` it uses sequence unrolling to deploy multiple sequences in a + single instrument call. + + Defaults to ``False``. + """ classifiers_list: Optional[list[str]] = field( default_factory=lambda: [DEFAULT_CLASSIFIER] ) - """List of models to classify the qubit states""" + """List of models to classify the qubit states.""" savedir: Optional[str] = " " - """Dumping folder of the classification results""" + """Dumping folder of the classification results.""" ClassificationType = np.dtype([("i", np.float64), ("q", np.float64), ("state", int)]) @@ -59,7 +68,7 @@ class SingleShotClassificationData(Data): nshots: int """Number of shots.""" savedir: str - """Dumping folder of the classification results""" + """Dumping folder of the classification results.""" qubit_frequencies: dict[QubitId, float] = field(default_factory=dict) """Qubit frequencies.""" data: dict[QubitId, npt.NDArray] = field(default_factory=dict) @@ -67,7 +76,7 @@ class SingleShotClassificationData(Data): classifiers_list: Optional[list[str]] = field( default_factory=lambda: [DEFAULT_CLASSIFIER] ) - """List of models to classify the qubit states""" + """List of models to classify the qubit states.""" @dataclass @@ -110,8 +119,8 @@ class SingleShotClassificationResults(Results): def __contains__(self, key: QubitId): """Checking if key is in Results. - Overwritten because classifiers_hpars is empty when running - the default_classifier. + Overwritten because classifiers_hpars is empty when running the + default_classifier. """ return all( key in getattr(self, field.name) @@ -179,19 +188,21 @@ def _acquisition( # state1_sequence: RX - MZ # taking advantage of multiplexing, apply the same set of gates to all qubits in parallel + native = platform.natives.single_qubit sequences, all_ro_pulses = [], [] for state in [0, 1]: - sequence = PulseSequence() - RX_pulses = {} ro_pulses = {} - for qubit in targets: - RX_pulses[qubit] = platform.create_RX_pulse(qubit, start=0) - ro_pulses[qubit] = platform.create_qubit_readout_pulse( - qubit, start=RX_pulses[qubit].finish - ) - if state == 1: - sequence.add(RX_pulses[qubit]) - sequence.add(ro_pulses[qubit]) + sequence = PulseSequence() + for q in targets: + ro_sequence = native[q].MZ() + ro_pulses[q] = ro_sequence[0][1].id + sequence += ro_sequence + + if state == 1: + rx_sequence = PulseSequence() + for q in targets: + rx_sequence += native[q].RX() + sequence = rx_sequence | sequence sequences.append(sequence) all_ro_pulses.append(ro_pulses) @@ -199,38 +210,36 @@ def _acquisition( data = SingleShotClassificationData( nshots=params.nshots, qubit_frequencies={ - qubit: platform.qubits[qubit].drive_frequency for qubit in targets + qubit: platform.config(platform.qubits[qubit].drive).frequency + for qubit in targets }, classifiers_list=params.classifiers_list, savedir=params.savedir, ) - options = ExecutionParameters( + options = dict( nshots=params.nshots, relaxation_time=params.relaxation_time, acquisition_type=AcquisitionType.INTEGRATION, ) if params.unrolling: - results = platform.execute_pulse_sequences(sequences, options) + results = platform.execute(sequences, **options) else: - results = [ - platform.execute_pulse_sequence(sequence, options) for sequence in sequences - ] + results = {} + for sequence in sequences: + results.update(platform.execute([sequence], **options)) - for ig, (state, ro_pulses) in enumerate(zip([0, 1], all_ro_pulses)): + for state, ro_pulses in zip([0, 1], all_ro_pulses): for qubit in targets: - serial = ro_pulses[qubit].serial - if params.unrolling: - result = results[serial][ig] - else: - result = results[ig][serial] + serial = ro_pulses[qubit] + result = results[serial] data.register_qubit( ClassificationType, (qubit), dict( - i=result.voltage_i, - q=result.voltage_q, + i=result[..., 0], + q=result[..., 1], state=[state] * params.nshots, ), ) diff --git a/src/qibocal/protocols/coherence/spin_echo.py b/src/qibocal/protocols/coherence/spin_echo.py index 20e8fb042..8193a6866 100644 --- a/src/qibocal/protocols/coherence/spin_echo.py +++ b/src/qibocal/protocols/coherence/spin_echo.py @@ -4,12 +4,9 @@ import numpy as np import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from ..utils import table_dict, table_html from . import t1 diff --git a/src/qibocal/protocols/coherence/spin_echo_signal.py b/src/qibocal/protocols/coherence/spin_echo_signal.py index 94a852f01..e8a7d93bd 100644 --- a/src/qibocal/protocols/coherence/spin_echo_signal.py +++ b/src/qibocal/protocols/coherence/spin_echo_signal.py @@ -4,13 +4,10 @@ import numpy as np import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence from qibocal import update -from qibocal.auto.operation import Parameters, Results, Routine +from qibocal.auto.operation import Parameters, QubitId, Results, Routine from ..utils import table_dict, table_html from .t1_signal import T1SignalData diff --git a/src/qibocal/protocols/coherence/t1.py b/src/qibocal/protocols/coherence/t1.py index 54b99ee93..147261ce5 100644 --- a/src/qibocal/protocols/coherence/t1.py +++ b/src/qibocal/protocols/coherence/t1.py @@ -4,13 +4,16 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) -from qibocal.auto.operation import Data, Routine +from qibocal.auto.operation import Data, QubitId, Routine from ..utils import table_dict, table_html from . import t1_signal, utils diff --git a/src/qibocal/protocols/coherence/t1_sequences.py b/src/qibocal/protocols/coherence/t1_sequences.py index d932e3acb..631684ddb 100644 --- a/src/qibocal/protocols/coherence/t1_sequences.py +++ b/src/qibocal/protocols/coherence/t1_sequences.py @@ -1,10 +1,7 @@ import numpy as np -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from . import t1_signal from .utils import CoherenceType diff --git a/src/qibocal/protocols/coherence/t1_signal.py b/src/qibocal/protocols/coherence/t1_signal.py index 74c13fc90..a51c098ad 100644 --- a/src/qibocal/protocols/coherence/t1_signal.py +++ b/src/qibocal/protocols/coherence/t1_signal.py @@ -4,14 +4,18 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Delay, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from ..utils import table_dict, table_html from . import utils @@ -81,15 +85,19 @@ def _acquisition( # create a sequence of pulses for the experiment # RX - wait t - MZ qd_pulses = {} + delays = {} ro_pulses = {} sequence = PulseSequence() - for qubit in targets: - qd_pulses[qubit] = platform.create_RX_pulse(qubit, start=0) - ro_pulses[qubit] = platform.create_qubit_readout_pulse( - qubit, start=qd_pulses[qubit].duration - ) - sequence.add(qd_pulses[qubit]) - sequence.add(ro_pulses[qubit]) + for q in targets: + qubit = platform.qubits[q] + qd_sequence = qubit.native_gates.RX.create_sequence(theta=np.pi, phi=0) + ro_sequence = qubit.native_gates.MZ.create_sequence() + qd_pulses[q] = qd_sequence[qubit.drive.name][0] + ro_pulses[q] = ro_sequence[qubit.measure.name][0] + delays[q] = Delay(duration=qd_pulses[q].duration) + sequence.extend(qd_sequence) + sequence[qubit.measure.name].append(delays[q]) + sequence.extend(ro_sequence) # define the parameter to sweep and its range: # wait time before readout @@ -100,9 +108,9 @@ def _acquisition( ) sweeper = Sweeper( - Parameter.start, + Parameter.duration, ro_wait_range, - [ro_pulses[qubit] for qubit in targets], + [delays[q] for q in targets], type=SweeperType.ABSOLUTE, ) @@ -122,15 +130,15 @@ def _acquisition( ) data = T1SignalData() - for qubit in targets: - result = results[ro_pulses[qubit].serial] + for q in targets: + result = results[ro_pulses[q].id] if params.single_shot: _waits = np.array(len(result.magnitude) * [ro_wait_range]) else: _waits = ro_wait_range data.register_qubit( utils.CoherenceType, - (qubit), + (q), dict(wait=_waits, signal=result.magnitude, phase=result.phase), ) diff --git a/src/qibocal/protocols/coherence/t2.py b/src/qibocal/protocols/coherence/t2.py index 0b2be1f16..5877a66c3 100644 --- a/src/qibocal/protocols/coherence/t2.py +++ b/src/qibocal/protocols/coherence/t2.py @@ -3,13 +3,16 @@ import numpy as np import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType - -from qibocal.auto.operation import Routine +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) + +from qibocal.auto.operation import QubitId, Routine from ..utils import table_dict, table_html from . import t1, t2_signal, utils diff --git a/src/qibocal/protocols/coherence/t2_sequences.py b/src/qibocal/protocols/coherence/t2_sequences.py index 85a38159a..02cf54d40 100644 --- a/src/qibocal/protocols/coherence/t2_sequences.py +++ b/src/qibocal/protocols/coherence/t2_sequences.py @@ -1,10 +1,7 @@ import numpy as np -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from .t2_signal import T2SignalData, T2SignalParameters, _fit, _plot, _update from .utils import CoherenceType diff --git a/src/qibocal/protocols/coherence/t2_signal.py b/src/qibocal/protocols/coherence/t2_signal.py index 4c8ffc714..1a40649ee 100644 --- a/src/qibocal/protocols/coherence/t2_signal.py +++ b/src/qibocal/protocols/coherence/t2_signal.py @@ -3,14 +3,18 @@ import numpy as np import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Delay, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from qibocal import update -from qibocal.auto.operation import Parameters, Results, Routine +from qibocal.auto.operation import Parameters, QubitId, Results, Routine from ..utils import table_dict, table_html from . import t1_signal, t2, utils @@ -60,21 +64,23 @@ def _acquisition( # create a sequence of pulses for the experiment # RX90 - t - RX90 - MZ ro_pulses = {} - RX90_pulses1 = {} - RX90_pulses2 = {} + qd_delays = {} + ro_delays = {} sequence = PulseSequence() - for qubit in targets: - RX90_pulses1[qubit] = platform.create_RX90_pulse(qubit, start=0) - RX90_pulses2[qubit] = platform.create_RX90_pulse( - qubit, - start=RX90_pulses1[qubit].finish, - ) - ro_pulses[qubit] = platform.create_qubit_readout_pulse( - qubit, start=RX90_pulses2[qubit].finish - ) - sequence.add(RX90_pulses1[qubit]) - sequence.add(RX90_pulses2[qubit]) - sequence.add(ro_pulses[qubit]) + for q in targets: + qubit = platform.qubits[q] + qd_sequence = qubit.native_gates.RX.create_sequence(theta=np.pi / 2, phi=0) + ro_sequence = qubit.native_gates.MZ.create_sequence() + qd_delays[q] = Delay(duration=16) + ro_delays[q] = Delay(duration=16) + qd_pulse = qd_sequence[qubit.drive.name][0] + ro_pulses[q] = ro_sequence[qubit.measure.name][0] + sequence.extend(qd_sequence) + sequence[qubit.drive.name].append(qd_delays[q]) + sequence.extend(qd_sequence) + sequence[qubit.measure.name].append(Delay(duration=2 * qd_pulse.duration)) + sequence[qubit.measure.name].append(ro_delays[q]) + sequence.extend(ro_sequence) # define the parameter to sweep and its range: waits = np.arange( @@ -85,9 +91,9 @@ def _acquisition( ) sweeper = Sweeper( - Parameter.start, + Parameter.duration, waits, - [RX90_pulses2[qubit] for qubit in targets], + [qd_delays[q] for q in targets] + [ro_delays[q] for q in targets], type=SweeperType.ABSOLUTE, ) @@ -106,15 +112,15 @@ def _acquisition( ) data = T2SignalData() - for qubit in targets: - result = results[ro_pulses[qubit].serial] + for q in targets: + result = results[ro_pulses[q].id] if params.single_shot: _waits = np.array(len(result.magnitude) * [waits]) else: _waits = waits data.register_qubit( utils.CoherenceType, - (qubit), + (q), dict(wait=_waits, signal=result.magnitude, phase=result.phase), ) return data diff --git a/src/qibocal/protocols/coherence/zeno.py b/src/qibocal/protocols/coherence/zeno.py index 42561b60c..8ae0e8f58 100644 --- a/src/qibocal/protocols/coherence/zeno.py +++ b/src/qibocal/protocols/coherence/zeno.py @@ -3,12 +3,9 @@ import numpy as np import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from ..utils import table_dict, table_html from . import t1, utils diff --git a/src/qibocal/protocols/coherence/zeno_signal.py b/src/qibocal/protocols/coherence/zeno_signal.py index 1d0240eeb..126b24e4e 100644 --- a/src/qibocal/protocols/coherence/zeno_signal.py +++ b/src/qibocal/protocols/coherence/zeno_signal.py @@ -3,13 +3,10 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from ..utils import table_dict, table_html from . import utils diff --git a/src/qibocal/protocols/couplers/coupler_chevron.py b/src/qibocal/protocols/couplers/coupler_chevron.py index 2a5195dd2..2ea9dd2d7 100644 --- a/src/qibocal/protocols/couplers/coupler_chevron.py +++ b/src/qibocal/protocols/couplers/coupler_chevron.py @@ -2,13 +2,16 @@ from typing import Optional import numpy as np -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitPairId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) -from qibocal.auto.operation import Results, Routine +from qibocal.auto.operation import QubitPairId, Results, Routine from ..two_qubit_interaction.chevron.chevron import ( ChevronData, diff --git a/src/qibocal/protocols/couplers/coupler_qubit_spectroscopy.py b/src/qibocal/protocols/couplers/coupler_qubit_spectroscopy.py index 8b5cb1c15..a49217324 100644 --- a/src/qibocal/protocols/couplers/coupler_qubit_spectroscopy.py +++ b/src/qibocal/protocols/couplers/coupler_qubit_spectroscopy.py @@ -1,13 +1,16 @@ from typing import Optional import numpy as np -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitPairId -from qibolab.sweeper import Parameter, Sweeper, SweeperType - -from qibocal.auto.operation import Routine +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) + +from qibocal.auto.operation import QubitPairId, Routine from ..two_qubit_interaction.utils import order_pair from .coupler_resonator_spectroscopy import _fit, _plot, _update diff --git a/src/qibocal/protocols/couplers/coupler_resonator_spectroscopy.py b/src/qibocal/protocols/couplers/coupler_resonator_spectroscopy.py index 9848a2a8c..a1eb18bff 100644 --- a/src/qibocal/protocols/couplers/coupler_resonator_spectroscopy.py +++ b/src/qibocal/protocols/couplers/coupler_resonator_spectroscopy.py @@ -1,11 +1,14 @@ import numpy as np -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitPairId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitPairId, Routine from ..flux_dependence.utils import flux_dependence_plot from ..two_qubit_interaction.utils import order_pair diff --git a/src/qibocal/protocols/couplers/utils.py b/src/qibocal/protocols/couplers/utils.py index 9e2648dce..bb6530331 100644 --- a/src/qibocal/protocols/couplers/utils.py +++ b/src/qibocal/protocols/couplers/utils.py @@ -3,9 +3,8 @@ import numpy as np import numpy.typing as npt -from qibolab.qubits import QubitId -from qibocal.auto.operation import Data, Results +from qibocal.auto.operation import Data, QubitId, Results from ..flux_dependence.resonator_flux_dependence import ResonatorFluxParameters from ..flux_dependence.utils import create_data_array diff --git a/src/qibocal/protocols/dispersive_shift.py b/src/qibocal/protocols/dispersive_shift.py index 19d6ff05f..0847e3407 100644 --- a/src/qibocal/protocols/dispersive_shift.py +++ b/src/qibocal/protocols/dispersive_shift.py @@ -4,14 +4,17 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.protocols.utils import ( HZ_TO_GHZ, lorentzian, diff --git a/src/qibocal/protocols/dispersive_shift_qutrit.py b/src/qibocal/protocols/dispersive_shift_qutrit.py index 79545826c..d000df6ff 100644 --- a/src/qibocal/protocols/dispersive_shift_qutrit.py +++ b/src/qibocal/protocols/dispersive_shift_qutrit.py @@ -4,13 +4,16 @@ import numpy as np import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) -from qibocal.auto.operation import Results, Routine +from qibocal.auto.operation import QubitId, Results, Routine from qibocal.protocols.utils import ( GHZ_TO_HZ, HZ_TO_GHZ, diff --git a/src/qibocal/protocols/drag.py b/src/qibocal/protocols/drag.py index d915d78bd..e892863d6 100644 --- a/src/qibocal/protocols/drag.py +++ b/src/qibocal/protocols/drag.py @@ -4,14 +4,11 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence from scipy.optimize import curve_fit from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.config import log from .utils import ( diff --git a/src/qibocal/protocols/fast_reset/fast_reset.py b/src/qibocal/protocols/fast_reset/fast_reset.py index a6081b424..a46354332 100644 --- a/src/qibocal/protocols/fast_reset/fast_reset.py +++ b/src/qibocal/protocols/fast_reset/fast_reset.py @@ -4,12 +4,9 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import Platform, PulseSequence -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.protocols.utils import table_dict, table_html # TODO: IBM Fast Reset until saturation loop diff --git a/src/qibocal/protocols/flipping.py b/src/qibocal/protocols/flipping.py index 981be1b08..01e43de6e 100644 --- a/src/qibocal/protocols/flipping.py +++ b/src/qibocal/protocols/flipping.py @@ -3,13 +3,10 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence from scipy.optimize import curve_fit -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from qibocal.config import log from qibocal.protocols.utils import ( fallback_period, diff --git a/src/qibocal/protocols/flipping_signal.py b/src/qibocal/protocols/flipping_signal.py index 33e7900c4..aac719761 100644 --- a/src/qibocal/protocols/flipping_signal.py +++ b/src/qibocal/protocols/flipping_signal.py @@ -4,14 +4,11 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence from scipy.optimize import curve_fit from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.config import log from qibocal.protocols.utils import ( fallback_period, diff --git a/src/qibocal/protocols/flux_dependence/avoided_crossing.py b/src/qibocal/protocols/flux_dependence/avoided_crossing.py index f9f9ce796..4c89517f8 100644 --- a/src/qibocal/protocols/flux_dependence/avoided_crossing.py +++ b/src/qibocal/protocols/flux_dependence/avoided_crossing.py @@ -7,10 +7,9 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab.platform import Platform -from qibolab.qubits import QubitId, QubitPairId +from qibolab import Platform -from qibocal.auto.operation import Data, Results, Routine +from qibocal.auto.operation import Data, QubitId, QubitPairId, Results, Routine from qibocal.protocols.two_qubit_interaction.utils import order_pair from qibocal.protocols.utils import HZ_TO_GHZ, table_dict, table_html diff --git a/src/qibocal/protocols/flux_dependence/qubit_crosstalk.py b/src/qibocal/protocols/flux_dependence/qubit_crosstalk.py index dac8d8c8c..2c999ecff 100644 --- a/src/qibocal/protocols/flux_dependence/qubit_crosstalk.py +++ b/src/qibocal/protocols/flux_dependence/qubit_crosstalk.py @@ -3,15 +3,18 @@ import numpy as np import numpy.typing as npt -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from scipy.optimize import curve_fit from qibocal import update -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from qibocal.config import log from ..qubit_spectroscopy_ef import DEFAULT_ANHARMONICITY diff --git a/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py b/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py index e87983f05..b9a704d4b 100644 --- a/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py +++ b/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py @@ -3,15 +3,18 @@ import numpy as np import numpy.typing as npt -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from scipy.optimize import curve_fit from qibocal import update -from qibocal.auto.operation import Data, Results, Routine +from qibocal.auto.operation import Data, QubitId, Results, Routine from qibocal.config import log from qibocal.protocols.qubit_spectroscopy_ef import DEFAULT_ANHARMONICITY diff --git a/src/qibocal/protocols/flux_dependence/qubit_flux_tracking.py b/src/qibocal/protocols/flux_dependence/qubit_flux_tracking.py index a4f2ef407..3abad5040 100644 --- a/src/qibocal/protocols/flux_dependence/qubit_flux_tracking.py +++ b/src/qibocal/protocols/flux_dependence/qubit_flux_tracking.py @@ -1,13 +1,16 @@ from dataclasses import dataclass import numpy as np -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from qibocal.config import raise_error from ..qubit_spectroscopy_ef import DEFAULT_ANHARMONICITY diff --git a/src/qibocal/protocols/flux_dependence/resonator_crosstalk.py b/src/qibocal/protocols/flux_dependence/resonator_crosstalk.py index 44046c8b1..75e04937b 100644 --- a/src/qibocal/protocols/flux_dependence/resonator_crosstalk.py +++ b/src/qibocal/protocols/flux_dependence/resonator_crosstalk.py @@ -3,15 +3,18 @@ import numpy as np import numpy.typing as npt -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from scipy.optimize import curve_fit from qibocal import update -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from qibocal.config import log from ..utils import HZ_TO_GHZ, extract_feature, table_dict, table_html diff --git a/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py b/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py index e8ad497a8..28fe6acc8 100644 --- a/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py +++ b/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py @@ -3,15 +3,18 @@ import numpy as np import numpy.typing as npt -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from scipy.optimize import curve_fit from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.config import log from ..utils import GHZ_TO_HZ, HZ_TO_GHZ, extract_feature, table_dict, table_html diff --git a/src/qibocal/protocols/flux_dependence/utils.py b/src/qibocal/protocols/flux_dependence/utils.py index 673a71275..76ced375b 100644 --- a/src/qibocal/protocols/flux_dependence/utils.py +++ b/src/qibocal/protocols/flux_dependence/utils.py @@ -1,8 +1,9 @@ import numpy as np import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab.platform import Platform -from qibolab.qubits import QubitId +from qibolab import Platform + +from qibocal.auto.operation import QubitId from ..utils import HZ_TO_GHZ diff --git a/src/qibocal/protocols/qubit_power_spectroscopy.py b/src/qibocal/protocols/qubit_power_spectroscopy.py index 5b77172bb..ba83bcc81 100644 --- a/src/qibocal/protocols/qubit_power_spectroscopy.py +++ b/src/qibocal/protocols/qubit_power_spectroscopy.py @@ -4,13 +4,16 @@ import numpy as np import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType - -from qibocal.auto.operation import Parameters, Results, Routine +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) + +from qibocal.auto.operation import Parameters, QubitId, Results, Routine from .qubit_spectroscopy import QubitSpectroscopyResults from .resonator_punchout import ResonatorPunchoutData diff --git a/src/qibocal/protocols/qubit_spectroscopy.py b/src/qibocal/protocols/qubit_spectroscopy.py index ae60f93f7..06d776c3d 100644 --- a/src/qibocal/protocols/qubit_spectroscopy.py +++ b/src/qibocal/protocols/qubit_spectroscopy.py @@ -2,13 +2,10 @@ from typing import Optional import numpy as np -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import Parameter, Platform, PulseSequence, Sweeper from qibocal import update -from qibocal.auto.operation import Parameters, Results, Routine +from qibocal.auto.operation import Parameters, QubitId, Results, Routine from .resonator_spectroscopy import ResonatorSpectroscopyData, ResSpecType from .utils import chi2_reduced, lorentzian, lorentzian_fit, spectroscopy_plot diff --git a/src/qibocal/protocols/qubit_spectroscopy_ef.py b/src/qibocal/protocols/qubit_spectroscopy_ef.py index 72ac82f86..8f08eebfd 100644 --- a/src/qibocal/protocols/qubit_spectroscopy_ef.py +++ b/src/qibocal/protocols/qubit_spectroscopy_ef.py @@ -1,13 +1,10 @@ from dataclasses import asdict, dataclass, field import numpy as np -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import Parameter, Platform, PulseSequence, Sweeper from qibocal import update -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from .qubit_spectroscopy import ( QubitSpectroscopyData, diff --git a/src/qibocal/protocols/qutrit_classification.py b/src/qibocal/protocols/qutrit_classification.py index c7a450667..c2bca7dc6 100644 --- a/src/qibocal/protocols/qutrit_classification.py +++ b/src/qibocal/protocols/qutrit_classification.py @@ -2,12 +2,9 @@ from typing import Optional import numpy as np -from qibolab import AcquisitionType, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, Platform, PulseSequence -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from qibocal.fitting.classifier import run from qibocal.protocols.classification import ( ClassificationType, diff --git a/src/qibocal/protocols/rabi/amplitude.py b/src/qibocal/protocols/rabi/amplitude.py index 4a3d4b209..1cd6ddda0 100644 --- a/src/qibocal/protocols/rabi/amplitude.py +++ b/src/qibocal/protocols/rabi/amplitude.py @@ -2,14 +2,12 @@ import numpy as np import numpy.typing as npt -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from qibocal import update -from qibocal.auto.operation import Data, Routine +from qibocal.auto.operation import Data, QubitId, Routine from qibocal.config import log +from qibocal.result import probability from ..utils import chi2_reduced, fallback_period, guess_period from . import utils @@ -53,43 +51,34 @@ def _acquisition( to find the drive pulse amplitude that creates a rotation of a desired angle. """ - sequence, qd_pulses, _, durations = utils.sequence_amplitude( + sequence, qd_pulses, ro_pulses, durations = utils.sequence_amplitude( targets, params, platform ) - # define the parameter to sweep and its range: - # qubit drive pulse amplitude - qd_pulse_amplitude_range = np.arange( - params.min_amp_factor, - params.max_amp_factor, - params.step_amp_factor, - ) + sweeper = Sweeper( - Parameter.amplitude, - qd_pulse_amplitude_range, - [qd_pulses[qubit] for qubit in targets], - type=SweeperType.FACTOR, + parameter=Parameter.amplitude, + range=(params.min_amp, params.max_amp, params.step_amp), + pulses=[qd_pulses[qubit] for qubit in targets], ) data = RabiAmplitudeData(durations=durations) # sweep the parameter - results = platform.sweep( - sequence, - ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.DISCRIMINATION, - averaging_mode=AveragingMode.SINGLESHOT, - ), - sweeper, + results = platform.execute( + [sequence], + [[sweeper]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.DISCRIMINATION, + averaging_mode=AveragingMode.SINGLESHOT, ) for qubit in targets: - prob = results[qubit].probability(state=1) + prob = probability(results[ro_pulses[qubit].id], state=1) data.register_qubit( RabiAmpType, (qubit), dict( - amp=qd_pulses[qubit].amplitude * qd_pulse_amplitude_range, + amp=sweeper.values, prob=prob.tolist(), error=np.sqrt(prob * (1 - prob) / params.nshots).tolist(), ), diff --git a/src/qibocal/protocols/rabi/amplitude_frequency.py b/src/qibocal/protocols/rabi/amplitude_frequency.py index 1de63c3f2..71feaec23 100644 --- a/src/qibocal/protocols/rabi/amplitude_frequency.py +++ b/src/qibocal/protocols/rabi/amplitude_frequency.py @@ -6,12 +6,9 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from qibocal.config import log from qibocal.protocols.utils import ( HZ_TO_GHZ, diff --git a/src/qibocal/protocols/rabi/amplitude_frequency_signal.py b/src/qibocal/protocols/rabi/amplitude_frequency_signal.py index 5bd24ed6e..7632177e2 100644 --- a/src/qibocal/protocols/rabi/amplitude_frequency_signal.py +++ b/src/qibocal/protocols/rabi/amplitude_frequency_signal.py @@ -7,13 +7,10 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from qibocal import update -from qibocal.auto.operation import Data, Parameters, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Routine from qibocal.config import log from qibocal.protocols.utils import ( HZ_TO_GHZ, diff --git a/src/qibocal/protocols/rabi/amplitude_signal.py b/src/qibocal/protocols/rabi/amplitude_signal.py index 31a8eb04a..76bbbeab6 100644 --- a/src/qibocal/protocols/rabi/amplitude_signal.py +++ b/src/qibocal/protocols/rabi/amplitude_signal.py @@ -3,15 +3,13 @@ import numpy as np import numpy.typing as npt -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.config import log from qibocal.protocols.utils import fallback_period, guess_period +from qibocal.result import magnitude, phase from . import utils @@ -20,12 +18,12 @@ class RabiAmplitudeSignalParameters(Parameters): """RabiAmplitude runcard inputs.""" - min_amp_factor: float - """Minimum amplitude multiplicative factor.""" - max_amp_factor: float - """Maximum amplitude multiplicative factor.""" - step_amp_factor: float - """Step amplitude multiplicative factor.""" + min_amp: float + """Minimum amplitude.""" + max_amp: float + """Maximum amplitude.""" + step_amp: float + """Step amplitude.""" pulse_length: Optional[float] = None """RX pulse duration [ns].""" @@ -72,42 +70,32 @@ def _acquisition( targets, params, platform ) - # define the parameter to sweep and its range: - # qubit drive pulse amplitude - qd_pulse_amplitude_range = np.arange( - params.min_amp_factor, - params.max_amp_factor, - params.step_amp_factor, - ) sweeper = Sweeper( - Parameter.amplitude, - qd_pulse_amplitude_range, - [qd_pulses[qubit] for qubit in targets], - type=SweeperType.FACTOR, + parameter=Parameter.amplitude, + range=(params.min_amp, params.max_amp, params.step_amp), + pulses=[qd_pulses[qubit] for qubit in targets], ) data = RabiAmplitudeSignalData(durations=durations) # sweep the parameter - results = platform.sweep( - sequence, - ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.INTEGRATION, - averaging_mode=AveragingMode.CYCLIC, - ), - sweeper, + results = platform.execute( + [sequence], + [[sweeper]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.INTEGRATION, + averaging_mode=AveragingMode.CYCLIC, ) for qubit in targets: - result = results[ro_pulses[qubit].serial] + result = results[ro_pulses[qubit].id] data.register_qubit( RabiAmpSignalType, (qubit), dict( - amp=qd_pulses[qubit].amplitude * qd_pulse_amplitude_range, - signal=result.magnitude, - phase=result.phase, + amp=sweeper.values, + signal=magnitude(result), + phase=phase(result), ), ) return data diff --git a/src/qibocal/protocols/rabi/ef.py b/src/qibocal/protocols/rabi/ef.py index 5797daf7c..3cb64506b 100644 --- a/src/qibocal/protocols/rabi/ef.py +++ b/src/qibocal/protocols/rabi/ef.py @@ -1,14 +1,17 @@ from dataclasses import dataclass import numpy as np -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from qibocal import update -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from . import amplitude_signal, utils diff --git a/src/qibocal/protocols/rabi/length.py b/src/qibocal/protocols/rabi/length.py index 1b529322b..e116153bd 100644 --- a/src/qibocal/protocols/rabi/length.py +++ b/src/qibocal/protocols/rabi/length.py @@ -3,18 +3,16 @@ import numpy as np import numpy.typing as npt -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from qibocal import update -from qibocal.auto.operation import Parameters, Routine +from qibocal.auto.operation import Parameters, QubitId, Routine from qibocal.config import log from qibocal.protocols.rabi.length_signal import ( RabiLengthSignalData, RabiLengthSignalResults, ) +from qibocal.result import probability from ..utils import chi2_reduced, fallback_period, guess_period from . import utils @@ -32,6 +30,8 @@ class RabiLengthParameters(Parameters): """Step pi pulse duration [ns].""" pulse_amplitude: Optional[float] = None """Pi pulse amplitude. Same for all qubits.""" + interpolated_sweeper: bool = False + """Use real-time interpolation if supported by instruments.""" @dataclass @@ -64,45 +64,46 @@ def _acquisition( to find the drive pulse length that creates a rotation of a desired angle. """ - sequence, qd_pulses, _, amplitudes = utils.sequence_length( - targets, params, platform + sequence, qd_pulses, delays, ro_pulses, amplitudes = utils.sequence_length( + targets, params, platform, use_align=params.interpolated_sweeper ) - # define the parameter to sweep and its range: - # qubit drive pulse duration time - qd_pulse_duration_range = np.arange( + sweep_range = ( params.pulse_duration_start, params.pulse_duration_end, params.pulse_duration_step, ) - - sweeper = Sweeper( - Parameter.duration, - qd_pulse_duration_range, - [qd_pulses[qubit] for qubit in targets], - type=SweeperType.ABSOLUTE, - ) + if params.interpolated_sweeper: + sweeper = Sweeper( + parameter=Parameter.duration_interpolated, + range=sweep_range, + pulses=[qd_pulses[q] for q in targets], + ) + else: + sweeper = Sweeper( + parameter=Parameter.duration, + range=sweep_range, + pulses=[qd_pulses[q] for q in targets] + [delays[q] for q in targets], + ) data = RabiLengthData(amplitudes=amplitudes) # execute the sweep - results = platform.sweep( - sequence, - ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.DISCRIMINATION, - averaging_mode=AveragingMode.SINGLESHOT, - ), - sweeper, + results = platform.execute( + [sequence], + [[sweeper]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.DISCRIMINATION, + averaging_mode=AveragingMode.SINGLESHOT, ) - for qubit in targets: - prob = results[qubit].probability(state=1) + for q in targets: + prob = probability(results[ro_pulses[q].id], state=1) data.register_qubit( RabiLenType, - (qubit), + (q), dict( - length=qd_pulse_duration_range, + length=sweeper.values, prob=prob, error=np.sqrt(prob * (1 - prob) / params.nshots).tolist(), ), diff --git a/src/qibocal/protocols/rabi/length_frequency.py b/src/qibocal/protocols/rabi/length_frequency.py index 28ac4715c..68e010e76 100644 --- a/src/qibocal/protocols/rabi/length_frequency.py +++ b/src/qibocal/protocols/rabi/length_frequency.py @@ -6,12 +6,9 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from qibocal.config import log from qibocal.protocols.utils import table_dict, table_html diff --git a/src/qibocal/protocols/rabi/length_frequency_signal.py b/src/qibocal/protocols/rabi/length_frequency_signal.py index abf73caa3..238145930 100644 --- a/src/qibocal/protocols/rabi/length_frequency_signal.py +++ b/src/qibocal/protocols/rabi/length_frequency_signal.py @@ -7,13 +7,10 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from qibocal import update -from qibocal.auto.operation import Data, Parameters, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Routine from qibocal.config import log from qibocal.protocols.utils import table_dict, table_html diff --git a/src/qibocal/protocols/rabi/length_sequences.py b/src/qibocal/protocols/rabi/length_sequences.py index 3b6259d20..105d15bca 100644 --- a/src/qibocal/protocols/rabi/length_sequences.py +++ b/src/qibocal/protocols/rabi/length_sequences.py @@ -1,9 +1,7 @@ import numpy as np -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from .length_signal import ( RabiLengthSignalData, diff --git a/src/qibocal/protocols/rabi/length_signal.py b/src/qibocal/protocols/rabi/length_signal.py index fc139197d..8a6107341 100644 --- a/src/qibocal/protocols/rabi/length_signal.py +++ b/src/qibocal/protocols/rabi/length_signal.py @@ -3,15 +3,13 @@ import numpy as np import numpy.typing as npt -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.config import log from qibocal.protocols.utils import fallback_period, guess_period +from qibocal.result import magnitude, phase from . import utils @@ -28,6 +26,8 @@ class RabiLengthSignalParameters(Parameters): """Step pi pulse duration [ns].""" pulse_amplitude: Optional[float] = None """Pi pulse amplitude. Same for all qubits.""" + interpolated_sweeper: bool = False + """Use real-time interpolation if supported by instruments.""" @dataclass @@ -67,47 +67,48 @@ def _acquisition( to find the drive pulse length that creates a rotation of a desired angle. """ - sequence, qd_pulses, ro_pulses, amplitudes = utils.sequence_length( + sequence, qd_pulses, delays, ro_pulses, amplitudes = utils.sequence_length( targets, params, platform ) - - # define the parameter to sweep and its range: - # qubit drive pulse duration time - qd_pulse_duration_range = np.arange( + sweep_range = ( params.pulse_duration_start, params.pulse_duration_end, params.pulse_duration_step, ) + if params.interpolated_sweeper: + sweeper = Sweeper( + parameter=Parameter.duration_interpolated, + range=sweep_range, + pulses=[qd_pulses[q] for q in targets], + ) + else: + sweeper = Sweeper( + parameter=Parameter.duration, + range=sweep_range, + pulses=[qd_pulses[q] for q in targets] + [delays[q] for q in targets], + ) - sweeper = Sweeper( - Parameter.duration, - qd_pulse_duration_range, - [qd_pulses[qubit] for qubit in targets], - type=SweeperType.ABSOLUTE, - ) data = RabiLengthSignalData(amplitudes=amplitudes) # execute the sweep - results = platform.sweep( - sequence, - ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.INTEGRATION, - averaging_mode=AveragingMode.CYCLIC, - ), - sweeper, + results = platform.execute( + [sequence], + [[sweeper]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.INTEGRATION, + averaging_mode=AveragingMode.CYCLIC, ) - for qubit in targets: - result = results[ro_pulses[qubit].serial] + for q in targets: + result = results[ro_pulses[q].id] data.register_qubit( RabiLenSignalType, - (qubit), + (q), dict( - length=qd_pulse_duration_range, - signal=result.magnitude, - phase=result.phase, + length=sweeper.values, + signal=magnitude(result), + phase=phase(result), ), ) return data diff --git a/src/qibocal/protocols/rabi/utils.py b/src/qibocal/protocols/rabi/utils.py index d31a40679..e7b3cc0d5 100644 --- a/src/qibocal/protocols/rabi/utils.py +++ b/src/qibocal/protocols/rabi/utils.py @@ -1,12 +1,10 @@ import numpy as np import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import Delay, Platform, PulseSequence from scipy.optimize import curve_fit -from qibocal.auto.operation import Parameters +from qibocal.auto.operation import Parameters, QubitId from ..utils import COLORBAND, COLORBAND_LINE, table_dict, table_html @@ -231,42 +229,58 @@ def sequence_amplitude( qd_pulses = {} ro_pulses = {} durations = {} - for qubit in targets: - qd_pulses[qubit] = platform.create_RX_pulse(qubit, start=0) + for q in targets: + natives = platform.natives.single_qubit[q] + qd_sequence = natives.RX() + ro_sequence = natives.MZ() + + qd_pulses[q] = qd_sequence[0][1] if params.pulse_length is not None: - qd_pulses[qubit].duration = params.pulse_length + qd_pulses[q].duration = params.pulse_length + durations[q] = qd_pulses[q].duration - durations[qubit] = qd_pulses[qubit].duration - ro_pulses[qubit] = platform.create_qubit_readout_pulse( - qubit, start=qd_pulses[qubit].finish - ) - sequence.add(qd_pulses[qubit]) - sequence.add(ro_pulses[qubit]) + ro_pulses[q] = ro_sequence[0][1] + + qubit = platform.qubits[q] + sequence.append((qubit.drive, qd_pulses[q])) + sequence.append((qubit.acquisition, Delay(duration=durations[q]))) + sequence.extend(ro_sequence) return sequence, qd_pulses, ro_pulses, durations def sequence_length( - targets: list[QubitId], params: Parameters, platform: Platform + targets: list[QubitId], + params: Parameters, + platform: Platform, + use_align: bool = False, ) -> tuple[PulseSequence, dict, dict, dict]: """Return sequence for rabi length.""" sequence = PulseSequence() qd_pulses = {} + delays = {} ro_pulses = {} amplitudes = {} - for qubit in targets: - qd_pulses[qubit] = platform.create_qubit_drive_pulse( - qubit, start=0, duration=params.pulse_duration_start - ) - if params.pulse_amplitude is not None: - qd_pulses[qubit].amplitude = params.pulse_amplitude - amplitudes[qubit] = qd_pulses[qubit].amplitude + for q in targets: + natives = platform.natives.single_qubit[q] + qd_sequence = natives.RX() + ro_sequence = natives.MZ() - ro_pulses[qubit] = platform.create_qubit_readout_pulse( - qubit, start=qd_pulses[qubit].finish - ) - sequence.add(qd_pulses[qubit]) - sequence.add(ro_pulses[qubit]) - return sequence, qd_pulses, ro_pulses, amplitudes + qd_pulses[q] = qd_sequence[0][1] + if params.pulse_amplitude is not None: + qd_pulses[q].amplitude = params.pulse_amplitude + amplitudes[q] = qd_pulses[q].amplitude + + ro_pulses[q] = ro_sequence[0][1] + qubit = platform.qubits[q] + sequence.append((qubit.drive, qd_pulses[q])) + if use_align: + sequence.align([qubit.drive, qubit.acquisition]) + else: + delays[q] = Delay(duration=16) + sequence.append((qubit.acquisition, delays[q])) + sequence.extend(ro_sequence) + + return sequence, qd_pulses, delays, ro_pulses, amplitudes def fit_length_function( diff --git a/src/qibocal/protocols/ramsey/ramsey.py b/src/qibocal/protocols/ramsey/ramsey.py index c74d42b56..2708f7857 100644 --- a/src/qibocal/protocols/ramsey/ramsey.py +++ b/src/qibocal/protocols/ramsey/ramsey.py @@ -4,13 +4,16 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitId, Routine from qibocal.config import log from ..utils import chi2_reduced, table_dict, table_html diff --git a/src/qibocal/protocols/ramsey/ramsey_signal.py b/src/qibocal/protocols/ramsey/ramsey_signal.py index 07bb695c4..64e0ddf0f 100644 --- a/src/qibocal/protocols/ramsey/ramsey_signal.py +++ b/src/qibocal/protocols/ramsey/ramsey_signal.py @@ -4,14 +4,17 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.config import log from ..utils import table_dict, table_html diff --git a/src/qibocal/protocols/ramsey/utils.py b/src/qibocal/protocols/ramsey/utils.py index f7a4a8cb7..acb98f012 100644 --- a/src/qibocal/protocols/ramsey/utils.py +++ b/src/qibocal/protocols/ramsey/utils.py @@ -1,11 +1,10 @@ from typing import Optional import numpy as np -from qibolab import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import Platform, PulseSequence from scipy.optimize import curve_fit +from qibocal.auto.operation import QubitId from qibocal.protocols.utils import GHZ_TO_HZ, fallback_period, guess_period POPT_EXCEPTION = [0, 0, 0, 0, 1] diff --git a/src/qibocal/protocols/randomized_benchmarking/filtered_rb.py b/src/qibocal/protocols/randomized_benchmarking/filtered_rb.py index 6c949bb73..80b5a3bb3 100644 --- a/src/qibocal/protocols/randomized_benchmarking/filtered_rb.py +++ b/src/qibocal/protocols/randomized_benchmarking/filtered_rb.py @@ -2,10 +2,9 @@ import numpy as np import plotly.graph_objects as go -from qibolab.platform import Platform -from qibolab.qubits import QubitId +from qibolab import Platform -from qibocal.auto.operation import Results, Routine +from qibocal.auto.operation import QubitId, Results, Routine from qibocal.protocols.randomized_benchmarking.utils import rb_acquisition from qibocal.protocols.utils import table_dict, table_html diff --git a/src/qibocal/protocols/randomized_benchmarking/standard_rb.py b/src/qibocal/protocols/randomized_benchmarking/standard_rb.py index 0788afabf..ea6fb0c89 100644 --- a/src/qibocal/protocols/randomized_benchmarking/standard_rb.py +++ b/src/qibocal/protocols/randomized_benchmarking/standard_rb.py @@ -3,10 +3,9 @@ import numpy as np import plotly.graph_objects as go -from qibolab.platform import Platform -from qibolab.qubits import QubitId +from qibolab import Platform -from qibocal.auto.operation import Parameters, Routine +from qibocal.auto.operation import Parameters, QubitId, Routine from ..utils import table_dict, table_html from .fitting import exp1B_func diff --git a/src/qibocal/protocols/randomized_benchmarking/standard_rb_2q.py b/src/qibocal/protocols/randomized_benchmarking/standard_rb_2q.py index 79cb260b9..30df76ba1 100644 --- a/src/qibocal/protocols/randomized_benchmarking/standard_rb_2q.py +++ b/src/qibocal/protocols/randomized_benchmarking/standard_rb_2q.py @@ -1,9 +1,8 @@ from dataclasses import dataclass -from qibolab.platform import Platform -from qibolab.qubits import QubitPairId +from qibolab import Platform -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitPairId, Routine from qibocal.protocols.randomized_benchmarking.standard_rb import ( StandardRBParameters, _plot, diff --git a/src/qibocal/protocols/randomized_benchmarking/standard_rb_2q_inter.py b/src/qibocal/protocols/randomized_benchmarking/standard_rb_2q_inter.py index c6a657e05..bc55ecd81 100644 --- a/src/qibocal/protocols/randomized_benchmarking/standard_rb_2q_inter.py +++ b/src/qibocal/protocols/randomized_benchmarking/standard_rb_2q_inter.py @@ -1,10 +1,9 @@ from dataclasses import dataclass, fields import numpy as np -from qibolab.platform import Platform -from qibolab.qubits import QubitPairId +from qibolab import Platform -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitPairId, Routine from qibocal.protocols.randomized_benchmarking.standard_rb import _plot from qibocal.protocols.randomized_benchmarking.standard_rb_2q import ( StandardRB2QParameters, diff --git a/src/qibocal/protocols/randomized_benchmarking/utils.py b/src/qibocal/protocols/randomized_benchmarking/utils.py index e9f41ced3..e6b67af75 100644 --- a/src/qibocal/protocols/randomized_benchmarking/utils.py +++ b/src/qibocal/protocols/randomized_benchmarking/utils.py @@ -10,10 +10,9 @@ from qibo.backends import GlobalBackend from qibo.config import raise_error from qibo.models import Circuit -from qibolab.platform import Platform -from qibolab.qubits import QubitId, QubitPairId +from qibolab import Platform -from qibocal.auto.operation import Data, Parameters, Results +from qibocal.auto.operation import Data, Parameters, QubitId, QubitPairId, Results from qibocal.auto.transpile import ( dummy_transpiler, execute_transpiled_circuit, diff --git a/src/qibocal/protocols/readout_characterization.py b/src/qibocal/protocols/readout_characterization.py index 04b5928eb..223e5393c 100644 --- a/src/qibocal/protocols/readout_characterization.py +++ b/src/qibocal/protocols/readout_characterization.py @@ -4,13 +4,10 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, Platform, PulseSequence from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.protocols.utils import ( effective_qubit_temperature, format_error_single_cell, diff --git a/src/qibocal/protocols/readout_mitigation_matrix.py b/src/qibocal/protocols/readout_mitigation_matrix.py index 61397e4f5..29d002f62 100644 --- a/src/qibocal/protocols/readout_mitigation_matrix.py +++ b/src/qibocal/protocols/readout_mitigation_matrix.py @@ -7,12 +7,9 @@ from qibo import gates from qibo.backends import GlobalBackend from qibo.models import Circuit -from qibolab import ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import Platform, PulseSequence -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.auto.transpile import dummy_transpiler, execute_transpiled_circuit from qibocal.config import log diff --git a/src/qibocal/protocols/readout_optimization/resonator_amplitude.py b/src/qibocal/protocols/readout_optimization/resonator_amplitude.py index 6826d2757..6abd43ac7 100644 --- a/src/qibocal/protocols/readout_optimization/resonator_amplitude.py +++ b/src/qibocal/protocols/readout_optimization/resonator_amplitude.py @@ -5,13 +5,10 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, Platform, PulseSequence from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.fitting.classifier.qubit_fit import QubitFit from qibocal.protocols.utils import table_dict, table_html diff --git a/src/qibocal/protocols/readout_optimization/resonator_frequency.py b/src/qibocal/protocols/readout_optimization/resonator_frequency.py index b31daf1d1..9bac21344 100644 --- a/src/qibocal/protocols/readout_optimization/resonator_frequency.py +++ b/src/qibocal/protocols/readout_optimization/resonator_frequency.py @@ -4,14 +4,10 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, Parameter, Platform, PulseSequence, Sweeper from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.fitting.classifier.qubit_fit import QubitFit from qibocal.protocols.utils import table_dict, table_html diff --git a/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency.py b/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency.py index f35c5e1e3..d097c35a9 100644 --- a/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency.py +++ b/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency.py @@ -3,11 +3,10 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab.platform import Platform -from qibolab.qubits import QubitId +from qibolab import Platform from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.protocols import classification from qibocal.protocols.readout_optimization.resonator_frequency import ( ResonatorFrequencyType, diff --git a/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency_SNR.py b/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency_SNR.py index 7b1e1e32b..ca6c55b19 100644 --- a/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency_SNR.py +++ b/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency_SNR.py @@ -5,10 +5,9 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab.platform import Platform -from qibolab.qubits import QubitId +from qibolab import Platform -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.protocols.resonator_spectroscopy import resonator_spectroscopy from qibocal.protocols.utils import HZ_TO_GHZ, PowerLevel, table_dict, table_html diff --git a/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency_power.py b/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency_power.py index 86f21a4e0..d69661d08 100644 --- a/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency_power.py +++ b/src/qibocal/protocols/readout_optimization/twpa_calibration/frequency_power.py @@ -3,11 +3,10 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab.platform import Platform -from qibolab.qubits import QubitId +from qibolab import Platform from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.protocols import classification from qibocal.protocols.utils import HZ_TO_GHZ, table_dict, table_html diff --git a/src/qibocal/protocols/readout_optimization/twpa_calibration/power.py b/src/qibocal/protocols/readout_optimization/twpa_calibration/power.py index 76f0b3c87..58a6e3326 100644 --- a/src/qibocal/protocols/readout_optimization/twpa_calibration/power.py +++ b/src/qibocal/protocols/readout_optimization/twpa_calibration/power.py @@ -2,11 +2,10 @@ import numpy as np import plotly.graph_objects as go -from qibolab.platform import Platform -from qibolab.qubits import QubitId +from qibolab import Platform from qibocal import update -from qibocal.auto.operation import Parameters, Results, Routine +from qibocal.auto.operation import Parameters, QubitId, Results, Routine from qibocal.protocols import classification from qibocal.protocols.utils import table_dict, table_html diff --git a/src/qibocal/protocols/readout_optimization/twpa_calibration/power_SNR.py b/src/qibocal/protocols/readout_optimization/twpa_calibration/power_SNR.py index 93b22e0e5..aa2b4f4e3 100644 --- a/src/qibocal/protocols/readout_optimization/twpa_calibration/power_SNR.py +++ b/src/qibocal/protocols/readout_optimization/twpa_calibration/power_SNR.py @@ -5,10 +5,9 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab.platform import Platform -from qibolab.qubits import QubitId +from qibolab import Platform -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.protocols.resonator_spectroscopy import resonator_spectroscopy from qibocal.protocols.utils import HZ_TO_GHZ, PowerLevel, table_dict, table_html diff --git a/src/qibocal/protocols/resonator_punchout.py b/src/qibocal/protocols/resonator_punchout.py index 58ad1dbf6..e7b5c7090 100644 --- a/src/qibocal/protocols/resonator_punchout.py +++ b/src/qibocal/protocols/resonator_punchout.py @@ -5,14 +5,17 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from .utils import HZ_TO_GHZ, fit_punchout, norm, table_dict, table_html diff --git a/src/qibocal/protocols/resonator_punchout_attenuation.py b/src/qibocal/protocols/resonator_punchout_attenuation.py index 0ff28b693..7a070b4b3 100644 --- a/src/qibocal/protocols/resonator_punchout_attenuation.py +++ b/src/qibocal/protocols/resonator_punchout_attenuation.py @@ -5,14 +5,17 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from .utils import HZ_TO_GHZ, fit_punchout, norm, table_dict, table_html diff --git a/src/qibocal/protocols/resonator_spectroscopy.py b/src/qibocal/protocols/resonator_spectroscopy.py index d66815481..bdf75bcce 100644 --- a/src/qibocal/protocols/resonator_spectroscopy.py +++ b/src/qibocal/protocols/resonator_spectroscopy.py @@ -5,13 +5,18 @@ import numpy as np import numpy.typing as npt from _collections_abc import Callable -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + PulseSequence, + Sweeper, +) from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine +from qibocal.result import magnitude, phase from .utils import ( PowerLevel, @@ -184,35 +189,42 @@ def _acquisition( amplitudes = {} attenuations = {} - for qubit in targets: - ro_pulses[qubit] = platform.create_qubit_readout_pulse(qubit, start=0) + for q in targets: + natives = platform.natives.single_qubit[q] + ro_sequence = natives.MZ.create_sequence() + ro_pulses[q] = ro_sequence[0][1] if params.amplitude is not None: - ro_pulses[qubit].amplitude = params.amplitude + ro_pulses[q].amplitude = params.amplitude - amplitudes[qubit] = ro_pulses[qubit].amplitude + amplitudes[q] = ro_pulses[q].probe.amplitude if params.attenuation is not None: - platform.qubits[qubit].readout.attenuation = params.attenuation + raise NotImplementedError + platform.qubits[q].readout.attenuation = params.attenuation try: - attenuation = platform.qubits[qubit].readout.attenuation + attenuation = platform.config(platform.qubits[q].probe).attenuation except AttributeError: attenuation = None - attenuations[qubit] = attenuation - sequence.add(ro_pulses[qubit]) + attenuations[q] = attenuation + sequence.concatenate(ro_sequence) # define the parameter to sweep and its range: delta_frequency_range = np.arange( -params.freq_width / 2, params.freq_width / 2, params.freq_step ) - sweeper = Sweeper( - Parameter.frequency, - delta_frequency_range, - pulses=[ro_pulses[qubit] for qubit in targets], - type=SweeperType.OFFSET, - ) + sweepers = [ + Sweeper( + parameter=Parameter.frequency, + values=platform.config(platform.qubits[q].probe).frequency + + delta_frequency_range, + channels=[platform.qubits[q].probe], + ) + for q in targets + ] + data = ResonatorSpectroscopyData( resonator_type=platform.resonator_type, power_level=params.power_level, @@ -222,25 +234,31 @@ def _acquisition( phase_sign=params.phase_sign, ) - results = platform.sweep( - sequence, - params.execution_parameters, - sweeper, + results = platform.execute( + [sequence], + [sweepers], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.INTEGRATION, + averaging_mode=AveragingMode.SINGLESHOT, ) # retrieve the results for every qubit - for qubit in targets: - result = results[ro_pulses[qubit].serial] + for q in targets: + result = results[ro_pulses[q].id] # store the results + ro_frequency = platform.config(platform.qubits[q].probe).frequency + signal = magnitude(result) + phase_ = phase(result) data.register_qubit( ResSpecType, - (qubit), + (q), dict( - signal=result.average.magnitude, - phase=result.average.phase, - freq=delta_frequency_range + ro_pulses[qubit].frequency, - error_signal=result.average.std, - error_phase=result.phase_std, + signal=signal.mean(axis=0), + phase=phase_.mean(axis=0), + freq=delta_frequency_range + ro_frequency, + error_signal=np.std(signal, axis=0, ddof=1) / np.sqrt(signal.shape[0]), + error_phase=np.std(phase_, axis=0, ddof=1) / np.sqrt(phase_.shape[0]), ), ) return data diff --git a/src/qibocal/protocols/signal_experiments/calibrate_state_discrimination.py b/src/qibocal/protocols/signal_experiments/calibrate_state_discrimination.py index 89c02242d..9e7966a73 100644 --- a/src/qibocal/protocols/signal_experiments/calibrate_state_discrimination.py +++ b/src/qibocal/protocols/signal_experiments/calibrate_state_discrimination.py @@ -5,13 +5,10 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine SAMPLES_FACTOR = 16 diff --git a/src/qibocal/protocols/signal_experiments/time_of_flight_readout.py b/src/qibocal/protocols/signal_experiments/time_of_flight_readout.py index 94356618a..1b35cf34a 100644 --- a/src/qibocal/protocols/signal_experiments/time_of_flight_readout.py +++ b/src/qibocal/protocols/signal_experiments/time_of_flight_readout.py @@ -4,12 +4,9 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitId +from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.protocols.utils import S_TO_NS, table_dict, table_html diff --git a/src/qibocal/protocols/state_tomography.py b/src/qibocal/protocols/state_tomography.py index 70fbcb74e..833425a19 100644 --- a/src/qibocal/protocols/state_tomography.py +++ b/src/qibocal/protocols/state_tomography.py @@ -10,10 +10,9 @@ from qibo import Circuit, gates from qibo.backends import GlobalBackend, NumpyBackend, matrices from qibo.quantum_info import fidelity -from qibolab.platform import Platform -from qibolab.qubits import QubitId +from qibolab import Platform -from qibocal.auto.operation import DATAFILE, Data, Parameters, Results, Routine +from qibocal.auto.operation import DATAFILE, Data, Parameters, QubitId, Results, Routine from qibocal.auto.transpile import dummy_transpiler, execute_transpiled_circuit from .utils import table_dict, table_html diff --git a/src/qibocal/protocols/two_qubit_interaction/chevron/chevron.py b/src/qibocal/protocols/two_qubit_interaction/chevron/chevron.py index c65ce9aeb..67cbff669 100644 --- a/src/qibocal/protocols/two_qubit_interaction/chevron/chevron.py +++ b/src/qibocal/protocols/two_qubit_interaction/chevron/chevron.py @@ -7,14 +7,11 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitPairId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from scipy.optimize import curve_fit from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitPairId, Results, Routine from qibocal.config import log from qibocal.protocols.utils import table_dict, table_html diff --git a/src/qibocal/protocols/two_qubit_interaction/chevron/chevron_signal.py b/src/qibocal/protocols/two_qubit_interaction/chevron/chevron_signal.py index ccd21bdc1..11b5baa6e 100644 --- a/src/qibocal/protocols/two_qubit_interaction/chevron/chevron_signal.py +++ b/src/qibocal/protocols/two_qubit_interaction/chevron/chevron_signal.py @@ -4,12 +4,9 @@ import numpy as np import numpy.typing as npt -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitPairId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitPairId, Routine from ..utils import order_pair from .chevron import ( diff --git a/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py b/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py index 40ea08213..894d00780 100644 --- a/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py +++ b/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py @@ -1,7 +1,7 @@ import numpy as np -from qibolab.platform import Platform -from qibolab.pulses import PulseSequence -from qibolab.qubits import QubitPairId +from qibolab import Platform, PulseSequence + +from qibocal.auto.operation import QubitPairId from ..utils import order_pair diff --git a/src/qibocal/protocols/two_qubit_interaction/chsh/protocol.py b/src/qibocal/protocols/two_qubit_interaction/chsh/protocol.py index 6adc6f147..10a57b763 100644 --- a/src/qibocal/protocols/two_qubit_interaction/chsh/protocol.py +++ b/src/qibocal/protocols/two_qubit_interaction/chsh/protocol.py @@ -9,11 +9,16 @@ import numpy.typing as npt import plotly.graph_objects as go from qibo.backends import GlobalBackend -from qibolab import ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitId, QubitPairId - -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibolab import Platform + +from qibocal.auto.operation import ( + Data, + Parameters, + QubitId, + QubitPairId, + Results, + Routine, +) from qibocal.auto.transpile import dummy_transpiler, execute_transpiled_circuit from qibocal.config import log diff --git a/src/qibocal/protocols/two_qubit_interaction/chsh/pulses.py b/src/qibocal/protocols/two_qubit_interaction/chsh/pulses.py index 3602d88bd..5c0b693e2 100644 --- a/src/qibocal/protocols/two_qubit_interaction/chsh/pulses.py +++ b/src/qibocal/protocols/two_qubit_interaction/chsh/pulses.py @@ -3,7 +3,7 @@ from collections import defaultdict import numpy as np -from qibolab.pulses import PulseSequence +from qibolab import PulseSequence from .utils import READOUT_BASIS diff --git a/src/qibocal/protocols/two_qubit_interaction/optimize.py b/src/qibocal/protocols/two_qubit_interaction/optimize.py index 020eecb66..ac7167f80 100644 --- a/src/qibocal/protocols/two_qubit_interaction/optimize.py +++ b/src/qibocal/protocols/two_qubit_interaction/optimize.py @@ -7,14 +7,18 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitId, QubitPairId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from scipy.optimize import curve_fit from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import ( + Data, + Parameters, + QubitId, + QubitPairId, + Results, + Routine, +) from qibocal.config import log from qibocal.protocols.utils import table_dict, table_html diff --git a/src/qibocal/protocols/two_qubit_interaction/utils.py b/src/qibocal/protocols/two_qubit_interaction/utils.py index 06c912a30..cad8b0d6e 100644 --- a/src/qibocal/protocols/two_qubit_interaction/utils.py +++ b/src/qibocal/protocols/two_qubit_interaction/utils.py @@ -1,6 +1,7 @@ import numpy as np -from qibolab.platform import Platform -from qibolab.qubits import QubitId, QubitPairId +from qibolab import Platform + +from qibocal.auto.operation import QubitId, QubitPairId from ..utils import fallback_period, guess_period diff --git a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py index e526198cd..2328124c7 100644 --- a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py +++ b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py @@ -7,15 +7,26 @@ import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.pulses import Pulse, PulseSequence -from qibolab.qubits import QubitId, QubitPairId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import ( + AcquisitionType, + AveragingMode, + Parameter, + Platform, + Pulse, + PulseSequence, + Sweeper, +) from scipy.optimize import curve_fit from qibocal import update -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import ( + Data, + Parameters, + QubitId, + QubitPairId, + Results, + Routine, +) from qibocal.config import log from qibocal.protocols.utils import table_dict, table_html diff --git a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py index 2b3f4419e..b2a610d50 100644 --- a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py +++ b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py @@ -3,12 +3,9 @@ from dataclasses import dataclass import numpy as np -from qibolab import AcquisitionType, AveragingMode, ExecutionParameters -from qibolab.platform import Platform -from qibolab.qubits import QubitPairId -from qibolab.sweeper import Parameter, Sweeper, SweeperType +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper -from qibocal.auto.operation import Routine +from qibocal.auto.operation import QubitPairId, Routine from .utils import order_pair from .virtual_z_phases import ( diff --git a/src/qibocal/protocols/two_qubit_state_tomography.py b/src/qibocal/protocols/two_qubit_state_tomography.py index 0d3ecabc4..89f026cff 100644 --- a/src/qibocal/protocols/two_qubit_state_tomography.py +++ b/src/qibocal/protocols/two_qubit_state_tomography.py @@ -12,10 +12,16 @@ from qibo.backends import GlobalBackend, NumpyBackend from qibo.quantum_info import fidelity from qibo.result import QuantumState -from qibolab.platform import Platform -from qibolab.qubits import QubitId, QubitPairId - -from qibocal.auto.operation import DATAFILE, Data, Results, Routine +from qibolab import Platform + +from qibocal.auto.operation import ( + DATAFILE, + Data, + QubitId, + QubitPairId, + Results, + Routine, +) from qibocal.auto.transpile import dummy_transpiler, execute_transpiled_circuit from .state_tomography import StateTomographyParameters, plot_reconstruction diff --git a/src/qibocal/protocols/utils.py b/src/qibocal/protocols/utils.py index a8513ef92..94fdaeb05 100644 --- a/src/qibocal/protocols/utils.py +++ b/src/qibocal/protocols/utils.py @@ -7,12 +7,11 @@ import plotly.graph_objects as go from numpy.typing import NDArray from plotly.subplots import make_subplots -from qibolab.qubits import QubitId from scipy import constants from scipy.optimize import curve_fit from scipy.signal import find_peaks -from qibocal.auto.operation import Data, Results +from qibocal.auto.operation import Data, QubitId, Results from qibocal.config import log from qibocal.fitting.classifier import run from qibocal.protocols.resonator_utils import ( diff --git a/src/qibocal/result.py b/src/qibocal/result.py new file mode 100644 index 000000000..675b8091e --- /dev/null +++ b/src/qibocal/result.py @@ -0,0 +1,88 @@ +"""Common result operations.""" + +import numpy as np +import numpy.typing as npt + +IQ = npt.NDArray[np.float64] +"""An array of I and Q values. + +It is assumed that the I and Q component are discriminated by the +innermost dimension of the array. +""" + + +def _lift(values: IQ) -> npt.NDArray: + """Transpose the innermost dimension to the outermost.""" + return np.moveaxis(values, -1, 0) + + +def _sink(values: npt.NDArray) -> IQ: + """Transpose the outermost dimension to the innermost. + + Inverse of :func:`_lift`. + """ + return np.moveaxis(values, 0, -1) + + +def collect(i: npt.NDArray, q: npt.NDArray) -> IQ: + """Collect I and Q components in a single array.""" + return _sink(np.stack([i, q])) + + +def unpack(iq: IQ) -> tuple[npt.NDArray, npt.NDArray]: + """Unpack I and Q components from single array. + + Inverse of :func:`collect`. + """ + i, q = tuple(_lift(iq)) + return i, q + + +def magnitude(iq: IQ): + """Signal magnitude. + + It is supposed to be a tension, possibly in arbitrary units. + """ + iq_ = _lift(iq) + return np.sqrt(iq_[0] ** 2 + iq_[1] ** 2) + + +def average(values: npt.NDArray) -> tuple[npt.NDArray, npt.NDArray]: + """Perform the values average. + + It returns both the average estimator itself, and its standard + deviation estimator. + + Use this also for I and Q values in the *standard layout*, cf. :class:`IQ`. + """ + mean = np.mean(values, axis=0) + std = np.std(values, axis=0, ddof=1) / np.sqrt(values.shape[0]) + return mean, std + + +def average_iq(i: npt.NDArray, q: npt.NDArray) -> tuple[npt.NDArray, npt.NDArray]: + """Perform the average over I and Q. + + Convenience wrapper over :func:`average` for separate i and q samples arrays. + """ + return average(collect(i, q)) + + +def phase(iq: npt.NDArray): + """Signal phase in radians. + + It is assumed that the I and Q component are discriminated by the + innermost dimension of the array. + """ + iq_ = _lift(iq) + return np.unwrap(np.arctan2(iq_[0], iq_[1])) + + +def probability(values: npt.NDArray, state: int = 0): + """Return the statistical frequency of the specified state. + + The only accepted values `state` are `0` and `1`. + """ + # The absolute value is only needed to make sure the result is always positive, even + # when extremely close to zero + return abs(1 - state - np.mean(values, axis=0)) diff --git a/src/qibocal/update.py b/src/qibocal/update.py index 376cad2c3..e523b509e 100644 --- a/src/qibocal/update.py +++ b/src/qibocal/update.py @@ -4,10 +4,9 @@ from typing import Union import numpy as np -from qibolab import pulses -from qibolab.native import VirtualZPulse -from qibolab.platform import Platform -from qibolab.qubits import QubitId, QubitPairId +from qibolab import Platform + +from qibocal.auto.operation import QubitId, QubitPairId CLASSIFICATION_PARAMS = [ "threshold", @@ -20,45 +19,45 @@ def readout_frequency(freq: float, platform: Platform, qubit: QubitId): """Update readout frequency value in platform for specific qubit.""" - mz = platform.qubits[qubit].native_gates.MZ - freq_hz = int(freq) - mz.frequency = freq_hz - if mz.if_frequency is not None: - mz.if_frequency = freq_hz - platform.qubits[qubit].readout.lo_frequency - platform.qubits[qubit].readout_frequency = freq_hz + # mz = platform.qubits[qubit].native_gates.MZ + # freq_hz = int(freq) + # mz.frequency = freq_hz + # if mz.if_frequency is not None: + # mz.if_frequency = freq_hz - platform.qubits[qubit].readout.lo_frequency + # platform.qubits[qubit].readout_frequency = freq_hz def bare_resonator_frequency(freq: float, platform: Platform, qubit: QubitId): """Update rbare frequency value in platform for specific qubit.""" - platform.qubits[qubit].bare_resonator_frequency = int(freq) + # platform.qubits[qubit].bare_resonator_frequency = int(freq) def readout_amplitude(amp: float, platform: Platform, qubit: QubitId): """Update readout amplitude value in platform for specific qubit.""" - platform.qubits[qubit].native_gates.MZ.amplitude = float(amp) + # platform.natives.single_qubit[qubit].MZ.amplitude = float(amp) def readout_attenuation(att: int, platform: Platform, qubit: QubitId): """Update readout attenuation value in platform for specific qubit.""" - platform.qubits[qubit].readout.attenuation = int(att) + # platform.qubits[qubit].readout.attenuation = int(att) def drive_frequency( freq: Union[float, tuple, list], platform: Platform, qubit: QubitId ): """Update drive frequency value in platform for specific qubit.""" - if isinstance(freq, Iterable): - freq = freq[0] - freq = int(freq) - platform.qubits[qubit].native_gates.RX.frequency = int(freq) - platform.qubits[qubit].drive_frequency = int(freq) + # if isinstance(freq, Iterable): + # freq = freq[0] + # freq = int(freq) + # platform.qubits[qubit].native_gates.RX.frequency = int(freq) + # platform.qubits[qubit].drive_frequency = int(freq) def drive_amplitude(amp: Union[float, tuple, list], platform: Platform, qubit: QubitId): """Update drive frequency value in platform for specific qubit.""" if isinstance(amp, Iterable): amp = amp[0] - platform.qubits[qubit].native_gates.RX.amplitude = float(amp) + # platform.natives.single_qubit[qubit].RX.amplitude = float(amp) def drive_duration( @@ -67,7 +66,7 @@ def drive_duration( """Update drive duration value in platform for specific qubit.""" if isinstance(duration, Iterable): duration = duration[0] - platform.qubits[qubit].native_gates.RX.duration = int(duration) + # platform.natives.single_qubit[qubit].RX.duration = int(duration) def crosstalk_matrix( @@ -79,31 +78,33 @@ def crosstalk_matrix( def iq_angle(angle: float, platform: Platform, qubit: QubitId): """Update iq angle value in platform for specific qubit.""" - platform.qubits[qubit].iq_angle = float(angle) + # platform.qubits[qubit].iq_angle = float(angle) + pass def threshold(threshold: float, platform: Platform, qubit: QubitId): - platform.qubits[qubit].threshold = float(threshold) + # platform.qubits[qubit].threshold = float(threshold) + pass def mean_gnd_states(gnd_state: list, platform: Platform, qubit: QubitId): """Update mean ground state value in platform for specific qubit.""" - platform.qubits[qubit].mean_gnd_states = gnd_state + # platform.qubits[qubit].mean_gnd_states = gnd_state def mean_exc_states(exc_state: list, platform: Platform, qubit: QubitId): """Update mean excited state value in platform for specific qubit.""" - platform.qubits[qubit].mean_exc_states = exc_state + # platform.qubits[qubit].mean_exc_states = exc_state def readout_fidelity(fidelity: float, platform: Platform, qubit: QubitId): """Update fidelity of single shot classification.""" - platform.qubits[qubit].readout_fidelity = float(fidelity) + # platform.qubits[qubit].readout_fidelity = float(fidelity) def assignment_fidelity(fidelity: float, platform: Platform, qubit: QubitId): """Update fidelity of single shot classification.""" - platform.qubits[qubit].assignment_fidelity = float(fidelity) + # platform.qubits[qubit].assignment_fidelity = float(fidelity) def virtual_phases( diff --git a/src/qibocal/web/compared_report.py b/src/qibocal/web/compared_report.py index 562416c22..80af8be44 100644 --- a/src/qibocal/web/compared_report.py +++ b/src/qibocal/web/compared_report.py @@ -7,9 +7,9 @@ import pandas as pd import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab.qubits import QubitId, QubitPairId from qibocal.auto.history import History +from qibocal.auto.operation import QubitId, QubitPairId from qibocal.auto.output import Output from qibocal.auto.task import Completed, TaskId from qibocal.cli.report import generate_figures_and_report diff --git a/tests/test_executor.py b/tests/test_executor.py index c9f1bbeb6..75be8aa52 100644 --- a/tests/test_executor.py +++ b/tests/test_executor.py @@ -8,14 +8,13 @@ import pytest from qibolab import Platform, create_platform -from qibolab.qubits import QubitId import qibocal import qibocal.protocols from qibocal import Executor from qibocal.auto.history import History from qibocal.auto.mode import ExecutionMode -from qibocal.auto.operation import Data, Parameters, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.auto.runcard import Action from qibocal.protocols import flipping diff --git a/tests/test_update.py b/tests/test_update.py index b183cc232..ef8f6c7b9 100644 --- a/tests/test_update.py +++ b/tests/test_update.py @@ -5,9 +5,8 @@ import numpy as np import pytest -from qibolab import create_platform +from qibolab import Drag, create_platform from qibolab.native import VirtualZPulse -from qibolab.pulses import Drag from qibocal import update from qibocal.protocols.signal_experiments.calibrate_state_discrimination import ( From 0f3f2149bc40ecc07b4ac7021628582c69f5a85e Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri, 4 Oct 2024 00:46:17 +0400 Subject: [PATCH 02/22] fix: amplitude replace in resonator spectroscopy --- src/qibocal/protocols/resonator_spectroscopy.py | 12 +++++++----- src/qibocal/update.py | 6 ++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/qibocal/protocols/resonator_spectroscopy.py b/src/qibocal/protocols/resonator_spectroscopy.py index bdf75bcce..ba17021eb 100644 --- a/src/qibocal/protocols/resonator_spectroscopy.py +++ b/src/qibocal/protocols/resonator_spectroscopy.py @@ -17,6 +17,7 @@ from qibocal import update from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.result import magnitude, phase +from qibocal.update import replace from .utils import ( PowerLevel, @@ -191,13 +192,13 @@ def _acquisition( for q in targets: natives = platform.natives.single_qubit[q] - ro_sequence = natives.MZ.create_sequence() - ro_pulses[q] = ro_sequence[0][1] + channel, pulse = natives.MZ()[0] if params.amplitude is not None: - ro_pulses[q].amplitude = params.amplitude + probe = replace(pulse.probe, amplitude=params.amplitude) + pulse = replace(pulse, probe=probe) - amplitudes[q] = ro_pulses[q].probe.amplitude + amplitudes[q] = pulse.probe.amplitude if params.attenuation is not None: raise NotImplementedError @@ -209,7 +210,8 @@ def _acquisition( attenuation = None attenuations[q] = attenuation - sequence.concatenate(ro_sequence) + ro_pulses[q] = pulse + sequence |= [(channel, pulse)] # define the parameter to sweep and its range: delta_frequency_range = np.arange( diff --git a/src/qibocal/update.py b/src/qibocal/update.py index e523b509e..b623dcf47 100644 --- a/src/qibocal/update.py +++ b/src/qibocal/update.py @@ -4,6 +4,7 @@ from typing import Union import numpy as np +from pydantic import BaseModel from qibolab import Platform from qibocal.auto.operation import QubitId, QubitPairId @@ -17,6 +18,11 @@ ] +def replace(model: BaseModel, **update): + """Replace interface for pydantic models.""" + return model.model_copy(update=update) + + def readout_frequency(freq: float, platform: Platform, qubit: QubitId): """Update readout frequency value in platform for specific qubit.""" # mz = platform.qubits[qubit].native_gates.MZ From 3bfced9d03bc73f77cb2bd6a7476b00d67d594a9 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri, 4 Oct 2024 00:59:17 +0400 Subject: [PATCH 03/22] fix: duration and amplitude overwrite in Rabi --- src/qibocal/protocols/rabi/utils.py | 42 +++++++++---------- .../protocols/resonator_spectroscopy.py | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/qibocal/protocols/rabi/utils.py b/src/qibocal/protocols/rabi/utils.py index e7b3cc0d5..0f1e00ebe 100644 --- a/src/qibocal/protocols/rabi/utils.py +++ b/src/qibocal/protocols/rabi/utils.py @@ -5,6 +5,7 @@ from scipy.optimize import curve_fit from qibocal.auto.operation import Parameters, QubitId +from qibocal.update import replace from ..utils import COLORBAND, COLORBAND_LINE, table_dict, table_html @@ -231,20 +232,19 @@ def sequence_amplitude( durations = {} for q in targets: natives = platform.natives.single_qubit[q] - qd_sequence = natives.RX() - ro_sequence = natives.MZ() + qd_channel, qd_pulse = natives.RX()[0] + ro_channel, ro_pulse = natives.MZ()[0] - qd_pulses[q] = qd_sequence[0][1] if params.pulse_length is not None: - qd_pulses[q].duration = params.pulse_length - durations[q] = qd_pulses[q].duration + qd_pulse = replace(qd_pulse, duration=params.pulse_length) - ro_pulses[q] = ro_sequence[0][1] + durations[q] = qd_pulse.duration + qd_pulses[q] = qd_pulse + ro_pulses[q] = ro_pulse - qubit = platform.qubits[q] - sequence.append((qubit.drive, qd_pulses[q])) - sequence.append((qubit.acquisition, Delay(duration=durations[q]))) - sequence.extend(ro_sequence) + sequence.append((qd_channel, qd_pulses[q])) + sequence.append((ro_channel, Delay(duration=durations[q]))) + sequence.append((ro_channel, ro_pulse)) return sequence, qd_pulses, ro_pulses, durations @@ -262,23 +262,23 @@ def sequence_length( amplitudes = {} for q in targets: natives = platform.natives.single_qubit[q] - qd_sequence = natives.RX() - ro_sequence = natives.MZ() + qd_channel, qd_pulse = natives.RX()[0] + ro_channel, ro_pulse = natives.MZ()[0] - qd_pulses[q] = qd_sequence[0][1] if params.pulse_amplitude is not None: - qd_pulses[q].amplitude = params.pulse_amplitude - amplitudes[q] = qd_pulses[q].amplitude + qd_pulse = replace(qd_pulse, amplitude=params.pulse_amplitude) - ro_pulses[q] = ro_sequence[0][1] - qubit = platform.qubits[q] - sequence.append((qubit.drive, qd_pulses[q])) + amplitudes[q] = qd_pulse.amplitude + qd_pulses[q] = qd_pulse + ro_pulses[q] = ro_pulse + + sequence.append((qd_channel, qd_pulse)) if use_align: - sequence.align([qubit.drive, qubit.acquisition]) + sequence.align([qd_channel, ro_channel]) else: delays[q] = Delay(duration=16) - sequence.append((qubit.acquisition, delays[q])) - sequence.extend(ro_sequence) + sequence.append((ro_channel, delays[q])) + sequence.append((ro_channel, ro_pulse)) return sequence, qd_pulses, delays, ro_pulses, amplitudes diff --git a/src/qibocal/protocols/resonator_spectroscopy.py b/src/qibocal/protocols/resonator_spectroscopy.py index ba17021eb..f6459acc0 100644 --- a/src/qibocal/protocols/resonator_spectroscopy.py +++ b/src/qibocal/protocols/resonator_spectroscopy.py @@ -211,7 +211,7 @@ def _acquisition( attenuations[q] = attenuation ro_pulses[q] = pulse - sequence |= [(channel, pulse)] + sequence.append((channel, pulse)) # define the parameter to sweep and its range: delta_frequency_range = np.arange( From 6de53942ad896245bb11cb2e90dd7ea45d18ae05 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun, 6 Oct 2024 00:11:42 +0400 Subject: [PATCH 04/22] feat: update chevron routine --- .../two_qubit_interaction/chevron/chevron.py | 112 +++++++----------- .../two_qubit_interaction/chevron/utils.py | 50 ++------ .../protocols/two_qubit_interaction/utils.py | 12 +- 3 files changed, 64 insertions(+), 110 deletions(-) diff --git a/src/qibocal/protocols/two_qubit_interaction/chevron/chevron.py b/src/qibocal/protocols/two_qubit_interaction/chevron/chevron.py index 67cbff669..3dddbe0cd 100644 --- a/src/qibocal/protocols/two_qubit_interaction/chevron/chevron.py +++ b/src/qibocal/protocols/two_qubit_interaction/chevron/chevron.py @@ -1,16 +1,15 @@ """SWAP experiment for two qubit gates, chevron plot.""" from dataclasses import dataclass, field -from typing import Optional +from typing import Literal, Optional import numpy as np import numpy.typing as npt import plotly.graph_objects as go from plotly.subplots import make_subplots -from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Pulse, Sweeper from scipy.optimize import curve_fit -from qibocal import update from qibocal.auto.operation import Data, Parameters, QubitPairId, Results, Routine from qibocal.config import log from qibocal.protocols.utils import table_dict, table_html @@ -23,11 +22,11 @@ class ChevronParameters(Parameters): """CzFluxTime runcard inputs.""" - amplitude_min_factor: float + amplitude_min: float """Amplitude minimum.""" - amplitude_max_factor: float + amplitude_max: float """Amplitude maximum.""" - amplitude_step_factor: float + amplitude_step: float """Amplitude step.""" duration_min: float """Duration minimum.""" @@ -39,28 +38,8 @@ class ChevronParameters(Parameters): """Time delay between flux pulses and readout.""" parking: bool = True """Wether to park non interacting qubits or not.""" - native: str = "CZ" - """Two qubit interaction to be calibrated. - - iSWAP and CZ are the possible options. - - """ - - @property - def amplitude_range(self): - return np.arange( - self.amplitude_min_factor, - self.amplitude_max_factor, - self.amplitude_step_factor, - ) - - @property - def duration_range(self): - return np.arange( - self.duration_min, - self.duration_max, - self.duration_step, - ) + native: Literal["CZ", "iSWAP"] = "CZ" + """Two qubit interaction to be calibrated.""" @dataclass @@ -71,12 +50,8 @@ class ChevronResults(Results): """CZ angle.""" duration: dict[QubitPairId, int] """Virtual Z phase correction.""" - native: str = "CZ" - """Two qubit interaction to be calibrated. - - iSWAP and CZ are the possible options. - - """ + native: Literal["CZ", "iSWAP"] = "CZ" + """Two qubit interaction to be calibrated.""" ChevronType = np.dtype( @@ -163,41 +138,46 @@ def _aquisition( ) ordered_pair = order_pair(pair, platform) # TODO: move in function to avoid code duplications + flux_channel = platform.qubits[ordered_pair[1]].flux + flux_pulses = [ + pulse + for pulse in sequence.channel(flux_channel) + if isinstance(pulse, Pulse) + ] + ro_pulses_low = sequence.channel(platform.qubits[ordered_pair[0]].acquisition) + ro_pulses_high = sequence.channel(platform.qubits[ordered_pair[1]].acquisition) + delay_low, ro_low = list(ro_pulses_low) + delay_high, ro_high = list(ro_pulses_high) sweeper_amplitude = Sweeper( - Parameter.amplitude, - params.amplitude_range, - pulses=[sequence.get_qubit_pulses(ordered_pair[1]).qf_pulses[0]], - type=SweeperType.FACTOR, + parameter=Parameter.amplitude, + range=(params.amplitude_min, params.amplitude_max, params.amplitude_step), + pulses=flux_pulses, ) - data.native_amplitude[ordered_pair] = ( - sequence.get_qubit_pulses(ordered_pair[1]).qf_pulses[0].amplitude - ) - data.sweetspot[ordered_pair] = platform.qubits[ordered_pair[1]].sweetspot sweeper_duration = Sweeper( - Parameter.duration, - params.duration_range, - pulses=[sequence.get_qubit_pulses(ordered_pair[1]).qf_pulses[0]], - type=SweeperType.ABSOLUTE, + parameter=Parameter.duration, + range=(params.duration_min, params.duration_max, params.duration_step), + pulses=flux_pulses + [delay_low, delay_high], ) - results = platform.sweep( - sequence, - ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.DISCRIMINATION, - averaging_mode=AveragingMode.CYCLIC, - ), - sweeper_duration, - sweeper_amplitude, + data.native_amplitude[ordered_pair] = flux_pulses[0].amplitude + data.sweetspot[ordered_pair] = platform.config(flux_channel).offset + + results = platform.execute( + [sequence], + [[sweeper_duration], [sweeper_amplitude]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.DISCRIMINATION, + averaging_mode=AveragingMode.CYCLIC, ) + data.register_qubit( ordered_pair[0], ordered_pair[1], - params.duration_range, - params.amplitude_range * data.native_amplitude[ordered_pair], - results[ordered_pair[0]].probability(state=1), - results[ordered_pair[1]].probability(state=1), + sweeper_duration.values, + sweeper_amplitude.values, + results[ro_low.id], + results[ro_high.id], ) return data @@ -336,12 +316,12 @@ def _update(results: ChevronResults, platform: Platform, target: QubitPairId): if target not in results.duration: target = (target[1], target[0]) - getattr(update, f"{results.native}_duration")( - results.duration[target], platform, target - ) - getattr(update, f"{results.native}_amplitude")( - results.amplitude[target], platform, target - ) + # getattr(update, f"{results.native}_duration")( + # results.duration[target], platform, target + # ) + # getattr(update, f"{results.native}_amplitude")( + # results.amplitude[target], platform, target + # ) chevron = Routine(_aquisition, _fit, _plot, _update, two_qubit_gates=True) diff --git a/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py b/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py index 894d00780..89f4fcbfc 100644 --- a/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py +++ b/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py @@ -1,5 +1,5 @@ import numpy as np -from qibolab import Platform, PulseSequence +from qibolab import Platform, PulseSequence, VirtualZ from qibocal.auto.operation import QubitPairId @@ -26,36 +26,20 @@ def chevron_sequence( sequence = PulseSequence() ordered_pair = order_pair(pair, platform) # initialize in system in 11 state - + low_natives = platform.natives.single_qubit[ordered_pair[0]] + high_natives = platform.natives.single_qubit[ordered_pair[1]] if native == "CZ": - initialize_lowfreq = platform.create_RX_pulse( - ordered_pair[0], start=0, relative_phase=0 - ) - sequence.add(initialize_lowfreq) - - initialize_highfreq = platform.create_RX_pulse( - ordered_pair[1], start=0, relative_phase=0 - ) - sequence.add(initialize_highfreq) - - flux_sequence, _ = getattr(platform, f"create_{native}_pulse_sequence")( - qubits=(ordered_pair[1], ordered_pair[0]), - start=initialize_highfreq.finish, - ) + sequence += low_natives.RX() + sequence += high_natives.RX() - sequence.add(flux_sequence.get_qubit_pulses(ordered_pair[0])) - sequence.add(flux_sequence.get_qubit_pulses(ordered_pair[1])) - - delay_measurement = duration_max - - if platform.couplers: - coupler_pulse = flux_sequence.coupler_pulses( - platform.pairs[tuple(ordered_pair)].coupler.name - ) - sequence.add(coupler_pulse) - delay_measurement = max(duration_max, coupler_pulse.duration) + flux_sequence = getattr(platform.natives.two_qubit[ordered_pair], native)() + sequence |= [ + (ch, pulse) for ch, pulse in flux_sequence if not isinstance(pulse, VirtualZ) + ] + # TODO: Handle parking properly if parking: + raise NotImplementedError for pulse in flux_sequence: if pulse.qubit not in ordered_pair: pulse.start = COUPLER_PULSE_START @@ -63,17 +47,7 @@ def chevron_sequence( sequence.add(pulse) # add readout - measure_lowfreq = platform.create_qubit_readout_pulse( - ordered_pair[0], - start=initialize_highfreq.finish + delay_measurement + dt, - ) - measure_highfreq = platform.create_qubit_readout_pulse( - ordered_pair[1], - start=initialize_highfreq.finish + delay_measurement + dt, - ) - - sequence.add(measure_lowfreq) - sequence.add(measure_highfreq) + sequence |= low_natives.MZ() + high_natives.MZ() return sequence diff --git a/src/qibocal/protocols/two_qubit_interaction/utils.py b/src/qibocal/protocols/two_qubit_interaction/utils.py index cad8b0d6e..5dd51da8e 100644 --- a/src/qibocal/protocols/two_qubit_interaction/utils.py +++ b/src/qibocal/protocols/two_qubit_interaction/utils.py @@ -8,12 +8,12 @@ def order_pair(pair: QubitPairId, platform: Platform) -> tuple[QubitId, QubitId]: """Order a pair of qubits by drive frequency.""" - if ( - platform.qubits[pair[0]].drive_frequency - > platform.qubits[pair[1]].drive_frequency - ): - return pair[1], pair[0] - return pair[0], pair[1] + q0, q1 = pair + drive0 = platform.config(platform.qubits[q0].drive) + drive1 = platform.config(platform.qubits[q1].drive) + if drive0.frequency > drive1.frequency: + return q1, q0 + return q0, q1 def fit_flux_amplitude(matrix, amps, times): From 7f58f4188d71904a64b45f4eec17273ead15469b Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun, 6 Oct 2024 17:22:02 +0400 Subject: [PATCH 05/22] feat: update chevron signal and fix parking --- .../chevron/chevron_signal.py | 61 ++++++++++--------- .../two_qubit_interaction/chevron/utils.py | 21 +++---- 2 files changed, 43 insertions(+), 39 deletions(-) diff --git a/src/qibocal/protocols/two_qubit_interaction/chevron/chevron_signal.py b/src/qibocal/protocols/two_qubit_interaction/chevron/chevron_signal.py index 11b5baa6e..52ed8a751 100644 --- a/src/qibocal/protocols/two_qubit_interaction/chevron/chevron_signal.py +++ b/src/qibocal/protocols/two_qubit_interaction/chevron/chevron_signal.py @@ -4,9 +4,10 @@ import numpy as np import numpy.typing as npt -from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Pulse, Sweeper from qibocal.auto.operation import QubitPairId, Routine +from qibocal.result import magnitude from ..utils import order_pair from .chevron import ( @@ -100,41 +101,45 @@ def _aquisition( native=params.native, ) - data.native_amplitude[ordered_pair] = ( - sequence.get_qubit_pulses(ordered_pair[1]).qf_pulses[0].amplitude - ) - data.sweetspot[ordered_pair] = platform.qubits[ordered_pair[1]].sweetspot - + flux_channel = platform.qubits[ordered_pair[1]].flux + flux_pulses = [ + pulse + for pulse in sequence.channel(flux_channel) + if isinstance(pulse, Pulse) + ] + ro_pulses_low = sequence.channel(platform.qubits[ordered_pair[0]].acquisition) + ro_pulses_high = sequence.channel(platform.qubits[ordered_pair[1]].acquisition) + delay_low, ro_low = list(ro_pulses_low) + delay_high, ro_high = list(ro_pulses_high) sweeper_amplitude = Sweeper( - Parameter.amplitude, - params.amplitude_range, - pulses=[sequence.get_qubit_pulses(ordered_pair[1]).qf_pulses[0]], - type=SweeperType.FACTOR, + parameter=Parameter.amplitude, + range=(params.amplitude_min, params.amplitude_max, params.amplitude_step), + pulses=flux_pulses, ) sweeper_duration = Sweeper( - Parameter.duration, - params.duration_range, - pulses=[sequence.get_qubit_pulses(ordered_pair[1]).qf_pulses[0]], - type=SweeperType.ABSOLUTE, + parameter=Parameter.duration, + range=(params.duration_min, params.duration_max, params.duration_step), + pulses=flux_pulses + [delay_low, delay_high], ) - results = platform.sweep( - sequence, - ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.INTEGRATION, - averaging_mode=AveragingMode.CYCLIC, - ), - sweeper_duration, - sweeper_amplitude, + + data.native_amplitude[ordered_pair] = flux_pulses[0].amplitude + data.sweetspot[ordered_pair] = platform.config(flux_channel).offset + + results = platform.execute( + [sequence], + [[sweeper_duration], [sweeper_amplitude]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.INTEGRATION, + averaging_mode=AveragingMode.CYCLIC, ) data.register_qubit( ordered_pair[0], ordered_pair[1], - params.duration_range, - params.amplitude_range * data.native_amplitude[ordered_pair], - results[ordered_pair[0]].magnitude, - results[ordered_pair[1]].magnitude, + sweeper_duration.values, + sweeper_amplitude.values, + magnitude(results[ro_low.id]), + magnitude(results[ro_high.id]), ) return data diff --git a/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py b/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py index 89f4fcbfc..360c9b431 100644 --- a/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py +++ b/src/qibocal/protocols/two_qubit_interaction/chevron/utils.py @@ -33,18 +33,17 @@ def chevron_sequence( sequence += high_natives.RX() flux_sequence = getattr(platform.natives.two_qubit[ordered_pair], native)() - - sequence |= [ - (ch, pulse) for ch, pulse in flux_sequence if not isinstance(pulse, VirtualZ) - ] - # TODO: Handle parking properly if parking: - raise NotImplementedError - for pulse in flux_sequence: - if pulse.qubit not in ordered_pair: - pulse.start = COUPLER_PULSE_START - pulse.duration = COUPLER_PULSE_DURATION - sequence.add(pulse) + sequence |= [ + (ch, pulse) + for ch, pulse in flux_sequence + if not isinstance(pulse, VirtualZ) + ] + else: + target_channels = {platform.qubits[q].flux for q in ordered_pair} + sequence |= [ + (ch, pulse) for ch, pulse in flux_sequence if ch in target_channels + ] # add readout sequence |= low_natives.MZ() + high_natives.MZ() From b8028af363f4e08be84f45c6fa45a78e0c062ee8 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun, 6 Oct 2024 21:36:01 +0400 Subject: [PATCH 06/22] feat: update virtual_z_phases routine --- .../two_qubit_interaction/virtual_z_phases.py | 177 ++++++++---------- 1 file changed, 74 insertions(+), 103 deletions(-) diff --git a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py index 2328124c7..eec87cd57 100644 --- a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py +++ b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py @@ -1,7 +1,7 @@ """CZ virtual correction experiment for two qubit gates, tune landscape.""" from dataclasses import dataclass, field -from typing import Optional +from typing import Literal, Optional import numpy as np import numpy.typing as npt @@ -10,6 +10,7 @@ from qibolab import ( AcquisitionType, AveragingMode, + Delay, Parameter, Platform, Pulse, @@ -18,7 +19,6 @@ ) from scipy.optimize import curve_fit -from qibocal import update from qibocal.auto.operation import ( Data, Parameters, @@ -43,12 +43,8 @@ class VirtualZPhasesParameters(Parameters): """Final angle for the low frequency qubit measurement in radians.""" theta_step: float """Step size for the theta sweep in radians.""" - native: str = "CZ" - """Two qubit interaction to be calibrated. - - iSWAP and CZ are the possible options. - - """ + native: Literal["CZ", "iSWAP"] = "CZ" + """Two qubit interaction to be calibrated.""" flux_pulse_amplitude: Optional[float] = None """Amplitude of flux pulse implementing CZ.""" flux_pulse_duration: Optional[float] = None @@ -99,7 +95,6 @@ class VirtualZPhasesData(Data): data: dict[tuple, npt.NDArray[VirtualZPhasesType]] = field(default_factory=dict) native: str = "CZ" thetas: list = field(default_factory=list) - vphases: dict[QubitPairId, dict[QubitId, float]] = field(default_factory=dict) amplitudes: dict[tuple[QubitId, QubitId], float] = field(default_factory=dict) durations: dict[tuple[QubitId, QubitId], float] = field(default_factory=dict) @@ -113,11 +108,11 @@ def __getitem__(self, pair): def create_sequence( platform: Platform, - setup: str, + setup: Literal["I", "X"], target_qubit: QubitId, control_qubit: QubitId, ordered_pair: list[QubitId, QubitId], - native: str, + native: Literal["CZ", "iSWAP"], parking: bool, dt: float, amplitude: float = None, @@ -131,70 +126,51 @@ def create_sequence( ]: """Create the experiment PulseSequence.""" - sequence = PulseSequence() - - Y90_pulse = platform.create_RX90_pulse( - target_qubit, start=0, relative_phase=np.pi / 2 - ) - RX_pulse_start = platform.create_RX_pulse(control_qubit, start=0, relative_phase=0) - - flux_sequence, virtual_z_phase = getattr( - platform, f"create_{native}_pulse_sequence" - )( - (ordered_pair[1], ordered_pair[0]), - start=max(Y90_pulse.finish, RX_pulse_start.finish), - ) + target_natives = platform.natives.single_qubit[target_qubit] + control_natives = platform.natives.single_qubit[control_qubit] + sequence = PulseSequence() + # Y90 + sequence += target_natives.R(theta=np.pi / 2, phi=np.pi / 2) + # X + if setup == "X": + sequence += control_natives.RX() + + # CZ + flux_sequence = getattr(platform.natives.two_qubit[ordered_pair], native)() + flux_channel = platform.qubits[ordered_pair[1]].flux + flux_pulses = [ + (ch, pulse) for (ch, pulse) in flux_sequence if isinstance(pulse, Pulse) + ] + channel, flux_pulse = flux_pulses[0] if amplitude is not None: - flux_sequence.get_qubit_pulses(ordered_pair[1])[0].amplitude = amplitude - + flux_pulses[0] = (channel, replace(flux_pulse, amplitude=amplitude)) if duration is not None: - flux_sequence.get_qubit_pulses(ordered_pair[1])[0].duration = duration - - theta_pulse = platform.create_RX90_pulse( - target_qubit, - start=flux_sequence.finish + dt, - relative_phase=virtual_z_phase[target_qubit], - ) - RX_pulse_end = platform.create_RX_pulse( - control_qubit, - start=flux_sequence.finish + dt, - relative_phase=virtual_z_phase[control_qubit], - ) - measure_target = platform.create_qubit_readout_pulse( - target_qubit, start=theta_pulse.finish - ) - measure_control = platform.create_qubit_readout_pulse( - control_qubit, start=theta_pulse.finish - ) - - sequence.add( - Y90_pulse, - flux_sequence.get_qubit_pulses(ordered_pair[1]), - flux_sequence.cf_pulses, - theta_pulse, - measure_target, - measure_control, - ) - + flux_pulses[0] = (channel, replace(flux_pulse, duration=duration)) + sequence |= flux_pulses + + theta_sequence = PulseSequence() + if dt > 0: + theta_sequence += [ + (platform.qubits[target_qubit].drive, Delay(duration=dt)), + (platform.qubits[control_qubit].drive, Delay(duration=dt)), + ] + # R90 (angle to be swept) + theta_sequence += target_natives.R(theta=np.pi / 2, phi=0) + theta_pulse = theta_sequence[-1][1] + # X if setup == "X": - sequence.add( - RX_pulse_start, - RX_pulse_end, - ) + theta_sequence += control_natives.RX() + sequence |= theta_sequence - if parking: - for pulse in flux_sequence: - if pulse.qubit not in ordered_pair: - pulse.duration = theta_pulse.finish - sequence.add(pulse) + # M + sequence |= target_natives.MZ() + control_natives.MZ() return ( sequence, - virtual_z_phase, theta_pulse, - flux_sequence.get_qubit_pulses(ordered_pair[1])[0].amplitude, - flux_sequence.get_qubit_pulses(ordered_pair[1])[0].duration, + flux_pulses[0][1].amplitude, + flux_pulses[0][1].duration, ) @@ -224,56 +200,51 @@ def _acquisition( data = VirtualZPhasesData(thetas=theta_absolute.tolist(), native=params.native) for pair in targets: # order the qubits so that the low frequency one is the first - ord_pair = order_pair(pair, platform) + ordered_pair = order_pair(pair, platform) for target_q, control_q in ( - (ord_pair[0], ord_pair[1]), - (ord_pair[1], ord_pair[0]), + (ordered_pair[0], ordered_pair[1]), + (ordered_pair[1], ordered_pair[0]), ): for setup in ("I", "X"): ( sequence, - virtual_z_phase, theta_pulse, - data.amplitudes[ord_pair], - data.durations[ord_pair], + data.amplitudes[ordered_pair], + data.durations[ordered_pair], ) = create_sequence( platform, setup, target_q, control_q, - ord_pair, + ordered_pair, params.native, params.dt, params.parking, params.flux_pulse_amplitude, ) - data.vphases[ord_pair] = dict(virtual_z_phase) - theta = np.arange( - params.theta_start, - params.theta_end, - params.theta_step, - dtype=float, - ) sweeper = Sweeper( - Parameter.relative_phase, - theta, + parameter=Parameter.relative_phase, + range=(params.theta_start, params.theta_end, params.theta_step), pulses=[theta_pulse], - type=SweeperType.ABSOLUTE, ) - results = platform.sweep( - sequence, - ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.DISCRIMINATION, - averaging_mode=AveragingMode.CYCLIC, - ), - sweeper, + results = platform.execute( + [sequence], + [[sweeper]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.DISCRIMINATION, + averaging_mode=AveragingMode.CYCLIC, ) - result_target = results[target_q].probability(1) - result_control = results[control_q].probability(1) + ro_target = list( + sequence.channel(platform.qubits[target_q].acquisition) + )[-1] + ro_control = list( + sequence.channel(platform.qubits[control_q].acquisition) + )[-1] + result_target = results[ro_target.id] + result_control = results[ro_control.id] data.register_qubit( VirtualZPhasesType, @@ -494,15 +465,15 @@ def _update(results: VirtualZPhasesResults, platform: Platform, target: QubitPai # FIXME: quick fix for qubit order qubit_pair = tuple(sorted(target)) target = tuple(sorted(target)) - update.virtual_phases( - results.virtual_phase[target], results.native, platform, target - ) - getattr(update, f"{results.native}_duration")( - results.flux_pulse_duration[target], platform, target - ) - getattr(update, f"{results.native}_amplitude")( - results.flux_pulse_amplitude[target], platform, target - ) + # update.virtual_phases( + # results.virtual_phase[target], results.native, platform, target + # ) + # getattr(update, f"{results.native}_duration")( + # results.flux_pulse_duration[target], platform, target + # ) + # getattr(update, f"{results.native}_amplitude")( + # results.flux_pulse_amplitude[target], platform, target + # ) correct_virtual_z_phases = Routine( From f46c0d70c9781b181288190277d74afceb4f54bc Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun, 6 Oct 2024 22:53:19 +0400 Subject: [PATCH 07/22] fix: create_sequence arguments --- .../two_qubit_interaction/virtual_z_phases.py | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py index eec87cd57..cebdbfce1 100644 --- a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py +++ b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py @@ -16,6 +16,7 @@ Pulse, PulseSequence, Sweeper, + VirtualZ, ) from scipy.optimize import curve_fit @@ -113,10 +114,10 @@ def create_sequence( control_qubit: QubitId, ordered_pair: list[QubitId, QubitId], native: Literal["CZ", "iSWAP"], - parking: bool, dt: float, - amplitude: float = None, - duration: float = None, + parking: bool, + amplitude: float, + duration: float, ) -> tuple[ PulseSequence, dict[QubitId, Pulse], @@ -140,7 +141,7 @@ def create_sequence( flux_sequence = getattr(platform.natives.two_qubit[ordered_pair], native)() flux_channel = platform.qubits[ordered_pair[1]].flux flux_pulses = [ - (ch, pulse) for (ch, pulse) in flux_sequence if isinstance(pulse, Pulse) + (ch, pulse) for (ch, pulse) in flux_sequence if not isinstance(pulse, VirtualZ) ] channel, flux_pulse = flux_pulses[0] if amplitude is not None: @@ -149,19 +150,26 @@ def create_sequence( flux_pulses[0] = (channel, replace(flux_pulse, duration=duration)) sequence |= flux_pulses - theta_sequence = PulseSequence() - if dt > 0: - theta_sequence += [ - (platform.qubits[target_qubit].drive, Delay(duration=dt)), - (platform.qubits[control_qubit].drive, Delay(duration=dt)), + theta_start = flux_sequence.duration + theta_sequence = PulseSequence( + [ + ( + platform.qubits[target_qubit].drive, + Delay(duration=flux_sequence.duration + dt), + ), + ( + platform.qubits[control_qubit].drive, + Delay(duration=flux_sequence.duration + dt), + ), ] + ) # R90 (angle to be swept) theta_sequence += target_natives.R(theta=np.pi / 2, phi=0) theta_pulse = theta_sequence[-1][1] # X if setup == "X": theta_sequence += control_natives.RX() - sequence |= theta_sequence + sequence += theta_sequence # M sequence |= target_natives.MZ() + control_natives.MZ() @@ -222,7 +230,9 @@ def _acquisition( params.dt, params.parking, params.flux_pulse_amplitude, + params.flux_pulse_duration, ) + sweeper = Sweeper( parameter=Parameter.relative_phase, range=(params.theta_start, params.theta_end, params.theta_step), From cf4982cef091cbc199a8d32e5f48af5f210d308c Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun, 6 Oct 2024 23:12:29 +0400 Subject: [PATCH 08/22] feat: update virtual_z_phases_signal --- .../virtual_z_phases_signal.py | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py index b2a610d50..3cd6b3901 100644 --- a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py +++ b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py @@ -6,6 +6,7 @@ from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from qibocal.auto.operation import QubitPairId, Routine +from qibocal.result import magnitude from .utils import order_pair from .virtual_z_phases import ( @@ -72,7 +73,6 @@ def _acquisition( for setup in ("I", "X"): ( sequence, - virtual_z_phase, theta_pulse, data.amplitudes[ord_pair], data.durations[ord_pair], @@ -86,33 +86,31 @@ def _acquisition( params.dt, params.parking, params.flux_pulse_amplitude, + params.flux_pulse_duration, ) - data.vphases[ord_pair] = dict(virtual_z_phase) - theta = np.arange( - params.theta_start, - params.theta_end, - params.theta_step, - dtype=float, - ) + sweeper = Sweeper( - Parameter.relative_phase, - theta - data.vphases[ord_pair][target_q], + parameter=Parameter.relative_phase, + range=(params.theta_start, params.theta_end, params.theta_step), pulses=[theta_pulse], - type=SweeperType.ABSOLUTE, ) - results = platform.sweep( - sequence, - ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.INTEGRATION, - averaging_mode=AveragingMode.CYCLIC, - ), - sweeper, + results = platform.execute( + [sequence], + [[sweeper]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.INTEGRATION, + averaging_mode=AveragingMode.CYCLIC, ) - result_target = results[target_q].magnitude - result_control = results[control_q].magnitude + ro_target = list( + sequence.channel(platform.qubits[target_q].acquisition) + )[-1] + ro_control = list( + sequence.channel(platform.qubits[control_q].acquisition) + )[-1] + result_target = magnitude(results[ro_target.id]) + result_control = magnitude(results[ro_control.id]) data.register_qubit( VirtualZPhasesType, From faa500e341227dff043751d0121d2dae8ec11256 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:51:56 +0400 Subject: [PATCH 09/22] chore: update flux routines --- .../flux_dependence/qubit_flux_dependence.py | 128 ++++++++++-------- .../resonator_flux_dependence.py | 104 +++++++------- 2 files changed, 124 insertions(+), 108 deletions(-) diff --git a/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py b/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py index b9a704d4b..eda8880f9 100644 --- a/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py +++ b/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py @@ -6,6 +6,7 @@ from qibolab import ( AcquisitionType, AveragingMode, + Delay, Parameter, Platform, PulseSequence, @@ -13,10 +14,10 @@ ) from scipy.optimize import curve_fit -from qibocal import update from qibocal.auto.operation import Data, QubitId, Results, Routine from qibocal.config import log -from qibocal.protocols.qubit_spectroscopy_ef import DEFAULT_ANHARMONICITY +from qibocal.result import magnitude, phase +from qibocal.update import replace from ..utils import GHZ_TO_HZ, HZ_TO_GHZ, extract_feature, table_dict, table_html from . import utils @@ -88,81 +89,91 @@ def _acquisition( ) -> QubitFluxData: """Data acquisition for QubitFlux Experiment.""" + delta_frequency_range = np.arange( + -params.freq_width / 2, params.freq_width / 2, params.freq_step + ) + delta_offset_range = np.arange( + -params.bias_width / 2, params.bias_width / 2, params.bias_step + ) # taking advantage of multiplexing, apply the same set of gates to all qubits in parallel sequence = PulseSequence() ro_pulses = {} qd_pulses = {} qubit_frequency = {} - for qubit in targets: - qd_pulses[qubit] = platform.create_qubit_drive_pulse( - qubit, start=0, duration=params.drive_duration - ) - qubit_frequency[qubit] = platform.qubits[qubit].drive_frequency - - if params.transition == "02": - if platform.qubits[qubit].anharmonicity: - qd_pulses[qubit].frequency -= platform.qubits[qubit].anharmonicity / 2 - else: - qd_pulses[qubit].frequency -= DEFAULT_ANHARMONICITY / 2 - + freq_sweepers = [] + offset_sweepers = [] + for q in targets: + natives = platform.natives.single_qubit[q] + qd_channel, qd_pulse = natives.RX()[0] + ro_channel, ro_pulse = natives.MZ()[0] + + qd_pulse = replace(qd_pulse, duration=params.drive_duration) if params.drive_amplitude is not None: - qd_pulses[qubit].amplitude = params.drive_amplitude + qd_pulse = replace(qd_pulse, amplitude=params.drive_amplitude) - ro_pulses[qubit] = platform.create_qubit_readout_pulse( - qubit, start=qd_pulses[qubit].finish + if params.transition == "02": + raise NotImplementedError + # TODO: Change ``frequency0`` when implementing this + # if platform.qubits[qubit].anharmonicity: + # qd_pulses[qubit].frequency -= platform.qubits[qubit].anharmonicity / 2 + # else: + # qd_pulses[qubit].frequency -= DEFAULT_ANHARMONICITY / 2 + + qd_pulses[q] = qd_pulse + ro_pulses[q] = ro_pulse + qubit_frequency[q] = frequency0 = platform.config(qd_channel).frequency + + sequence.append((qd_channel, qd_pulse)) + sequence.append((ro_channel, Delay(duration=qd_pulse.duration))) + sequence.append((ro_channel, ro_pulse)) + + # define the parameters to sweep and their range: + + freq_sweepers.append( + Sweeper( + parameter=Parameter.frequency, + values=frequency0 + delta_frequency_range, + channels=[qd_channel], + ) ) - sequence.add(qd_pulses[qubit]) - sequence.add(ro_pulses[qubit]) - # define the parameters to sweep and their range: - delta_frequency_range = np.arange( - -params.freq_width / 2, params.freq_width / 2, params.freq_step - ) - freq_sweeper = Sweeper( - Parameter.frequency, - delta_frequency_range, - pulses=[qd_pulses[qubit] for qubit in targets], - type=SweeperType.OFFSET, - ) - - delta_bias_range = np.arange( - -params.bias_width / 2, params.bias_width / 2, params.bias_step - ) - sweepers = [ - Sweeper( - Parameter.bias, - delta_bias_range, - qubits=[platform.qubits[qubit] for qubit in targets], - type=SweeperType.OFFSET, + flux_channel = platform.qubits[q].flux + offset0 = platform.config(flux_channel).offset + offset_sweepers.append( + Sweeper( + parameter=Parameter.offset, + values=offset0 + delta_offset_range, + channels=[flux_channel], + ) ) - ] data = QubitFluxData( resonator_type=platform.resonator_type, charging_energy={ - qubit: -platform.qubits[qubit].anharmonicity for qubit in targets + qubit: 0 + for qubit in targets + # qubit: -platform.qubits[qubit].anharmonicity for qubit in targets }, qubit_frequency=qubit_frequency, ) - options = ExecutionParameters( + results = platform.execute( + [sequence], + [offset_sweepers, freq_sweepers], nshots=params.nshots, relaxation_time=params.relaxation_time, acquisition_type=AcquisitionType.INTEGRATION, averaging_mode=AveragingMode.CYCLIC, ) - for bias_sweeper in sweepers: - results = platform.sweep(sequence, options, bias_sweeper, freq_sweeper) - # retrieve the results for every qubit - for qubit in targets: - result = results[ro_pulses[qubit].serial] - sweetspot = platform.qubits[qubit].sweetspot - data.register_qubit( - qubit, - signal=result.magnitude, - phase=result.phase, - freq=delta_frequency_range + qd_pulses[qubit].frequency, - bias=delta_bias_range + sweetspot, - ) + # retrieve the results for every qubit + for i, qubit in enumerate(targets): + result = results[ro_pulses[qubit].id] + data.register_qubit( + qubit, + signal=magnitude(result), + phase=phase(result), + freq=freq_sweepers[i].values, + bias=offset_sweepers[i].values, + ) return data @@ -272,9 +283,10 @@ def _plot(data: QubitFluxData, fit: QubitFluxResults, target: QubitId): def _update(results: QubitFluxResults, platform: Platform, qubit: QubitId): - update.drive_frequency(results.frequency[qubit], platform, qubit) - update.sweetspot(results.sweetspot[qubit], platform, qubit) - update.crosstalk_matrix(results.matrix_element[qubit], platform, qubit, qubit) + pass + # update.drive_frequency(results.frequency[qubit], platform, qubit) + # update.sweetspot(results.sweetspot[qubit], platform, qubit) + # update.crosstalk_matrix(results.matrix_element[qubit], platform, qubit, qubit) qubit_flux = Routine(_acquisition, _fit, _plot, _update) diff --git a/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py b/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py index 28fe6acc8..df548f2c6 100644 --- a/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py +++ b/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py @@ -13,9 +13,9 @@ ) from scipy.optimize import curve_fit -from qibocal import update from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.config import log +from qibocal.result import magnitude, phase from ..utils import GHZ_TO_HZ, HZ_TO_GHZ, extract_feature, table_dict, table_html from . import utils @@ -89,6 +89,12 @@ def _acquisition( # create a sequence of pulses for the experiment: # MZ + delta_frequency_range = np.arange( + -params.freq_width / 2, params.freq_width / 2, params.freq_step + ) + delta_offset_range = np.arange( + -params.bias_width / 2, params.bias_width / 2, params.bias_step + ) # taking advantage of multiplexing, apply the same set of gates to all qubits in parallel sequence = PulseSequence() ro_pulses = {} @@ -97,39 +103,37 @@ def _acquisition( offset = {} matrix_element = {} charging_energy = {} - for qubit in targets: - qubit_frequency[qubit] = platform.qubits[qubit].drive_frequency - bare_resonator_frequency[qubit] = platform.qubits[ - qubit - ].bare_resonator_frequency - matrix_element[qubit] = platform.qubits[qubit].crosstalk_matrix[qubit] - offset[qubit] = -platform.qubits[qubit].sweetspot * matrix_element[qubit] - charging_energy[qubit] = -platform.qubits[qubit].anharmonicity - ro_pulses[qubit] = platform.create_qubit_readout_pulse(qubit, start=0) - sequence.add(ro_pulses[qubit]) - - # define the parameters to sweep and their range: - delta_frequency_range = np.arange( - -params.freq_width / 2, params.freq_width / 2, params.freq_step - ) - freq_sweeper = Sweeper( - Parameter.frequency, - delta_frequency_range, - [ro_pulses[qubit] for qubit in targets], - type=SweeperType.OFFSET, - ) - - delta_bias_range = np.arange( - -params.bias_width / 2, params.bias_width / 2, params.bias_step - ) - sweepers = [ - Sweeper( - Parameter.bias, - delta_bias_range, - qubits=[platform.qubits[qubit] for qubit in targets], - type=SweeperType.OFFSET, + freq_sweepers = [] + offset_sweepers = [] + for q in targets: + ro_sequence = platform.natives.single_qubit[q].MZ() + ro_pulses[q] = ro_sequence[0][1] + sequence += ro_sequence + + qubit = platform.qubits[q] + offset0 = platform.config(qubit.flux).offset + freq0 = platform.config(qubit.probe).frequency + + freq_sweepers.append( + Sweeper( + parameter=Parameter.frequency, + values=freq0 + delta_frequency_range, + channels=[qubit.probe], + ) ) - ] + offset_sweepers.append( + Sweeper( + parameter=Parameter.offset, + values=offset0 + delta_offset_range, + channels=[qubit.flux], + ) + ) + + qubit_frequency[q] = platform.config(qubit.drive).frequency + bare_resonator_frequency[q] = 0 # qubit.bare_resonator_frequency + matrix_element[q] = 1 # qubit.crosstalk_matrix[q] + offset[q] = -offset0 * matrix_element[q] + charging_energy[q] = 0 # -qubit.anharmonicity data = ResonatorFluxData( resonator_type=platform.resonator_type, @@ -139,25 +143,24 @@ def _acquisition( bare_resonator_frequency=bare_resonator_frequency, charging_energy=charging_energy, ) - options = ExecutionParameters( + results = platform.execute( + [sequence], + [offset_sweepers, freq_sweepers], nshots=params.nshots, relaxation_time=params.relaxation_time, acquisition_type=AcquisitionType.INTEGRATION, averaging_mode=AveragingMode.CYCLIC, ) - for bias_sweeper in sweepers: - results = platform.sweep(sequence, options, bias_sweeper, freq_sweeper) - # retrieve the results for every qubit - for qubit in targets: - result = results[ro_pulses[qubit].serial] - sweetspot = platform.qubits[qubit].sweetspot - data.register_qubit( - qubit, - signal=result.magnitude, - phase=result.phase, - freq=delta_frequency_range + ro_pulses[qubit].frequency, - bias=delta_bias_range + sweetspot, - ) + # retrieve the results for every qubit + for i, qubit in enumerate(targets): + result = results[ro_pulses[qubit].id] + data.register_qubit( + qubit, + signal=magnitude(result), + phase=phase(result), + freq=freq_sweepers[i].values, + bias=offset_sweepers[i].values, + ) return data @@ -271,9 +274,10 @@ def _plot(data: ResonatorFluxData, fit: ResonatorFluxResults, target: QubitId): def _update(results: ResonatorFluxResults, platform: Platform, qubit: QubitId): - update.bare_resonator_frequency(results.bare_resonator_freq[qubit], platform, qubit) - update.readout_frequency(results.resonator_freq[qubit], platform, qubit) - update.coupling(results.coupling[qubit], platform, qubit) + pass + # update.bare_resonator_frequency(results.bare_resonator_freq[qubit], platform, qubit) + # update.readout_frequency(results.resonator_freq[qubit], platform, qubit) + # update.coupling(results.coupling[qubit], platform, qubit) resonator_flux = Routine(_acquisition, _fit, _plot, _update) From 9904ff1e7c285e8279868a9213b9e0e6adf6cdb0 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Thu, 17 Oct 2024 20:30:50 +0400 Subject: [PATCH 10/22] chore: update qubit spectroscopy --- src/qibocal/protocols/qubit_spectroscopy.py | 85 ++++++++++++--------- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/src/qibocal/protocols/qubit_spectroscopy.py b/src/qibocal/protocols/qubit_spectroscopy.py index 06d776c3d..4010629f6 100644 --- a/src/qibocal/protocols/qubit_spectroscopy.py +++ b/src/qibocal/protocols/qubit_spectroscopy.py @@ -2,10 +2,11 @@ from typing import Optional import numpy as np -from qibolab import Parameter, Platform, PulseSequence, Sweeper +from qibolab import Delay, Parameter, Platform, PulseSequence, Sweeper -from qibocal import update from qibocal.auto.operation import Parameters, QubitId, Results, Routine +from qibocal.result import magnitude, phase +from qibocal.update import replace from .resonator_spectroscopy import ResonatorSpectroscopyData, ResSpecType from .utils import chi2_reduced, lorentzian, lorentzian_fit, spectroscopy_plot @@ -56,61 +57,74 @@ def _acquisition( # create a sequence of pulses for the experiment: # long drive probing pulse - MZ + delta_frequency_range = np.arange( + -params.freq_width / 2, params.freq_width / 2, params.freq_step + ) + # taking advantage of multiplexing, apply the same set of gates to all qubits in parallel sequence = PulseSequence() ro_pulses = {} qd_pulses = {} amplitudes = {} + sweepers = [] for qubit in targets: - qd_pulses[qubit] = platform.create_qubit_drive_pulse( - qubit, start=0, duration=params.drive_duration - ) - if params.drive_amplitude is not None: - qd_pulses[qubit].amplitude = params.drive_amplitude - - amplitudes[qubit] = qd_pulses[qubit].amplitude + natives = platform.natives.single_qubit[qubit] + qd_channel, qd_pulse = natives.RX()[0] + ro_channel, ro_pulse = natives.MZ()[0] - ro_pulses[qubit] = platform.create_qubit_readout_pulse( - qubit, start=qd_pulses[qubit].finish + qd_pulse = replace(qd_pulse, duration=params.drive_duration) + if params.drive_amplitude is not None: + qd_pulse = replace(qd_pulse, amplitude=params.drive_amplitude) + + amplitudes[qubit] = qd_pulse.amplitude + qd_pulses[qubit] = qd_pulse + ro_pulses[qubit] = ro_pulse + + sequence.append((qd_channel, qd_pulse)) + sequence.append((ro_channel, Delay(duration=qd_pulse.duration))) + sequence.append((ro_channel, ro_pulse)) + + f0 = platform.config(qd_channel).frequency + sweepers.append( + Sweeper( + parameter=Parameter.frequency, + values=f0 + delta_frequency_range, + channels=[qd_channel], + ) ) - sequence.add(qd_pulses[qubit]) - sequence.add(ro_pulses[qubit]) - - # define the parameter to sweep and its range: - delta_frequency_range = np.arange( - -params.freq_width / 2, params.freq_width / 2, params.freq_step - ) - sweeper = Sweeper( - Parameter.frequency, - delta_frequency_range, - pulses=[qd_pulses[qubit] for qubit in targets], - type=SweeperType.OFFSET, - ) # Create data structure for data acquisition. data = QubitSpectroscopyData( resonator_type=platform.resonator_type, amplitudes=amplitudes ) - results = platform.sweep( - sequence, - params.execution_parameters, - sweeper, + results = platform.execute( + [sequence], + [sweepers], + **params.execution_parameters, ) # retrieve the results for every qubit for qubit, ro_pulse in ro_pulses.items(): - result = results[ro_pulse.serial] + result = results[ro_pulse.id] # store the results + f0 = platform.config(platform.qubits[qubit].drive).frequency + signal = magnitude(result) + _phase = phase(result) + if len(signal.shape) > 1: + signal, error_signal = np.mean(signal, axis=0), np.std(signal, axis=0) + _phase, error_phase = np.mean(_phase, axis=0), np.std(_phase, axis=0) + else: + error_signal, error_phase = 0, 0 data.register_qubit( ResSpecType, (qubit), dict( - signal=result.average.magnitude, - phase=result.average.phase, - freq=delta_frequency_range + qd_pulses[qubit].frequency, - error_signal=result.average.std, - error_phase=result.phase_std, + signal=signal, + phase=_phase, + freq=delta_frequency_range + f0, + error_signal=error_signal, + error_phase=error_phase, ), ) return data @@ -154,7 +168,8 @@ def _plot(data: QubitSpectroscopyData, target: QubitId, fit: QubitSpectroscopyRe def _update(results: QubitSpectroscopyResults, platform: Platform, target: QubitId): - update.drive_frequency(results.frequency[target], platform, target) + pass + # update.drive_frequency(results.frequency[target], platform, target) qubit_spectroscopy = Routine(_acquisition, _fit, _plot, _update) From 541c9f4e9c91cf69f3cc77839300d65b83d17cc1 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Thu, 17 Oct 2024 20:36:16 +0400 Subject: [PATCH 11/22] fix: error calculation --- src/qibocal/protocols/qubit_spectroscopy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qibocal/protocols/qubit_spectroscopy.py b/src/qibocal/protocols/qubit_spectroscopy.py index 4010629f6..5c8aeccb4 100644 --- a/src/qibocal/protocols/qubit_spectroscopy.py +++ b/src/qibocal/protocols/qubit_spectroscopy.py @@ -112,8 +112,10 @@ def _acquisition( signal = magnitude(result) _phase = phase(result) if len(signal.shape) > 1: - signal, error_signal = np.mean(signal, axis=0), np.std(signal, axis=0) - _phase, error_phase = np.mean(_phase, axis=0), np.std(_phase, axis=0) + error_signal = np.std(signal, axis=0, ddof=1) / np.sqrt(signal.shape[0]) + signal = np.mean(signal, axis=0) + error_phase = np.std(_phase, axis=0, ddof=1) / np.sqrt(_phase.shape[0]) + _phase = np.mean(_phase, axis=0) else: error_signal, error_phase = 0, 0 data.register_qubit( From 190bb742d5b0beceb9b374d399f6ca9fe49e2476 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Thu, 17 Oct 2024 21:14:07 +0400 Subject: [PATCH 12/22] chore: update Ramsey routines --- src/qibocal/protocols/ramsey/ramsey.py | 49 ++++++++------- src/qibocal/protocols/ramsey/ramsey_signal.py | 62 ++++++++++--------- src/qibocal/protocols/ramsey/utils.py | 47 +++++++------- 3 files changed, 81 insertions(+), 77 deletions(-) diff --git a/src/qibocal/protocols/ramsey/ramsey.py b/src/qibocal/protocols/ramsey/ramsey.py index 2708f7857..c96ca84da 100644 --- a/src/qibocal/protocols/ramsey/ramsey.py +++ b/src/qibocal/protocols/ramsey/ramsey.py @@ -15,6 +15,7 @@ from qibocal.auto.operation import QubitId, Routine from qibocal.config import log +from qibocal.result import probability from ..utils import chi2_reduced, table_dict, table_html from .ramsey_signal import ( @@ -87,44 +88,42 @@ def _acquisition( params.delay_between_pulses_step, ) - options = ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.DISCRIMINATION, - averaging_mode=AveragingMode.SINGLESHOT, - ) - - sequence = PulseSequence() - data = RamseyData( detuning=params.detuning, qubit_freqs={ - qubit: platform.qubits[qubit].native_gates.RX.frequency for qubit in targets + qubit: platform.config(platform.qubits[qubit].drive).frequency + for qubit in targets }, ) - if not params.unrolling: - sequence = PulseSequence() + updates = [] + if params.detuning != 0: for qubit in targets: - sequence += ramsey_sequence( - platform=platform, qubit=qubit, detuning=params.detuning - ) + channel = platform.qubits[qubit].drive + f0 = platform.config(channel).frequency + updates.append({channel: {"frequency": f0 + params.detuning}}) + if not params.unrolling: + sequence, delays = ramsey_sequence(platform, targets) sweeper = Sweeper( - Parameter.start, - waits, - [sequence.get_qubit_pulses(qubit).qd_pulses[-1] for qubit in targets], - type=SweeperType.ABSOLUTE, + parameter=Parameter.duration, + values=waits, + pulses=delays, ) # execute the sweep - results = platform.sweep( - sequence, - options, - sweeper, + results = platform.execute( + [sequence], + [[sweeper]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.DISCRIMINATION, + averaging_mode=AveragingMode.SINGLESHOT, + updates=updates, ) for qubit in targets: - probs = results[qubit].probability(state=1) + ro_pulse = list(sequence.channel(platform.qubits[qubit].acquisition))[-1] + probs = probability(results[ro_pulse.id], state=1) # The probability errors are the standard errors of the binomial distribution errors = [np.sqrt(prob * (1 - prob) / params.nshots) for prob in probs] data.register_qubit( @@ -138,6 +137,8 @@ def _acquisition( ) if params.unrolling: + raise NotImplementedError + sequences, all_ro_pulses = [], [] for wait in waits: sequence = PulseSequence() diff --git a/src/qibocal/protocols/ramsey/ramsey_signal.py b/src/qibocal/protocols/ramsey/ramsey_signal.py index 64e0ddf0f..6cbc3e333 100644 --- a/src/qibocal/protocols/ramsey/ramsey_signal.py +++ b/src/qibocal/protocols/ramsey/ramsey_signal.py @@ -13,9 +13,9 @@ Sweeper, ) -from qibocal import update from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.config import log +from qibocal.result import magnitude from ..utils import table_dict, table_html from .utils import fitting, process_fit, ramsey_fit, ramsey_sequence @@ -99,54 +99,55 @@ def _acquisition( params.delay_between_pulses_step, ) - options = ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.INTEGRATION, - averaging_mode=AveragingMode.CYCLIC, - ) - data = RamseySignalData( detuning=params.detuning, qubit_freqs={ - qubit: platform.qubits[qubit].native_gates.RX.frequency for qubit in targets + qubit: platform.config(platform.qubits[qubit].drive).frequency + for qubit in targets }, ) - if not params.unrolling: - sequence = PulseSequence() + updates = [] + if params.detuning != 0: for qubit in targets: - sequence += ramsey_sequence( - platform=platform, qubit=qubit, detuning=params.detuning - ) + channel = platform.qubits[qubit].drive + f0 = platform.config(channel).frequency + updates.append({channel: {"frequency": f0 + params.detuning}}) + + if not params.unrolling: + sequence, delays = ramsey_sequence(platform, targets) sweeper = Sweeper( - Parameter.start, - waits, - [ - sequence.get_qubit_pulses(qubit).qd_pulses[-1] for qubit in targets - ], # TODO: check if it is correct - type=SweeperType.ABSOLUTE, + parameter=Parameter.duration, + values=waits, + pulses=delays, ) # execute the sweep - results = platform.sweep( - sequence, - options, - sweeper, + results = platform.execute( + [sequence], + [[sweeper]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.INTEGRATION, + averaging_mode=AveragingMode.CYCLIC, + updates=updates, ) for qubit in targets: - result = results[sequence.get_qubit_pulses(qubit).ro_pulses[0].serial] + ro_pulse = list(sequence.channel(platform.qubits[qubit].acquisition))[-1] + result = results[ro_pulse.id] # The probability errors are the standard errors of the binomial distribution data.register_qubit( RamseySignalType, (qubit), dict( wait=waits, - signal=result.magnitude, + signal=magnitude(result), ), ) else: + raise NotImplementedError + sequences, all_ro_pulses = [], [] for wait in waits: sequence = PulseSequence() @@ -289,10 +290,11 @@ def _plot(data: RamseySignalData, target: QubitId, fit: RamseySignalResults = No def _update(results: RamseySignalResults, platform: Platform, target: QubitId): - if results.detuning is not None: - update.drive_frequency(results.frequency[target][0], platform, target) - else: - update.t2(results.t2[target][0], platform, target) + pass + # if results.detuning is not None: + # update.drive_frequency(results.frequency[target][0], platform, target) + # else: + # update.t2(results.t2[target][0], platform, target) ramsey_signal = Routine(_acquisition, _fit, _plot, _update) diff --git a/src/qibocal/protocols/ramsey/utils.py b/src/qibocal/protocols/ramsey/utils.py index acb98f012..d0b70be37 100644 --- a/src/qibocal/protocols/ramsey/utils.py +++ b/src/qibocal/protocols/ramsey/utils.py @@ -1,7 +1,5 @@ -from typing import Optional - import numpy as np -from qibolab import Platform, PulseSequence +from qibolab import Delay, Platform, PulseSequence from scipy.optimize import curve_fit from qibocal.auto.operation import QubitId @@ -19,36 +17,39 @@ def ramsey_sequence( platform: Platform, - qubit: QubitId, - wait: int = 0, - detuning: Optional[int] = None, + targets: list[QubitId], ): """Pulse sequence used in Ramsey (detuned) experiments. The pulse sequence is the following: RX90 -- wait -- RX90 -- MZ - - If detuning is specified the RX90 pulses will be sent to - frequency = drive_frequency + detuning """ - + delays = [] sequence = PulseSequence() - first_pi_half_pulse = platform.create_RX90_pulse(qubit, start=0) - second_pi_half_pulse = platform.create_RX90_pulse( - qubit, start=first_pi_half_pulse.finish + wait - ) + for qubit in targets: + natives = platform.natives.single_qubit[qubit] - # apply detuning: - if detuning is not None: - first_pi_half_pulse.frequency += detuning - second_pi_half_pulse.frequency += detuning - readout_pulse = platform.create_qubit_readout_pulse( - qubit, start=second_pi_half_pulse.finish - ) + qd_channel, qd_pulse = natives.R(theta=np.pi / 2)[0] + ro_channel, ro_pulse = natives.MZ()[0] + + qd_delay = Delay(duration=0) + ro_delay = Delay(duration=0) + + sequence.extend( + [ + (qd_channel, qd_pulse), + (qd_channel, qd_delay), + (qd_channel, qd_pulse), + (ro_channel, Delay(duration=2 * qd_pulse.duration)), + (ro_channel, ro_delay), + (ro_channel, ro_pulse), + ] + ) + + delays.extend([qd_delay, ro_delay]) - sequence.add(first_pi_half_pulse, second_pi_half_pulse, readout_pulse) - return sequence + return sequence, delays def ramsey_fit(x, offset, amplitude, delta, phase, decay): From e1b808283fad7c1208b6e04f56b0c4527ca08971 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Thu, 17 Oct 2024 22:44:35 +0400 Subject: [PATCH 13/22] chore: update unrolling branch in ramsey (not tested) --- src/qibocal/protocols/ramsey/ramsey.py | 45 ++++++++----------- src/qibocal/protocols/ramsey/ramsey_signal.py | 45 ++++++++----------- src/qibocal/protocols/ramsey/utils.py | 5 ++- 3 files changed, 41 insertions(+), 54 deletions(-) diff --git a/src/qibocal/protocols/ramsey/ramsey.py b/src/qibocal/protocols/ramsey/ramsey.py index c96ca84da..40a99695e 100644 --- a/src/qibocal/protocols/ramsey/ramsey.py +++ b/src/qibocal/protocols/ramsey/ramsey.py @@ -4,14 +4,7 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import ( - AcquisitionType, - AveragingMode, - Parameter, - Platform, - PulseSequence, - Sweeper, -) +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from qibocal.auto.operation import QubitId, Routine from qibocal.config import log @@ -137,30 +130,30 @@ def _acquisition( ) if params.unrolling: - raise NotImplementedError - sequences, all_ro_pulses = [], [] for wait in waits: - sequence = PulseSequence() - for qubit in targets: - sequence += ramsey_sequence( - platform=platform, qubit=qubit, wait=wait, detuning=params.detuning - ) - + sequence, _ = ramsey_sequence(platform, targets, wait) sequences.append(sequence) - all_ro_pulses.append(sequence.ro_pulses) + all_ro_pulses.append( + { + qubit: list(sequence.channel(platform.qubits[qubit].acquisition))[0] + for qubit in targets + } + ) - results = platform.execute_pulse_sequences(sequences, options) + results = platform.execute( + sequences, + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.DISCRIMINATION, + averaging_mode=AveragingMode.SINGLESHOT, + updates=updates, + ) - # We dont need ig as every serial is different - for ig, (wait, ro_pulses) in enumerate(zip(waits, all_ro_pulses)): + for wait, ro_pulses in zip(waits, all_ro_pulses): for qubit in targets: - serial = ro_pulses[qubit].serial - if params.unrolling: - result = results[serial][0] - else: - result = results[ig][serial] - prob = result.probability() + result = results[ro_pulses[qubit].id] + prob = probability(result, state=1) error = np.sqrt(prob * (1 - prob) / params.nshots) data.register_qubit( RamseyType, diff --git a/src/qibocal/protocols/ramsey/ramsey_signal.py b/src/qibocal/protocols/ramsey/ramsey_signal.py index 6cbc3e333..0f6a13da2 100644 --- a/src/qibocal/protocols/ramsey/ramsey_signal.py +++ b/src/qibocal/protocols/ramsey/ramsey_signal.py @@ -4,14 +4,7 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import ( - AcquisitionType, - AveragingMode, - Parameter, - Platform, - PulseSequence, - Sweeper, -) +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine from qibocal.config import log @@ -146,35 +139,35 @@ def _acquisition( ) else: - raise NotImplementedError - sequences, all_ro_pulses = [], [] for wait in waits: - sequence = PulseSequence() - for qubit in targets: - sequence += ramsey_sequence( - platform=platform, qubit=qubit, wait=wait, detuning=params.detuning - ) - + sequence, _ = ramsey_sequence(platform, targets, wait) sequences.append(sequence) - all_ro_pulses.append(sequence.ro_pulses) + all_ro_pulses.append( + { + qubit: list(sequence.channel(platform.qubits[qubit].acquisition))[0] + for qubit in targets + } + ) - results = platform.execute_pulse_sequences(sequences, options) + results = platform.execute( + sequences, + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.INTEGRATION, + averaging_mode=AveragingMode.CYCLIC, + updates=updates, + ) - # We dont need ig as everty serial is different - for ig, (wait, ro_pulses) in enumerate(zip(waits, all_ro_pulses)): + for wait, ro_pulses in zip(waits, all_ro_pulses): for qubit in targets: - serial = ro_pulses[qubit].serial - if params.unrolling: - result = results[serial][0] - else: - result = results[ig][serial] + result = results[ro_pulses[qubit].id] data.register_qubit( RamseySignalType, (qubit), dict( wait=np.array([wait]), - signal=np.array([result.magnitude]), + signal=np.array([magnitude(result)]), ), ) diff --git a/src/qibocal/protocols/ramsey/utils.py b/src/qibocal/protocols/ramsey/utils.py index d0b70be37..c5e56fda8 100644 --- a/src/qibocal/protocols/ramsey/utils.py +++ b/src/qibocal/protocols/ramsey/utils.py @@ -18,6 +18,7 @@ def ramsey_sequence( platform: Platform, targets: list[QubitId], + wait: int = 0, ): """Pulse sequence used in Ramsey (detuned) experiments. @@ -33,8 +34,8 @@ def ramsey_sequence( qd_channel, qd_pulse = natives.R(theta=np.pi / 2)[0] ro_channel, ro_pulse = natives.MZ()[0] - qd_delay = Delay(duration=0) - ro_delay = Delay(duration=0) + qd_delay = Delay(duration=wait) + ro_delay = Delay(duration=wait) sequence.extend( [ From 3199b464a8d19bb59e224073666a6952b7556dbe Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Thu, 17 Oct 2024 22:56:47 +0400 Subject: [PATCH 14/22] chore: update T1 and T1 signal routines --- src/qibocal/protocols/coherence/t1.py | 48 +++++++++-------- src/qibocal/protocols/coherence/t1_signal.py | 56 ++++++++++---------- 2 files changed, 54 insertions(+), 50 deletions(-) diff --git a/src/qibocal/protocols/coherence/t1.py b/src/qibocal/protocols/coherence/t1.py index 147261ce5..4d74180e2 100644 --- a/src/qibocal/protocols/coherence/t1.py +++ b/src/qibocal/protocols/coherence/t1.py @@ -7,6 +7,7 @@ from qibolab import ( AcquisitionType, AveragingMode, + Delay, Parameter, Platform, PulseSequence, @@ -14,6 +15,7 @@ ) from qibocal.auto.operation import Data, QubitId, Routine +from qibocal.result import probability from ..utils import table_dict, table_html from . import t1_signal, utils @@ -72,16 +74,21 @@ def _acquisition( # create a sequence of pulses for the experiment # RX - wait t - MZ - qd_pulses = {} + delays = {} ro_pulses = {} sequence = PulseSequence() - for qubit in targets: - qd_pulses[qubit] = platform.create_RX_pulse(qubit, start=0) - ro_pulses[qubit] = platform.create_qubit_readout_pulse( - qubit, start=qd_pulses[qubit].duration - ) - sequence.add(qd_pulses[qubit]) - sequence.add(ro_pulses[qubit]) + for q in targets: + natives = platform.natives.single_qubit[q] + qd_channel, qd_pulse = natives.RX()[0] + ro_channel, ro_pulse = natives.MZ()[0] + + ro_pulses[q] = ro_pulse + delays[q] = Delay(duration=0) + + sequence.append((qd_channel, qd_pulse)) + sequence.append((ro_channel, Delay(duration=qd_pulse.duration))) + sequence.append((ro_channel, delays[q])) + sequence.append((ro_channel, ro_pulse)) # define the parameter to sweep and its range: # wait time before readout @@ -92,29 +99,26 @@ def _acquisition( ) sweeper = Sweeper( - Parameter.start, - ro_wait_range, - [ro_pulses[qubit] for qubit in targets], - type=SweeperType.ABSOLUTE, + parameter=Parameter.duration, + values=ro_wait_range, + pulses=[delays[q] for q in targets], ) data = T1Data() # sweep the parameter # execute the pulse sequence - results = platform.sweep( - sequence, - ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.DISCRIMINATION, - averaging_mode=AveragingMode.SINGLESHOT, - ), - sweeper, + results = platform.execute( + [sequence], + [[sweeper]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.DISCRIMINATION, + averaging_mode=AveragingMode.SINGLESHOT, ) for qubit in targets: - probs = results[ro_pulses[qubit].serial].probability(state=1) + probs = probability(results[ro_pulses[qubit].id], state=1) errors = np.sqrt(probs * (1 - probs) / params.nshots) data.register_qubit( CoherenceProbType, diff --git a/src/qibocal/protocols/coherence/t1_signal.py b/src/qibocal/protocols/coherence/t1_signal.py index a51c098ad..f730ebcce 100644 --- a/src/qibocal/protocols/coherence/t1_signal.py +++ b/src/qibocal/protocols/coherence/t1_signal.py @@ -14,8 +14,8 @@ Sweeper, ) -from qibocal import update from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine +from qibocal.result import magnitude, phase from ..utils import table_dict, table_html from . import utils @@ -84,20 +84,21 @@ def _acquisition( # create a sequence of pulses for the experiment # RX - wait t - MZ - qd_pulses = {} delays = {} ro_pulses = {} sequence = PulseSequence() for q in targets: - qubit = platform.qubits[q] - qd_sequence = qubit.native_gates.RX.create_sequence(theta=np.pi, phi=0) - ro_sequence = qubit.native_gates.MZ.create_sequence() - qd_pulses[q] = qd_sequence[qubit.drive.name][0] - ro_pulses[q] = ro_sequence[qubit.measure.name][0] - delays[q] = Delay(duration=qd_pulses[q].duration) - sequence.extend(qd_sequence) - sequence[qubit.measure.name].append(delays[q]) - sequence.extend(ro_sequence) + natives = platform.natives.single_qubit[q] + qd_channel, qd_pulse = natives.RX()[0] + ro_channel, ro_pulse = natives.MZ()[0] + + ro_pulses[q] = ro_pulse + delays[q] = Delay(duration=0) + + sequence.append((qd_channel, qd_pulse)) + sequence.append((ro_channel, Delay(duration=qd_pulse.duration))) + sequence.append((ro_channel, delays[q])) + sequence.append((ro_channel, ro_pulse)) # define the parameter to sweep and its range: # wait time before readout @@ -108,38 +109,36 @@ def _acquisition( ) sweeper = Sweeper( - Parameter.duration, - ro_wait_range, - [delays[q] for q in targets], - type=SweeperType.ABSOLUTE, + parameter=Parameter.duration, + values=ro_wait_range, + pulses=[delays[q] for q in targets], ) # sweep the parameter # execute the pulse sequence - results = platform.sweep( - sequence, - ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.INTEGRATION, - averaging_mode=( - AveragingMode.SINGLESHOT if params.single_shot else AveragingMode.CYCLIC - ), + results = platform.execute( + [sequence], + [[sweeper]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.INTEGRATION, + averaging_mode=( + AveragingMode.SINGLESHOT if params.single_shot else AveragingMode.CYCLIC ), - sweeper, ) data = T1SignalData() for q in targets: result = results[ro_pulses[q].id] + signal = magnitude(result) if params.single_shot: - _waits = np.array(len(result.magnitude) * [ro_wait_range]) + _waits = np.array(len(signal) * [ro_wait_range]) else: _waits = ro_wait_range data.register_qubit( utils.CoherenceType, (q), - dict(wait=_waits, signal=result.magnitude, phase=result.phase), + dict(wait=_waits, signal=signal, phase=phase(result)), ) return data @@ -216,7 +215,8 @@ def _plot(data: T1SignalData, target: QubitId, fit: T1SignalResults = None): def _update(results: T1SignalResults, platform: Platform, target: QubitId): - update.t1(results.t1[target], platform, target) + pass + # update.t1(results.t1[target], platform, target) t1_signal = Routine(_acquisition, _fit, _plot, _update) From c061fe7c77ca25ec015d5bd990696d6278ebc748 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri, 18 Oct 2024 01:38:11 +0400 Subject: [PATCH 15/22] chore: update spin echo routine --- src/qibocal/protocols/coherence/spin_echo.py | 91 +++++---------- .../protocols/coherence/spin_echo_signal.py | 110 +++++------------- src/qibocal/protocols/coherence/utils.py | 43 +++++++ 3 files changed, 102 insertions(+), 142 deletions(-) diff --git a/src/qibocal/protocols/coherence/spin_echo.py b/src/qibocal/protocols/coherence/spin_echo.py index 8193a6866..6e4264f88 100644 --- a/src/qibocal/protocols/coherence/spin_echo.py +++ b/src/qibocal/protocols/coherence/spin_echo.py @@ -1,17 +1,17 @@ -from copy import deepcopy from dataclasses import dataclass, field from typing import Optional import numpy as np import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper from qibocal.auto.operation import QubitId, Routine +from qibocal.result import probability from ..utils import table_dict, table_html from . import t1 from .spin_echo_signal import SpinEchoSignalParameters, SpinEchoSignalResults, _update -from .utils import exp_decay, exponential_fit_probability +from .utils import exp_decay, exponential_fit_probability, spin_echo_sequence @dataclass @@ -40,27 +40,7 @@ def _acquisition( ) -> SpinEchoData: """Data acquisition for SpinEcho""" # create a sequence of pulses for the experiment: - # Spin Echo 3 Pulses: RX(pi/2) - wait t(rotates z) - RX(pi) - wait t(rotates z) - RX(pi/2) - readout - ro_pulses = {} - RX90_pulses1 = {} - RX_pulses = {} - RX90_pulses2 = {} - sequence = PulseSequence() - for qubit in targets: - RX90_pulses1[qubit] = platform.create_RX90_pulse(qubit, start=0) - RX_pulses[qubit] = platform.create_RX_pulse( - qubit, start=RX90_pulses1[qubit].finish - ) - RX90_pulses2[qubit] = platform.create_RX90_pulse( - qubit, start=RX_pulses[qubit].finish - ) - ro_pulses[qubit] = platform.create_qubit_readout_pulse( - qubit, start=RX90_pulses2[qubit].finish - ) - sequence.add(RX90_pulses1[qubit]) - sequence.add(RX_pulses[qubit]) - sequence.add(RX90_pulses2[qubit]) - sequence.add(ro_pulses[qubit]) + sequence, delays = spin_echo_sequence(platform, targets) # define the parameter to sweep and its range: # delay between pulses @@ -70,7 +50,15 @@ def _acquisition( params.delay_between_pulses_step, ) - options = ExecutionParameters( + sweeper = Sweeper( + parameter=Parameter.duration, + values=ro_wait_range, + pulses=delays, + ) + + results = platform.execute( + [sequence], + [[sweeper]], nshots=params.nshots, relaxation_time=params.relaxation_time, acquisition_type=AcquisitionType.DISCRIMINATION, @@ -78,45 +66,20 @@ def _acquisition( ) data = SpinEchoData() - sequences, all_ro_pulses = [], [] - # sweep the parameter - for wait in ro_wait_range: - # save data as often as defined by points - - for qubit in targets: - RX_pulses[qubit].start = RX90_pulses1[qubit].finish + wait // 2 - RX90_pulses2[qubit].start = RX_pulses[qubit].finish + wait // 2 - ro_pulses[qubit].start = RX90_pulses2[qubit].finish - - sequences.append(deepcopy(sequence)) - all_ro_pulses.append(deepcopy(sequence).ro_pulses) - - if params.unrolling: - results = platform.execute_pulse_sequences(sequences, options) - - elif not params.unrolling: - results = [ - platform.execute_pulse_sequence(sequence, options) for sequence in sequences - ] - - for ig, (wait, ro_pulses) in enumerate(zip(ro_wait_range, all_ro_pulses)): - for qubit in targets: - serial = ro_pulses.get_qubit_pulses(qubit)[0].serial - if params.unrolling: - result = results[serial][0] - else: - result = results[ig][serial] - prob = result.probability(state=0) - error = np.sqrt(prob * (1 - prob) / params.nshots) - data.register_qubit( - t1.CoherenceProbType, - (qubit), - dict( - wait=np.array([wait]), - prob=np.array([prob]), - error=np.array([error]), - ), - ) + for qubit in targets: + ro_pulse = list(sequence.channel(platform.qubits[qubit].acquisition))[-1] + result = results[ro_pulse.id] + prob = probability(result, state=0) + error = np.sqrt(prob * (1 - prob) / params.nshots) + data.register_qubit( + t1.CoherenceProbType, + (qubit), + dict( + wait=ro_wait_range, + prob=prob, + error=error, + ), + ) return data diff --git a/src/qibocal/protocols/coherence/spin_echo_signal.py b/src/qibocal/protocols/coherence/spin_echo_signal.py index e8a7d93bd..1f13e4a5a 100644 --- a/src/qibocal/protocols/coherence/spin_echo_signal.py +++ b/src/qibocal/protocols/coherence/spin_echo_signal.py @@ -1,17 +1,16 @@ -from copy import deepcopy from dataclasses import dataclass from typing import Union import numpy as np import plotly.graph_objects as go -from qibolab import AcquisitionType, AveragingMode, Platform, PulseSequence +from qibolab import AcquisitionType, AveragingMode, Parameter, Platform, Sweeper -from qibocal import update from qibocal.auto.operation import Parameters, QubitId, Results, Routine +from qibocal.result import magnitude, phase from ..utils import table_dict, table_html from .t1_signal import T1SignalData -from .utils import CoherenceType, exp_decay, exponential_fit +from .utils import CoherenceType, exp_decay, exponential_fit, spin_echo_sequence @dataclass @@ -24,9 +23,6 @@ class SpinEchoSignalParameters(Parameters): """Final delay between pulses [ns].""" delay_between_pulses_step: int """Step delay between pulses [ns].""" - unrolling: bool = False - """If ``True`` it uses sequence unrolling to deploy multiple sequences in a single instrument call. - Defaults to ``False``.""" single_shot: bool = False """If ``True`` save single shot signal data.""" @@ -54,27 +50,7 @@ def _acquisition( ) -> SpinEchoSignalData: """Data acquisition for SpinEcho""" # create a sequence of pulses for the experiment: - # Spin Echo 3 Pulses: RX(pi/2) - wait t(rotates z) - RX(pi) - wait t(rotates z) - RX(pi/2) - readout - ro_pulses = {} - RX90_pulses1 = {} - RX_pulses = {} - RX90_pulses2 = {} - sequence = PulseSequence() - for qubit in targets: - RX90_pulses1[qubit] = platform.create_RX90_pulse(qubit, start=0) - RX_pulses[qubit] = platform.create_RX_pulse( - qubit, start=RX90_pulses1[qubit].finish - ) - RX90_pulses2[qubit] = platform.create_RX90_pulse( - qubit, start=RX_pulses[qubit].finish - ) - ro_pulses[qubit] = platform.create_qubit_readout_pulse( - qubit, start=RX90_pulses2[qubit].finish - ) - sequence.add(RX90_pulses1[qubit]) - sequence.add(RX_pulses[qubit]) - sequence.add(RX90_pulses2[qubit]) - sequence.add(ro_pulses[qubit]) + sequence, delays = spin_echo_sequence(platform, targets) # define the parameter to sweep and its range: # delay between pulses @@ -84,7 +60,15 @@ def _acquisition( params.delay_between_pulses_step, ) - options = ExecutionParameters( + sweeper = Sweeper( + parameter=Parameter.duration, + values=ro_wait_range, + pulses=delays, + ) + + results = platform.execute( + [sequence], + [[sweeper]], nshots=params.nshots, relaxation_time=params.relaxation_time, acquisition_type=AcquisitionType.INTEGRATION, @@ -93,55 +77,24 @@ def _acquisition( ), ) - sequences, all_ro_pulses = [], [] - - # sweep the parameter - for wait in ro_wait_range: - # save data as often as defined by points - - for qubit in targets: - RX_pulses[qubit].start = RX90_pulses1[qubit].finish + wait / 2 - RX90_pulses2[qubit].start = RX_pulses[qubit].finish + wait / 2 - ro_pulses[qubit].start = RX90_pulses2[qubit].finish - - sequences.append(deepcopy(sequence)) - all_ro_pulses.append(deepcopy(sequence).ro_pulses) - - if params.unrolling: - results = platform.execute_pulse_sequences(sequences, options) - - elif not params.unrolling: - results = [ - platform.execute_pulse_sequence(sequence, options) for sequence in sequences - ] - data = SpinEchoSignalData() - for ig, (wait, ro_pulses) in enumerate(zip(ro_wait_range, all_ro_pulses)): - for qubit in targets: - serial = ro_pulses.get_qubit_pulses(qubit)[0].serial - if params.unrolling: - result = results[serial][0] - else: - result = results[ig][serial] - if params.single_shot: - _wait = np.array(len(result.magnitude) * [wait]) - else: - _wait = np.array([wait]) - data.register_qubit( - CoherenceType, - (qubit), - dict( - wait=_wait, - signal=np.array([result.magnitude]), - phase=np.array([result.phase]), - ), - ) - - if params.single_shot: - data.data = { - qubit: values.reshape((len(ro_wait_range), params.nshots)).T - for qubit, values in data.data.items() - } + for qubit in targets: + ro_pulse = list(sequence.channel(platform.qubits[qubit].acquisition))[-1] + result = results[ro_pulse.id] + signal = magnitude(result) + if params.single_shot: + _wait = np.array(len(signal) * [ro_wait_range]) + else: + _wait = ro_wait_range + data.register_qubit( + CoherenceType, + (qubit), + dict( + wait=_wait, + signal=signal, + phase=phase(result), + ), + ) return data @@ -218,7 +171,8 @@ def _plot(data: SpinEchoSignalData, target: QubitId, fit: SpinEchoSignalResults def _update(results: SpinEchoSignalResults, platform: Platform, target: QubitId): - update.t2_spin_echo(results.t2_spin_echo[target], platform, target) + pass + # update.t2_spin_echo(results.t2_spin_echo[target], platform, target) spin_echo_signal = Routine(_acquisition, _fit, _plot, _update) diff --git a/src/qibocal/protocols/coherence/utils.py b/src/qibocal/protocols/coherence/utils.py index 8e28cee02..a7be5e80c 100644 --- a/src/qibocal/protocols/coherence/utils.py +++ b/src/qibocal/protocols/coherence/utils.py @@ -1,6 +1,8 @@ import numpy as np +from qibolab import Delay, Platform, PulseSequence from scipy.optimize import curve_fit +from qibocal.auto.operation import QubitId from qibocal.config import log from ..utils import chi2_reduced @@ -28,6 +30,47 @@ def average_single_shots(data_type, single_shots): return data +def spin_echo_sequence(platform: Platform, targets: list[QubitId], wait: int = 0): + """Create pulse sequence for spin-echo routine. + + Spin Echo 3 Pulses: RX(pi/2) - wait t(rotates z) - RX(pi) - wait t(rotates z) - RX(pi/2) - readout + """ + sequence = PulseSequence() + all_delays = [] + for qubit in targets: + natives = platform.natives.single_qubit[qubit] + qd_channel, rx90_pulse = natives.R(theta=np.pi / 2)[0] + _, rx_pulse = natives.RX()[0] + ro_channel, ro_pulse = natives.MZ()[0] + + delays = [ + Delay(duration=wait), + Delay(duration=wait), + Delay(duration=wait), + Delay(duration=wait), + ] + + sequence.extend( + [ + (qd_channel, rx90_pulse), + (qd_channel, delays[0]), + (qd_channel, rx_pulse), + (qd_channel, delays[1]), + (qd_channel, rx90_pulse), + ( + ro_channel, + Delay(duration=2 * rx90_pulse.duration + rx_pulse.duration), + ), + (ro_channel, delays[2]), + (ro_channel, delays[3]), + (ro_channel, ro_pulse), + ] + ) + all_delays.extend(delays) + + return sequence, all_delays + + def exp_decay(x, *p): return p[0] - p[1] * np.exp(-1 * x / p[2]) From 3ba96606a7e1e8754786c1aedddeb9c4e6ff6895 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri, 18 Oct 2024 18:44:48 +0400 Subject: [PATCH 16/22] chore: update punchout routine --- src/qibocal/protocols/resonator_punchout.py | 95 ++++++++++----------- 1 file changed, 44 insertions(+), 51 deletions(-) diff --git a/src/qibocal/protocols/resonator_punchout.py b/src/qibocal/protocols/resonator_punchout.py index e7b5c7090..7ffe367ee 100644 --- a/src/qibocal/protocols/resonator_punchout.py +++ b/src/qibocal/protocols/resonator_punchout.py @@ -14,8 +14,8 @@ Sweeper, ) -from qibocal import update from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine +from qibocal.result import magnitude, phase from .utils import HZ_TO_GHZ, fit_punchout, norm, table_dict, table_html @@ -28,14 +28,12 @@ class ResonatorPunchoutParameters(Parameters): """Width for frequency sweep relative to the readout frequency [Hz].""" freq_step: int """Frequency step for sweep [Hz].""" - min_amp_factor: float + min_amp: float """Minimum amplitude multiplicative factor.""" - max_amp_factor: float + max_amp: float """Maximum amplitude multiplicative factor.""" - step_amp_factor: float + step_amp: float """Step amplitude multiplicative factor.""" - amplitude: float = None - """Initial readout amplitude.""" @dataclass @@ -93,40 +91,37 @@ def _acquisition( # create a sequence of pulses for the experiment: # MZ - # taking advantage of multiplexing, apply the same set of gates to all qubits in parallel - sequence = PulseSequence() - - ro_pulses = {} - amplitudes = {} - for qubit in targets: - ro_pulses[qubit] = platform.create_qubit_readout_pulse(qubit, start=0) - if params.amplitude is not None: - ro_pulses[qubit].amplitude = params.amplitude - - amplitudes[qubit] = ro_pulses[qubit].amplitude - sequence.add(ro_pulses[qubit]) - # define the parameters to sweep and their range: # resonator frequency delta_frequency_range = np.arange( -params.freq_width / 2, params.freq_width / 2, params.freq_step ) - freq_sweeper = Sweeper( - Parameter.frequency, - delta_frequency_range, - [ro_pulses[qubit] for qubit in targets], - type=SweeperType.OFFSET, - ) - # amplitude - amplitude_range = np.arange( - params.min_amp_factor, params.max_amp_factor, params.step_amp_factor - ) + # taking advantage of multiplexing, apply the same set of gates to all qubits in parallel + ro_pulses = {} + amplitudes = {} + freq_sweepers = {} + sequence = PulseSequence() + for qubit in targets: + natives = platform.natives.single_qubit[qubit] + ro_channel, ro_pulse = natives.MZ()[0] + + ro_pulses[qubit] = ro_pulse + amplitudes[qubit] = ro_pulse.probe.amplitude + sequence.append((ro_channel, ro_pulse)) + + probe = platform.qubits[qubit].probe + f0 = platform.config(probe).frequency + freq_sweepers[qubit] = Sweeper( + parameter=Parameter.frequency, + values=f0 + delta_frequency_range, + channels=[probe], + ) + amp_sweeper = Sweeper( - Parameter.amplitude, - amplitude_range, - [ro_pulses[qubit] for qubit in targets], - type=SweeperType.FACTOR, + parameter=Parameter.amplitude, + range=(params.min_amp, params.max_amp, params.step_amp), + pulses=[ro_pulses[qubit] for qubit in targets], ) data = ResonatorPunchoutData( @@ -134,28 +129,25 @@ def _acquisition( resonator_type=platform.resonator_type, ) - results = platform.sweep( - sequence, - ExecutionParameters( - nshots=params.nshots, - relaxation_time=params.relaxation_time, - acquisition_type=AcquisitionType.INTEGRATION, - averaging_mode=AveragingMode.CYCLIC, - ), - amp_sweeper, - freq_sweeper, + results = platform.execute( + [sequence], + [[amp_sweeper], [freq_sweepers[q] for q in targets]], + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.INTEGRATION, + averaging_mode=AveragingMode.CYCLIC, ) # retrieve the results for every qubit for qubit, ro_pulse in ro_pulses.items(): # average signal, phase, i and q over the number of shots defined in the runcard - result = results[ro_pulse.serial] + result = results[ro_pulse.id] data.register_qubit( qubit, - signal=result.magnitude, - phase=result.phase, - freq=delta_frequency_range + ro_pulse.frequency, - amp=amplitude_range * amplitudes[qubit], + signal=magnitude(result), + phase=phase(result), + freq=freq_sweepers[qubit].values, + amp=amp_sweeper.values, ) return data @@ -264,9 +256,10 @@ def _plot( def _update(results: ResonatorPunchoutResults, platform: Platform, target: QubitId): - update.readout_frequency(results.readout_frequency[target], platform, target) - update.bare_resonator_frequency(results.bare_frequency[target], platform, target) - update.readout_amplitude(results.readout_amplitude[target], platform, target) + pass + # update.readout_frequency(results.readout_frequency[target], platform, target) + # update.bare_resonator_frequency(results.bare_frequency[target], platform, target) + # update.readout_amplitude(results.readout_amplitude[target], platform, target) resonator_punchout = Routine(_acquisition, _fit, _plot, _update) From d35ab6b2d707031520927a9325b62b9b95a60c62 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Fri, 18 Oct 2024 19:11:21 +0400 Subject: [PATCH 17/22] chore: update allxy --- src/qibocal/protocols/allxy/allxy.py | 105 +++++++-------------------- 1 file changed, 28 insertions(+), 77 deletions(-) diff --git a/src/qibocal/protocols/allxy/allxy.py b/src/qibocal/protocols/allxy/allxy.py index d2c89b935..5625fc71a 100644 --- a/src/qibocal/protocols/allxy/allxy.py +++ b/src/qibocal/protocols/allxy/allxy.py @@ -3,7 +3,7 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import AveragingMode, Platform, PulseSequence +from qibolab import AveragingMode, Delay, Platform, PulseSequence from qibocal.auto.operation import Data, Parameters, QubitId, Results, Routine @@ -90,27 +90,19 @@ def _acquisition( ) # execute the pulse sequence - options = ExecutionParameters( - nshots=params.nshots, averaging_mode=AveragingMode.CYCLIC - ) + options = dict(nshots=params.nshots, averaging_mode=AveragingMode.CYCLIC) if params.unrolling: - results = platform.execute_pulse_sequences(sequences, options) + results = platform.execute(sequences, **options) else: - results = [ - platform.execute_pulse_sequence(sequence, options) for sequence in sequences - ] + results = {} + for sequence in sequences: + results.update(platform.execute([sequence], **options)) - for ig, (gates, ro_pulses) in enumerate(zip(gatelist, all_ro_pulses)): + for gates, ro_pulses in zip(gatelist, all_ro_pulses): gate = "-".join(gates) for qubit in targets: - serial = ro_pulses[qubit].serial - if params.unrolling: - prob = results[serial][ig].probability(0) - z_proj = 2 * prob - 1 - else: - prob = results[ig][serial].probability(0) - z_proj = 2 * prob - 1 - + prob = 1 - results[ro_pulses[qubit].id] + z_proj = 2 * prob - 1 errors = 2 * np.sqrt(prob * (1 - prob) / params.nshots) data.register_qubit( AllXYType, @@ -135,85 +127,44 @@ def add_gate_pair_pulses_to_sequence( readout_delay=0, beta_param=None, ): - pulse_duration = platform.create_RX_pulse(qubit, start=0).duration - # All gates have equal pulse duration - - sequence_duration = sequence.get_qubit_pulses(qubit).duration + sequence_delay - pulse_start = sequence.get_qubit_pulses(qubit).duration + sequence_delay - + natives = platform.natives.single_qubit[qubit] for gate in gates: if gate == "I": pass if gate == "Xp": - if beta_param == None: - RX_pulse = platform.create_RX_pulse( - qubit, - start=pulse_start, - ) + if beta_param is None: + rx_sequence = natives.RX() else: - RX_pulse = platform.create_RX_drag_pulse( - qubit, - start=pulse_start, - beta=beta_param, - ) - sequence.add(RX_pulse) + raise NotImplementedError + sequence += rx_sequence if gate == "X9": - if beta_param == None: - RX90_pulse = platform.create_RX90_pulse( - qubit, - start=pulse_start, - ) + if beta_param is None: + rx90_sequence = natives.R(theta=np.pi / 2) else: - RX90_pulse = platform.create_RX90_drag_pulse( - qubit, - start=pulse_start, - beta=beta_param, - ) - sequence.add(RX90_pulse) + raise NotImplementedError + sequence += rx90_sequence if gate == "Yp": if beta_param == None: - RY_pulse = platform.create_RX_pulse( - qubit, - start=pulse_start, - relative_phase=np.pi / 2, - ) + ry_sequence = natives.R(phi=np.pi / 2) else: - RY_pulse = platform.create_RX_drag_pulse( - qubit, - start=pulse_start, - relative_phase=np.pi / 2, - beta=beta_param, - ) - sequence.add(RY_pulse) + raise NotImplementedError + sequence += ry_sequence if gate == "Y9": if beta_param == None: - RY90_pulse = platform.create_RX90_pulse( - qubit, - start=pulse_start, - relative_phase=np.pi / 2, - ) + ry90_sequence = natives.R(theta=np.pi / 2, phi=np.pi / 2) else: - RY90_pulse = platform.create_RX90_drag_pulse( - qubit, - start=pulse_start, - relative_phase=np.pi / 2, - beta=beta_param, - ) - sequence.add(RY90_pulse) - - sequence_duration += pulse_duration - pulse_start = sequence_duration + raise NotImplementedError + sequence += ry90_sequence # RO pulse starting just after pair of gates - ro_pulse = platform.create_qubit_readout_pulse( - qubit, start=sequence_duration + readout_delay - ) - - sequence.add(ro_pulse) + qd_channel = platform.qubits[qubit].drive + ro_channel, ro_pulse = natives.MZ()[0] + sequence.append((ro_channel, Delay(duration=sequence.channel_duration(qd_channel)))) + sequence.append((ro_channel, ro_pulse)) return sequence, ro_pulse From 21efb0e8641e2065cdfe55a2f66f4ca504b3f3c3 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:25:58 +0400 Subject: [PATCH 18/22] feat: implement update for single shot routine --- src/qibocal/auto/operation.py | 1 + src/qibocal/auto/output.py | 2 +- src/qibocal/protocols/classification.py | 9 ++---- src/qibocal/update.py | 40 +++++++++---------------- 4 files changed, 19 insertions(+), 33 deletions(-) diff --git a/src/qibocal/auto/operation.py b/src/qibocal/auto/operation.py index b00eb6003..fa1166bc6 100644 --- a/src/qibocal/auto/operation.py +++ b/src/qibocal/auto/operation.py @@ -17,6 +17,7 @@ QubitId = Union[str, int] QubitPairId = tuple[QubitId, QubitId] +ChannelId = str OperationId = NewType("OperationId", str) """Identifier for a calibration routine.""" diff --git a/src/qibocal/auto/output.py b/src/qibocal/auto/output.py index 2b8bdf194..714117725 100644 --- a/src/qibocal/auto/output.py +++ b/src/qibocal/auto/output.py @@ -212,7 +212,7 @@ def update_platform(platform: Platform, path: Path): platpath = path / UPDATED_PLATFORM platpath.mkdir(parents=True, exist_ok=True) - # dump_platform(platform, platpath) + platform.dump(platpath) def _export_stats(self): """Export task statistics. diff --git a/src/qibocal/protocols/classification.py b/src/qibocal/protocols/classification.py index 59eb3dc9a..499af12a6 100644 --- a/src/qibocal/protocols/classification.py +++ b/src/qibocal/protocols/classification.py @@ -404,12 +404,9 @@ def _plot( def _update( results: SingleShotClassificationResults, platform: Platform, target: QubitId ): - update.iq_angle(results.rotation_angle[target], platform, target) - update.threshold(results.threshold[target], platform, target) - update.mean_gnd_states(results.mean_gnd_states[target], platform, target) - update.mean_exc_states(results.mean_exc_states[target], platform, target) - update.readout_fidelity(results.fidelity[target], platform, target) - update.assignment_fidelity(results.assignment_fidelity[target], platform, target) + channel = platform.qubits[target].acquisition + update.iq_angle(results.rotation_angle[target], platform, channel) + update.threshold(results.threshold[target], platform, channel) single_shot_classification = Routine(_acquisition, _fit, _plot, _update) diff --git a/src/qibocal/update.py b/src/qibocal/update.py index b623dcf47..1a8df2798 100644 --- a/src/qibocal/update.py +++ b/src/qibocal/update.py @@ -7,7 +7,7 @@ from pydantic import BaseModel from qibolab import Platform -from qibocal.auto.operation import QubitId, QubitPairId +from qibocal.auto.operation import ChannelId, QubitId, QubitPairId CLASSIFICATION_PARAMS = [ "threshold", @@ -82,35 +82,23 @@ def crosstalk_matrix( platform.qubits[qubit].crosstalk_matrix[flux_qubit] = float(matrix_element) -def iq_angle(angle: float, platform: Platform, qubit: QubitId): - """Update iq angle value in platform for specific qubit.""" - # platform.qubits[qubit].iq_angle = float(angle) - pass - - -def threshold(threshold: float, platform: Platform, qubit: QubitId): - # platform.qubits[qubit].threshold = float(threshold) - pass - - -def mean_gnd_states(gnd_state: list, platform: Platform, qubit: QubitId): - """Update mean ground state value in platform for specific qubit.""" - # platform.qubits[qubit].mean_gnd_states = gnd_state - - -def mean_exc_states(exc_state: list, platform: Platform, qubit: QubitId): - """Update mean excited state value in platform for specific qubit.""" - # platform.qubits[qubit].mean_exc_states = exc_state +def replace(model: BaseModel, **update): + """Replace interface for pydantic models.""" + return model.model_copy(update=update) -def readout_fidelity(fidelity: float, platform: Platform, qubit: QubitId): - """Update fidelity of single shot classification.""" - # platform.qubits[qubit].readout_fidelity = float(fidelity) +def iq_angle(angle: float, platform: Platform, channel: ChannelId): + """Update classification iq angle value in platform for specific acquisition channel.""" + platform.parameters.configs[channel] = replace( + platform.config(channel), iq_angle=angle + ) -def assignment_fidelity(fidelity: float, platform: Platform, qubit: QubitId): - """Update fidelity of single shot classification.""" - # platform.qubits[qubit].assignment_fidelity = float(fidelity) +def threshold(threshold: float, platform: Platform, channel: ChannelId): + """Update classification threshold value in platform for specific acquisition channel.""" + platform.parameters.configs[channel] = replace( + platform.config(channel), threshold=threshold + ) def virtual_phases( From def460a3a0a250d2fa0ca2549856eeed59a0346c Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:41:44 +0400 Subject: [PATCH 19/22] feat: updates for resonator spectroscopy --- .../protocols/resonator_spectroscopy.py | 4 ---- src/qibocal/update.py | 24 ++++++------------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/qibocal/protocols/resonator_spectroscopy.py b/src/qibocal/protocols/resonator_spectroscopy.py index f6459acc0..132c51f24 100644 --- a/src/qibocal/protocols/resonator_spectroscopy.py +++ b/src/qibocal/protocols/resonator_spectroscopy.py @@ -350,10 +350,6 @@ def _update(results: ResonatorSpectroscopyResults, platform: Platform, target: Q update.readout_amplitude(results.amplitude[target], platform, target) if results.attenuation[target] is not None: update.readout_attenuation(results.attenuation[target], platform, target) - else: - update.bare_resonator_frequency( - results.bare_frequency[target], platform, target - ) resonator_spectroscopy = Routine(_acquisition, _fit, _plot, _update) diff --git a/src/qibocal/update.py b/src/qibocal/update.py index 1a8df2798..6760db00d 100644 --- a/src/qibocal/update.py +++ b/src/qibocal/update.py @@ -25,22 +25,17 @@ def replace(model: BaseModel, **update): def readout_frequency(freq: float, platform: Platform, qubit: QubitId): """Update readout frequency value in platform for specific qubit.""" - # mz = platform.qubits[qubit].native_gates.MZ - # freq_hz = int(freq) - # mz.frequency = freq_hz - # if mz.if_frequency is not None: - # mz.if_frequency = freq_hz - platform.qubits[qubit].readout.lo_frequency - # platform.qubits[qubit].readout_frequency = freq_hz - - -def bare_resonator_frequency(freq: float, platform: Platform, qubit: QubitId): - """Update rbare frequency value in platform for specific qubit.""" - # platform.qubits[qubit].bare_resonator_frequency = int(freq) + channel = platform.qubits[qubit].probe + platform.parameters.configs[channel] = replace( + platform.config(channel), frequency=freq + ) def readout_amplitude(amp: float, platform: Platform, qubit: QubitId): """Update readout amplitude value in platform for specific qubit.""" - # platform.natives.single_qubit[qubit].MZ.amplitude = float(amp) + channel, pulse = platform.natives.single_qubit[qubit].MZ[0] + new_pulse = replace(pulse, probe=replace(pulse.probe, amplitude=amp)) + platform.natives.single_qubit[qubit].MZ[0] = (channel, new_pulse) def readout_attenuation(att: int, platform: Platform, qubit: QubitId): @@ -82,11 +77,6 @@ def crosstalk_matrix( platform.qubits[qubit].crosstalk_matrix[flux_qubit] = float(matrix_element) -def replace(model: BaseModel, **update): - """Replace interface for pydantic models.""" - return model.model_copy(update=update) - - def iq_angle(angle: float, platform: Platform, channel: ChannelId): """Update classification iq angle value in platform for specific acquisition channel.""" platform.parameters.configs[channel] = replace( From 2b86cd4a12507917710ea4d052e10d5c82e4f2e1 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:50:03 +0400 Subject: [PATCH 20/22] refactor: use qubit instead of channel in single shot updates --- src/qibocal/protocols/classification.py | 5 ++--- src/qibocal/update.py | 10 ++++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/qibocal/protocols/classification.py b/src/qibocal/protocols/classification.py index 499af12a6..ab45396de 100644 --- a/src/qibocal/protocols/classification.py +++ b/src/qibocal/protocols/classification.py @@ -404,9 +404,8 @@ def _plot( def _update( results: SingleShotClassificationResults, platform: Platform, target: QubitId ): - channel = platform.qubits[target].acquisition - update.iq_angle(results.rotation_angle[target], platform, channel) - update.threshold(results.threshold[target], platform, channel) + update.iq_angle(results.rotation_angle[target], platform, target) + update.threshold(results.threshold[target], platform, target) single_shot_classification = Routine(_acquisition, _fit, _plot, _update) diff --git a/src/qibocal/update.py b/src/qibocal/update.py index 6760db00d..97bd2c063 100644 --- a/src/qibocal/update.py +++ b/src/qibocal/update.py @@ -77,15 +77,17 @@ def crosstalk_matrix( platform.qubits[qubit].crosstalk_matrix[flux_qubit] = float(matrix_element) -def iq_angle(angle: float, platform: Platform, channel: ChannelId): - """Update classification iq angle value in platform for specific acquisition channel.""" +def iq_angle(angle: float, platform: Platform, qubit: ChannelId): + """Update classification iq angle value in platform for specific qubit.""" + channel = platform.qubits[qubit].acquisition platform.parameters.configs[channel] = replace( platform.config(channel), iq_angle=angle ) -def threshold(threshold: float, platform: Platform, channel: ChannelId): - """Update classification threshold value in platform for specific acquisition channel.""" +def threshold(threshold: float, platform: Platform, qubit: ChannelId): + """Update classification threshold value in platform for specific qubit.""" + channel = platform.qubits[qubit].acquisition platform.parameters.configs[channel] = replace( platform.config(channel), threshold=threshold ) From 70a546bfaa8b90a527440be7f38c81a3e0a93be2 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:50:42 +0400 Subject: [PATCH 21/22] fix: type annotations --- src/qibocal/update.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qibocal/update.py b/src/qibocal/update.py index 97bd2c063..215deb43e 100644 --- a/src/qibocal/update.py +++ b/src/qibocal/update.py @@ -7,7 +7,7 @@ from pydantic import BaseModel from qibolab import Platform -from qibocal.auto.operation import ChannelId, QubitId, QubitPairId +from qibocal.auto.operation import QubitId, QubitPairId CLASSIFICATION_PARAMS = [ "threshold", @@ -77,7 +77,7 @@ def crosstalk_matrix( platform.qubits[qubit].crosstalk_matrix[flux_qubit] = float(matrix_element) -def iq_angle(angle: float, platform: Platform, qubit: ChannelId): +def iq_angle(angle: float, platform: Platform, qubit: QubitId): """Update classification iq angle value in platform for specific qubit.""" channel = platform.qubits[qubit].acquisition platform.parameters.configs[channel] = replace( @@ -85,7 +85,7 @@ def iq_angle(angle: float, platform: Platform, qubit: ChannelId): ) -def threshold(threshold: float, platform: Platform, qubit: ChannelId): +def threshold(threshold: float, platform: Platform, qubit: QubitId): """Update classification threshold value in platform for specific qubit.""" channel = platform.qubits[qubit].acquisition platform.parameters.configs[channel] = replace( From 9601c212b53be812b22df323980c568a0cd1216e Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Wed, 2 Oct 2024 18:04:41 +0400 Subject: [PATCH 22/22] feat: updates for Rabi routines --- src/qibocal/update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qibocal/update.py b/src/qibocal/update.py index 215deb43e..b3d0993a0 100644 --- a/src/qibocal/update.py +++ b/src/qibocal/update.py @@ -58,7 +58,9 @@ def drive_amplitude(amp: Union[float, tuple, list], platform: Platform, qubit: Q """Update drive frequency value in platform for specific qubit.""" if isinstance(amp, Iterable): amp = amp[0] - # platform.natives.single_qubit[qubit].RX.amplitude = float(amp) + channel, pulse = platform.natives.single_qubit[qubit].RX[0] + new_pulse = replace(pulse, amplitude=amp) + platform.natives.single_qubit[qubit].RX[0] = (channel, new_pulse) def drive_duration( @@ -67,7 +69,9 @@ def drive_duration( """Update drive duration value in platform for specific qubit.""" if isinstance(duration, Iterable): duration = duration[0] - # platform.natives.single_qubit[qubit].RX.duration = int(duration) + channel, pulse = platform.natives.single_qubit[qubit].RX[0] + new_pulse = replace(pulse, duration=duration) + platform.natives.single_qubit[qubit].RX[0] = (channel, new_pulse) def crosstalk_matrix(