diff --git a/.gitignore b/.gitignore index 97167ada7..8ddee1930 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,9 @@ instance/ .scrapy # Sphinx documentation -docs/_build/ +doc/_build/ +doc/source/api-reference/ + # PyBuilder target/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ad0e7a1b..ce7d66c86 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,11 +11,11 @@ repos: - id: check-merge-conflict - id: debug-statements - repo: https://github.com/psf/black - rev: 23.10.1 + rev: 23.11.0 hooks: - id: black - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.1 hooks: - id: isort args: ["--profile", "black"] @@ -24,7 +24,7 @@ repos: hooks: - id: pyupgrade - repo: https://github.com/hadialqattan/pycln - rev: v2.3.0 + rev: v2.4.0 hooks: - id: pycln args: diff --git a/doc/source/api-reference/modules.rst b/doc/source/api-reference/modules.rst index 9ac191963..ce4991df8 100644 --- a/doc/source/api-reference/modules.rst +++ b/doc/source/api-reference/modules.rst @@ -3,7 +3,7 @@ API reference ============= -In this section we present the main Qibolab components and primitives included in the public API. +In this section we present the main qibocal components and primitives included in the public API. .. toctree:: diff --git a/doc/source/api-reference/qibocal.auto.rst b/doc/source/api-reference/qibocal.auto.rst deleted file mode 100644 index 74989016d..000000000 --- a/doc/source/api-reference/qibocal.auto.rst +++ /dev/null @@ -1,82 +0,0 @@ -qibocal.auto package -==================== - -.. automodule:: qibocal.auto - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -qibocal.auto.draw module ------------------------- - -.. automodule:: qibocal.auto.draw - :members: - :undoc-members: - :show-inheritance: - -qibocal.auto.execute module ---------------------------- - -.. automodule:: qibocal.auto.execute - :members: - :undoc-members: - :show-inheritance: - -qibocal.auto.graph module -------------------------- - -.. automodule:: qibocal.auto.graph - :members: - :undoc-members: - :show-inheritance: - -qibocal.auto.history module ---------------------------- - -.. automodule:: qibocal.auto.history - :members: - :undoc-members: - :show-inheritance: - -qibocal.auto.operation module ------------------------------ - -.. automodule:: qibocal.auto.operation - :members: - :undoc-members: - :show-inheritance: - -qibocal.auto.runcard module ---------------------------- - -.. automodule:: qibocal.auto.runcard - :members: - :undoc-members: - :show-inheritance: - -qibocal.auto.status module --------------------------- - -.. automodule:: qibocal.auto.status - :members: - :undoc-members: - :show-inheritance: - -qibocal.auto.task module ------------------------- - -.. automodule:: qibocal.auto.task - :members: - :undoc-members: - :show-inheritance: - -qibocal.auto.validate module ----------------------------- - -.. automodule:: qibocal.auto.validate - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api-reference/qibocal.cli.rst b/doc/source/api-reference/qibocal.cli.rst deleted file mode 100644 index cc270b377..000000000 --- a/doc/source/api-reference/qibocal.cli.rst +++ /dev/null @@ -1,26 +0,0 @@ -qibocal.cli package -=================== - -.. automodule:: qibocal.cli - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -qibocal.cli.builders module ---------------------------- - -.. automodule:: qibocal.cli.builders - :members: - :undoc-members: - :show-inheritance: - -qibocal.cli.utils module ------------------------- - -.. automodule:: qibocal.cli.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api-reference/qibocal.protocols.characterization.allxy.rst b/doc/source/api-reference/qibocal.protocols.characterization.allxy.rst deleted file mode 100644 index 20e4fb655..000000000 --- a/doc/source/api-reference/qibocal.protocols.characterization.allxy.rst +++ /dev/null @@ -1,34 +0,0 @@ -qibocal.protocols.characterization.allxy package -================================================ - -.. automodule:: qibocal.protocols.characterization.allxy - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -qibocal.protocols.characterization.allxy.allxy module ------------------------------------------------------ - -.. automodule:: qibocal.protocols.characterization.allxy.allxy - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.allxy.allxy\_drag\_pulse\_tuning module --------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.allxy.allxy_drag_pulse_tuning - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.allxy.drag\_pulse\_tuning module -------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.allxy.drag_pulse_tuning - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api-reference/qibocal.protocols.characterization.coherence.rst b/doc/source/api-reference/qibocal.protocols.characterization.coherence.rst deleted file mode 100644 index 98749deb1..000000000 --- a/doc/source/api-reference/qibocal.protocols.characterization.coherence.rst +++ /dev/null @@ -1,66 +0,0 @@ -qibocal.protocols.characterization.coherence package -==================================================== - -.. automodule:: qibocal.protocols.characterization.coherence - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -qibocal.protocols.characterization.coherence.spin\_echo module --------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.coherence.spin_echo - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.coherence.t1 module ------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.coherence.t1 - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.coherence.t1\_sequences module ------------------------------------------------------------------ - -.. automodule:: qibocal.protocols.characterization.coherence.t1_sequences - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.coherence.t2 module ------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.coherence.t2 - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.coherence.t2\_sequences module ------------------------------------------------------------------ - -.. automodule:: qibocal.protocols.characterization.coherence.t2_sequences - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.coherence.utils module ---------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.coherence.utils - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.coherence.zeno module --------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.coherence.zeno - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api-reference/qibocal.protocols.characterization.flux_dependence.rst b/doc/source/api-reference/qibocal.protocols.characterization.flux_dependence.rst deleted file mode 100644 index 2c043d345..000000000 --- a/doc/source/api-reference/qibocal.protocols.characterization.flux_dependence.rst +++ /dev/null @@ -1,34 +0,0 @@ -qibocal.protocols.characterization.flux\_dependence package -=========================================================== - -.. automodule:: qibocal.protocols.characterization.flux_dependence - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -qibocal.protocols.characterization.flux\_dependence.qubit\_flux\_dependence module ----------------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.flux_dependence.qubit_flux_dependence - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.flux\_dependence.resonator\_flux\_dependence module --------------------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.flux_dependence.resonator_flux_dependence - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.flux\_dependence.utils module ----------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.flux_dependence.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api-reference/qibocal.protocols.characterization.rabi.rst b/doc/source/api-reference/qibocal.protocols.characterization.rabi.rst deleted file mode 100644 index 4cd12204c..000000000 --- a/doc/source/api-reference/qibocal.protocols.characterization.rabi.rst +++ /dev/null @@ -1,42 +0,0 @@ -qibocal.protocols.characterization.rabi package -=============================================== - -.. automodule:: qibocal.protocols.characterization.rabi - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -qibocal.protocols.characterization.rabi.amplitude module --------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.rabi.amplitude - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.rabi.length module ------------------------------------------------------ - -.. automodule:: qibocal.protocols.characterization.rabi.length - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.rabi.length\_sequences module ----------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.rabi.length_sequences - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.rabi.utils module ----------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.rabi.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api-reference/qibocal.protocols.characterization.randomized_benchmarking.rst b/doc/source/api-reference/qibocal.protocols.characterization.randomized_benchmarking.rst deleted file mode 100644 index 39ce64e62..000000000 --- a/doc/source/api-reference/qibocal.protocols.characterization.randomized_benchmarking.rst +++ /dev/null @@ -1,58 +0,0 @@ -qibocal.protocols.characterization.randomized\_benchmarking package -=================================================================== - -.. automodule:: qibocal.protocols.characterization.randomized_benchmarking - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -qibocal.protocols.characterization.randomized\_benchmarking.circuit\_tools module ---------------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.randomized_benchmarking.circuit_tools - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.randomized\_benchmarking.data module ------------------------------------------------------------------------ - -.. automodule:: qibocal.protocols.characterization.randomized_benchmarking.data - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.randomized\_benchmarking.fitting module --------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.randomized_benchmarking.fitting - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.randomized\_benchmarking.noisemodels module ------------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.randomized_benchmarking.noisemodels - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.randomized\_benchmarking.standard\_rb module -------------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.randomized_benchmarking.standard_rb - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.randomized\_benchmarking.utils module ------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.randomized_benchmarking.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api-reference/qibocal.protocols.characterization.rst b/doc/source/api-reference/qibocal.protocols.characterization.rst deleted file mode 100644 index 0681e91c0..000000000 --- a/doc/source/api-reference/qibocal.protocols.characterization.rst +++ /dev/null @@ -1,135 +0,0 @@ -qibocal.protocols.characterization package -========================================== - -.. automodule:: qibocal.protocols.characterization - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - qibocal.protocols.characterization.allxy - qibocal.protocols.characterization.coherence - qibocal.protocols.characterization.flux_dependence - qibocal.protocols.characterization.rabi - qibocal.protocols.characterization.randomized_benchmarking - qibocal.protocols.characterization.two_qubit_interaction - -Submodules ----------- - -qibocal.protocols.characterization.classification module --------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.classification - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.dispersive\_shift module ------------------------------------------------------------ - -.. automodule:: qibocal.protocols.characterization.dispersive_shift - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.flipping module --------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.flipping - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.qubit\_spectroscopy module -------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.qubit_spectroscopy - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.ramsey module ------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.ramsey - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.ramsey\_sequences module ------------------------------------------------------------ - -.. automodule:: qibocal.protocols.characterization.ramsey_sequences - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.readout\_characterization module -------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.readout_characterization - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.resonator\_punchout module -------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.resonator_punchout - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.resonator\_punchout\_attenuation module --------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.resonator_punchout_attenuation - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.resonator\_spectroscopy module ------------------------------------------------------------------ - -.. automodule:: qibocal.protocols.characterization.resonator_spectroscopy - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.resonator\_spectroscopy\_attenuation module ------------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.resonator_spectroscopy_attenuation - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.test module ----------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.test - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.two module ---------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.two - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.utils module ------------------------------------------------ - -.. automodule:: qibocal.protocols.characterization.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api-reference/qibocal.protocols.characterization.two_qubit_interaction.rst b/doc/source/api-reference/qibocal.protocols.characterization.two_qubit_interaction.rst deleted file mode 100644 index 58aa1db08..000000000 --- a/doc/source/api-reference/qibocal.protocols.characterization.two_qubit_interaction.rst +++ /dev/null @@ -1,34 +0,0 @@ -qibocal.protocols.characterization.two\_qubit\_interaction package -================================================================== - -.. automodule:: qibocal.protocols.characterization.two_qubit_interaction - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -qibocal.protocols.characterization.two\_qubit\_interaction.chevron module -------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.two_qubit_interaction.chevron - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.two\_qubit\_interaction.cz\_virtualz module ------------------------------------------------------------------------------- - -.. automodule:: qibocal.protocols.characterization.two_qubit_interaction.cz_virtualz - :members: - :undoc-members: - :show-inheritance: - -qibocal.protocols.characterization.two\_qubit\_interaction.utils module ------------------------------------------------------------------------ - -.. automodule:: qibocal.protocols.characterization.two_qubit_interaction.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api-reference/qibocal.protocols.rst b/doc/source/api-reference/qibocal.protocols.rst deleted file mode 100644 index 1ee545a70..000000000 --- a/doc/source/api-reference/qibocal.protocols.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. _calibration_routines: - -qibocal.protocols package -========================= - -.. automodule:: qibocal.protocols - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - qibocal.protocols.characterization diff --git a/doc/source/api-reference/qibocal.rst b/doc/source/api-reference/qibocal.rst deleted file mode 100644 index a7561e257..000000000 --- a/doc/source/api-reference/qibocal.rst +++ /dev/null @@ -1,45 +0,0 @@ -qibocal package -=============== - -.. automodule:: qibocal - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - qibocal.auto - qibocal.cli - qibocal.protocols - qibocal.web - -Submodules ----------- - -qibocal.bootstrap module ------------------------- - -.. automodule:: qibocal.bootstrap - :members: - :undoc-members: - :show-inheritance: - -qibocal.config module ---------------------- - -.. automodule:: qibocal.config - :members: - :undoc-members: - :show-inheritance: - -qibocal.utils module --------------------- - -.. automodule:: qibocal.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api-reference/qibocal.web.rst b/doc/source/api-reference/qibocal.web.rst deleted file mode 100644 index ad03adc9b..000000000 --- a/doc/source/api-reference/qibocal.web.rst +++ /dev/null @@ -1,18 +0,0 @@ -qibocal.web package -=================== - -.. automodule:: qibocal.web - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -qibocal.web.report module -------------------------- - -.. automodule:: qibocal.web.report - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/conf.py b/doc/source/conf.py index 1ff3d3745..193a84e86 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -47,7 +47,9 @@ "sphinx.ext.viewcode", "sphinx.ext.todo", "sphinx_copybutton", + "sphinxcontrib.bibtex", ] +bibtex_bibfiles = ["refs.bib"] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] diff --git a/doc/source/getting-started/index.rst b/doc/source/getting-started/index.rst index 5c57f59e9..d41bbf99c 100644 --- a/doc/source/getting-started/index.rst +++ b/doc/source/getting-started/index.rst @@ -12,5 +12,6 @@ your quantum hardware. interface runcard autoruncard + validation protocols example diff --git a/doc/source/getting-started/protocols.rst b/doc/source/getting-started/protocols.rst index 3add22bd1..6d35cc39a 100644 --- a/doc/source/getting-started/protocols.rst +++ b/doc/source/getting-started/protocols.rst @@ -8,3 +8,9 @@ Here is a scheme with the protocols currently available in Qibocal. The source code for each protocol is available in the :ref:`Components`. + +.. toctree:: + :maxdepth: 2 + :caption: Protocols + + ../protocols/index diff --git a/doc/source/getting-started/qpu_characterization.svg b/doc/source/getting-started/qpu_characterization.svg index 064cb3f0c..400d1aae4 100644 --- a/doc/source/getting-started/qpu_characterization.svg +++ b/doc/source/getting-started/qpu_characterization.svg @@ -1,4 +1,4 @@ -
Hardware Characterization
Single Qubit Routines
Gate Set Characterization
Standard Randomized Benchmarking
Low Level Characterization
Resonator Characterization
Resonator Spectroscopy
Resonator Punchout
Resonator Flux Dependence
Resonator Crosstalk
Readout Optimization
Qubit Characterization
Qubit Spectroscopy
Qubit EF Spectroscopy
Qubit Flux Dependence
Qubit Crosstalk
Qubit flux tracking
T1 & T2
Couplers
Qubit spectroscopy
Resonator Spectroscopy
Zeno
Single-Shot Classification
Rabi
Amplitude
Length
EF Transition
AllXY & Drag Pulse Tuning
Ramsey
Standard
Detuned
Flipping
Dispersive Shift
Readout Characterization
Fidelity
QND-ness
Mitigation matrix
TWPA Optimization
Fast Reset Test
Time of Flight Readout
Qutrit classification
Avoided crossing
Two Qubits Interactions
Chevron
Tune Landscape
CHSH
diff --git a/doc/source/getting-started/validation.rst b/doc/source/getting-started/validation.rst new file mode 100644 index 000000000..f9a89329f --- /dev/null +++ b/doc/source/getting-started/validation.rst @@ -0,0 +1,23 @@ +How to add validation to your protocol? +======================================= + +In Qibocal there is the possibility to add a validation step +during the execution of your protocols. +Here is an example of a runcard which validates the results through +:math:`\chi^2`. + +.. code-block:: yaml + + actions: + - id: t1 + priority: 0 + operation: t1 + validator: + scheme: chi2 + parameters: + chi2_max_value: 1 + parameters: + ... + +The execution will be interrupted in this case if the :math:`\chi^2` exceeds +`chi_max_value`. diff --git a/doc/source/index.rst b/doc/source/index.rst index f469fc2b3..2eda0bb1e 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -4,7 +4,7 @@ What is Qibocal? ================ -Qibocal is a python module that implements Quatum Characterization Validation and Verification using +Qibocal is a python module that implements Quantum Characterization Validation and Verification using `Qibo `_ and `Qibolab `_. diff --git a/doc/source/protocols/classification.png b/doc/source/protocols/classification.png new file mode 100644 index 000000000..aa4c22b68 Binary files /dev/null and b/doc/source/protocols/classification.png differ diff --git a/doc/source/protocols/index.rst b/doc/source/protocols/index.rst new file mode 100644 index 000000000..f751e10f0 --- /dev/null +++ b/doc/source/protocols/index.rst @@ -0,0 +1,9 @@ +Protocols +========= + +In this section we introduce the basics of all protocols supported by ``qibocal``. + +.. toctree:: + :maxdepth: 1 + + resonator_spectroscopy diff --git a/doc/source/protocols/qubit_flux_spectroscopy.png b/doc/source/protocols/qubit_flux_spectroscopy.png new file mode 100644 index 000000000..447a904ce Binary files /dev/null and b/doc/source/protocols/qubit_flux_spectroscopy.png differ diff --git a/doc/source/protocols/qubit_spectroscopy.png b/doc/source/protocols/qubit_spectroscopy.png new file mode 100644 index 000000000..9ca8447a0 Binary files /dev/null and b/doc/source/protocols/qubit_spectroscopy.png differ diff --git a/doc/source/protocols/rabi_amplitude.png b/doc/source/protocols/rabi_amplitude.png new file mode 100644 index 000000000..5998fed57 Binary files /dev/null and b/doc/source/protocols/rabi_amplitude.png differ diff --git a/doc/source/protocols/rb.png b/doc/source/protocols/rb.png new file mode 100644 index 000000000..004e07885 Binary files /dev/null and b/doc/source/protocols/rb.png differ diff --git a/doc/source/protocols/resonator_punchout.png b/doc/source/protocols/resonator_punchout.png new file mode 100644 index 000000000..25760401d Binary files /dev/null and b/doc/source/protocols/resonator_punchout.png differ diff --git a/doc/source/protocols/resonator_spectroscopy.rst b/doc/source/protocols/resonator_spectroscopy.rst new file mode 100644 index 000000000..af2318122 --- /dev/null +++ b/doc/source/protocols/resonator_spectroscopy.rst @@ -0,0 +1,140 @@ +Resonator spectroscopy +====================== + + +When calibrating the readout pulse, the first thing to do is finding the resonator frequency. +At this frequency we will be able to observe a clear difference in the transmitted +signal: if the resonator is a 3D cavity we will observe an amplified signal, while for a +2D resonator we will observe a higher absorption. In both cases, we expect to see a +Lorentzian peak (positive for 3D cavity or negative for 2D resonators). + +In the experiment, we send a readout pulse with fixed duration and amplitude and, +after waiting for the time of flight, we acquire a waveform that we average, obtaining a single +point. This experiment is extremely dependent on the amplitude of the pulse. + +Since the objective of this experiment is to find the resonator frequency, without any readout +optimization (something that we will have to do afterwards), we can fix the duration of +the pulse in the order of magnitude of µs. +For the amplitude the discussion is slightly more complex and there are several +elements to take into consideration: + +* higher amplitudes usually correspond to better signal to noise ratio; +* at high amplitudes the signal breaks superconductivity, therefore resonator is not effectively not coupled to the qubit (we talk of bare resonator frequency); +* at intermediate amplitudes the peak could completely disappear and is, in general, not Lorentzian; +* very high amplitudes could damage the components. + +The bare resonator frequency can be found setting a large value for the amplitude, e.g.: + +.. code-block:: yaml + + platform: + + qubits: [0] + + actions: + + - id: resonator_spectroscopy high power + priority: 0 + operation: resonator_spectroscopy + parameters: + freq_width: 60_000_000 + freq_step: 200_000 + amplitude: 0.6 + power_level: high + nshots: 1024 + relaxation_time: 100000 + +.. image:: resonator_spectroscopy_high.png + +Lowering the amplitude we can see a shift in the peak, e.g.: + +.. code-block:: yaml + + platform: + + qubits: [0] + + actions: + + - id: resonator_spectroscopy low power + priority: 0 + operation: resonator_spectroscopy + parameters: + freq_width: 60_000_000 + freq_step: 200_000 + amplitude: 0.03 + power_level: low + nshots: 1024 + relaxation_time: 100000 + +.. image:: resonator_spectroscopy_low.png + +Running the ``qibocal`` routines above produces outputs in the reports like the ones shown above. +The peaks are Lorentzian. As we can see, at low power the resonator fequency shifts. +This is due to the Hamiltonian of the system :cite:p:`Blais_2004, wallraff2004strong`. Therefore, the dressed resonator +frequency is larger than the bare resonator frequency. + +Lowering the amplitude value also reduces the height of the peak and increases the noise. + +Another parameter connected to the amplitude, is also the relaxation time (in some +literature also referred to as repetition duration) and the number of shots. +The number of shots represents the number of repetitions of the same experiment (at the same +frequency), while the relaxation time is the waiting time between repetitions. A higher +number of shots will increase the S/N ratio by averaging the noise, but will also slow +down the acquisition. +As per the relaxation time, for this experiment in particular we +can leave it at zero: since we are not exciting the qubit we do not particularly care +about it. However note that, for 3D cavities, we could end up damaging the qubit if we +send too much energy over a small period of time so it could be worth to increase the +relaxation time. However, some electronics do not support zero relaxation times, therefore +a relaxation time greater than zero is a safer choice. + +Last but not least, we have to choose which frequencies are probed during the scan: +a very wide scan can be useful if nothing is known about the studied resonator, but in +general we have at least the design parameters. These are often not exact, but can give +an idea of the region to scan (for standard cavities around 7 GHz). Also, a very small +step between two subsequent frequency points is not needed and could really slow down +the experiment (from seconds to tens of minutes) if chosen incorrectly. Usually, a step +of 200 MHz is fine enough. + +The resonator frequencies can be then inserted into the platform runcards (in ``qibolab_platforms_qrc``). +For example, if we are reading qubit 0: + +.. code-block:: yaml + + native_gates: + single_qubit: + 0: # qubit number + RX: + duration: 40 + amplitude: + frequency: + shape: Gaussian(5) + type: qd # qubit drive + relative_start: 0 + phase: 0 + MZ: + duration: 2000 + amplitude: + frequency: + shape: Rectangular() + type: ro # readout + relative_start: 0 + phase: 0 + +and also here: + +.. code-block:: yaml + + characterization: + single_qubit: + 0: + bare_resonator_frequency: + readout_frequency: 5_227_920_060 + drive_frequency: + +.. rubric:: References + +.. bibliography:: + :filter: docname in docnames + :style: plain diff --git a/doc/source/protocols/resonator_spectroscopy_high.png b/doc/source/protocols/resonator_spectroscopy_high.png new file mode 100644 index 000000000..a689c9912 Binary files /dev/null and b/doc/source/protocols/resonator_spectroscopy_high.png differ diff --git a/doc/source/protocols/resonator_spectroscopy_low.png b/doc/source/protocols/resonator_spectroscopy_low.png new file mode 100644 index 000000000..4b366f8ce Binary files /dev/null and b/doc/source/protocols/resonator_spectroscopy_low.png differ diff --git a/doc/source/protocols/ro_characterization.png b/doc/source/protocols/ro_characterization.png new file mode 100644 index 000000000..f71ea37d1 Binary files /dev/null and b/doc/source/protocols/ro_characterization.png differ diff --git a/doc/source/protocols/t1.png b/doc/source/protocols/t1.png new file mode 100644 index 000000000..fd9bacbdf Binary files /dev/null and b/doc/source/protocols/t1.png differ diff --git a/doc/source/protocols/t2.png b/doc/source/protocols/t2.png new file mode 100644 index 000000000..ad35cf175 Binary files /dev/null and b/doc/source/protocols/t2.png differ diff --git a/doc/source/refs.bib b/doc/source/refs.bib new file mode 100644 index 000000000..07c36fc76 --- /dev/null +++ b/doc/source/refs.bib @@ -0,0 +1,46 @@ +@article{Blais_2004, + doi = {10.1103/physreva.69.062320}, + url = {https://doi.org/10.1103%2Fphysreva.69.062320}, + year = 2004, + month = {jun}, + publisher = {American Physical Society ({APS})}, + volume = {69}, + number = {6}, + author = {Alexandre Blais and Ren-Shou Huang and Andreas Wallraff and S. M. Girvin and R. J. Schoelkopf}, + title = {Cavity quantum electrodynamics for superconducting electrical circuits: An architecture for quantum computation}, + journal = {Physical Review A} +} + +@article{wallraff2004strong, + doi = {https://doi.org/10.1038/nature02851}, + title = {Strong coupling of a single photon to a superconducting qubit using circuit quantum electrodynamics}, + author = {Wallraff, Andreas and Schuster, David I and Blais, Alexandre and Frunzio, Luigi and Huang, R-S and Majer, Johannes and Kumar, Sameer and Girvin, Steven M and Schoelkopf, Robert J}, + journal = {Nature}, + volume = {431}, + number = {7005}, + pages = {162--167}, + year = {2004}, + publisher = {Nature Publishing Group UK London} +} + +@misc{gao2021practical, + title={A practical guide for building superconducting quantum devices}, + author={Yvonne Y. Gao and M. Adriaan Rol and Steven Touzard and Chen Wang}, + year={2021}, + eprint={2106.06173}, + archivePrefix={arXiv}, + primaryClass={quant-ph} +} + +@article{Krantz_2019, + title={A quantum engineer’s guide to superconducting qubits}, + volume={6}, + ISSN={1931-9401}, + url={http://dx.doi.org/10.1063/1.5089550}, + DOI={10.1063/1.5089550}, + number={2}, + journal={Applied Physics Reviews}, + publisher={AIP Publishing}, + author={Krantz, P. and Kjaergaard, M. and Yan, F. and Orlando, T. P. and Gustavsson, S. and Oliver, W. D.}, + year={2019}, + month=jun } diff --git a/doc/source/tutorials/protocol.rst b/doc/source/tutorials/advanced.rst similarity index 66% rename from doc/source/tutorials/protocol.rst rename to doc/source/tutorials/advanced.rst index afe147380..a47d9787e 100644 --- a/doc/source/tutorials/protocol.rst +++ b/doc/source/tutorials/advanced.rst @@ -1,10 +1,121 @@ +Advanced examples +================= + +How to use Qibocal as a library +------------------------------- + +Qibocal also allows executing protocols without the standard :ref:`interface `. + +In the following tutorial we show how to run a single protocol using Qibocal as a library. +For this particular example we will focus on the `single shot classification protocol +`_. + +.. code-block:: python + + from qibocal.protocols.characterization import Operation + from qibolab import create_platform + + # allocate platform + platform = create_platform("....") + # get qubits from platform + qubits = platform.qubits + + # we select the protocol + protocol = Operation.single_shot_classification.value + +``protocol`` is a `Routine `_ object which contains all the necessary +methods to execute the experiment. + +In order to run a protocol the user needs to specify the parameters. +The user can check which parameters need to be provided either by checking the +documentation of the specific protocol or by simply inspecting ``protocol.parameters_type``. +For ``single_shot_classification`` we can pass just the number of shots +in the following way: + +.. code-block:: python + + parameters = experiment.parameters_type.load(dict(nshots=1024)) + + +After defining the parameters, the user can perform the acquisition using +``experiment.acquisition`` which accepts the following parameters: + +* params (`experiment.parameters_type `_): input parameters for the experiment +* platform (`qibolab.platform.Platform `_): Qibolab platform class +* qubits (dict[`QubitId `_, `QubitPairId `_]) dictionary with qubits where the acquisition will run + +and returns the following: + +* data (`experiment.data_type `_): data acquired +* acquisition_time (float): acquisition time on hardware + +.. code-block:: python + + data, acquisition_time = experiment.acquisition(params=parameters, platform=platform, qubits=qubits) + + +The user can now use the raw data acquired by the quantum processor to perform +an arbitrary post-processing analysis. This is one of the main advantages of this API +compared to the cli execution. + +The fitting corresponding to the experiment (``experiment.fit``) can be launched in the +following way: + +.. code-block:: python + + fit, fit_time = experiment.fit(data) + +To be more specific the user should pass as input ``data`` which is of type +``experiment.data_type`` and the outputs are the following: + +* fit: (`experiment.results_type `_) input parameters for the experiment +* fit_time (float): post-processing time + + +It is also possible to access the plots and the tables generated in the +report using ``experiment.report`` which accepts the following parameters: + +* data: (`experiment.data_type `_) data structure used by ``experiment`` +* qubit (dict[`QubitId `_, `QubitPairId `_]): qubit / qubit pair to be plotted +* fit: (`experiment.results_type `_): data structure for post-processing used by ``experiment`` + +.. code-block:: python + + # Plot for qubit 0 + qubit = 0 + figs, html_content = experiment.report(data=data, qubit=0, fit=fit) + +``experiment.report`` returns the following: + +* figs: list of plotly figures +* html_content: raw html with additional information usually in the form of a table + +In our case we get the following figure for qubit 0: + +.. code-block:: python + + figs[0] + + +.. image:: classification_plot.png + +and we can render the html content in the following way: + +.. code-block:: python + + import IPython + IPython.display.HTML(html_content) + +.. image:: classification_table.png + + How to add a new protocol -========================= +------------------------- In this tutorial we show how to add a new protocol to ``Qibocal``. Protocol implementation in ``Qibocal`` --------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Currently, characterization/calibration protocols are divided in three steps: `acquisition`, `fit` and `plot`. ``Qibocal`` provides three data structures *input parameters*, *data acquired* and *results*, that collect all the information concerning the routine. @@ -18,7 +129,7 @@ The relationship between steps and data structures are summarized in the followi This approach is flexible enough to allow the data acquisition without performing a post-processing analysis. Step by step tutorial ---------------------- +~~~~~~~~~~~~~~~~~~~~~ All protocols are located in `src/qibocal/protocols/characterization `_. Suppose that we want to code a protocol to perform a RX rotation for different @@ -60,7 +171,7 @@ of shots. Data structure ^^^^^^^^^^^^^^ -Secondly, we define a data structure aims at storing both the angles and +Secondly, we define a data structure that aims at storing both the angles and the probabilities measured for each qubit. A generic data structure is usually composed of some raw data (the data attribute), which is usually coded as a dictionary of arrays plus additional information if required. @@ -93,7 +204,7 @@ plus additional information if required. .. note:: When the protocols will be executed the data will be saved automatically. - The `data` attribute will be store as a `npz` file, while the rest of the + The `data` attribute will be stored as a `npz` file, while the rest of the information will be stored as `json` file. If the user would like to use a custom format the implementation of a `save` method inside the data structure will be necessary. @@ -318,7 +429,6 @@ to the ``Operation`` `Enum` in `src/qibocal/protocols/characterization/__init__. .. code-block:: python - # src/qibocal/protocols/characterization/__init__.py # other imports... from rotate import rotation diff --git a/doc/source/tutorials/api.rst b/doc/source/tutorials/api.rst deleted file mode 100644 index ac750dfa9..000000000 --- a/doc/source/tutorials/api.rst +++ /dev/null @@ -1,108 +0,0 @@ -How to use Qibocal as a library -=============================== - -Qibocal also allows executing protocols without the standard :ref:`interface `. - -In the following tutorial we show how to run a single protocol using Qibocal as a library. -For this particular example we will focus on the `single shot classification protocol -`_. - -.. code-block:: python - - from qibocal.protocols.characterization import Operation - from qibolab import create_platform - - # allocate platform - platform = create_platform("....") - # get qubits from platform - qubits = platform.qubits - - # we select the protocol - protocol = Operation.single_shot_classification.value - -``protocol`` is a `Routine `_ object which contains all the necessary -methods to execute the experiment. - -In order to run a protocol the user needs to specify the parameters. -The user can check which parameters need to be provided either by checking the -documentation of the specific protocol or by simply inspecting ``protocol.parameters_type``. -For ``single_shot_classification`` we can pass just the number of shots -in the following way: - -.. code-block:: python - - parameters = experiment.parameters_type.load(dict(nshots=1024)) - - -After defining the parameters, the user can perform the acquisition using -``experiment.acquisition`` which accepts the following parameters: - -* params (`experiment.parameters_type `_): input parameters for the experiment -* platform (`qibolab.platform.Platform `_): Qibolab platform class -* qubits (dict[`QubitId `_, `QubitPairId `_]) dictionary with qubits where the acquisition will run - -and returns the following: - -* data (`experiment.data_type `_): data acquired -* acquisition_time (float): acquisition time on hardware - -.. code-block:: python - - data, acquisition_time = experiment.acquisition(params=parameters, - platform=platform, - qubits=qubits) - - -The user can now use the raw data acquired by the quantum processor to perform -an arbitrary post-processing analysis. This is one of the main advantages of this API -compared to the cli execution. - -The fitting corresponding to the experiment (``experiment.fit``) can be launched in the -following way: - -.. code-block:: python - - fit, fit_time = experiment.fit(data) - -To be more specific the user should pass as input ``data`` which is of type -``experiment.data_type`` and the outputs are the following: - -* fit: (`experiment.results_type `_) input parameters for the experiment -* fit_time (float): post-processing time - - -It is also possible to access the plots and the tables generated in the -report using ``experiment.report`` which accepts the following parameters: - -* data: (`experiment.data_type `_) data structure used by ``experiment`` -* qubit (dict[`QubitId `_, `QubitPairId `_]): qubit / qubit pair to be plotted -* fit: (`experiment.results_type `_): data structure for post-processing used by ``experiment`` - -.. code-block:: python - - # Plot for qubit 0 - qubit = 0 - figs, html_content = experiment.report(data=data, qubit=0, fit=fit) - -``experiment.report`` returns the following: - -* figs: list of plotly figures -* html_content: raw html with additional information usually in the form of a table - -In our case we get the following figure for qubit 0: - -.. code-block:: python - - figs[0] - - -.. image:: classification_plot.png - -and we can render the html content in the following way: - -.. code-block:: python - - import IPython - IPython.display.HTML(html_content) - -.. image:: classification_table.png diff --git a/doc/source/tutorials/basic.rst b/doc/source/tutorials/basic.rst new file mode 100644 index 000000000..e64f6da39 --- /dev/null +++ b/doc/source/tutorials/basic.rst @@ -0,0 +1,366 @@ +Basic examples +============== + +In this section we are going to explain briefly how to perform +the calibration of single qubit devices. +All runcards that are going to be used are available +`here `_. + +Dummy guide for single qubit calibration +---------------------------------------- + +Not flux tunable qubits +~~~~~~~~~~~~~~~~~~~~~~~ + +The calibration of a not flux-tunable superconducting chip +includes the following steps: + +#. Resonator characterization: + #. Probing the resonator at high power + #. Estimating the readout amplitude through a punchout + #. Finding the dressed resonator frequency +#. Qubit characterization + #. Finding the qubit frequency + #. Calibrating the :math:`\pi` pulse +#. Building classification model for :math:`\ket{0}` and :math:`\ket{1}` + +We are going to explain how to use qibocal to address each step of the calibration. + + +Resonator characterization +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Each qubit is coupled to a resonator to perform the measurement. +The resonator is characterized by a bare frequency that can be extracted +by running a resonator spectroscopy at high power. To perform this experiment +with qibocal it is sufficient to write the following action: + +.. code-block:: yaml + + - id: resonator_spectroscopy high power + priority: 0 + operation: resonator_spectroscopy + parameters: + freq_width: 60_000_000 + freq_step: 200_000 + amplitude: 0.6 + power_level: high + nshots: 1024 + relaxation_time: 100000 + +In order to learn how to run this action using Qibocal you can a look at +:ref:`this tutorial `. + +The choice of the parameters is arbitrary. In this specific case the +user should make sure to specify an amplitude value sufficiently large. + + +It is then possible to visualize a report included in the output folder. + + +.. image:: ../protocols/resonator_spectroscopy_high.png + +The expected signal is a lorentzian centered around the bare frequency of the resonator. + +At lower power, the resonator will be coupled to the qubit in the dispersive regime. +The coupling manifests itself in a shift of the energy levels. In order to check at which +power we observe this shift it is possible to run a resonator punchout using the following +`punchout.yaml` runcard. + +.. code-block:: yaml + + - id: resonator punchout + priority: 0 + operation: resonator_punchout + parameters: + freq_width: 40_000_000 + freq_step: 500_000 + amplitude: 0.03 + min_amp_factor: 0.1 + max_amp_factor: 2.4 + step_amp_factor: 0.3 + nshots: 2048 + relaxation_time: 5000 + +Which corresponds to a 2D scan in amplitude and readout frequency. +After executing the experiment with the previous syntax we should +see something like this. + +.. image:: ../protocols/resonator_punchout.png + +The image above shows that below 0.15 amplitude the frequency of the resonator +shifted as expected. + +Finally, now that we have a reasonable guess for the readout amplitude we can +eventually run again a resonator spectroscopy putting the correct readout amplitude value. + +Here is an example of a runcard. + +.. code-block:: yaml + + - id: resonator_spectroscopy low power + priority: 0 + operation: resonator_spectroscopy + parameters: + freq_width: 60_000_000 + freq_step: 200_000 + amplitude: 0.03 + power_level: low + nshots: 1024 + relaxation_time: 100000 + +Note that in this case we changed the ``power_level`` entry from +``high`` to ``low``, this keyword is used by qibocal to upgrade +correctly the QPU parameters depending on the power regime. + +.. image:: ../protocols/resonator_spectroscopy_low.png + + +.. note:: + Depending on the resonator type the resonator frequency + might appear as a deep or a peak. + +Qubit characterization +^^^^^^^^^^^^^^^^^^^^^^ + + +After having a rough estimate on the readout frequency and the readout amplitude, we +can start to characterize the qubit. + +The qubit transition frequency :math:`\omega_{01}`,the frequency of the transition between state +:math:`\ket{0}` and state :math:`\ket{1}`, is determined using a dispersive spectroscopy measurement. + + +Here is an example runcard: + +.. code-block:: yaml + + - id: qubit spectroscopy 01 + priority: 0 + operation: qubit_spectroscopy + parameters: + drive_amplitude: 0.5 + drive_duration: 4000 + freq_width: 100_000_000 + freq_step: 100_000 + nshots: 1024 + relaxation_time: 5000 + + +For this particular experiment it is recommended to use +a ``drive_duration`` large compared to the coherence time of +the qubit. Currenty the coherence time for transmon qubits +if of the order of :math:`10^3 - 10^6` ns. + + +.. image:: ../protocols/qubit_spectroscopy.png + +Similarly to the resonator, we expect a lorentzian peak around :math:`\omega_{01}` +which will be our drive frequency. + +.. note:: + By using high values of ``drive_amplitude`` it might be possible to see + another peak which corresponds to :math:`\omega_{02}/2`. + +.. note:: + Depending on the resonator type the qubit frequency + might appear as a deep or a peak. + +.. note:: + If the qubit is flux-tunable make sure to have a look at this :ref:`section `. + + +The missing step required to perform a transition between state :math:`\ket{0}` and state +:math:`\ket{1}` is to calibrate the amplitude of the drive pulse, also known as :math:`\pi` pulse. + +Such amplitude is estimated through a Rabi experiment, which can be executed in qibocal through +the following runcard: + +.. code-block:: yaml + + - id: rabi + priority: 0 + operation: rabi_amplitude_signal + parameters: + min_amp_factor: 0 + max_amp_factor: 1.1 + step_amp_factor: 0.1 + pulse_length: 40 + relaxation_time: 100_000 + nshots: 1024 + +In this particular case we are fixing the duration of the pulse to be 40 ns and we perform +a sweep in the drive amplitude to find the correct value. The :math:`\pi` corresponds to +first half period of the oscillation. + +.. image:: ../protocols/rabi_amplitude.png + +Classification model +^^^^^^^^^^^^^^^^^^^^ + +Now that we are able to produce :math:`\ket{0}` and :math:`\ket{1}` we need to build a model +that will discriminate between these two states, also known as `classifier`. +Qibocal provides several classifiers of different complexities including Machine Learning based +ones. + +The simplest model can be trained by running the following experiment: + +.. code-block:: yaml + + - id: single shot classification 1 + priority: 0 + operation: single_shot_classification + parameters: + nshots: 5000 + + +The expected results are two separated clouds in the IQ plane. + +.. image:: ../protocols/classification.png + +.. _flux: + +Flux tunable qubits +~~~~~~~~~~~~~~~~~~~ + +When dealing with flux tunable qubits it is important to also +study how the qubit reacts when changing the magnetic flux. +From the theory we know that by modifying the flux the qubit +frequency will be modified. + +Usually we should characterize the qubit in the flux range where it is most insensitive to a +a change in flux, also know as ``sweetspot``. + +We can study the flux dependence of the qubit using the following runcard: + +.. code-block:: yaml + + - id: qubit flux dependence + priority: 0 + operation: qubit_flux + parameters: + freq_width: 100_000_000 + freq_step: 500_000 + bias_width: 0.20 + bias_step: 0.01 + drive_amplitude: 0.1 + nshots: 1024 + relaxation_time: 20_000 + + +.. image:: ../protocols/qubit_flux_spectroscopy.png + + +.. note:: + For more complicating applications the optimal point might not be + the sweetspot. + +Assessing the goodness of the calibration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Several experiments can be performed to estimate the goodness of the +calibration. + +Measurement of the qubit coherences +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The fidelity achievable using a superconducting qubit is limited +by the coherence times of the qubit. + +To measure the energy decay of a qubit state, also known as :math:`\\T_1`. +The experiment consists in bringing the qubit to :math:`\ket{1}` and then +performing a measurement after a waiting time :math:`\tau`. + +Here is the runcard: + + +.. code-block:: yaml + + - id: t1 + priority: 0 + operation: t1 + parameters: + delay_before_readout_end: 200000 + delay_before_readout_start: 50 + delay_before_readout_step: 1000 + nshots: 1024 + relaxation_time: 300000 + +.. image:: ../protocols/t1.png + +We expect to see an exponential decay whose rate will give us +the factor :math:`\\T_1`. + +We can also estimate the loss of quantum information due to the +loss in the knowledge of the phase of a quantum state. Such parameter is +denoted with :math:`\\T_2` and can be estimated through a Ramsey experiment. + +.. TODO: change in RAMSEY probability + + +.. code-block:: yaml + + - id: ramsey detuned + priority: 0 + operation: ramsey + parameters: + delay_between_pulses_end: 40000 + delay_between_pulses_start: 100 + delay_between_pulses_step: 1000 + n_osc: 0 + nshots: 4096 + relaxation_time: 200000 + + + +.. image:: ../protocols/t2.png + + +Fidelities +^^^^^^^^^^ + +We can estimate the `assignment fidelity` :math:`\\\mathcal{F}` which is defined as +:cite:p:`gao2021practical` + +.. math:: + + \mathcal{F} = 1 - \frac{P(m=0|\ket{1}_i) + P(m=1|\ket{0}_i)}{2} + +where :math:`P(m=X|\ket{Y}_i)` is the probability of measuring :math:`\ket{X}` +after having prepared :math:`\ket{Y}`. + +.. code-block:: yaml + + - id: readout characterization + priority: 0 + operation: readout_characterization + parameters: + nshots: 5000 + +.. image:: ../protocols/ro_characterization.png + + + +In order to estimate a gate-fidelity which is unaffected by +State Preparation And Measurement (SPAM) errors it is possible to run a standard +randomized benchmarking. + + +.. code-block:: yaml + + - id: standard rb bootstrap + priority: 0 + operation: standard_rb + parameters: + depths: [10, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500] + n_bootstrap: 10 + niter: 256 + nshots: 128 + +.. image:: ../protocols/rb.png + +.. rubric:: References + +.. bibliography:: + :filter: docname in docnames + :style: plain diff --git a/doc/source/tutorials/index.rst b/doc/source/tutorials/index.rst index 167a4514d..ba61f10a0 100644 --- a/doc/source/tutorials/index.rst +++ b/doc/source/tutorials/index.rst @@ -8,5 +8,5 @@ In this section we present code examples from basic to advanced features impleme .. toctree:: :maxdepth: 2 - api - protocol + basic + advanced diff --git a/poetry.lock b/poetry.lock index 3e3bea858..3fdd00a23 100644 --- a/poetry.lock +++ b/poetry.lock @@ -37,34 +37,6 @@ files = [ docs = ["Sphinx", "setuptools-scm", "sphinx-rtd-theme"] test = ["pytest", "pytest-cov"] -[[package]] -name = "appnope" -version = "0.1.3" -description = "Disable App Nap on macOS >= 10.9" -optional = false -python-versions = "*" -files = [ - {file = "appnope-0.1.3-py2.py3-none-any.whl", hash = "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e"}, - {file = "appnope-0.1.3.tar.gz", hash = "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24"}, -] - -[[package]] -name = "asteval" -version = "0.9.31" -description = "Safe, minimalistic evaluator of python expression using ast module" -optional = false -python-versions = ">=3.7" -files = [ - {file = "asteval-0.9.31-py3-none-any.whl", hash = "sha256:2761750c184d97707c292b62df3b10e330a809a2201721acc435a2b89a114263"}, - {file = "asteval-0.9.31.tar.gz", hash = "sha256:a2da066b6696dba9835c5f7dec63e0ffb5bd2b4e3bb5f0b9a604aeafb17d833d"}, -] - -[package.extras] -all = ["Sphinx", "build", "coverage", "pytest", "pytest-cov", "twine"] -dev = ["build", "twine"] -doc = ["Sphinx"] -test = ["coverage", "pytest", "pytest-cov"] - [[package]] name = "astroid" version = "2.15.8" @@ -191,13 +163,13 @@ files = [ [[package]] name = "certifi" -version = "2023.7.22" +version = "2023.11.17" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, - {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, + {file = "certifi-2023.11.17-py3-none-any.whl", hash = "sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474"}, + {file = "certifi-2023.11.17.tar.gz", hash = "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1"}, ] [[package]] @@ -313,6 +285,17 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} +[[package]] +name = "cloudpickle" +version = "3.0.0" +description = "Pickler class to extend the standard pickle.Pickler functionality" +optional = false +python-versions = ">=3.8" +files = [ + {file = "cloudpickle-3.0.0-py3-none-any.whl", hash = "sha256:246ee7d0c295602a036e86369c77fecda4ab17b506496730f2f576d9016fd9c7"}, + {file = "cloudpickle-3.0.0.tar.gz", hash = "sha256:996d9a482c6fb4f33c1a35335cf8afd065d2a56e973270364840712d9131a882"}, +] + [[package]] name = "cma" version = "3.3.0" @@ -520,13 +503,13 @@ tests = ["pytest", "pytest-cov", "pytest-xdist"] [[package]] name = "dash" -version = "2.14.1" +version = "2.14.2" description = "A Python framework for building reactive web-apps. Developed by Plotly." optional = false python-versions = ">=3.6" files = [ - {file = "dash-2.14.1-py3-none-any.whl", hash = "sha256:ce440ef7416945c9daa8274948483a0aac928a4fec768c0384fd4e9a6196eaf2"}, - {file = "dash-2.14.1.tar.gz", hash = "sha256:93dc9d665ec5d3720647d4cef4520a1c7cd1bde57e893ffeb7e6cd59781d3294"}, + {file = "dash-2.14.2-py3-none-any.whl", hash = "sha256:8e1a280f1c7be0714825f04786beab41d40752095e116204e64b13ac978b654d"}, + {file = "dash-2.14.2.tar.gz", hash = "sha256:602e7b0047cc9c48a81244377b812e79198678ef759a0039dadfe81023e20e96"}, ] [package.dependencies] @@ -641,13 +624,13 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.1.3" +version = "1.2.0" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, - {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, + {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, + {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, ] [package.extras] @@ -734,53 +717,53 @@ files = [ [[package]] name = "fonttools" -version = "4.44.0" +version = "4.46.0" description = "Tools to manipulate font files" optional = false python-versions = ">=3.8" files = [ - {file = "fonttools-4.44.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e1cd1c6bb097e774d68402499ff66185190baaa2629ae2f18515a2c50b93db0c"}, - {file = "fonttools-4.44.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b9eab7f9837fdaa2a10a524fbcc2ec24bf60637c044b6e4a59c3f835b90f0fae"}, - {file = "fonttools-4.44.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f412954275e594f7a51c16f3b3edd850acb0d842fefc33856b63a17e18499a5"}, - {file = "fonttools-4.44.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50d25893885e80a5955186791eed5579f1e75921751539cc1dc3ffd1160b48cf"}, - {file = "fonttools-4.44.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:22ea8aa7b3712450b42b044702bd3a64fd118006bad09a6f94bd1b227088492e"}, - {file = "fonttools-4.44.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df40daa6c03b98652ffe8110ae014fe695437f6e1cb5a07e16ea37f40e73ac86"}, - {file = "fonttools-4.44.0-cp310-cp310-win32.whl", hash = "sha256:bca49da868e8bde569ef36f0cc1b6de21d56bf9c3be185c503b629c19a185287"}, - {file = "fonttools-4.44.0-cp310-cp310-win_amd64.whl", hash = "sha256:dbac86d83d96099890e731cc2af97976ff2c98f4ba432fccde657c5653a32f1c"}, - {file = "fonttools-4.44.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e8ff7d19a6804bfd561cfcec9b4200dd1788e28f7de4be70189801530c47c1b3"}, - {file = "fonttools-4.44.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a8a1fa9a718de0bc026979c93e1e9b55c5efde60d76f91561fd713387573817d"}, - {file = "fonttools-4.44.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c05064f95aacdfc06f21e55096c964b2228d942b8675fa26995a2551f6329d2d"}, - {file = "fonttools-4.44.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31b38528f25bc662401e6ffae14b3eb7f1e820892fd80369a37155e3b636a2f4"}, - {file = "fonttools-4.44.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:05d7c4d2c95b9490e669f3cb83918799bf1c838619ac6d3bad9ea017cfc63f2e"}, - {file = "fonttools-4.44.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6999e80a125b0cd8e068d0210b63323f17338038c2ecd2e11b9209ec430fe7f2"}, - {file = "fonttools-4.44.0-cp311-cp311-win32.whl", hash = "sha256:a7aec7f5d14dfcd71fb3ebc299b3f000c21fdc4043079101777ed2042ba5b7c5"}, - {file = "fonttools-4.44.0-cp311-cp311-win_amd64.whl", hash = "sha256:518a945dbfe337744bfff31423c1430303b8813c5275dffb0f2577f0734a1189"}, - {file = "fonttools-4.44.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:59b6ad83cce067d10f4790c037a5904424f45bebb5e7be2eb2db90402f288267"}, - {file = "fonttools-4.44.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c2de1fb18198acd400c45ffe2aef5420c8d55fde903e91cba705596099550f3b"}, - {file = "fonttools-4.44.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:84f308b7a8d28208d54315d11d35f9888d6d607673dd4d42d60b463682ee0400"}, - {file = "fonttools-4.44.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66bc6efd829382f7a7e6cf33c2fb32b13edc8a239eb15f32acbf197dce7a0165"}, - {file = "fonttools-4.44.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:a8b99713d3a0d0e876b6aecfaada5e7dc9fe979fcd90ef9fa0ba1d9b9aed03f2"}, - {file = "fonttools-4.44.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:b63da598d9cbc52e2381f922da0e94d60c0429f92207bd3fb04d112fc82ea7cb"}, - {file = "fonttools-4.44.0-cp312-cp312-win32.whl", hash = "sha256:f611c97678604e302b725f71626edea113a5745a7fb557c958b39edb6add87d5"}, - {file = "fonttools-4.44.0-cp312-cp312-win_amd64.whl", hash = "sha256:58af428746fa73a2edcbf26aff33ac4ef3c11c8d75bb200eaea2f7e888d2de4e"}, - {file = "fonttools-4.44.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9ee8692e23028564c13d924004495f284df8ac016a19f17a87251210e1f1f928"}, - {file = "fonttools-4.44.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:dab3d00d27b1a79ae4d4a240e8ceea8af0ff049fd45f05adb4f860d93744110d"}, - {file = "fonttools-4.44.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f53526668beccdb3409c6055a4ffe50987a7f05af6436fa55d61f5e7bd450219"}, - {file = "fonttools-4.44.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3da036b016c975c2d8c69005bdc4d5d16266f948a7fab950244e0f58301996a"}, - {file = "fonttools-4.44.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b99fe8ef4093f672d00841569d2d05691e50334d79f4d9c15c1265d76d5580d2"}, - {file = "fonttools-4.44.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6d16d9634ff1e5cea2cf4a8cbda9026f766e4b5f30b48f8180f0e99133d3abfc"}, - {file = "fonttools-4.44.0-cp38-cp38-win32.whl", hash = "sha256:3d29509f6e05e8d725db59c2d8c076223d793e4e35773040be6632a0349f2f97"}, - {file = "fonttools-4.44.0-cp38-cp38-win_amd64.whl", hash = "sha256:d4fa4f4bc8fd86579b8cdbe5e948f35d82c0eda0091c399d009b2a5a6b61c040"}, - {file = "fonttools-4.44.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c794de4086f06ae609b71ac944ec7deb09f34ecf73316fddc041087dd24bba39"}, - {file = "fonttools-4.44.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2db63941fee3122e31a21dd0f5b2138ce9906b661a85b63622421d3654a74ae2"}, - {file = "fonttools-4.44.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb01c49c8aa035d5346f46630209923d4927ed15c2493db38d31da9f811eb70d"}, - {file = "fonttools-4.44.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46c79af80a835410874683b5779b6c1ec1d5a285e11c45b5193e79dd691eb111"}, - {file = "fonttools-4.44.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b6e6aa2d066f8dafd06d8d0799b4944b5d5a1f015dd52ac01bdf2895ebe169a0"}, - {file = "fonttools-4.44.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63a3112f753baef8c6ac2f5f574bb9ac8001b86c8c0c0380039db47a7f512d20"}, - {file = "fonttools-4.44.0-cp39-cp39-win32.whl", hash = "sha256:54efed22b2799a85475e6840e907c402ba49892c614565dc770aa97a53621b2b"}, - {file = "fonttools-4.44.0-cp39-cp39-win_amd64.whl", hash = "sha256:2e91e19b583961979e2e5a701269d3cfc07418963bee717f8160b0a24332826b"}, - {file = "fonttools-4.44.0-py3-none-any.whl", hash = "sha256:b9beb0fa6ff3ea808ad4a6962d68ac0f140ddab080957b20d9e268e4d67fb335"}, - {file = "fonttools-4.44.0.tar.gz", hash = "sha256:4e90dd81b6e0d97ebfe52c0d12a17a9ef7f305d6bfbb93081265057d6092f252"}, + {file = "fonttools-4.46.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d4e69e2c7f93b695d2e6f18f709d501d945f65c1d237dafaabdd23cd935a5276"}, + {file = "fonttools-4.46.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:25852f0c63df0af022f698464a4a80f7d1d5bd974bcd22f995f6b4ad198e32dd"}, + {file = "fonttools-4.46.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:adab73618d0a328b203a0e242b3eba60a2b5662d9cb2bd16ed9c52af8a7d86af"}, + {file = "fonttools-4.46.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cf923a4a556ab4cc4c52f69a4a2db624cf5a2cf360394368b40c5152fe3321e"}, + {file = "fonttools-4.46.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:87c214197712cc14fd2a4621efce2a9c501a77041232b789568149a8a3161517"}, + {file = "fonttools-4.46.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:156ae342a1ed1fe38e180de471e98fbf5b2b6ae280fa3323138569c4ca215844"}, + {file = "fonttools-4.46.0-cp310-cp310-win32.whl", hash = "sha256:c506e3d3a9e898caee4dc094f34b49c5566870d5a2d1ca2125f0a9f35ecc2205"}, + {file = "fonttools-4.46.0-cp310-cp310-win_amd64.whl", hash = "sha256:f8bc3973ed58893c4107993e0a7ae34901cb572b5e798249cbef35d30801ffd4"}, + {file = "fonttools-4.46.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:982f69855ac258260f51048d9e0c53c5f19881138cc7ca06deb38dc4b97404b6"}, + {file = "fonttools-4.46.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c23c59d321d62588620f2255cf951270bf637d88070f38ed8b5e5558775b86c"}, + {file = "fonttools-4.46.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0e94244ec24a940ecfbe5b31c975c8a575d5ed2d80f9a280ce3b21fa5dc9c34"}, + {file = "fonttools-4.46.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a9f9cdd7ef63d1b8ac90db335762451452426b3207abd79f60da510cea62da5"}, + {file = "fonttools-4.46.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ca9eceebe70035b057ce549e2054cad73e95cac3fe91a9d827253d1c14618204"}, + {file = "fonttools-4.46.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8be6adfa4e15977075278dd0a0bae74dec59be7b969b5ceed93fb86af52aa5be"}, + {file = "fonttools-4.46.0-cp311-cp311-win32.whl", hash = "sha256:7b5636f5706d49f13b6d610fe54ee662336cdf56b5a6f6683c0b803e23d826d2"}, + {file = "fonttools-4.46.0-cp311-cp311-win_amd64.whl", hash = "sha256:49ea0983e55fd7586a809787cd4644a7ae471e53ab8ddc016f9093b400e32646"}, + {file = "fonttools-4.46.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:7b460720ce81773da1a3e7cc964c48e1e11942b280619582a897fa0117b56a62"}, + {file = "fonttools-4.46.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:8bee9f4fc8c99824a424ae45c789ee8c67cb84f8e747afa7f83b7d3cef439c3b"}, + {file = "fonttools-4.46.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3d7b96aba96e05e8c911ce2dfc5acc6a178b8f44f6aa69371ab91aa587563da"}, + {file = "fonttools-4.46.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e6aeb5c340416d11a3209d75c48d13e72deea9e1517837dd1522c1fd1f17c11"}, + {file = "fonttools-4.46.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c779f8701deedf41908f287aeb775b8a6f59875ad1002b98ac6034ae4ddc1b7b"}, + {file = "fonttools-4.46.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ce199227ce7921eaafdd4f96536f16b232d6b580ce74ce337de544bf06cb2752"}, + {file = "fonttools-4.46.0-cp312-cp312-win32.whl", hash = "sha256:1c9937c4dd1061afd22643389445fabda858af5e805860ec3082a4bc07c7a720"}, + {file = "fonttools-4.46.0-cp312-cp312-win_amd64.whl", hash = "sha256:a9fa52ef8fd14d7eb3d813e1451e7ace3e1eebfa9b7237d3f81fee8f3de6a114"}, + {file = "fonttools-4.46.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c94564b1f3b5dd87e73577610d85115b1936edcc596deaf84a31bbe70e17456b"}, + {file = "fonttools-4.46.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a4a50a1dfad7f7ba5ca3f99cc73bf5cdac67ceade8e4b355a877521f20ad1b63"}, + {file = "fonttools-4.46.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89c2c520f9492844ecd6316d20c6c7a157b5c0cb73a1411b3db28ee304f30122"}, + {file = "fonttools-4.46.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5b7905fd68eacb7cc56a13139da5c312c45baae6950dd00b02563c54508a041"}, + {file = "fonttools-4.46.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8485cc468288e213f31afdaf1fdda3c79010f542559fbba936a54f4644df2570"}, + {file = "fonttools-4.46.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:87c3299da7da55394fb324349db0ede38114a46aafd0e7dfcabfecd28cdd94c3"}, + {file = "fonttools-4.46.0-cp38-cp38-win32.whl", hash = "sha256:f5f1423a504ccc329efb5aa79738de83d38c072be5308788dde6bd419969d7f5"}, + {file = "fonttools-4.46.0-cp38-cp38-win_amd64.whl", hash = "sha256:6d4a4ebcc76e30898ff3296ea786491c70e183f738319ae2629e0d44f17ece42"}, + {file = "fonttools-4.46.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c9a0e422ab79e5cb2b47913be6a4b5fd20c4c7ac34a24f3691a4e099e965e0b8"}, + {file = "fonttools-4.46.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:13ac0cba2fc63fa4b232f2a7971f35f35c6eaf10bd1271fa96d4ce6253a8acfd"}, + {file = "fonttools-4.46.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:795150d5edc595e1a2cfb3d65e8f4f3d027704fc2579f8990d381bef6b188eb6"}, + {file = "fonttools-4.46.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d00fc63131dcac6b25f50a5a129758438317e54e3ce5587163f7058de4b0e933"}, + {file = "fonttools-4.46.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3033b55f401a622de2630b3982234d97219d89b058607b87927eccb0f922313c"}, + {file = "fonttools-4.46.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e26e7fb908ae4f622813e7cb32cd2db6c24e3122bb3b98f25e832a2fe0e7e228"}, + {file = "fonttools-4.46.0-cp39-cp39-win32.whl", hash = "sha256:2d0eba685938c603f2f648dfc0aadbf8c6a4fe1c7ca608c2970a6ef39e00f254"}, + {file = "fonttools-4.46.0-cp39-cp39-win_amd64.whl", hash = "sha256:5200b01f463d97cc2b7ff8a1e3584151f4413e98cb8419da5f17d1dbb84cc214"}, + {file = "fonttools-4.46.0-py3-none-any.whl", hash = "sha256:5b627ed142398ea9202bd752c04311592558964d1a765fb2f78dc441a05633f4"}, + {file = "fonttools-4.46.0.tar.gz", hash = "sha256:2ae45716c27a41807d58a9f3f59983bdc8c0a46cb259e4450ab7e196253a9853"}, ] [package.extras] @@ -799,13 +782,13 @@ woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] [[package]] name = "fsspec" -version = "2023.10.0" +version = "2023.12.1" description = "File-system specification" optional = false python-versions = ">=3.8" files = [ - {file = "fsspec-2023.10.0-py3-none-any.whl", hash = "sha256:346a8f024efeb749d2a5fca7ba8854474b1ff9af7c3faaf636a4548781136529"}, - {file = "fsspec-2023.10.0.tar.gz", hash = "sha256:330c66757591df346ad3091a53bd907e15348c2ba17d63fd54f5c39c4457d2a5"}, + {file = "fsspec-2023.12.1-py3-none-any.whl", hash = "sha256:6271f1d3075a378bfe432f6f42bf7e1d2a6ba74f78dd9b512385474c579146a0"}, + {file = "fsspec-2023.12.1.tar.gz", hash = "sha256:c4da01a35ac65c853f833e43f67802c25213f560820d54ddf248f92eddd5e990"}, ] [package.extras] @@ -872,13 +855,13 @@ files = [ [[package]] name = "google-auth" -version = "2.23.4" +version = "2.25.1" description = "Google Authentication Library" optional = true python-versions = ">=3.7" files = [ - {file = "google-auth-2.23.4.tar.gz", hash = "sha256:79905d6b1652187def79d491d6e23d0cbb3a21d3c7ba0dbaa9c8a01906b13ff3"}, - {file = "google_auth-2.23.4-py2.py3-none-any.whl", hash = "sha256:d4bbc92fe4b8bfd2f3e8d88e5ba7085935da208ee38a134fc280e7ce682a05f2"}, + {file = "google-auth-2.25.1.tar.gz", hash = "sha256:d5d66b8f4f6e3273740d7bb73ddefa6c2d1ff691704bd407d51c6b5800e7c97b"}, + {file = "google_auth-2.25.1-py2.py3-none-any.whl", hash = "sha256:dfd7b44935d498e106c08883b2dac0ad36d8aa10402a6412e9a1c9d74b4773f1"}, ] [package.dependencies] @@ -928,69 +911,69 @@ six = "*" [[package]] name = "grpcio" -version = "1.59.2" +version = "1.59.3" description = "HTTP/2-based RPC framework" optional = true python-versions = ">=3.7" files = [ - {file = "grpcio-1.59.2-cp310-cp310-linux_armv7l.whl", hash = "sha256:d2fa68a96a30dd240be80bbad838a0ac81a61770611ff7952b889485970c4c71"}, - {file = "grpcio-1.59.2-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:cf0dead5a2c5a3347af2cfec7131d4f2a2e03c934af28989c9078f8241a491fa"}, - {file = "grpcio-1.59.2-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:e420ced29b5904cdf9ee5545e23f9406189d8acb6750916c2db4793dada065c6"}, - {file = "grpcio-1.59.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b230028a008ae1d0f430acb227d323ff8a619017415cf334c38b457f814119f"}, - {file = "grpcio-1.59.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a4a3833c0e067f3558538727235cd8a49709bff1003200bbdefa2f09334e4b1"}, - {file = "grpcio-1.59.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6b25ed37c27e652db01be341af93fbcea03d296c024d8a0e680017a268eb85dd"}, - {file = "grpcio-1.59.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:73abb8584b0cf74d37f5ef61c10722adc7275502ab71789a8fe3cb7ef04cf6e2"}, - {file = "grpcio-1.59.2-cp310-cp310-win32.whl", hash = "sha256:d6f70406695e3220f09cd7a2f879333279d91aa4a8a1d34303b56d61a8180137"}, - {file = "grpcio-1.59.2-cp310-cp310-win_amd64.whl", hash = "sha256:3c61d641d4f409c5ae46bfdd89ea42ce5ea233dcf69e74ce9ba32b503c727e29"}, - {file = "grpcio-1.59.2-cp311-cp311-linux_armv7l.whl", hash = "sha256:3059668df17627f0e0fa680e9ef8c995c946c792612e9518f5cc1503be14e90b"}, - {file = "grpcio-1.59.2-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:72ca2399097c0b758198f2ff30f7178d680de8a5cfcf3d9b73a63cf87455532e"}, - {file = "grpcio-1.59.2-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:c978f864b35f2261e0819f5cd88b9830b04dc51bcf055aac3c601e525a10d2ba"}, - {file = "grpcio-1.59.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9411e24328a2302e279e70cae6e479f1fddde79629fcb14e03e6d94b3956eabf"}, - {file = "grpcio-1.59.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb7e0fe6ad73b7f06d7e2b689c19a71cf5cc48f0c2bf8608469e51ffe0bd2867"}, - {file = "grpcio-1.59.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c2504eed520958a5b77cc99458297cb7906308cb92327f35fb7fbbad4e9b2188"}, - {file = "grpcio-1.59.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2171c39f355ba5b551c5d5928d65aa6c69807fae195b86ef4a7d125bcdb860a9"}, - {file = "grpcio-1.59.2-cp311-cp311-win32.whl", hash = "sha256:d2794f0e68b3085d99b4f6ff9c089f6fdd02b32b9d3efdfbb55beac1bf22d516"}, - {file = "grpcio-1.59.2-cp311-cp311-win_amd64.whl", hash = "sha256:2067274c88bc6de89c278a672a652b4247d088811ece781a4858b09bdf8448e3"}, - {file = "grpcio-1.59.2-cp312-cp312-linux_armv7l.whl", hash = "sha256:535561990e075fa6bd4b16c4c3c1096b9581b7bb35d96fac4650f1181e428268"}, - {file = "grpcio-1.59.2-cp312-cp312-macosx_10_10_universal2.whl", hash = "sha256:a213acfbf186b9f35803b52e4ca9addb153fc0b67f82a48f961be7000ecf6721"}, - {file = "grpcio-1.59.2-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:6959fb07e8351e20501ffb8cc4074c39a0b7ef123e1c850a7f8f3afdc3a3da01"}, - {file = "grpcio-1.59.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e82c5cf1495244adf5252f925ac5932e5fd288b3e5ab6b70bec5593074b7236c"}, - {file = "grpcio-1.59.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:023088764012411affe7db183d1ada3ad9daf2e23ddc719ff46d7061de661340"}, - {file = "grpcio-1.59.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:da2d94c15f88cd40d7e67f7919d4f60110d2b9d5b1e08cf354c2be773ab13479"}, - {file = "grpcio-1.59.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:6009386a2df66159f64ac9f20425ae25229b29b9dd0e1d3dd60043f037e2ad7e"}, - {file = "grpcio-1.59.2-cp312-cp312-win32.whl", hash = "sha256:75c6ecb70e809cf1504465174343113f51f24bc61e22a80ae1c859f3f7034c6d"}, - {file = "grpcio-1.59.2-cp312-cp312-win_amd64.whl", hash = "sha256:cbe946b3e6e60a7b4618f091e62a029cb082b109a9d6b53962dd305087c6e4fd"}, - {file = "grpcio-1.59.2-cp37-cp37m-linux_armv7l.whl", hash = "sha256:f8753a6c88d1d0ba64302309eecf20f70d2770f65ca02d83c2452279085bfcd3"}, - {file = "grpcio-1.59.2-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:f1ef0d39bc1feb420caf549b3c657c871cad4ebbcf0580c4d03816b0590de0cf"}, - {file = "grpcio-1.59.2-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:4c93f4abbb54321ee6471e04a00139c80c754eda51064187963ddf98f5cf36a4"}, - {file = "grpcio-1.59.2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:08d77e682f2bf730a4961eea330e56d2f423c6a9b91ca222e5b1eb24a357b19f"}, - {file = "grpcio-1.59.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ff16d68bf453275466a9a46739061a63584d92f18a0f5b33d19fc97eb69867c"}, - {file = "grpcio-1.59.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4abb717e320e74959517dc8e84a9f48fbe90e9abe19c248541e9418b1ce60acd"}, - {file = "grpcio-1.59.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:36f53c2b3449c015880e7d55a89c992c357f176327b0d2873cdaaf9628a37c69"}, - {file = "grpcio-1.59.2-cp37-cp37m-win_amd64.whl", hash = "sha256:cc3e4cd087f07758b16bef8f31d88dbb1b5da5671d2f03685ab52dece3d7a16e"}, - {file = "grpcio-1.59.2-cp38-cp38-linux_armv7l.whl", hash = "sha256:27f879ae604a7fcf371e59fba6f3ff4635a4c2a64768bd83ff0cac503142fef4"}, - {file = "grpcio-1.59.2-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:7cf05053242f61ba94014dd3a986e11a083400a32664058f80bf4cf817c0b3a1"}, - {file = "grpcio-1.59.2-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:e1727c1c0e394096bb9af185c6923e8ea55a5095b8af44f06903bcc0e06800a2"}, - {file = "grpcio-1.59.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5d573e70a6fe77555fb6143c12d3a7d3fa306632a3034b4e7c59ca09721546f8"}, - {file = "grpcio-1.59.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31176aa88f36020055ace9adff2405a33c8bdbfa72a9c4980e25d91b2f196873"}, - {file = "grpcio-1.59.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:11168ef43e4a43ff1b1a65859f3e0ef1a173e277349e7fb16923ff108160a8cd"}, - {file = "grpcio-1.59.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:53c9aa5ddd6857c0a1cd0287225a2a25873a8e09727c2e95c4aebb1be83a766a"}, - {file = "grpcio-1.59.2-cp38-cp38-win32.whl", hash = "sha256:3b4368b33908f683a363f376dfb747d40af3463a6e5044afee07cf9436addf96"}, - {file = "grpcio-1.59.2-cp38-cp38-win_amd64.whl", hash = "sha256:0a754aff9e3af63bdc4c75c234b86b9d14e14a28a30c4e324aed1a9b873d755f"}, - {file = "grpcio-1.59.2-cp39-cp39-linux_armv7l.whl", hash = "sha256:1f9524d1d701e399462d2c90ba7c193e49d1711cf429c0d3d97c966856e03d00"}, - {file = "grpcio-1.59.2-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:f93dbf58f03146164048be5426ffde298b237a5e059144847e4940f5b80172c3"}, - {file = "grpcio-1.59.2-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:6da6dea3a1bacf99b3c2187e296db9a83029ed9c38fd4c52b7c9b7326d13c828"}, - {file = "grpcio-1.59.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c5f09cffa619adfb44799fa4a81c2a1ad77c887187613fb0a8f201ab38d89ba1"}, - {file = "grpcio-1.59.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c35aa9657f5d5116d23b934568e0956bd50c615127810fffe3ac356a914c176a"}, - {file = "grpcio-1.59.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:74100fecaec8a535e380cf5f2fb556ff84957d481c13e54051c52e5baac70541"}, - {file = "grpcio-1.59.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:128e20f57c5f27cb0157e73756d1586b83c1b513ebecc83ea0ac37e4b0e4e758"}, - {file = "grpcio-1.59.2-cp39-cp39-win32.whl", hash = "sha256:686e975a5d16602dc0982c7c703948d17184bd1397e16c8ee03511ecb8c4cdda"}, - {file = "grpcio-1.59.2-cp39-cp39-win_amd64.whl", hash = "sha256:242adc47725b9a499ee77c6a2e36688fa6c96484611f33b1be4c57ab075a92dd"}, - {file = "grpcio-1.59.2.tar.gz", hash = "sha256:d8f9cd4ad1be90b0cf350a2f04a38a36e44a026cac1e036ac593dc48efe91d52"}, -] - -[package.extras] -protobuf = ["grpcio-tools (>=1.59.2)"] + {file = "grpcio-1.59.3-cp310-cp310-linux_armv7l.whl", hash = "sha256:aca028a6c7806e5b61e5f9f4232432c52856f7fcb98e330b20b6bc95d657bdcc"}, + {file = "grpcio-1.59.3-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:19ad26a7967f7999c8960d2b9fe382dae74c55b0c508c613a6c2ba21cddf2354"}, + {file = "grpcio-1.59.3-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:72b71dad2a3d1650e69ad42a5c4edbc59ee017f08c32c95694172bc501def23c"}, + {file = "grpcio-1.59.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c0f0a11d82d0253656cc42e04b6a149521e02e755fe2e4edd21123de610fd1d4"}, + {file = "grpcio-1.59.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60cddafb70f9a2c81ba251b53b4007e07cca7389e704f86266e22c4bffd8bf1d"}, + {file = "grpcio-1.59.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6c75a1fa0e677c1d2b6d4196ad395a5c381dfb8385f07ed034ef667cdcdbcc25"}, + {file = "grpcio-1.59.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e1d8e01438d5964a11167eec1edb5f85ed8e475648f36c834ed5db4ffba24ac8"}, + {file = "grpcio-1.59.3-cp310-cp310-win32.whl", hash = "sha256:c4b0076f0bf29ee62335b055a9599f52000b7941f577daa001c7ef961a1fbeab"}, + {file = "grpcio-1.59.3-cp310-cp310-win_amd64.whl", hash = "sha256:b1f00a3e6e0c3dccccffb5579fc76ebfe4eb40405ba308505b41ef92f747746a"}, + {file = "grpcio-1.59.3-cp311-cp311-linux_armv7l.whl", hash = "sha256:3996aaa21231451161dc29df6a43fcaa8b332042b6150482c119a678d007dd86"}, + {file = "grpcio-1.59.3-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:cb4e9cbd9b7388fcb06412da9f188c7803742d06d6f626304eb838d1707ec7e3"}, + {file = "grpcio-1.59.3-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:8022ca303d6c694a0d7acfb2b472add920217618d3a99eb4b14edc7c6a7e8fcf"}, + {file = "grpcio-1.59.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b36683fad5664283755a7f4e2e804e243633634e93cd798a46247b8e54e3cb0d"}, + {file = "grpcio-1.59.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8239b853226e4824e769517e1b5232e7c4dda3815b200534500338960fcc6118"}, + {file = "grpcio-1.59.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:0511af8653fbda489ff11d542a08505d56023e63cafbda60e6e00d4e0bae86ea"}, + {file = "grpcio-1.59.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e78dc982bda74cef2ddfce1c91d29b96864c4c680c634e279ed204d51e227473"}, + {file = "grpcio-1.59.3-cp311-cp311-win32.whl", hash = "sha256:6a5c3a96405966c023e139c3bcccb2c7c776a6f256ac6d70f8558c9041bdccc3"}, + {file = "grpcio-1.59.3-cp311-cp311-win_amd64.whl", hash = "sha256:ed26826ee423b11477297b187371cdf4fa1eca874eb1156422ef3c9a60590dd9"}, + {file = "grpcio-1.59.3-cp312-cp312-linux_armv7l.whl", hash = "sha256:45dddc5cb5227d30fa43652d8872dc87f086d81ab4b500be99413bad0ae198d7"}, + {file = "grpcio-1.59.3-cp312-cp312-macosx_10_10_universal2.whl", hash = "sha256:1736496d74682e53dd0907fd515f2694d8e6a96c9a359b4080b2504bf2b2d91b"}, + {file = "grpcio-1.59.3-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:ddbd1a16138e52e66229047624de364f88a948a4d92ba20e4e25ad7d22eef025"}, + {file = "grpcio-1.59.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fcfa56f8d031ffda902c258c84c4b88707f3a4be4827b4e3ab8ec7c24676320d"}, + {file = "grpcio-1.59.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2eb8f0c7c0c62f7a547ad7a91ba627a5aa32a5ae8d930783f7ee61680d7eb8d"}, + {file = "grpcio-1.59.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8d993399cc65e3a34f8fd48dd9ad7a376734564b822e0160dd18b3d00c1a33f9"}, + {file = "grpcio-1.59.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c0bd141f4f41907eb90bda74d969c3cb21c1c62779419782a5b3f5e4b5835718"}, + {file = "grpcio-1.59.3-cp312-cp312-win32.whl", hash = "sha256:33b8fd65d4e97efa62baec6171ce51f9cf68f3a8ba9f866f4abc9d62b5c97b79"}, + {file = "grpcio-1.59.3-cp312-cp312-win_amd64.whl", hash = "sha256:0e735ed002f50d4f3cb9ecfe8ac82403f5d842d274c92d99db64cfc998515e07"}, + {file = "grpcio-1.59.3-cp37-cp37m-linux_armv7l.whl", hash = "sha256:ea40ce4404e7cca0724c91a7404da410f0144148fdd58402a5942971e3469b94"}, + {file = "grpcio-1.59.3-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:83113bcc393477b6f7342b9f48e8a054330c895205517edc66789ceea0796b53"}, + {file = "grpcio-1.59.3-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:73afbac602b8f1212a50088193601f869b5073efa9855b3e51aaaec97848fc8a"}, + {file = "grpcio-1.59.3-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:575d61de1950b0b0699917b686b1ca108690702fcc2df127b8c9c9320f93e069"}, + {file = "grpcio-1.59.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cd76057b5c9a4d68814610ef9226925f94c1231bbe533fdf96f6181f7d2ff9e"}, + {file = "grpcio-1.59.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:95d6fd804c81efe4879e38bfd84d2b26e339a0a9b797e7615e884ef4686eb47b"}, + {file = "grpcio-1.59.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0d42048b8a3286ea4134faddf1f9a59cf98192b94aaa10d910a25613c5eb5bfb"}, + {file = "grpcio-1.59.3-cp37-cp37m-win_amd64.whl", hash = "sha256:4619fea15c64bcdd9d447cdbdde40e3d5f1da3a2e8ae84103d94a9c1df210d7e"}, + {file = "grpcio-1.59.3-cp38-cp38-linux_armv7l.whl", hash = "sha256:95b5506e70284ac03b2005dd9ffcb6708c9ae660669376f0192a710687a22556"}, + {file = "grpcio-1.59.3-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:9e17660947660ccfce56c7869032910c179a5328a77b73b37305cd1ee9301c2e"}, + {file = "grpcio-1.59.3-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:00912ce19914d038851be5cd380d94a03f9d195643c28e3ad03d355cc02ce7e8"}, + {file = "grpcio-1.59.3-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e58b3cadaa3c90f1efca26ba33e0d408b35b497307027d3d707e4bcd8de862a6"}, + {file = "grpcio-1.59.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d787ecadea865bdf78f6679f6f5bf4b984f18f659257ba612979df97a298b3c3"}, + {file = "grpcio-1.59.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:0814942ba1bba269db4e760a34388640c601dece525c6a01f3b4ff030cc0db69"}, + {file = "grpcio-1.59.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fb111aa99d3180c361a35b5ae1e2c63750220c584a1344229abc139d5c891881"}, + {file = "grpcio-1.59.3-cp38-cp38-win32.whl", hash = "sha256:eb8ba504c726befe40a356ecbe63c6c3c64c9a439b3164f5a718ec53c9874da0"}, + {file = "grpcio-1.59.3-cp38-cp38-win_amd64.whl", hash = "sha256:cdbc6b32fadab9bebc6f49d3e7ec4c70983c71e965497adab7f87de218e84391"}, + {file = "grpcio-1.59.3-cp39-cp39-linux_armv7l.whl", hash = "sha256:c82ca1e4be24a98a253d6dbaa216542e4163f33f38163fc77964b0f0d255b552"}, + {file = "grpcio-1.59.3-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:36636babfda14f9e9687f28d5b66d349cf88c1301154dc71c6513de2b6c88c59"}, + {file = "grpcio-1.59.3-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:5f9b2e591da751ac7fdd316cc25afafb7a626dededa9b414f90faad7f3ccebdb"}, + {file = "grpcio-1.59.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a93a82876a4926bf451db82ceb725bd87f42292bacc94586045261f501a86994"}, + {file = "grpcio-1.59.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce31fa0bfdd1f2bb15b657c16105c8652186eab304eb512e6ae3b99b2fdd7d13"}, + {file = "grpcio-1.59.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:16da0e40573962dab6cba16bec31f25a4f468e6d05b658e589090fe103b03e3d"}, + {file = "grpcio-1.59.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d1d1a17372fd425addd5812049fa7374008ffe689585f27f802d0935522cf4b7"}, + {file = "grpcio-1.59.3-cp39-cp39-win32.whl", hash = "sha256:52cc38a7241b5f7b4a91aaf9000fdd38e26bb00d5e8a71665ce40cfcee716281"}, + {file = "grpcio-1.59.3-cp39-cp39-win_amd64.whl", hash = "sha256:b491e5bbcad3020a96842040421e508780cade35baba30f402df9d321d1c423e"}, + {file = "grpcio-1.59.3.tar.gz", hash = "sha256:7800f99568a74a06ebdccd419dd1b6e639b477dcaf6da77ea702f8fb14ce5f80"}, +] + +[package.extras] +protobuf = ["grpcio-tools (>=1.59.3)"] [[package]] name = "h5py" @@ -1031,13 +1014,13 @@ numpy = ">=1.17.3" [[package]] name = "huggingface-hub" -version = "0.18.0" +version = "0.19.4" 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.18.0-py3-none-any.whl", hash = "sha256:ee0b6b68acbf6aeb6d083ea081e981c277a1104b82ab67fdf6780ff5396830af"}, - {file = "huggingface_hub-0.18.0.tar.gz", hash = "sha256:10eda12b9c1cfa800b4b7c096b3ace8843734c3f28d69d1c243743fb7d7a2e81"}, + {file = "huggingface_hub-0.19.4-py3-none-any.whl", hash = "sha256:dba013f779da16f14b606492828f3760600a1e1801432d09fe1c33e50b825bb5"}, + {file = "huggingface_hub-0.19.4.tar.gz", hash = "sha256:176a4fc355a851c17550e7619488f383189727eab209534d7cef2114dae77b22"}, ] [package.dependencies] @@ -1050,17 +1033,17 @@ tqdm = ">=4.42.1" typing-extensions = ">=3.7.4.3" [package.extras] -all = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (==23.7)", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)"] +all = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.1.3)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"] cli = ["InquirerPy (==0.3.4)"] -dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (==23.7)", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)"] -docs = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (==23.7)", "gradio", "hf-doc-builder", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)", "watchdog"] +dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.1.3)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"] +docs = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "hf-doc-builder", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.1.3)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)", "watchdog"] fastai = ["fastai (>=2.4)", "fastcore (>=1.3.27)", "toml"] -inference = ["aiohttp", "pydantic (<2.0)"] -quality = ["black (==23.7)", "mypy (==1.5.1)", "ruff (>=0.0.241)"] +inference = ["aiohttp", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)"] +quality = ["mypy (==1.5.1)", "ruff (>=0.1.3)"] tensorflow = ["graphviz", "pydot", "tensorflow"] -testing = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "soundfile", "urllib3 (<2.0)"] +testing = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "numpy", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "soundfile", "urllib3 (<2.0)"] torch = ["torch"] -typing = ["pydantic (<2.0)", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3"] +typing = ["types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)"] [[package]] name = "humanfriendly" @@ -1076,15 +1059,42 @@ files = [ [package.dependencies] pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_version >= \"3.8\""} +[[package]] +name = "hyperopt" +version = "0.2.7" +description = "Distributed Asynchronous Hyperparameter Optimization" +optional = false +python-versions = "*" +files = [ + {file = "hyperopt-0.2.7-py2.py3-none-any.whl", hash = "sha256:f3046d91fe4167dbf104365016596856b2524a609d22f047a066fc1ac796427c"}, + {file = "hyperopt-0.2.7.tar.gz", hash = "sha256:1bf89ae58050bbd32c7307199046117feee245c2fd9ab6255c7308522b7ca149"}, +] + +[package.dependencies] +cloudpickle = "*" +future = "*" +networkx = ">=2.2" +numpy = "*" +py4j = "*" +scipy = "*" +six = "*" +tqdm = "*" + +[package.extras] +atpe = ["lightgbm", "scikit-learn"] +dev = ["black", "nose", "pre-commit", "pytest"] +mongotrials = ["pymongo"] +sparktrials = ["pyspark"] + [[package]] name = "idna" -version = "3.4" +version = "3.6" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, + {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, + {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, ] [[package]] @@ -1100,20 +1110,20 @@ files = [ [[package]] name = "importlib-metadata" -version = "6.8.0" +version = "7.0.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-6.8.0-py3-none-any.whl", hash = "sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb"}, - {file = "importlib_metadata-6.8.0.tar.gz", hash = "sha256:dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743"}, + {file = "importlib_metadata-7.0.0-py3-none-any.whl", hash = "sha256:d97503976bb81f40a193d41ee6570868479c69d5068651eb039c40d850c59d67"}, + {file = "importlib_metadata-7.0.0.tar.gz", hash = "sha256:7fc841f8b8332803464e5dc1c63a2e59121f46ca186c0e2e182e80bf8c1319f7"}, ] [package.dependencies] zipp = ">=0.5" [package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] @@ -1148,24 +1158,23 @@ files = [ [[package]] name = "ipython" -version = "8.17.2" +version = "8.18.1" description = "IPython: Productive Interactive Computing" optional = false python-versions = ">=3.9" files = [ - {file = "ipython-8.17.2-py3-none-any.whl", hash = "sha256:1e4d1d666a023e3c93585ba0d8e962867f7a111af322efff6b9c58062b3e5444"}, - {file = "ipython-8.17.2.tar.gz", hash = "sha256:126bb57e1895594bb0d91ea3090bbd39384f6fe87c3d57fd558d0670f50339bb"}, + {file = "ipython-8.18.1-py3-none-any.whl", hash = "sha256:e8267419d72d81955ec1177f8a29aaa90ac80ad647499201119e2f05e99aa397"}, + {file = "ipython-8.18.1.tar.gz", hash = "sha256:ca6f079bb33457c66e233e4580ebfc4128855b4cf6370dddd73842a9563e8a27"}, ] [package.dependencies] -appnope = {version = "*", markers = "sys_platform == \"darwin\""} colorama = {version = "*", markers = "sys_platform == \"win32\""} decorator = "*" exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} jedi = ">=0.16" matplotlib-inline = "*" pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} -prompt-toolkit = ">=3.0.30,<3.0.37 || >3.0.37,<3.1.0" +prompt-toolkit = ">=3.0.41,<3.1.0" pygments = ">=2.4.0" stack-data = "*" traitlets = ">=5" @@ -1496,62 +1505,6 @@ files = [ {file = "libclang-16.0.6.tar.gz", hash = "sha256:4acdde39dfe410c877b4ccc0d4b57eb952100e4ee26bbdf6cfdb88e2033a7d31"}, ] -[[package]] -name = "llvmlite" -version = "0.40.1" -description = "lightweight wrapper around basic LLVM functionality" -optional = false -python-versions = ">=3.8" -files = [ - {file = "llvmlite-0.40.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:84ce9b1c7a59936382ffde7871978cddcda14098e5a76d961e204523e5c372fb"}, - {file = "llvmlite-0.40.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3673c53cb21c65d2ff3704962b5958e967c6fc0bd0cff772998face199e8d87b"}, - {file = "llvmlite-0.40.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bba2747cf5b4954e945c287fe310b3fcc484e2a9d1b0c273e99eb17d103bb0e6"}, - {file = "llvmlite-0.40.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbd5e82cc990e5a3e343a3bf855c26fdfe3bfae55225f00efd01c05bbda79918"}, - {file = "llvmlite-0.40.1-cp310-cp310-win32.whl", hash = "sha256:09f83ea7a54509c285f905d968184bba00fc31ebf12f2b6b1494d677bb7dde9b"}, - {file = "llvmlite-0.40.1-cp310-cp310-win_amd64.whl", hash = "sha256:7b37297f3cbd68d14a97223a30620589d98ad1890e5040c9e5fc181063f4ed49"}, - {file = "llvmlite-0.40.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a66a5bd580951751b4268f4c3bddcef92682814d6bc72f3cd3bb67f335dd7097"}, - {file = "llvmlite-0.40.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:467b43836b388eaedc5a106d76761e388dbc4674b2f2237bc477c6895b15a634"}, - {file = "llvmlite-0.40.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0c23edd196bd797dc3a7860799054ea3488d2824ecabc03f9135110c2e39fcbc"}, - {file = "llvmlite-0.40.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a36d9f244b6680cb90bbca66b146dabb2972f4180c64415c96f7c8a2d8b60a36"}, - {file = "llvmlite-0.40.1-cp311-cp311-win_amd64.whl", hash = "sha256:5b3076dc4e9c107d16dc15ecb7f2faf94f7736cd2d5e9f4dc06287fd672452c1"}, - {file = "llvmlite-0.40.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4a7525db121f2e699809b539b5308228854ccab6693ecb01b52c44a2f5647e20"}, - {file = "llvmlite-0.40.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:84747289775d0874e506f907a4513db889471607db19b04de97d144047fec885"}, - {file = "llvmlite-0.40.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e35766e42acef0fe7d1c43169a8ffc327a47808fae6a067b049fe0e9bbf84dd5"}, - {file = "llvmlite-0.40.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cda71de10a1f48416309e408ea83dab5bf36058f83e13b86a2961defed265568"}, - {file = "llvmlite-0.40.1-cp38-cp38-win32.whl", hash = "sha256:96707ebad8b051bbb4fc40c65ef93b7eeee16643bd4d579a14d11578e4b7a647"}, - {file = "llvmlite-0.40.1-cp38-cp38-win_amd64.whl", hash = "sha256:e44f854dc11559795bcdeaf12303759e56213d42dabbf91a5897aa2d8b033810"}, - {file = "llvmlite-0.40.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f643d15aacd0b0b0dc8b74b693822ba3f9a53fa63bc6a178c2dba7cc88f42144"}, - {file = "llvmlite-0.40.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:39a0b4d0088c01a469a5860d2e2d7a9b4e6a93c0f07eb26e71a9a872a8cadf8d"}, - {file = "llvmlite-0.40.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9329b930d699699846623054121ed105fd0823ed2180906d3b3235d361645490"}, - {file = "llvmlite-0.40.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2dbbb8424037ca287983b115a29adf37d806baf7e1bf4a67bd2cffb74e085ed"}, - {file = "llvmlite-0.40.1-cp39-cp39-win32.whl", hash = "sha256:e74e7bec3235a1e1c9ad97d897a620c5007d0ed80c32c84c1d787e7daa17e4ec"}, - {file = "llvmlite-0.40.1-cp39-cp39-win_amd64.whl", hash = "sha256:ff8f31111bb99d135ff296757dc81ab36c2dee54ed4bd429158a96da9807c316"}, - {file = "llvmlite-0.40.1.tar.gz", hash = "sha256:5cdb0d45df602099d833d50bd9e81353a5e036242d3c003c5b294fc61d1986b4"}, -] - -[[package]] -name = "lmfit" -version = "1.2.2" -description = "Least-Squares Minimization with Bounds and Constraints" -optional = false -python-versions = ">=3.7" -files = [ - {file = "lmfit-1.2.2-py3-none-any.whl", hash = "sha256:3101bb16236179cc2e332202d621109271269dcb8edaa8983eecbffdaf57eb0c"}, - {file = "lmfit-1.2.2.tar.gz", hash = "sha256:044a052a11a61da0576274504c17eb7e2803b41128e25821e96632207f23c88c"}, -] - -[package.dependencies] -asteval = ">=0.9.28" -numpy = ">=1.19" -scipy = ">=1.6" -uncertainties = ">=3.1.4" - -[package.extras] -all = ["Pillow", "Sphinx", "build", "cairosvg", "check-wheel-contents", "corner", "coverage", "dill", "emcee (>=3.0.0)", "flaky", "ipykernel", "jupyter-sphinx (>=0.2.4)", "matplotlib", "numdifftools", "pandas", "pre-commit", "pycairo", "pytest", "pytest-cov", "sphinx-gallery (>=0.10)", "sphinxcontrib-svg2pdfconverter", "sympy", "twine"] -dev = ["build", "check-wheel-contents", "pre-commit", "twine"] -doc = ["Pillow", "Sphinx", "cairosvg", "corner", "dill", "emcee (>=3.0.0)", "ipykernel", "jupyter-sphinx (>=0.2.4)", "matplotlib", "numdifftools", "pandas", "pycairo", "sphinx-gallery (>=0.10)", "sphinxcontrib-svg2pdfconverter", "sympy"] -test = ["coverage", "flaky", "pytest", "pytest-cov"] - [[package]] name = "markdown" version = "3.5.1" @@ -1597,6 +1550,16 @@ files = [ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, @@ -1631,39 +1594,39 @@ files = [ [[package]] name = "matplotlib" -version = "3.8.1" +version = "3.8.2" description = "Python plotting package" optional = false python-versions = ">=3.9" files = [ - {file = "matplotlib-3.8.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:e11ab864323fa73ac1b7849688d9671c47a2665242e899785b4db1a375b547e1"}, - {file = "matplotlib-3.8.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:43a9d40feb63c9e31a0b8b069dcbd74a912f59bdc0095d187126694cd26977e4"}, - {file = "matplotlib-3.8.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:608ea2951838d391e45dec2e644888db6899c752d3c29e157af9dcefb3d7d8d5"}, - {file = "matplotlib-3.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82ec95b02e894561c21e066bd0c716e4b410df141ce9441aa5af6cd937e4ade2"}, - {file = "matplotlib-3.8.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e3ad1759ad4a5245172c6d32b8ada603a6020d03211524c39d78d25c9a7dc0d2"}, - {file = "matplotlib-3.8.1-cp310-cp310-win_amd64.whl", hash = "sha256:20a0fdfd3ee836179047f3782be060057b878ad37f5abe29edf006a1ff3ecd73"}, - {file = "matplotlib-3.8.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:7658b7073c1d6a2922ecc0ed41602410fae88586cb8a54f7a2063d537b6beaf7"}, - {file = "matplotlib-3.8.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bf6889643d4560fcc56f9f0941f078e4df0d72a6c3e4ca548841fc13c5642664"}, - {file = "matplotlib-3.8.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ff842e27bc6a80de08c40e0bfdce460bd08080e8a94af131162b6a1b8948f2cc"}, - {file = "matplotlib-3.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f99d07c0e753717775be7be39ab383453b4d8b629c9fa174596b970c6555890"}, - {file = "matplotlib-3.8.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f34b46dbb1db1f09bfa937cd5853e5f2af232caeeff509c3ab6e43fd33780eae"}, - {file = "matplotlib-3.8.1-cp311-cp311-win_amd64.whl", hash = "sha256:1fcb49b6baf0375281979cbf26695ec10bd1cada1e311893e89533b3b70143e7"}, - {file = "matplotlib-3.8.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:e17674ee127f78f26fea237e7f4d5cf910a8be82beb6260fedf358b88075b823"}, - {file = "matplotlib-3.8.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d921c0270647ab11c3ef283efaaa3d46fd005ba233bfb3aea75231cdf3656de8"}, - {file = "matplotlib-3.8.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2afe7d2f8c9e35e94fbcfcfd9b28f29cb32f0a9068cba469cf907428379c8db9"}, - {file = "matplotlib-3.8.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5a504ff40f81d6233603475a45497a6dca37a873393fa20ae6f7dd6596ef72b"}, - {file = "matplotlib-3.8.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:cd54bbf089953140905768ed4626d7223e1ad1d7e2a138410a9c4d3b865ccd80"}, - {file = "matplotlib-3.8.1-cp312-cp312-win_amd64.whl", hash = "sha256:27502d2452208ae784c19504644f09f83742809143bbeae147617640930aa344"}, - {file = "matplotlib-3.8.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:f55fb5ff02d999a100be28bf6ffe826e1867a54c7b465409685332c9dd48ffa5"}, - {file = "matplotlib-3.8.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:afb72822ae410d62aa1a2920c6563cb5680de9078358f0e9474396c6c3e06be2"}, - {file = "matplotlib-3.8.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:43cf368a4a1d8cbc426944806e5e183cead746647a64d2cdb786441546235967"}, - {file = "matplotlib-3.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c54c55457c7f5ea4dfdba0020004fc7667f5c10c8d9b8010d735345acc06c9b8"}, - {file = "matplotlib-3.8.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e3bb809b743653b5aab5d72ee45c8c937c28e147b0846b0826a54bece898608c"}, - {file = "matplotlib-3.8.1-cp39-cp39-win_amd64.whl", hash = "sha256:c1b0ecaa0d1f4fe1e30f625a2347f0034a89a7d17c39efbb502e554d92ee2f61"}, - {file = "matplotlib-3.8.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ca84deaa38cb64b7dd160ca2046b45f7b5dbff2b0179642e1339fadc337446c9"}, - {file = "matplotlib-3.8.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed3b29f54f6bbf3eaca4cbd23bc260155153ace63b7f597c474fa6fc6f386530"}, - {file = "matplotlib-3.8.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:0d24c47a1bb47e392fbcd26fe322e4ff3431653ac1e8718e4e147d450ae97a44"}, - {file = "matplotlib-3.8.1.tar.gz", hash = "sha256:044df81c1f6f3a8e52d70c4cfcb44e77ea9632a10929932870dfaa90de94365d"}, + {file = "matplotlib-3.8.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:09796f89fb71a0c0e1e2f4bdaf63fb2cefc84446bb963ecdeb40dfee7dfa98c7"}, + {file = "matplotlib-3.8.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6f9c6976748a25e8b9be51ea028df49b8e561eed7809146da7a47dbecebab367"}, + {file = "matplotlib-3.8.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b78e4f2cedf303869b782071b55fdde5987fda3038e9d09e58c91cc261b5ad18"}, + {file = "matplotlib-3.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e208f46cf6576a7624195aa047cb344a7f802e113bb1a06cfd4bee431de5e31"}, + {file = "matplotlib-3.8.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:46a569130ff53798ea5f50afce7406e91fdc471ca1e0e26ba976a8c734c9427a"}, + {file = "matplotlib-3.8.2-cp310-cp310-win_amd64.whl", hash = "sha256:830f00640c965c5b7f6bc32f0d4ce0c36dfe0379f7dd65b07a00c801713ec40a"}, + {file = "matplotlib-3.8.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d86593ccf546223eb75a39b44c32788e6f6440d13cfc4750c1c15d0fcb850b63"}, + {file = "matplotlib-3.8.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9a5430836811b7652991939012f43d2808a2db9b64ee240387e8c43e2e5578c8"}, + {file = "matplotlib-3.8.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9576723858a78751d5aacd2497b8aef29ffea6d1c95981505877f7ac28215c6"}, + {file = "matplotlib-3.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ba9cbd8ac6cf422f3102622b20f8552d601bf8837e49a3afed188d560152788"}, + {file = "matplotlib-3.8.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:03f9d160a29e0b65c0790bb07f4f45d6a181b1ac33eb1bb0dd225986450148f0"}, + {file = "matplotlib-3.8.2-cp311-cp311-win_amd64.whl", hash = "sha256:3773002da767f0a9323ba1a9b9b5d00d6257dbd2a93107233167cfb581f64717"}, + {file = "matplotlib-3.8.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:4c318c1e95e2f5926fba326f68177dee364aa791d6df022ceb91b8221bd0a627"}, + {file = "matplotlib-3.8.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:091275d18d942cf1ee9609c830a1bc36610607d8223b1b981c37d5c9fc3e46a4"}, + {file = "matplotlib-3.8.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b0f3b8ea0e99e233a4bcc44590f01604840d833c280ebb8fe5554fd3e6cfe8d"}, + {file = "matplotlib-3.8.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7b1704a530395aaf73912be741c04d181f82ca78084fbd80bc737be04848331"}, + {file = "matplotlib-3.8.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:533b0e3b0c6768eef8cbe4b583731ce25a91ab54a22f830db2b031e83cca9213"}, + {file = "matplotlib-3.8.2-cp312-cp312-win_amd64.whl", hash = "sha256:0f4fc5d72b75e2c18e55eb32292659cf731d9d5b312a6eb036506304f4675630"}, + {file = "matplotlib-3.8.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:deaed9ad4da0b1aea77fe0aa0cebb9ef611c70b3177be936a95e5d01fa05094f"}, + {file = "matplotlib-3.8.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:172f4d0fbac3383d39164c6caafd3255ce6fa58f08fc392513a0b1d3b89c4f89"}, + {file = "matplotlib-3.8.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7d36c2209d9136cd8e02fab1c0ddc185ce79bc914c45054a9f514e44c787917"}, + {file = "matplotlib-3.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5864bdd7da445e4e5e011b199bb67168cdad10b501750367c496420f2ad00843"}, + {file = "matplotlib-3.8.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ef8345b48e95cee45ff25192ed1f4857273117917a4dcd48e3905619bcd9c9b8"}, + {file = "matplotlib-3.8.2-cp39-cp39-win_amd64.whl", hash = "sha256:7c48d9e221b637c017232e3760ed30b4e8d5dfd081daf327e829bf2a72c731b4"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:aa11b3c6928a1e496c1a79917d51d4cd5d04f8a2e75f21df4949eeefdf697f4b"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1095fecf99eeb7384dabad4bf44b965f929a5f6079654b681193edf7169ec20"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:bddfb1db89bfaa855912261c805bd0e10218923cc262b9159a49c29a7a1c1afa"}, + {file = "matplotlib-3.8.2.tar.gz", hash = "sha256:01a978b871b881ee76017152f1f1a0cbf6bd5f7b8ff8c96df0df1bd57d8755a1"}, ] [package.dependencies] @@ -1796,43 +1759,6 @@ doc = ["nb2plots (>=0.7)", "nbconvert (<7.9)", "numpydoc (>=1.6)", "pillow (>=9. extra = ["lxml (>=4.6)", "pydot (>=1.4.2)", "pygraphviz (>=1.11)", "sympy (>=1.10)"] test = ["pytest (>=7.2)", "pytest-cov (>=4.0)"] -[[package]] -name = "numba" -version = "0.57.1" -description = "compiling Python code using LLVM" -optional = false -python-versions = ">=3.8" -files = [ - {file = "numba-0.57.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:db8268eb5093cae2288942a8cbd69c9352f6fe6e0bfa0a9a27679436f92e4248"}, - {file = "numba-0.57.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:643cb09a9ba9e1bd8b060e910aeca455e9442361e80fce97690795ff9840e681"}, - {file = "numba-0.57.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:53e9fab973d9e82c9f8449f75994a898daaaf821d84f06fbb0b9de2293dd9306"}, - {file = "numba-0.57.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c0602e4f896e6a6d844517c3ab434bc978e7698a22a733cc8124465898c28fa8"}, - {file = "numba-0.57.1-cp310-cp310-win32.whl", hash = "sha256:3d6483c27520d16cf5d122868b79cad79e48056ecb721b52d70c126bed65431e"}, - {file = "numba-0.57.1-cp310-cp310-win_amd64.whl", hash = "sha256:a32ee263649aa3c3587b833d6311305379529570e6c20deb0c6f4fb5bc7020db"}, - {file = "numba-0.57.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c078f84b5529a7fdb8413bb33d5100f11ec7b44aa705857d9eb4e54a54ff505"}, - {file = "numba-0.57.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e447c4634d1cc99ab50d4faa68f680f1d88b06a2a05acf134aa6fcc0342adeca"}, - {file = "numba-0.57.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4838edef2df5f056cb8974670f3d66562e751040c448eb0b67c7e2fec1726649"}, - {file = "numba-0.57.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9b17fbe4a69dcd9a7cd49916b6463cd9a82af5f84911feeb40793b8bce00dfa7"}, - {file = "numba-0.57.1-cp311-cp311-win_amd64.whl", hash = "sha256:93df62304ada9b351818ba19b1cfbddaf72cd89348e81474326ca0b23bf0bae1"}, - {file = "numba-0.57.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8e00ca63c5d0ad2beeb78d77f087b3a88c45ea9b97e7622ab2ec411a868420ee"}, - {file = "numba-0.57.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ff66d5b022af6c7d81ddbefa87768e78ed4f834ab2da6ca2fd0d60a9e69b94f5"}, - {file = "numba-0.57.1-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:60ec56386076e9eed106a87c96626d5686fbb16293b9834f0849cf78c9491779"}, - {file = "numba-0.57.1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6c057ccedca95df23802b6ccad86bb318be624af45b5a38bb8412882be57a681"}, - {file = "numba-0.57.1-cp38-cp38-win32.whl", hash = "sha256:5a82bf37444039c732485c072fda21a361790ed990f88db57fd6941cd5e5d307"}, - {file = "numba-0.57.1-cp38-cp38-win_amd64.whl", hash = "sha256:9bcc36478773ce838f38afd9a4dfafc328d4ffb1915381353d657da7f6473282"}, - {file = "numba-0.57.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ae50c8c90c2ce8057f9618b589223e13faa8cbc037d8f15b4aad95a2c33a0582"}, - {file = "numba-0.57.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9a1b2b69448e510d672ff9a6b18d2db9355241d93c6a77677baa14bec67dc2a0"}, - {file = "numba-0.57.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3cf78d74ad9d289fbc1e5b1c9f2680fca7a788311eb620581893ab347ec37a7e"}, - {file = "numba-0.57.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f47dd214adc5dcd040fe9ad2adbd2192133c9075d2189ce1b3d5f9d72863ef05"}, - {file = "numba-0.57.1-cp39-cp39-win32.whl", hash = "sha256:a3eac19529956185677acb7f01864919761bfffbb9ae04bbbe5e84bbc06cfc2b"}, - {file = "numba-0.57.1-cp39-cp39-win_amd64.whl", hash = "sha256:9587ba1bf5f3035575e45562ada17737535c6d612df751e811d702693a72d95e"}, - {file = "numba-0.57.1.tar.gz", hash = "sha256:33c0500170d213e66d90558ad6aca57d3e03e97bb11da82e6d87ab793648cb17"}, -] - -[package.dependencies] -llvmlite = "==0.40.*" -numpy = ">=1.21,<1.25" - [[package]] name = "numpy" version = "1.24.4" @@ -1946,35 +1872,35 @@ protobuf = "*" [[package]] name = "onnxruntime" -version = "1.16.1" +version = "1.16.3" description = "ONNX Runtime is a runtime accelerator for Machine Learning models" optional = true python-versions = "*" files = [ - {file = "onnxruntime-1.16.1-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:28b2c7f444b4119950b69370801cd66067f403d19cbaf2a444735d7c269cce4a"}, - {file = "onnxruntime-1.16.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c24e04f33e7899f6aebb03ed51e51d346c1f906b05c5569d58ac9a12d38a2f58"}, - {file = "onnxruntime-1.16.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9fa93b166f2d97063dc9f33c5118c5729a4a5dd5617296b6dbef42f9047b3e81"}, - {file = "onnxruntime-1.16.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:042dd9201b3016ee18f8f8bc4609baf11ff34ca1ff489c0a46bcd30919bf883d"}, - {file = "onnxruntime-1.16.1-cp310-cp310-win32.whl", hash = "sha256:c20aa0591f305012f1b21aad607ed96917c86ae7aede4a4dd95824b3d124ceb7"}, - {file = "onnxruntime-1.16.1-cp310-cp310-win_amd64.whl", hash = "sha256:5581873e578917bea76d6434ee7337e28195d03488dcf72d161d08e9398c6249"}, - {file = "onnxruntime-1.16.1-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:ef8c0c8abf5f309aa1caf35941380839dc5f7a2fa53da533be4a3f254993f120"}, - {file = "onnxruntime-1.16.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e680380bea35a137cbc3efd67a17486e96972901192ad3026ee79c8d8fe264f7"}, - {file = "onnxruntime-1.16.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e62cc38ce1a669013d0a596d984762dc9c67c56f60ecfeee0d5ad36da5863f6"}, - {file = "onnxruntime-1.16.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:025c7a4d57bd2e63b8a0f84ad3df53e419e3df1cc72d63184f2aae807b17c13c"}, - {file = "onnxruntime-1.16.1-cp311-cp311-win32.whl", hash = "sha256:9ad074057fa8d028df248b5668514088cb0937b6ac5954073b7fb9b2891ffc8c"}, - {file = "onnxruntime-1.16.1-cp311-cp311-win_amd64.whl", hash = "sha256:d5e43a3478bffc01f817ecf826de7b25a2ca1bca8547d70888594ab80a77ad24"}, - {file = "onnxruntime-1.16.1-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:3aef4d70b0930e29a8943eab248cd1565664458d3a62b2276bd11181f28fd0a3"}, - {file = "onnxruntime-1.16.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:55a7b843a57c8ca0c8ff169428137958146081d5d76f1a6dd444c4ffcd37c3c2"}, - {file = "onnxruntime-1.16.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62c631af1941bf3b5f7d063d24c04aacce8cff0794e157c497e315e89ac5ad7b"}, - {file = "onnxruntime-1.16.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5671f296c3d5c233f601e97a10ab5a1dd8e65ba35c7b7b0c253332aba9dff330"}, - {file = "onnxruntime-1.16.1-cp38-cp38-win32.whl", hash = "sha256:eb3802305023dd05e16848d4e22b41f8147247894309c0c27122aaa08793b3d2"}, - {file = "onnxruntime-1.16.1-cp38-cp38-win_amd64.whl", hash = "sha256:fecfb07443d09d271b1487f401fbdf1ba0c829af6fd4fe8f6af25f71190e7eb9"}, - {file = "onnxruntime-1.16.1-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:de3e12094234db6545c67adbf801874b4eb91e9f299bda34c62967ef0050960f"}, - {file = "onnxruntime-1.16.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ff723c2a5621b5e7103f3be84d5aae1e03a20621e72219dddceae81f65f240af"}, - {file = "onnxruntime-1.16.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14a7fb3073aaf6b462e3d7fb433320f7700558a8892e5021780522dc4574292a"}, - {file = "onnxruntime-1.16.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:963159f1f699b0454cd72fcef3276c8a1aab9389a7b301bcd8e320fb9d9e8597"}, - {file = "onnxruntime-1.16.1-cp39-cp39-win32.whl", hash = "sha256:85771adb75190db9364b25ddec353ebf07635b83eb94b64ed014f1f6d57a3857"}, - {file = "onnxruntime-1.16.1-cp39-cp39-win_amd64.whl", hash = "sha256:d32d2b30799c1f950123c60ae8390818381fd5f88bdf3627eeca10071c155dc5"}, + {file = "onnxruntime-1.16.3-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:3bc41f323ac77acfed190be8ffdc47a6a75e4beeb3473fbf55eeb075ccca8df2"}, + {file = "onnxruntime-1.16.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:212741b519ee61a4822c79c47147d63a8b0ffde25cd33988d3d7be9fbd51005d"}, + {file = "onnxruntime-1.16.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f91f5497fe3df4ceee2f9e66c6148d9bfeb320cd6a71df361c66c5b8bac985a"}, + {file = "onnxruntime-1.16.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef2b1fc269cabd27f129fb9058917d6fdc89b188c49ed8700f300b945c81f889"}, + {file = "onnxruntime-1.16.3-cp310-cp310-win32.whl", hash = "sha256:f36b56a593b49a3c430be008c2aea6658d91a3030115729609ec1d5ffbaab1b6"}, + {file = "onnxruntime-1.16.3-cp310-cp310-win_amd64.whl", hash = "sha256:3c467eaa3d2429c026b10c3d17b78b7f311f718ef9d2a0d6938e5c3c2611b0cf"}, + {file = "onnxruntime-1.16.3-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:a225bb683991001d111f75323d355b3590e75e16b5e0f07a0401e741a0143ea1"}, + {file = "onnxruntime-1.16.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9aded21fe3d898edd86be8aa2eb995aa375e800ad3dfe4be9f618a20b8ee3630"}, + {file = "onnxruntime-1.16.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00cccc37a5195c8fca5011b9690b349db435986bd508eb44c9fce432da9228a4"}, + {file = "onnxruntime-1.16.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e253e572021563226a86f1c024f8f70cdae28f2fb1cc8c3a9221e8b1ce37db5"}, + {file = "onnxruntime-1.16.3-cp311-cp311-win32.whl", hash = "sha256:a82a8f0b4c978d08f9f5c7a6019ae51151bced9fd91e5aaa0c20a9e4ac7a60b6"}, + {file = "onnxruntime-1.16.3-cp311-cp311-win_amd64.whl", hash = "sha256:78d81d9af457a1dc90db9a7da0d09f3ccb1288ea1236c6ab19f0ca61f3eee2d3"}, + {file = "onnxruntime-1.16.3-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:04ebcd29c20473596a1412e471524b2fb88d55e6301c40b98dd2407b5911595f"}, + {file = "onnxruntime-1.16.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9996bab0f202a6435ab867bc55598f15210d0b72794d5de83712b53d564084ae"}, + {file = "onnxruntime-1.16.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b8f5083f903408238883821dd8c775f8120cb4a604166dbdabe97f4715256d5"}, + {file = "onnxruntime-1.16.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c2dcf1b70f8434abb1116fe0975c00e740722aaf321997195ea3618cc00558e"}, + {file = "onnxruntime-1.16.3-cp38-cp38-win32.whl", hash = "sha256:d4a0151e1accd04da6711f6fd89024509602f82c65a754498e960b032359b02d"}, + {file = "onnxruntime-1.16.3-cp38-cp38-win_amd64.whl", hash = "sha256:e8aa5bba78afbd4d8a2654b14ec7462ff3ce4a6aad312a3c2d2c2b65009f2541"}, + {file = "onnxruntime-1.16.3-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:6829dc2a79d48c911fedaf4c0f01e03c86297d32718a3fdee7a282766dfd282a"}, + {file = "onnxruntime-1.16.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:76f876c53bfa912c6c242fc38213a6f13f47612d4360bc9d599bd23753e53161"}, + {file = "onnxruntime-1.16.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4137e5d443e2dccebe5e156a47f1d6d66f8077b03587c35f11ee0c7eda98b533"}, + {file = "onnxruntime-1.16.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c56695c1a343c7c008b647fff3df44da63741fbe7b6003ef576758640719be7b"}, + {file = "onnxruntime-1.16.3-cp39-cp39-win32.whl", hash = "sha256:985a029798744ce4743fcf8442240fed35c8e4d4d30ec7d0c2cdf1388cd44408"}, + {file = "onnxruntime-1.16.3-cp39-cp39-win_amd64.whl", hash = "sha256:28ff758b17ce3ca6bcad3d936ec53bd7f5482e7630a13f6dcae518eba8f71d85"}, ] [package.dependencies] @@ -2099,13 +2025,13 @@ testing = ["funcsigs", "pytest"] [[package]] name = "pexpect" -version = "4.8.0" +version = "4.9.0" description = "Pexpect allows easy control of interactive console applications." optional = false python-versions = "*" files = [ - {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, - {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, + {file = "pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523"}, + {file = "pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f"}, ] [package.dependencies] @@ -2180,13 +2106,13 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa [[package]] name = "platformdirs" -version = "3.11.0" +version = "4.1.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "platformdirs-3.11.0-py3-none-any.whl", hash = "sha256:e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e"}, - {file = "platformdirs-3.11.0.tar.gz", hash = "sha256:cf8ee52a3afdb965072dcc652433e0c7e3e40cf5ea1477cd4b3b1d2eb75495b3"}, + {file = "platformdirs-4.1.0-py3-none-any.whl", hash = "sha256:11c8f37bcca40db96d8144522d925583bdb7a31f7b0e37e3ed4318400a8e2380"}, + {file = "platformdirs-4.1.0.tar.gz", hash = "sha256:906d548203468492d432bcb294d4bc2fff751bf84971fbb2c10918cc206ee420"}, ] [package.extras] @@ -2225,13 +2151,13 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "prompt-toolkit" -version = "3.0.39" +version = "3.0.41" description = "Library for building powerful interactive command lines in Python" optional = false python-versions = ">=3.7.0" files = [ - {file = "prompt_toolkit-3.0.39-py3-none-any.whl", hash = "sha256:9dffbe1d8acf91e3de75f3b544e4842382fc06c6babe903ac9acb74dc6e08d88"}, - {file = "prompt_toolkit-3.0.39.tar.gz", hash = "sha256:04505ade687dc26dc4284b1ad19a83be2f2afe83e7a828ace0c72f3a1df72aac"}, + {file = "prompt_toolkit-3.0.41-py3-none-any.whl", hash = "sha256:f36fe301fafb7470e86aaf90f036eef600a3210be4decf461a5b1ca8403d3cb2"}, + {file = "prompt_toolkit-3.0.41.tar.gz", hash = "sha256:941367d97fc815548822aa26c2a269fdc4eb21e9ec05fc5d447cf09bad5d75f0"}, ] [package.dependencies] @@ -2239,22 +2165,22 @@ wcwidth = "*" [[package]] name = "protobuf" -version = "4.25.0" +version = "4.25.1" description = "" optional = true python-versions = ">=3.8" files = [ - {file = "protobuf-4.25.0-cp310-abi3-win32.whl", hash = "sha256:5c1203ac9f50e4853b0a0bfffd32c67118ef552a33942982eeab543f5c634395"}, - {file = "protobuf-4.25.0-cp310-abi3-win_amd64.whl", hash = "sha256:c40ff8f00aa737938c5378d461637d15c442a12275a81019cc2fef06d81c9419"}, - {file = "protobuf-4.25.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:cf21faba64cd2c9a3ed92b7a67f226296b10159dbb8fbc5e854fc90657d908e4"}, - {file = "protobuf-4.25.0-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:32ac2100b0e23412413d948c03060184d34a7c50b3e5d7524ee96ac2b10acf51"}, - {file = "protobuf-4.25.0-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:683dc44c61f2620b32ce4927de2108f3ebe8ccf2fd716e1e684e5a50da154054"}, - {file = "protobuf-4.25.0-cp38-cp38-win32.whl", hash = "sha256:1a3ba712877e6d37013cdc3476040ea1e313a6c2e1580836a94f76b3c176d575"}, - {file = "protobuf-4.25.0-cp38-cp38-win_amd64.whl", hash = "sha256:b2cf8b5d381f9378afe84618288b239e75665fe58d0f3fd5db400959274296e9"}, - {file = "protobuf-4.25.0-cp39-cp39-win32.whl", hash = "sha256:63714e79b761a37048c9701a37438aa29945cd2417a97076048232c1df07b701"}, - {file = "protobuf-4.25.0-cp39-cp39-win_amd64.whl", hash = "sha256:d94a33db8b7ddbd0af7c467475fb9fde0c705fb315a8433c0e2020942b863a1f"}, - {file = "protobuf-4.25.0-py3-none-any.whl", hash = "sha256:1a53d6f64b00eecf53b65ff4a8c23dc95df1fa1e97bb06b8122e5a64f49fc90a"}, - {file = "protobuf-4.25.0.tar.gz", hash = "sha256:68f7caf0d4f012fd194a301420cf6aa258366144d814f358c5b32558228afa7c"}, + {file = "protobuf-4.25.1-cp310-abi3-win32.whl", hash = "sha256:193f50a6ab78a970c9b4f148e7c750cfde64f59815e86f686c22e26b4fe01ce7"}, + {file = "protobuf-4.25.1-cp310-abi3-win_amd64.whl", hash = "sha256:3497c1af9f2526962f09329fd61a36566305e6c72da2590ae0d7d1322818843b"}, + {file = "protobuf-4.25.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:0bf384e75b92c42830c0a679b0cd4d6e2b36ae0cf3dbb1e1dfdda48a244f4bcd"}, + {file = "protobuf-4.25.1-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:0f881b589ff449bf0b931a711926e9ddaad3b35089cc039ce1af50b21a4ae8cb"}, + {file = "protobuf-4.25.1-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:ca37bf6a6d0046272c152eea90d2e4ef34593aaa32e8873fc14c16440f22d4b7"}, + {file = "protobuf-4.25.1-cp38-cp38-win32.whl", hash = "sha256:abc0525ae2689a8000837729eef7883b9391cd6aa7950249dcf5a4ede230d5dd"}, + {file = "protobuf-4.25.1-cp38-cp38-win_amd64.whl", hash = "sha256:1484f9e692091450e7edf418c939e15bfc8fc68856e36ce399aed6889dae8bb0"}, + {file = "protobuf-4.25.1-cp39-cp39-win32.whl", hash = "sha256:8bdbeaddaac52d15c6dce38c71b03038ef7772b977847eb6d374fc86636fa510"}, + {file = "protobuf-4.25.1-cp39-cp39-win_amd64.whl", hash = "sha256:becc576b7e6b553d22cbdf418686ee4daa443d7217999125c045ad56322dda10"}, + {file = "protobuf-4.25.1-py3-none-any.whl", hash = "sha256:a19731d5e83ae4737bb2a089605e636077ac001d18781b3cf489b9546c7c80d6"}, + {file = "protobuf-4.25.1.tar.gz", hash = "sha256:57d65074b4f5baa4ab5da1605c02be90ac20c8b40fb137d6a8df9f416b0d0ce2"}, ] [[package]] @@ -2310,15 +2236,26 @@ files = [ [package.extras] tests = ["pytest"] +[[package]] +name = "py4j" +version = "0.10.9.7" +description = "Enables Python programs to dynamically access arbitrary Java objects" +optional = false +python-versions = "*" +files = [ + {file = "py4j-0.10.9.7-py2.py3-none-any.whl", hash = "sha256:85defdfd2b2376eb3abf5ca6474b51ab7e0de341c75a02f46dc9b5976f5a5c1b"}, + {file = "py4j-0.10.9.7.tar.gz", hash = "sha256:0b6e5315bb3ada5cf62ac651d107bb2ebc02def3dee9d9548e3baac644ea8dbb"}, +] + [[package]] name = "pyasn1" -version = "0.5.0" +version = "0.5.1" description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" optional = true python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ - {file = "pyasn1-0.5.0-py2.py3-none-any.whl", hash = "sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57"}, - {file = "pyasn1-0.5.0.tar.gz", hash = "sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde"}, + {file = "pyasn1-0.5.1-py2.py3-none-any.whl", hash = "sha256:4439847c58d40b1d0a573d07e3856e95333f1976294494c325775aeca506eb58"}, + {file = "pyasn1-0.5.1.tar.gz", hash = "sha256:6d391a96e59b23130a5cfa74d6fd7f388dbbe26cc8f1edf39fdddf08d9d6676c"}, ] [[package]] @@ -2437,17 +2374,18 @@ pyparsing = ">=2.1.4" [[package]] name = "pygments" -version = "2.16.1" +version = "2.17.2" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.7" files = [ - {file = "Pygments-2.16.1-py3-none-any.whl", hash = "sha256:13fc09fa63bc8d8671a6d247e1eb303c4b343eaee81d861f3404db2935653692"}, - {file = "Pygments-2.16.1.tar.gz", hash = "sha256:1daff0494820c69bc8941e407aa20f577374ee88364ee10a98fdbe0aece96e29"}, + {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, + {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, ] [package.extras] plugins = ["importlib-metadata"] +windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pylint" @@ -2617,6 +2555,7 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -2624,8 +2563,15 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -2642,6 +2588,7 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -2649,6 +2596,7 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -2656,17 +2604,18 @@ files = [ [[package]] name = "qibo" -version = "0.2.2" +version = "0.2.3" description = "A framework for quantum computing with hardware acceleration." optional = false -python-versions = ">=3.8,<3.12" +python-versions = ">=3.9,<3.12" files = [ - {file = "qibo-0.2.2-py3-none-any.whl", hash = "sha256:663e1da540798b351175d23048a5b0dedd92d26d79fb70a9789b15b33f069cdb"}, - {file = "qibo-0.2.2.tar.gz", hash = "sha256:0edfb287d0bdadfeeafb236de3a214b88f46dfbd3669b92120530afd7f32599b"}, + {file = "qibo-0.2.3-py3-none-any.whl", hash = "sha256:53e649c57bf17c75ccafff804633d99aab595a4cbf42b3c42d625764c3dbb5b6"}, + {file = "qibo-0.2.3.tar.gz", hash = "sha256:ad375d47499781c9a0c942fcbd3747c84346e4c671e40fca34797929a2f509b3"}, ] [package.dependencies] cma = ">=3.3.0,<4.0.0" +hyperopt = ">=0.2.7,<0.3.0" joblib = ">=1.2.0,<2.0.0" matplotlib = ">=3.7.0,<4.0.0" psutil = ">=5.9.4,<6.0.0" @@ -2680,27 +2629,25 @@ version = "0.1.4" description = "Quantum hardware module and drivers for Qibo" optional = false python-versions = ">=3.9,<3.12" -files = [] -develop = false +files = [ + {file = "qibolab-0.1.4-py3-none-any.whl", hash = "sha256:cbab4d6737858a66e0c4de056c094aec87d8495e21f4c45474c0cd633b1945a3"}, + {file = "qibolab-0.1.4.tar.gz", hash = "sha256:af05dbcc6e7ce4240f00cd51331502fda81b23f6b4ace64aeb21782f4274df48"}, +] [package.dependencies] -more-itertools = "^9.1.0" -networkx = "^3.0" -numpy = "==1.24.4" -pyyaml = "^6.0" -qibo = ">=0.2.2" +more-itertools = ">=9.1.0,<10.0.0" +networkx = ">=3.0,<4.0" +numpy = "1.24.4" +pyyaml = ">=6.0,<7.0" +qibo = ">=0.2.3" +setuptools = ">67.0.0" [package.extras] +los = ["qcodes (>=0.37.0,<0.38.0)", "qcodes_contrib_drivers (==0.18.0)"] qblox = ["pyvisa-py (==0.5.3)", "qblox-instruments (==0.11.0)", "qcodes (>=0.37.0,<0.38.0)", "qcodes_contrib_drivers (==0.18.0)"] qm = ["qm-qua (==1.1.1)", "qualang-tools (==0.14.0)"] -rfsoc = ["qcodes (>=0.37.0,<0.38.0)", "qcodes_contrib_drivers (==0.18.0)", "qibosoq (>=0.0.4,<0.2)"] -zh = ["laboneq (>=2.12.0)"] - -[package.source] -type = "git" -url = "https://github.com/qiboteam/qibolab.git" -reference = "unrolling" -resolved_reference = "8feb6051693ef997af496ed526495d6315d90014" +rfsoc = ["qibosoq (>=0.0.4,<0.2)"] +zh = ["laboneq (==2.20.1)"] [[package]] name = "recommonmark" @@ -2834,36 +2781,36 @@ tests = ["black (>=23.3.0)", "matplotlib (>=3.1.3)", "mypy (>=1.3)", "numpydoc ( [[package]] name = "scipy" -version = "1.11.3" +version = "1.11.4" description = "Fundamental algorithms for scientific computing in Python" optional = false -python-versions = "<3.13,>=3.9" -files = [ - {file = "scipy-1.11.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:370f569c57e1d888304052c18e58f4a927338eafdaef78613c685ca2ea0d1fa0"}, - {file = "scipy-1.11.3-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:9885e3e4f13b2bd44aaf2a1a6390a11add9f48d5295f7a592393ceb8991577a3"}, - {file = "scipy-1.11.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e04aa19acc324a1a076abb4035dabe9b64badb19f76ad9c798bde39d41025cdc"}, - {file = "scipy-1.11.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e1a8a4657673bfae1e05e1e1d6e94b0cabe5ed0c7c144c8aa7b7dbb774ce5c1"}, - {file = "scipy-1.11.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7abda0e62ef00cde826d441485e2e32fe737bdddee3324e35c0e01dee65e2a88"}, - {file = "scipy-1.11.3-cp310-cp310-win_amd64.whl", hash = "sha256:033c3fd95d55012dd1148b201b72ae854d5086d25e7c316ec9850de4fe776929"}, - {file = "scipy-1.11.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:925c6f09d0053b1c0f90b2d92d03b261e889b20d1c9b08a3a51f61afc5f58165"}, - {file = "scipy-1.11.3-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:5664e364f90be8219283eeb844323ff8cd79d7acbd64e15eb9c46b9bc7f6a42a"}, - {file = "scipy-1.11.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00f325434b6424952fbb636506f0567898dca7b0f7654d48f1c382ea338ce9a3"}, - {file = "scipy-1.11.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f290cf561a4b4edfe8d1001ee4be6da60c1c4ea712985b58bf6bc62badee221"}, - {file = "scipy-1.11.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:91770cb3b1e81ae19463b3c235bf1e0e330767dca9eb4cd73ba3ded6c4151e4d"}, - {file = "scipy-1.11.3-cp311-cp311-win_amd64.whl", hash = "sha256:e1f97cd89c0fe1a0685f8f89d85fa305deb3067d0668151571ba50913e445820"}, - {file = "scipy-1.11.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:dfcc1552add7cb7c13fb70efcb2389d0624d571aaf2c80b04117e2755a0c5d15"}, - {file = "scipy-1.11.3-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:0d3a136ae1ff0883fffbb1b05b0b2fea251cb1046a5077d0b435a1839b3e52b7"}, - {file = "scipy-1.11.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bae66a2d7d5768eaa33008fa5a974389f167183c87bf39160d3fefe6664f8ddc"}, - {file = "scipy-1.11.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2f6dee6cbb0e263b8142ed587bc93e3ed5e777f1f75448d24fb923d9fd4dce6"}, - {file = "scipy-1.11.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:74e89dc5e00201e71dd94f5f382ab1c6a9f3ff806c7d24e4e90928bb1aafb280"}, - {file = "scipy-1.11.3-cp312-cp312-win_amd64.whl", hash = "sha256:90271dbde4be191522b3903fc97334e3956d7cfb9cce3f0718d0ab4fd7d8bfd6"}, - {file = "scipy-1.11.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a63d1ec9cadecce838467ce0631c17c15c7197ae61e49429434ba01d618caa83"}, - {file = "scipy-1.11.3-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:5305792c7110e32ff155aed0df46aa60a60fc6e52cd4ee02cdeb67eaccd5356e"}, - {file = "scipy-1.11.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9ea7f579182d83d00fed0e5c11a4aa5ffe01460444219dedc448a36adf0c3917"}, - {file = "scipy-1.11.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c77da50c9a91e23beb63c2a711ef9e9ca9a2060442757dffee34ea41847d8156"}, - {file = "scipy-1.11.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:15f237e890c24aef6891c7d008f9ff7e758c6ef39a2b5df264650eb7900403c0"}, - {file = "scipy-1.11.3-cp39-cp39-win_amd64.whl", hash = "sha256:4b4bb134c7aa457e26cc6ea482b016fef45db71417d55cc6d8f43d799cdf9ef2"}, - {file = "scipy-1.11.3.tar.gz", hash = "sha256:bba4d955f54edd61899776bad459bf7326e14b9fa1c552181f0479cc60a568cd"}, +python-versions = ">=3.9" +files = [ + {file = "scipy-1.11.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bc9a714581f561af0848e6b69947fda0614915f072dfd14142ed1bfe1b806710"}, + {file = "scipy-1.11.4-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:cf00bd2b1b0211888d4dc75656c0412213a8b25e80d73898083f402b50f47e41"}, + {file = "scipy-1.11.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9999c008ccf00e8fbcce1236f85ade5c569d13144f77a1946bef8863e8f6eb4"}, + {file = "scipy-1.11.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:933baf588daa8dc9a92c20a0be32f56d43faf3d1a60ab11b3f08c356430f6e56"}, + {file = "scipy-1.11.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8fce70f39076a5aa62e92e69a7f62349f9574d8405c0a5de6ed3ef72de07f446"}, + {file = "scipy-1.11.4-cp310-cp310-win_amd64.whl", hash = "sha256:6550466fbeec7453d7465e74d4f4b19f905642c89a7525571ee91dd7adabb5a3"}, + {file = "scipy-1.11.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f313b39a7e94f296025e3cffc2c567618174c0b1dde173960cf23808f9fae4be"}, + {file = "scipy-1.11.4-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:1b7c3dca977f30a739e0409fb001056484661cb2541a01aba0bb0029f7b68db8"}, + {file = "scipy-1.11.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00150c5eae7b610c32589dda259eacc7c4f1665aedf25d921907f4d08a951b1c"}, + {file = "scipy-1.11.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:530f9ad26440e85766509dbf78edcfe13ffd0ab7fec2560ee5c36ff74d6269ff"}, + {file = "scipy-1.11.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5e347b14fe01003d3b78e196e84bd3f48ffe4c8a7b8a1afbcb8f5505cb710993"}, + {file = "scipy-1.11.4-cp311-cp311-win_amd64.whl", hash = "sha256:acf8ed278cc03f5aff035e69cb511741e0418681d25fbbb86ca65429c4f4d9cd"}, + {file = "scipy-1.11.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:028eccd22e654b3ea01ee63705681ee79933652b2d8f873e7949898dda6d11b6"}, + {file = "scipy-1.11.4-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:2c6ff6ef9cc27f9b3db93a6f8b38f97387e6e0591600369a297a50a8e96e835d"}, + {file = "scipy-1.11.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b030c6674b9230d37c5c60ab456e2cf12f6784596d15ce8da9365e70896effc4"}, + {file = "scipy-1.11.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad669df80528aeca5f557712102538f4f37e503f0c5b9541655016dd0932ca79"}, + {file = "scipy-1.11.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ce7fff2e23ab2cc81ff452a9444c215c28e6305f396b2ba88343a567feec9660"}, + {file = "scipy-1.11.4-cp312-cp312-win_amd64.whl", hash = "sha256:36750b7733d960d7994888f0d148d31ea3017ac15eef664194b4ef68d36a4a97"}, + {file = "scipy-1.11.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6e619aba2df228a9b34718efb023966da781e89dd3d21637b27f2e54db0410d7"}, + {file = "scipy-1.11.4-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:f3cd9e7b3c2c1ec26364856f9fbe78695fe631150f94cd1c22228456404cf1ec"}, + {file = "scipy-1.11.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d10e45a6c50211fe256da61a11c34927c68f277e03138777bdebedd933712fea"}, + {file = "scipy-1.11.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:91af76a68eeae0064887a48e25c4e616fa519fa0d38602eda7e0f97d65d57937"}, + {file = "scipy-1.11.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6df1468153a31cf55ed5ed39647279beb9cfb5d3f84369453b49e4b8502394fd"}, + {file = "scipy-1.11.4-cp39-cp39-win_amd64.whl", hash = "sha256:ee410e6de8f88fd5cf6eadd73c135020bfbbbdfcd0f6162c36a7638a1ea8cc65"}, + {file = "scipy-1.11.4.tar.gz", hash = "sha256:90a2b78e7f5733b9de748f589f09225013685f9b218275257f8a8168ededaeaa"}, ] [package.dependencies] @@ -3287,26 +3234,26 @@ files = [ [[package]] name = "tensorflow" -version = "2.14.0" +version = "2.14.1" description = "TensorFlow is an open source machine learning framework for everyone." optional = true python-versions = ">=3.9" files = [ - {file = "tensorflow-2.14.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:318b21b18312df6d11f511d0f205d55809d9ad0f46d5f9c13d8325ce4fe3b159"}, - {file = "tensorflow-2.14.0-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:927868c9bd4b3d2026ac77ec65352226a9f25e2d24ec3c7d088c68cff7583c9b"}, - {file = "tensorflow-2.14.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3870063433aebbd1b8da65ed4dcb09495f9239397f8cb5a8822025b6bb65e04"}, - {file = "tensorflow-2.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c9c1101269efcdb63492b45c8e83df0fc30c4454260a252d507dfeaebdf77ff"}, - {file = "tensorflow-2.14.0-cp310-cp310-win_amd64.whl", hash = "sha256:0b7eaab5e034f1695dc968f7be52ce7ccae4621182d1e2bf6d5b3fab583be98c"}, - {file = "tensorflow-2.14.0-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:00c42e7d8280c660b10cf5d0b3164fdc5e38fd0bf16b3f9963b7cd0e546346d8"}, - {file = "tensorflow-2.14.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:c92f5526c2029d31a036be06eb229c71f1c1821472876d34d0184d19908e318c"}, - {file = "tensorflow-2.14.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c224c076160ef9f60284e88f59df2bed347d55e64a0ca157f30f9ca57e8495b0"}, - {file = "tensorflow-2.14.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a80cabe6ab5f44280c05533e5b4a08e5b128f0d68d112564cffa3b96638e28aa"}, - {file = "tensorflow-2.14.0-cp311-cp311-win_amd64.whl", hash = "sha256:0587ece626c4f7c4fcb2132525ea6c77ad2f2f5659a9b0f4451b1000be1b5e16"}, - {file = "tensorflow-2.14.0-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:6d65b54f6928490e2b6ff51836b97f88f5d5b29b5943fe81d8ac5d8c809ccca4"}, - {file = "tensorflow-2.14.0-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:e2840b549686080bfb824cc1578b5a15d5ec416badacc0c327d93f8762ee6b56"}, - {file = "tensorflow-2.14.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4fb16641092b04a37ec2916c30412f986ca6adf969e6062057839efb788985f8"}, - {file = "tensorflow-2.14.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ba2ee1f9fe7f453bcd27d39a36928142de75a427ac2097dee2db1516387c9d5"}, - {file = "tensorflow-2.14.0-cp39-cp39-win_amd64.whl", hash = "sha256:6531e76276b1421f43e008280107ba215256d4570cc56fd54856db7ff45e58f7"}, + {file = "tensorflow-2.14.1-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:f6e9ac1e53db30f1759148f731f87b9d12da5ce0f153fc49406824efd486aae7"}, + {file = "tensorflow-2.14.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:7156bf1f7311dada7dba5345b526a38e6f4e4f4b8509bee162a24342bf6571b2"}, + {file = "tensorflow-2.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f5781aadad5b46e2de4e373b0ca15a852b90d58982270a6db02ec52e4986316d"}, + {file = "tensorflow-2.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a955c42164eff4d751732c1274ca4bf059db60c9e2362098ce1eed7177c3fe9"}, + {file = "tensorflow-2.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:4be5f4327a6e854f64b4dcfd08a51c5fc7cc3fea8c76c5bf5c0c3deb002d5221"}, + {file = "tensorflow-2.14.1-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:597dd6665a91b3d4b881f0d40277eb55b65b04567553206a46e7db9cfa067310"}, + {file = "tensorflow-2.14.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:9833e61423ad2726f81e3fc770558b81d5f0a454bdb2dad717c5474ea837ce91"}, + {file = "tensorflow-2.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14a48a087954722d9e73086e8ce28a14b1f9f889ea5845c7c0bf30d8747ab6e2"}, + {file = "tensorflow-2.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9aa05a98450fa5bc4efd529383b7d15c10ec12b0238a6744baa1508c4bfa4d5"}, + {file = "tensorflow-2.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:11958d12e39d44a9f5fc753fc312dd1726a8506f2d2606e01421ca4ee9dc5c55"}, + {file = "tensorflow-2.14.1-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:d95404f78a8d5e3d2481383dbe2d2286341ccf9bc5cbb19d857c646494d860c6"}, + {file = "tensorflow-2.14.1-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:511c4c5bfb2af17c6ca22663f98a7267c4386bf5486fbe78ee2d21482a6fa822"}, + {file = "tensorflow-2.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f66d2990157cf27f80c730878cb8befa8ed9716223494037d31c80fbe5f64370"}, + {file = "tensorflow-2.14.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9ab2747f75aba0327bfe6092b963694f1001781e5d2c0d251dfeed02b0c3bba"}, + {file = "tensorflow-2.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:7f5c9215bc00ba88f1cde1399f8160a5cb865c20ad71a1d5a6869f9fad62d9a5"}, ] [package.dependencies] @@ -3320,7 +3267,7 @@ h5py = ">=2.9.0" keras = ">=2.14.0,<2.15" libclang = ">=13.0.0" ml-dtypes = "0.2.0" -numpy = ">=1.23.5" +numpy = ">=1.23.5,<2.0.0" opt-einsum = ">=2.3.2" packaging = "*" protobuf = ">=3.20.3,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0dev" @@ -3383,13 +3330,13 @@ tensorflow-rocm = ["tensorflow-rocm (>=2.13.0,<2.14.0)"] [[package]] name = "termcolor" -version = "2.3.0" +version = "2.4.0" description = "ANSI color formatting for output in terminal" optional = true -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "termcolor-2.3.0-py3-none-any.whl", hash = "sha256:3afb05607b89aed0ffe25202399ee0867ad4d3cb4180d98aaf8eefa6a5f7d475"}, - {file = "termcolor-2.3.0.tar.gz", hash = "sha256:b5b08f68937f138fe92f6c089b99f1e2da0ae56c52b78bf7075fd95420fd9a5a"}, + {file = "termcolor-2.4.0-py3-none-any.whl", hash = "sha256:9297c0df9c99445c2412e832e882a7884038a25617c60cea2ad69488d4040d63"}, + {file = "termcolor-2.4.0.tar.gz", hash = "sha256:aab9e56047c8ac41ed798fa36d892a37aca6b3e9159f3e0c24bc64a9b3ac7b7a"}, ] [package.extras] @@ -3419,13 +3366,13 @@ files = [ [[package]] name = "tomlkit" -version = "0.12.2" +version = "0.12.3" description = "Style preserving TOML library" optional = false python-versions = ">=3.7" files = [ - {file = "tomlkit-0.12.2-py3-none-any.whl", hash = "sha256:eeea7ac7563faeab0a1ed8fe12c2e5a51c61f933f2502f7e9db0241a65163ad0"}, - {file = "tomlkit-0.12.2.tar.gz", hash = "sha256:df32fab589a81f0d7dc525a4267b6d7a64ee99619cbd1eeb0fae32c1dd426977"}, + {file = "tomlkit-0.12.3-py3-none-any.whl", hash = "sha256:b0a645a9156dc7cb5d3a1f0d4bab66db287fcb8e0430bdd4664a095ea16414ba"}, + {file = "tomlkit-0.12.3.tar.gz", hash = "sha256:75baf5012d06501f07bee5bf8e801b9f343e7aac5a92581f20f80ce632e6b5a4"}, ] [[package]] @@ -3450,18 +3397,18 @@ telegram = ["requests"] [[package]] name = "traitlets" -version = "5.13.0" +version = "5.14.0" description = "Traitlets Python configuration system" optional = false python-versions = ">=3.8" files = [ - {file = "traitlets-5.13.0-py3-none-any.whl", hash = "sha256:baf991e61542da48fe8aef8b779a9ea0aa38d8a54166ee250d5af5ecf4486619"}, - {file = "traitlets-5.13.0.tar.gz", hash = "sha256:9b232b9430c8f57288c1024b34a8f0251ddcc47268927367a0dd3eeaca40deb5"}, + {file = "traitlets-5.14.0-py3-none-any.whl", hash = "sha256:f14949d23829023013c47df20b4a76ccd1a85effb786dc060f34de7948361b33"}, + {file = "traitlets-5.14.0.tar.gz", hash = "sha256:fcdaa8ac49c04dfa0ed3ee3384ef6dfdb5d6f3741502be247279407679296772"}, ] [package.extras] docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] -test = ["argcomplete (>=3.0.3)", "mypy (>=1.6.0)", "pre-commit", "pytest (>=7.0,<7.5)", "pytest-mock", "pytest-mypy-testing"] +test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<7.5)", "pytest-mock", "pytest-mypy-testing"] [[package]] name = "typing-extensions" @@ -3474,52 +3421,31 @@ files = [ {file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"}, ] -[[package]] -name = "uncertainties" -version = "3.1.7" -description = "Transparent calculations with uncertainties on the quantities involved (aka error propagation); fast calculation of derivatives" -optional = false -python-versions = "*" -files = [ - {file = "uncertainties-3.1.7-py2.py3-none-any.whl", hash = "sha256:4040ec64d298215531922a68fa1506dc6b1cb86cd7cca8eca848fcfe0f987151"}, - {file = "uncertainties-3.1.7.tar.gz", hash = "sha256:80111e0839f239c5b233cb4772017b483a0b7a1573a581b92ab7746a35e6faab"}, -] - -[package.dependencies] -future = "*" - -[package.extras] -all = ["nose", "numpy", "sphinx"] -docs = ["sphinx"] -optional = ["numpy"] -tests = ["nose", "numpy"] - [[package]] name = "urllib3" -version = "2.0.7" +version = "2.1.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "urllib3-2.0.7-py3-none-any.whl", hash = "sha256:fdb6d215c776278489906c2f8916e6e7d4f5a9b602ccbcfdf7f016fc8da0596e"}, - {file = "urllib3-2.0.7.tar.gz", hash = "sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84"}, + {file = "urllib3-2.1.0-py3-none-any.whl", hash = "sha256:55901e917a5896a349ff771be919f8bd99aff50b79fe58fec595eb37bbc56bb3"}, + {file = "urllib3-2.1.0.tar.gz", hash = "sha256:df7aa8afb0148fa78488e7899b2c59b5f4ffcfa82e6c54ccb9dd37c1d7b52d54"}, ] [package.extras] brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] [[package]] name = "wcwidth" -version = "0.2.9" +version = "0.2.12" description = "Measures the displayed width of unicode strings in a terminal" optional = false python-versions = "*" files = [ - {file = "wcwidth-0.2.9-py2.py3-none-any.whl", hash = "sha256:9a929bd8380f6cd9571a968a9c8f4353ca58d7cd812a4822bba831f8d685b223"}, - {file = "wcwidth-0.2.9.tar.gz", hash = "sha256:a675d1a4a2d24ef67096a04b85b02deeecd8e226f57b5e3a72dbb9ed99d27da8"}, + {file = "wcwidth-0.2.12-py2.py3-none-any.whl", hash = "sha256:f26ec43d96c8cbfed76a5075dac87680124fa84e0855195a6184da9c187f133c"}, + {file = "wcwidth-0.2.12.tar.gz", hash = "sha256:f01c104efdf57971bcb756f054dd58ddec5204dd15fa31d6503ea57947d97c02"}, ] [[package]] @@ -3541,13 +3467,13 @@ watchdog = ["watchdog (>=2.3)"] [[package]] name = "wheel" -version = "0.41.3" +version = "0.42.0" description = "A built-package format for Python" optional = true python-versions = ">=3.7" files = [ - {file = "wheel-0.41.3-py3-none-any.whl", hash = "sha256:488609bc63a29322326e05560731bf7bfea8e48ad646e1f5e40d366607de0942"}, - {file = "wheel-0.41.3.tar.gz", hash = "sha256:4d4987ce51a49370ea65c0bfd2234e8ce80a12780820d9dc462597a6e60d0841"}, + {file = "wheel-0.42.0-py3-none-any.whl", hash = "sha256:177f9c9b0d45c47873b619f5b650346d632cdc35fb5e4d25058e09c9e581433d"}, + {file = "wheel-0.42.0.tar.gz", hash = "sha256:c45be39f7882c9d34243236f2d63cbd58039e360f85d0913425fbd7ceea617a8"}, ] [package.extras] @@ -3670,10 +3596,9 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [extras] classify = ["keras-tuner", "matplotlib", "onnx", "onnxruntime", "seaborn", "skl2onnx", "tensorflow"] -docs = ["Sphinx", "furo", "recommonmark", "sphinx-copybutton", "sphinx_markdown_tables", "sphinxcontrib-bibtex"] viz = ["pydot"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.12" -content-hash = "c2c967e71a65fbc27f7d0e0c65239666cb4ddc513a97a04807c7e6d3c449fc15" +content-hash = "970164c313a675cd694bd4be27a83a3d2791796d49314be6664fed11d9431850" diff --git a/pyproject.toml b/pyproject.toml index 7b4844718..eea147c6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "qibocal" -version = "0.0.6" +version = "0.0.7" description = "Qibo's quantum calibration, characterization and validation module." authors = ["andrea-pasquale "] license = "Apache License 2.0" @@ -17,7 +17,7 @@ classifiers = [ [tool.poetry.dependencies] python = ">=3.9,<3.12" -qibolab = { git = "https://github.com/qiboteam/qibolab.git", branch = "unrolling" } +qibolab = "^0.1.4" qibo = "^0.2.1" numpy = "^1.24.0" scipy = "^1.10.1" @@ -28,18 +28,10 @@ click = "^8.1.3" jinja2 = "^3.1.2" plotly = "^5.15.0" dash = "^2.6.0" -lmfit = "^1.0.3" skops = "^0.6.0" scikit-learn = "^1.2.1" # Explicit dependency required to cope for dash: https://github.com/plotly/dash/issues/2557 setuptools = "^67.8.0" -# docs dependencies (for readthedocs, https://github.com/readthedocs/readthedocs.org/issues/4912#issuecomment-664002569) -Sphinx = { version = "^5.0.0", optional = true } -furo = { version = "^2023.3.27", optional = true } -sphinxcontrib-bibtex = { version = "^2.4.1", optional = true } -recommonmark = { version = "^0.7.1", optional = true } -sphinx_markdown_tables = { version = "^0.0.17", optional = true } -sphinx-copybutton = { version = "^0.5.1", optional = true } keras-tuner = { version = "^1.3.0,<1.3.1", optional = true, markers = "sys_platform == 'linux' or sys_platform == 'darwin'" } matplotlib = { version = "^3.7.0", optional = true } seaborn = { version = "^0.12.2", optional = true } @@ -51,7 +43,6 @@ skl2onnx = { version = "^1.14.0", optional = true } onnxruntime = { version = "^1.14.1", optional = true } onnx = { version = "^1.13.1", optional = true } pyyaml = "^6.0" -numba = "^0.57.1" [tool.poetry.group.test] @@ -93,14 +84,6 @@ classify = [ "onnxruntime", "onnx", ] -docs = [ - "sphinx", - "furo", - "sphinxcontrib-bibtex", - "recommonmark", - "sphinx_markdown_tables", - "sphinx-copybutton", -] viz = ["pydot"] [build-system] @@ -122,7 +105,6 @@ test-docs = "make -C doc doctest" [tool.pytest.ini_options] testpaths = ['tests/'] addopts = ['--cov=qibocal', '--cov-report=xml', '--cov-report=html'] -env = ["D:NUMBA_DISABLE_JIT=1"] [tool.pylint.master] # extensions not to check diff --git a/runcards/calibration_tutorial/classification.yaml b/runcards/calibration_tutorial/classification.yaml new file mode 100644 index 000000000..2b8c595b2 --- /dev/null +++ b/runcards/calibration_tutorial/classification.yaml @@ -0,0 +1,10 @@ +platform: + +qubits: [0] + +actions: + - id: single shot classification 1 + priority: 0 + operation: single_shot_classification + parameters: + nshots: 5000 diff --git a/runcards/calibration_tutorial/qubit_flux_dependence.yaml b/runcards/calibration_tutorial/qubit_flux_dependence.yaml new file mode 100644 index 000000000..34a322c9d --- /dev/null +++ b/runcards/calibration_tutorial/qubit_flux_dependence.yaml @@ -0,0 +1,16 @@ +platform: + +qubits: [0] + +actions: + - id: qubit flux dependence + priority: 0 + operation: qubit_flux + parameters: + freq_width: 100_000_000 + freq_step: 500_000 + bias_width: 0.20 + bias_step: 0.01 + drive_amplitude: 0.1 + nshots: 1024 + relaxation_time: 20_000 diff --git a/runcards/calibration_tutorial/qubit_spectroscopy.yaml b/runcards/calibration_tutorial/qubit_spectroscopy.yaml new file mode 100644 index 000000000..ff484163c --- /dev/null +++ b/runcards/calibration_tutorial/qubit_spectroscopy.yaml @@ -0,0 +1,15 @@ +platform: + +qubits: [0] + +actions: + - id: qubit spectroscopy 01 + priority: 0 + operation: qubit_spectroscopy + parameters: + drive_amplitude: 0.5 + drive_duration: 4000 + freq_width: 100_000_000 + freq_step: 100_000 + nshots: 1024 + relaxation_time: 5000 diff --git a/runcards/calibration_tutorial/rabi.yaml b/runcards/calibration_tutorial/rabi.yaml new file mode 100644 index 000000000..570cdd717 --- /dev/null +++ b/runcards/calibration_tutorial/rabi.yaml @@ -0,0 +1,16 @@ +platform: + +qubits: [0] + +actions: + + - id: rabi + priority: 0 + operation: rabi_amplitude_signal + parameters: + min_amp_factor: 0 + max_amp_factor: 1.1 + step_amp_factor: 0.1 + pulse_length: 40 + relaxation_time: 100_000 + nshots: 1024 diff --git a/runcards/calibration_tutorial/ramsey.yaml b/runcards/calibration_tutorial/ramsey.yaml new file mode 100644 index 000000000..5f45d1571 --- /dev/null +++ b/runcards/calibration_tutorial/ramsey.yaml @@ -0,0 +1,15 @@ +platform: + +qubits: [0] + +actions: + - id: ramsey detuned + priority: 0 + operation: ramsey + parameters: + delay_between_pulses_end: 40000 + delay_between_pulses_start: 100 + delay_between_pulses_step: 1000 + n_osc: 0 + nshots: 4096 + relaxation_time: 200000 diff --git a/runcards/calibration_tutorial/rb.yaml b/runcards/calibration_tutorial/rb.yaml new file mode 100644 index 000000000..d5a13a747 --- /dev/null +++ b/runcards/calibration_tutorial/rb.yaml @@ -0,0 +1,13 @@ +platform: + +qubits: [0] + +actions: + - id: standard rb bootstrap + priority: 0 + operation: standard_rb + parameters: + depths: [10, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500] + n_bootstrap: 10 + niter: 256 + nshots: 128 diff --git a/runcards/calibration_tutorial/readout_characterization.yaml b/runcards/calibration_tutorial/readout_characterization.yaml new file mode 100644 index 000000000..559c79d45 --- /dev/null +++ b/runcards/calibration_tutorial/readout_characterization.yaml @@ -0,0 +1,10 @@ +platform: + +qubits: [0] + +actions: + - id: readout characterization + priority: 0 + operation: readout_characterization + parameters: + nshots: 5000 diff --git a/runcards/calibration_tutorial/resonator_punchout.yaml b/runcards/calibration_tutorial/resonator_punchout.yaml new file mode 100644 index 000000000..693a3f521 --- /dev/null +++ b/runcards/calibration_tutorial/resonator_punchout.yaml @@ -0,0 +1,17 @@ +platform: + +qubits: [0] + +actions: + - id: resonator punchout + priority: 0 + operation: resonator_punchout + parameters: + freq_width: 40_000_000 + freq_step: 500_000 + amplitude: 0.03 + min_amp_factor: 0.1 + max_amp_factor: 2.4 + step_amp_factor: 0.3 + nshots: 2048 + relaxation_time: 5000 diff --git a/runcards/calibration_tutorial/resonator_spectroscopy_high.yaml b/runcards/calibration_tutorial/resonator_spectroscopy_high.yaml new file mode 100644 index 000000000..f78cfcdc5 --- /dev/null +++ b/runcards/calibration_tutorial/resonator_spectroscopy_high.yaml @@ -0,0 +1,16 @@ +platform: + +qubits: [0] + +actions: + + - id: resonator_spectroscopy high power + priority: 0 + operation: resonator_spectroscopy + parameters: + freq_width: 60_000_000 + freq_step: 200_000 + amplitude: 0.6 + power_level: high + nshots: 1024 + relaxation_time: 100000 diff --git a/runcards/calibration_tutorial/resonator_spectroscopy_low.yaml b/runcards/calibration_tutorial/resonator_spectroscopy_low.yaml new file mode 100644 index 000000000..9cf7d839b --- /dev/null +++ b/runcards/calibration_tutorial/resonator_spectroscopy_low.yaml @@ -0,0 +1,15 @@ +platform: + +qubits: [0] + +actions: + - id: resonator_spectroscopy low power + priority: 0 + operation: resonator_spectroscopy + parameters: + freq_width: 60_000_000 + freq_step: 200_000 + amplitude: 0.03 + power_level: low + nshots: 1024 + relaxation_time: 100000 diff --git a/runcards/calibration_tutorial/t1.yaml b/runcards/calibration_tutorial/t1.yaml new file mode 100644 index 000000000..97154caba --- /dev/null +++ b/runcards/calibration_tutorial/t1.yaml @@ -0,0 +1,15 @@ +platform: + +qubits: [0] + +actions: + + - id: t1 + priority: 0 + operation: t1 + parameters: + delay_before_readout_end: 200000 + delay_before_readout_start: 50 + delay_before_readout_step: 1000 + nshots: 1024 + relaxation_time: 300000 diff --git a/runcards/monitor.yml b/runcards/monitor.yml index 30c1aafb7..08d6f91e0 100644 --- a/runcards/monitor.yml +++ b/runcards/monitor.yml @@ -3,7 +3,7 @@ actions: - id: t1 priority: 00 - operation: t1_msr + operation: t1_signal main: t2 parameters: delay_before_readout_start: 50 @@ -13,7 +13,7 @@ actions: - id: t2 priority: 10 - operation: t2_msr + operation: t2_signal main: readout characterization parameters: delay_between_pulses_start: 50 diff --git a/src/qibocal/auto/execute.py b/src/qibocal/auto/execute.py index b40d61f27..bd2dab5ae 100644 --- a/src/qibocal/auto/execute.py +++ b/src/qibocal/auto/execute.py @@ -10,6 +10,7 @@ from .graph import Graph from .history import History from .runcard import Id, Runcard +from .status import Failure from .task import Qubits, Task @@ -140,6 +141,10 @@ def run(self, mode): mode=mode, ) self.history.push(completed) + if isinstance(completed.status, Failure) and mode.name == "autocalibration": + log.warning("Stopping execution due to error in validation.") + yield task.uid + break self.head = self.next() update = self.update and task.update if ( diff --git a/src/qibocal/auto/operation.py b/src/qibocal/auto/operation.py index 00ef0529f..bf0deee29 100644 --- a/src/qibocal/auto/operation.py +++ b/src/qibocal/auto/operation.py @@ -9,7 +9,7 @@ import numpy as np import numpy.typing as npt from qibolab.platform import Platform -from qibolab.qubits import Qubit, QubitId, QubitPairId +from qibolab.qubits import Qubit, QubitId, QubitPair, QubitPairId from qibocal.config import log @@ -21,7 +21,7 @@ """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], Qubit] +QubitsPairs = dict[tuple[QubitId, QubitId], QubitPair] DATAFILE = "data.npz" diff --git a/src/qibocal/auto/runcard.py b/src/qibocal/auto/runcard.py index 83bf1649b..e46c94d51 100644 --- a/src/qibocal/auto/runcard.py +++ b/src/qibocal/auto/runcard.py @@ -10,6 +10,7 @@ from qibolab.qubits import QubitId from .operation import OperationId +from .validation import Validator Id = NewType("Id", str) """Action identifiers type.""" @@ -35,6 +36,8 @@ class Action: """Local qubits (optional).""" update: bool = True """Runcard update mechanism.""" + validator: Optional[Validator] = None + """Define validation scheme and parameters.""" parameters: Optional[dict[str, Any]] = None """Input parameters, either values or provider reference.""" diff --git a/src/qibocal/auto/status.py b/src/qibocal/auto/status.py index 2e5262037..a06a20771 100644 --- a/src/qibocal/auto/status.py +++ b/src/qibocal/auto/status.py @@ -38,5 +38,5 @@ class Normal(Status): """All green.""" -class Broken(Status): +class Failure(Status): """Unrecoverable.""" diff --git a/src/qibocal/auto/task.py b/src/qibocal/auto/task.py index c4a700182..ae1b98e13 100644 --- a/src/qibocal/auto/task.py +++ b/src/qibocal/auto/task.py @@ -26,7 +26,7 @@ dummy_operation, ) from .runcard import Action, Id -from .status import Normal, Status +from .status import Failure, Normal, Status MAX_PRIORITY = int(1e9) """A number bigger than whatever will be manually typed. But not so insanely big not to fit in a native integer.""" @@ -86,6 +86,20 @@ def operation(self): return Operation[self.action.operation].value + def validate(self, results: Results) -> Optional[Status]: + """Performs validation only if validator is provided.""" + + if self.action.validator is None: + return None + status = {} + for qubit in self.qubits: + status[qubit] = self.action.validator.__call__(results, qubit) + # exit if any of the qubit state is Failure + if any(isinstance(stat, Failure) for stat in status.values()): + return Failure() + else: + return Normal() + @property def main(self): """Main node to be executed next.""" @@ -133,7 +147,6 @@ def run( ): completed = Completed(self, Normal(), folder) task_qubits = self._allocate_local_qubits(qubits, platform) - try: if self.parameters.nshots is None: self.action.parameters["nshots"] = platform.settings.nshots @@ -143,10 +156,10 @@ def run( ] = platform.settings.relaxation_time operation: Routine = self.operation parameters = self.parameters - except RuntimeError: + + except (RuntimeError, AttributeError): operation = dummy_operation parameters = DummyPars() - if mode.name in ["autocalibration", "acquire"]: if operation.platform_dependent and operation.qubits_dependent: completed.data, completed.data_time = operation.acquisition( @@ -156,10 +169,9 @@ def run( completed.data, completed.data_time = operation.acquisition( parameters, platform=platform ) - if mode.name in ["autocalibration", "fit"]: completed.results, completed.results_time = operation.fit(completed.data) - + completed.status = self.validate(completed.results) return completed diff --git a/src/qibocal/auto/validation.py b/src/qibocal/auto/validation.py new file mode 100644 index 000000000..50cd37277 --- /dev/null +++ b/src/qibocal/auto/validation.py @@ -0,0 +1,30 @@ +"""Validation module.""" +from dataclasses import dataclass +from typing import NewType, Optional, Union + +from qibolab.qubits import QubitId, QubitPairId + +from ..config import log +from .operation import Results +from .status import Status +from .validators import VALIDATORS + +ValidatorId = NewType("ValidatorId", str) +"""Identifier for validator object.""" + + +@dataclass +class Validator: + """Generic validator object.""" + + scheme: ValidatorId + parameters: Optional[dict] = None + + def __call__( + self, results: Results, qubit: Union[QubitId, QubitPairId, list[QubitId]] + ) -> Status: + log.info( + f"Performing validation in qubit {qubit} of {results.__class__.__name__} using {self.scheme} scheme." + ) + validator = VALIDATORS[self.scheme] + return validator(results, qubit, **self.parameters) diff --git a/src/qibocal/auto/validators/__init__.py b/src/qibocal/auto/validators/__init__.py new file mode 100644 index 000000000..3d1df8994 --- /dev/null +++ b/src/qibocal/auto/validators/__init__.py @@ -0,0 +1,4 @@ +from .chi2 import check_chi2 + +VALIDATORS = {"chi2": check_chi2} +"""Dict with available validators.""" diff --git a/src/qibocal/auto/validators/chi2.py b/src/qibocal/auto/validators/chi2.py new file mode 100644 index 000000000..97207c984 --- /dev/null +++ b/src/qibocal/auto/validators/chi2.py @@ -0,0 +1,37 @@ +"""Chi2 validation""" +from typing import Union + +from qibolab.qubits import QubitId, QubitPairId + +from qibocal.config import raise_error + +from ..operation import Results +from ..status import Failure, Normal + +CHI2_MAX = 0.05 +"""Max value for accepting fit result.""" + + +def check_chi2( + results: Results, + qubit: Union[QubitId, QubitPairId, list[QubitId]], + chi2_max_value=None, +): + """Performs validation of results using chi2. + + It assesses that chi2 is below the chi2_max_value threshold. + + """ + + if chi2_max_value is None: + chi2_max_value = CHI2_MAX + try: + chi2 = getattr(results, "chi2")[qubit][0] + if chi2 < chi2_max_value: + return Normal() + else: + return Failure() + except AttributeError: + raise_error( + NotImplementedError, f"Chi2 validation not available for {type(results)}" + ) diff --git a/src/qibocal/cli/autocalibration.py b/src/qibocal/cli/autocalibration.py index 520ad2348..57f3a6638 100644 --- a/src/qibocal/cli/autocalibration.py +++ b/src/qibocal/cli/autocalibration.py @@ -61,9 +61,12 @@ def autocalibrate(runcard, folder, force, update): for _ in executor.run(mode=ExecutionMode.autocalibration): report = ReportBuilder(path, qubits, executor, meta, executor.history) report.run(path) - - e = datetime.datetime.now(datetime.timezone.utc) - meta["end-time"] = e.strftime("%H:%M:%S") + # meta needs to be updated after each report to show correct end-time + e = datetime.datetime.now(datetime.timezone.utc) + meta["end-time"] = e.strftime("%H:%M:%S") + # dump updated meta + meta = add_timings_to_meta(meta, executor.history) + (path / META).write_text(json.dumps(meta, indent=4)) # stop and disconnect platform if platform is not None: @@ -73,7 +76,3 @@ def autocalibrate(runcard, folder, force, update): # dump updated runcard if platform is not None: dump_runcard(platform, path / UPDATED_PLATFORM) - - # dump updated meta - meta = add_timings_to_meta(meta, executor.history) - (path / META).write_text(json.dumps(meta, indent=4)) diff --git a/src/qibocal/cli/report.py b/src/qibocal/cli/report.py index 88eb217a9..287af6720 100644 --- a/src/qibocal/cli/report.py +++ b/src/qibocal/cli/report.py @@ -41,7 +41,6 @@ def report(path): # load executor executor = Executor.load(runcard, path, qubits=qubits) - # produce html builder = ReportBuilder(path, qubits, executor, meta) builder.run(path) diff --git a/src/qibocal/cli/upload.py b/src/qibocal/cli/upload.py index d0bb3f4de..a78b36f11 100644 --- a/src/qibocal/cli/upload.py +++ b/src/qibocal/cli/upload.py @@ -91,3 +91,4 @@ def upload_report(path: pathlib.Path, tag: str, author: str): url = urljoin(ROOT_URL, randname) log.info(f"Upload completed. The result is available at:\n{url}") + return url diff --git a/src/qibocal/cli/utils.py b/src/qibocal/cli/utils.py index 7ed9ac83a..f3fd6eb95 100644 --- a/src/qibocal/cli/utils.py +++ b/src/qibocal/cli/utils.py @@ -44,7 +44,7 @@ def generate_meta(backend, platform, path): meta = {} meta["title"] = path.name meta["backend"] = backend.name - meta["platform"] = str(platform) + meta["platform"] = platform.name meta["date"] = e.strftime("%Y-%m-%d") meta["start-time"] = e.strftime("%H:%M:%S") meta["end-time"] = e.strftime("%H:%M:%S") diff --git a/src/qibocal/fitting/classifier/qubit_fit.py b/src/qibocal/fitting/classifier/qubit_fit.py index 78b436d76..c302fe1d4 100644 --- a/src/qibocal/fitting/classifier/qubit_fit.py +++ b/src/qibocal/fitting/classifier/qubit_fit.py @@ -5,7 +5,10 @@ import numpy as np import numpy.typing as npt -from qibocal.protocols.characterization.utils import cumulative +from qibocal.protocols.characterization.utils import ( + cumulative, + effective_qubit_temperature, +) def constructor(_hyperparams): @@ -71,6 +74,7 @@ class QubitFit: fidelity: float = None assignment_fidelity: float = None probability_error: float = None + effective_qubit_temperature: float = None def fit(self, iq_coordinates: list, states: list): r"""Evaluate the model's parameters given the @@ -114,6 +118,17 @@ def fit(self, iq_coordinates: list, states: list): predictions ) + def effective_temperature(self, predictions, qubit_frequency: float): + """Calculate effective qubit temperature.""" + prob_1 = np.count_nonzero(predictions) / len(predictions) + prob_0 = 1 - prob_1 + return effective_qubit_temperature( + prob_0=prob_0, + prob_1=prob_1, + qubit_frequency=qubit_frequency, + nshots=len(predictions), + ) + def rotate(self, v): c, s = np.cos(self.angle), np.sin(self.angle) rot = np.array([[c, -s], [s, c]]) diff --git a/src/qibocal/protocols/characterization/__init__.py b/src/qibocal/protocols/characterization/__init__.py index 1c613339e..b22fc7737 100644 --- a/src/qibocal/protocols/characterization/__init__.py +++ b/src/qibocal/protocols/characterization/__init__.py @@ -5,21 +5,22 @@ from .allxy.drag_pulse_tuning import drag_pulse_tuning from .classification import single_shot_classification from .coherence.spin_echo import spin_echo -from .coherence.spin_echo_msr import spin_echo_msr +from .coherence.spin_echo_sequence import spin_echo_sequence from .coherence.t1 import t1 -from .coherence.t1_msr import t1_msr from .coherence.t1_sequences import t1_sequences +from .coherence.t1_signal import t1_signal from .coherence.t2 import t2 -from .coherence.t2_msr import t2_msr from .coherence.t2_sequences import t2_sequences +from .coherence.t2_signal import t2_signal from .coherence.zeno import zeno -from .coherence.zeno_msr import zeno_msr +from .coherence.zeno_signal import zeno_signal from .couplers.coupler_qubit_spectroscopy import coupler_qubit_spectroscopy from .couplers.coupler_resonator_spectroscopy import coupler_resonator_spectroscopy from .dispersive_shift import dispersive_shift from .dispersive_shift_qutrit import dispersive_shift_qutrit from .fast_reset.fast_reset import fast_reset from .flipping import flipping +from .flux_dependence.avoided_crossing import avoided_crossing from .flux_dependence.qubit_crosstalk import qubit_crosstalk from .flux_dependence.qubit_flux_dependence import qubit_flux from .flux_dependence.qubit_flux_tracking import qubit_flux_tracking @@ -29,14 +30,14 @@ from .qubit_spectroscopy_ef import qubit_spectroscopy_ef from .qutrit_classification import qutrit_classification from .rabi.amplitude import rabi_amplitude -from .rabi.amplitude_msr import rabi_amplitude_msr +from .rabi.amplitude_signal import rabi_amplitude_signal from .rabi.ef import rabi_amplitude_ef from .rabi.length import rabi_length -from .rabi.length_msr import rabi_length_msr from .rabi.length_sequences import rabi_length_sequences +from .rabi.length_signal import rabi_length_signal from .ramsey import ramsey -from .ramsey_msr import ramsey_msr from .ramsey_sequences import ramsey_sequences +from .ramsey_signal import ramsey_signal from .randomized_benchmarking.standard_rb import standard_rb from .readout_characterization import readout_characterization from .readout_mitigation_matrix import readout_mitigation_matrix @@ -67,21 +68,21 @@ class Operation(Enum): rabi_amplitude = rabi_amplitude rabi_length = rabi_length rabi_length_sequences = rabi_length_sequences - rabi_amplitude_msr = rabi_amplitude_msr - rabi_length_msr = rabi_length_msr + rabi_amplitude_signal = rabi_amplitude_signal + rabi_length_signal = rabi_length_signal ramsey = ramsey - ramsey_msr = ramsey_msr + ramsey_signal = ramsey_signal ramsey_sequences = ramsey_sequences t1 = t1 - t1_msr = t1_msr + t1_signal = t1_signal t1_sequences = t1_sequences t2 = t2 - t2_msr = t2_msr + t2_signal = t2_signal t2_sequences = t2_sequences time_of_flight_readout = time_of_flight_readout single_shot_classification = single_shot_classification spin_echo = spin_echo - spin_echo_msr = spin_echo_msr + spin_echo_sequence = spin_echo_sequence allxy = allxy allxy_drag_pulse_tuning = allxy_drag_pulse_tuning drag_pulse_tuning = drag_pulse_tuning @@ -94,7 +95,7 @@ class Operation(Enum): resonator_frequency = resonator_frequency fast_reset = fast_reset zeno = zeno - zeno_msr = zeno_msr + zeno_signal = zeno_signal chsh_pulses = chsh_pulses chsh_circuits = chsh_circuits readout_mitigation_matrix = readout_mitigation_matrix @@ -105,6 +106,7 @@ class Operation(Enum): qubit_spectroscopy_ef = qubit_spectroscopy_ef qutrit_classification = qutrit_classification resonator_amplitude = resonator_amplitude + avoided_crossing = avoided_crossing dispersive_shift_qutrit = dispersive_shift_qutrit coupler_resonator_spectroscopy = coupler_resonator_spectroscopy coupler_qubit_spectroscopy = coupler_qubit_spectroscopy diff --git a/src/qibocal/protocols/characterization/allxy/allxy.py b/src/qibocal/protocols/characterization/allxy/allxy.py index 59abd46a6..c9a0c6b84 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy.py +++ b/src/qibocal/protocols/characterization/allxy/allxy.py @@ -17,6 +17,9 @@ class AllXYParameters(Parameters): beta_param: float = None """Beta parameter for drag pulse.""" + unrolling: bool = False + """If ``True`` it uses sequence unrolling to deploy multiple sequences in a single instrument call. + Defaults to ``False``.""" @dataclass @@ -80,31 +83,38 @@ def _acquisition( # repeat the experiment as many times as defined by software_averages # for iteration in range(params.software_averages): + sequences, all_ro_pulses = [], [] for gates in gatelist: - # create a sequence of pulses - ro_pulses = {} - sequence = PulseSequence() + sequences.append(PulseSequence()) + all_ro_pulses.append({}) for qubit in qubits: - sequence, ro_pulses[qubit] = add_gate_pair_pulses_to_sequence( - platform, gates, qubit, sequence, params.beta_param + sequences[-1], all_ro_pulses[-1][qubit] = add_gate_pair_pulses_to_sequence( + platform, gates, qubit, sequences[-1], params.beta_param ) - # execute the pulse sequence - results = platform.execute_pulse_sequence( - sequence, - ExecutionParameters( - nshots=params.nshots, - averaging_mode=AveragingMode.CYCLIC, - ), - ) - - # retrieve the results for every qubit + + # execute the pulse sequence + options = ExecutionParameters( + nshots=params.nshots, averaging_mode=AveragingMode.CYCLIC + ) + if params.unrolling: + results = platform.execute_pulse_sequences(sequences, options) + else: + results = [ + platform.execute_pulse_sequence(sequence, options) for sequence in sequences + ] + + for ig, (gates, ro_pulses) in enumerate(zip(gatelist, all_ro_pulses)): + gate = "-".join(gates) for qubit in qubits: - z_proj = 2 * results[ro_pulses[qubit].serial].probability(0) - 1 - # store the results - gate = "-".join(gates) + serial = ro_pulses[qubit].serial + if params.unrolling: + z_proj = 2 * results[serial][ig].probability(0) - 1 + else: + z_proj = 2 * results[ig][serial].probability(0) - 1 data.register_qubit( AllXYType, (qubit), dict(prob=np.array([z_proj]), gate=np.array([gate])) ) + # finally, save the remaining data return data @@ -250,7 +260,6 @@ def _plot(data: AllXYData, qubit, fit: AllXYResults = None): fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis_title="Gate sequence number", yaxis_title="Expectation value of Z", ) diff --git a/src/qibocal/protocols/characterization/allxy/allxy_drag_pulse_tuning.py b/src/qibocal/protocols/characterization/allxy/allxy_drag_pulse_tuning.py index 099c95f0e..a4ed737e9 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy_drag_pulse_tuning.py +++ b/src/qibocal/protocols/characterization/allxy/allxy_drag_pulse_tuning.py @@ -94,7 +94,9 @@ def _acquisition( # store the results gate = "-".join(gates) data.register_qubit( - allxy.AllXYType, (qubit, beta_param), dict(prob=z_proj, gate=gate) + allxy.AllXYType, + (qubit, beta_param), + dict(prob=np.array([z_proj]), gate=np.array([gate])), ) return data @@ -151,7 +153,6 @@ def _plot(data: AllXYDragData, qubit, fit: AllXYDragResults = None): fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis_title="Gate sequence number", yaxis_title="Expectation value of Z", ) diff --git a/src/qibocal/protocols/characterization/allxy/drag_pulse_tuning.py b/src/qibocal/protocols/characterization/allxy/drag_pulse_tuning.py index 16d7902ad..0e2e0b603 100644 --- a/src/qibocal/protocols/characterization/allxy/drag_pulse_tuning.py +++ b/src/qibocal/protocols/characterization/allxy/drag_pulse_tuning.py @@ -14,7 +14,7 @@ from qibocal.auto.operation import Data, Qubits, Results, Routine from qibocal.config import log -from ..utils import V_TO_UV, table_dict, table_html +from ..utils import table_dict, table_html from . import allxy_drag_pulse_tuning @@ -40,7 +40,7 @@ class DragPulseTuningResults(Results): """Raw fitting output.""" -DragPulseTuningType = np.dtype([("msr", np.float64), ("beta", np.float64)]) +DragPulseTuningType = np.dtype([("signal", np.float64), ("beta", np.float64)]) @dataclass @@ -67,7 +67,6 @@ def _acquisition( params.beta_start, params.beta_end, params.beta_step ).round(4) - # create a DataUnits object to store the MSR, phase, i, q and the beta parameter data = DragPulseTuningData() for beta_param in beta_param_range: @@ -144,8 +143,8 @@ def _acquisition( DragPulseTuningType, (qubit), dict( - msr=r1.magnitude - r2.magnitude, - beta=beta_param, + signal=np.array([r1.magnitude - r2.magnitude]), + beta=np.array([beta_param]), ), ) @@ -175,7 +174,7 @@ def _fit(data: DragPulseTuningData) -> DragPulseTuningResults: for qubit in qubits: qubit_data = data[qubit] - voltages = qubit_data.msr * V_TO_UV + voltages = qubit_data.signal beta_params = qubit_data.beta try: @@ -209,7 +208,7 @@ def _plot(data: DragPulseTuningData, qubit, fit: DragPulseTuningResults): fig.add_trace( go.Scatter( x=qubit_data.beta, - y=qubit_data.msr * V_TO_UV, + y=qubit_data.signal, mode="markers", name="Probability", showlegend=True, @@ -245,9 +244,8 @@ def _plot(data: DragPulseTuningData, qubit, fit: DragPulseTuningResults): fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis_title="Beta parameter", - yaxis_title="MSR[uV] [Rx(pi/2) - Ry(pi)] - [Ry(pi/2) - Rx(pi)]", + yaxis_title="Signal [a.u.] [Rx(pi/2) - Ry(pi)] - [Ry(pi/2) - Rx(pi)]", ) figures.append(fig) diff --git a/src/qibocal/protocols/characterization/classification.py b/src/qibocal/protocols/characterization/classification.py index 39c15a3ab..04ef34aba 100644 --- a/src/qibocal/protocols/characterization/classification.py +++ b/src/qibocal/protocols/characterization/classification.py @@ -29,8 +29,10 @@ MESH_SIZE, TITLE_SIZE, evaluate_grid, + format_error_single_cell, get_color_state0, plot_results, + round_report, table_dict, table_html, ) @@ -62,6 +64,8 @@ class SingleShotClassificationData(Data): """Number of shots.""" savedir: str """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) """Raw data acquired.""" classifiers_list: Optional[list[str]] = field( @@ -94,6 +98,8 @@ class SingleShotClassificationResults(Results): """Fidelity evaluated only with the `qubit_fit` model.""" assignment_fidelity: dict[QubitId, float] = field(default_factory=dict) """Assignment fidelity evaluated only with the `qubit_fit` model.""" + effective_temperature: dict[QubitId, float] = field(default_factory=dict) + """Qubit effective temperature from Boltzmann distribution.""" models: dict[QubitId, list] = field(default_factory=list) """List of trained classification models.""" benchmark_table: Optional[dict[QubitId, pd.DataFrame]] = field(default_factory=dict) @@ -183,6 +189,9 @@ def _acquisition( data = SingleShotClassificationData( nshots=params.nshots, + qubit_frequencies={ + qubit: platform.qubits[qubit].drive_frequency for qubit in qubits + }, classifiers_list=params.classifiers_list, savedir=params.savedir, ) @@ -242,6 +251,7 @@ def _fit(data: SingleShotClassificationData) -> SingleShotClassificationResults: assignment_fidelity = {} y_test_predict = {} grid_preds_dict = {} + effective_temperature = {} for qubit in qubits: qubit_data = data.data[qubit] benchmark_table, y_test, x_test, models, names, hpars_list = run.train_qubit( @@ -274,6 +284,9 @@ def _fit(data: SingleShotClassificationData) -> SingleShotClassificationResults: mean_exc_states[qubit] = models[i].iq_mean1.tolist() fidelity[qubit] = models[i].fidelity assignment_fidelity[qubit] = models[i].assignment_fidelity + effective_temperature[qubit] = models[i].effective_temperature( + y_preds[-1], data.qubit_frequencies[qubit] + ) y_test_predict[qubit] = y_preds grid_preds_dict[qubit] = grid_preds return SingleShotClassificationResults( @@ -289,6 +302,7 @@ def _fit(data: SingleShotClassificationData) -> SingleShotClassificationResults: mean_exc_states=mean_exc_states, fidelity=fidelity, assignment_fidelity=assignment_fidelity, + effective_temperature=effective_temperature, savedir=data.savedir, y_preds=y_test_predict, grid_preds=grid_preds_dict, @@ -352,6 +366,7 @@ def _plot( "Threshold", "Readout Fidelity", "Assignment Fidelity", + "Effective Qubit Temperature [K]", ], [ np.round(fit.mean_gnd_states[qubit], 3), @@ -360,6 +375,9 @@ def _plot( np.round(fit.threshold[qubit], 6), np.round(fit.fidelity[qubit], 3), np.round(fit.assignment_fidelity[qubit], 3), + format_error_single_cell( + round_report([fit.effective_temperature[qubit]]) + ), ], ) ) diff --git a/src/qibocal/protocols/characterization/coherence/spin_echo.py b/src/qibocal/protocols/characterization/coherence/spin_echo.py index 2e57229b0..cacab93fa 100644 --- a/src/qibocal/protocols/characterization/coherence/spin_echo.py +++ b/src/qibocal/protocols/characterization/coherence/spin_echo.py @@ -1,4 +1,5 @@ -from dataclasses import dataclass +from dataclasses import dataclass, field +from typing import Optional import numpy as np import plotly.graph_objects as go @@ -10,7 +11,7 @@ from qibocal import update from qibocal.auto.operation import Parameters, Qubits, Results, Routine -from ..utils import table_dict, table_html +from ..utils import chi2_reduced, table_dict, table_html from . import t1 from .utils import exp_decay, exponential_fit_probability @@ -24,7 +25,7 @@ class SpinEchoParameters(Parameters): delay_between_pulses_end: int """Final delay between pulses [ns].""" delay_between_pulses_step: int - """Step delay between pulses (ns).""" + """Step delay between pulses [ns].""" @dataclass @@ -35,6 +36,10 @@ class SpinEchoResults(Results): """T2 echo for each qubit.""" fitted_parameters: dict[QubitId, dict[str, float]] """Raw fitting output.""" + chi2: Optional[dict[QubitId, tuple[float, Optional[float]]]] = field( + default_factory=dict + ) + """Chi squared estimate mean value and error.""" class SpinEchoData(t1.T1Data): @@ -118,8 +123,19 @@ def _acquisition( def _fit(data: SpinEchoData) -> SpinEchoResults: """Post-processing for SpinEcho.""" t2Echos, fitted_parameters = exponential_fit_probability(data) + chi2 = { + qubit: ( + chi2_reduced( + data[qubit].prob, + exp_decay(data[qubit].wait, *fitted_parameters[qubit]), + data[qubit].error, + ), + np.sqrt(2 / len(data[qubit].prob)), + ) + for qubit in data.qubits + } - return SpinEchoResults(t2Echos, fitted_parameters) + return SpinEchoResults(t2Echos, fitted_parameters, chi2) def _plot(data: SpinEchoData, qubit, fit: SpinEchoResults = None): @@ -177,15 +193,15 @@ def _plot(data: SpinEchoData, qubit, fit: SpinEchoResults = None): fitting_report = table_html( table_dict( qubit, - ["T2 Spin Echo [ns]"], - [fit.t2_spin_echo[qubit]], + ["T2 Spin Echo [ns]", "chi2 reduced"], + [fit.t2_spin_echo[qubit], fit.chi2[qubit]], display_error=True, ) ) fig.update_layout( showlegend=True, - xaxis_title="Time (ns)", + xaxis_title="Time [ns]", yaxis_title="Probability of State 0", ) diff --git a/src/qibocal/protocols/characterization/coherence/spin_echo_msr.py b/src/qibocal/protocols/characterization/coherence/spin_echo_sequence.py similarity index 79% rename from src/qibocal/protocols/characterization/coherence/spin_echo_msr.py rename to src/qibocal/protocols/characterization/coherence/spin_echo_sequence.py index bfdcdaa6b..6bc367b59 100644 --- a/src/qibocal/protocols/characterization/coherence/spin_echo_msr.py +++ b/src/qibocal/protocols/characterization/coherence/spin_echo_sequence.py @@ -10,31 +10,31 @@ from qibocal import update from qibocal.auto.operation import Qubits, Routine -from ..utils import V_TO_UV, table_dict, table_html +from ..utils import table_dict, table_html from . import spin_echo -from .t1_msr import CoherenceType, T1MSRData +from .t1_signal import CoherenceType, T1SignalData from .utils import exp_decay, exponential_fit @dataclass -class SpinEchoMSRParameters(spin_echo.SpinEchoParameters): - """SpinEcho MSR runcard inputs.""" +class SpinEchoSignalParameters(spin_echo.SpinEchoParameters): + """SpinEcho Signal runcard inputs.""" @dataclass -class SpinEchoMSRResults(spin_echo.SpinEchoResults): - """SpinEchoMSR outputs.""" +class SpinEchoSignalResults(spin_echo.SpinEchoResults): + """SpinEchoSignal outputs.""" -class SpinEchoMSRData(T1MSRData): +class SpinEchoSignalData(T1SignalData): """SpinEcho acquisition outputs.""" def _acquisition( - params: SpinEchoMSRParameters, + params: SpinEchoSignalParameters, platform: Platform, qubits: Qubits, -) -> SpinEchoMSRData: +) -> 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 @@ -67,7 +67,7 @@ def _acquisition( params.delay_between_pulses_step, ) - data = SpinEchoMSRData() + data = SpinEchoSignalData() # sweep the parameter for wait in ro_wait_range: @@ -96,21 +96,21 @@ def _acquisition( (qubit), dict( wait=np.array([wait]), - msr=np.array([result.magnitude]), + signal=np.array([result.magnitude]), phase=np.array([result.phase]), ), ) return data -def _fit(data: SpinEchoMSRData) -> SpinEchoMSRResults: +def _fit(data: SpinEchoSignalData) -> SpinEchoSignalResults: """Post-processing for SpinEcho.""" t2Echos, fitted_parameters = exponential_fit(data) - return SpinEchoMSRResults(t2Echos, fitted_parameters) + return SpinEchoSignalResults(t2Echos, fitted_parameters) -def _plot(data: SpinEchoMSRData, qubit, fit: SpinEchoMSRResults = None): +def _plot(data: SpinEchoSignalData, qubit, fit: SpinEchoSignalResults = None): """Plotting for SpinEcho""" figures = [] @@ -125,11 +125,11 @@ def _plot(data: SpinEchoMSRData, qubit, fit: SpinEchoMSRResults = None): fig.add_trace( go.Scatter( x=waits, - y=qubit_data.msr * V_TO_UV, + y=qubit_data.signal, opacity=1, - name="Voltage", + name="Signal", showlegend=True, - legendgroup="Voltage", + legendgroup="Signal", ), ) @@ -157,9 +157,8 @@ def _plot(data: SpinEchoMSRData, qubit, fit: SpinEchoMSRResults = None): fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="Time (ns)", - yaxis_title="MSR (uV)", + xaxis_title="Time [ns]", + yaxis_title="Signal [a.u.]", ) figures.append(fig) @@ -167,9 +166,9 @@ def _plot(data: SpinEchoMSRData, qubit, fit: SpinEchoMSRResults = None): return figures, fitting_report -def _update(results: SpinEchoMSRResults, platform: Platform, qubit: QubitId): +def _update(results: SpinEchoSignalResults, platform: Platform, qubit: QubitId): update.t2_spin_echo(results.t2_spin_echo[qubit], platform, qubit) -spin_echo_msr = Routine(_acquisition, _fit, _plot, _update) +spin_echo_sequence = Routine(_acquisition, _fit, _plot, _update) """SpinEcho Routine object.""" diff --git a/src/qibocal/protocols/characterization/coherence/t1.py b/src/qibocal/protocols/characterization/coherence/t1.py index e48943bc2..317a5469c 100644 --- a/src/qibocal/protocols/characterization/coherence/t1.py +++ b/src/qibocal/protocols/characterization/coherence/t1.py @@ -1,4 +1,5 @@ from dataclasses import dataclass, field +from typing import Optional import numpy as np import numpy.typing as npt @@ -12,7 +13,7 @@ from qibocal import update from qibocal.auto.operation import Data, Parameters, Qubits, Results, Routine -from ..utils import table_dict, table_html +from ..utils import chi2_reduced, table_dict, table_html from . import utils COLORBAND = "rgba(0,100,80,0.2)" @@ -24,11 +25,11 @@ class T1Parameters(Parameters): """T1 runcard inputs.""" delay_before_readout_start: int - """Initial delay before readout (ns).""" + """Initial delay before readout [ns].""" delay_before_readout_end: int - """Final delay before readout (ns).""" + """Final delay before readout [ns].""" delay_before_readout_step: int - """Step delay before readout (ns).""" + """Step delay before readout [ns].""" @dataclass @@ -39,6 +40,10 @@ class T1Results(Results): """T1 for each qubit.""" fitted_parameters: dict[QubitId, dict[str, float]] """Raw fitting output.""" + chi2: Optional[dict[QubitId, tuple[float, Optional[float]]]] = field( + default_factory=dict + ) + """Chi squared estimate mean value and error.""" CoherenceProbType = np.dtype( @@ -138,7 +143,19 @@ def _fit(data: T1Data) -> T1Results: y = p_0-p_1 e^{-x p_2}. """ t1s, fitted_parameters = utils.exponential_fit_probability(data) - return T1Results(t1s, fitted_parameters) + chi2 = { + qubit: ( + chi2_reduced( + data[qubit].prob, + utils.exp_decay(data[qubit].wait, *fitted_parameters[qubit]), + data[qubit].error, + ), + np.sqrt(2 / len(data[qubit].prob)), + ) + for qubit in data.qubits + } + + return T1Results(t1s, fitted_parameters, chi2) def _plot(data: T1Data, qubit, fit: T1Results = None): @@ -191,12 +208,20 @@ def _plot(data: T1Data, qubit, fit: T1Results = None): ) ) fitting_report = table_html( - table_dict(qubit, ["T1 [ns]"], [fit.t1[qubit]], display_error=True) + table_dict( + qubit, + [ + "T1 [ns]", + "chi2 reduced", + ], + [fit.t1[qubit], fit.chi2[qubit]], + display_error=True, + ) ) # last part fig.update_layout( showlegend=True, - xaxis_title="Time (ns)", + xaxis_title="Time [ns]", yaxis_title="Probability of State 1", ) diff --git a/src/qibocal/protocols/characterization/coherence/t1_sequences.py b/src/qibocal/protocols/characterization/coherence/t1_sequences.py index 8218e4ab2..3167be79f 100644 --- a/src/qibocal/protocols/characterization/coherence/t1_sequences.py +++ b/src/qibocal/protocols/characterization/coherence/t1_sequences.py @@ -5,12 +5,12 @@ from qibocal.auto.operation import Qubits, Routine -from . import t1, t1_msr +from . import t1, t1_signal def _acquisition( - params: t1_msr.T1MSRParameters, platform: Platform, qubits: Qubits -) -> t1_msr.T1MSRData: + params: t1_signal.T1SignalParameters, platform: Platform, qubits: Qubits +) -> t1_signal.T1SignalData: r"""Data acquisition for T1 experiment. In a T1 experiment, we measure an excited qubit after a delay. Due to decoherence processes (e.g. amplitude damping channel), it is possible that, at the time of measurement, after the delay, @@ -50,8 +50,7 @@ def _acquisition( params.delay_before_readout_step, ) - # create a DataUnits object to store the MSR, phase, i, q and the delay time - data = t1_msr.T1MSRData() + data = t1_signal.T1SignalData() # repeat the experiment as many times as defined by software_averages # sweep the parameter @@ -70,19 +69,18 @@ def _acquisition( ), ) for qubit in qubits: - # average msr, phase, i and q over the number of shots defined in the runcard result = results[ro_pulses[qubit].serial] data.register_qubit( - t1_msr.CoherenceType, + t1_signal.CoherenceType, (qubit), dict( wait=np.array([wait]), - msr=np.array([result.magnitude]), + signal=np.array([result.magnitude]), phase=np.array([result.phase]), ), ) return data -t1_sequences = Routine(_acquisition, t1_msr._fit, t1_msr._plot, t1._update) +t1_sequences = Routine(_acquisition, t1_signal._fit, t1_signal._plot, t1._update) """T1 Routine object.""" diff --git a/src/qibocal/protocols/characterization/coherence/t1_msr.py b/src/qibocal/protocols/characterization/coherence/t1_signal.py similarity index 80% rename from src/qibocal/protocols/characterization/coherence/t1_msr.py rename to src/qibocal/protocols/characterization/coherence/t1_signal.py index b4e6cb20f..d1bbf10d1 100644 --- a/src/qibocal/protocols/characterization/coherence/t1_msr.py +++ b/src/qibocal/protocols/characterization/coherence/t1_signal.py @@ -11,28 +11,28 @@ from qibocal.auto.operation import Data, Qubits, Routine -from ..utils import V_TO_UV, table_dict, table_html +from ..utils import table_dict, table_html from . import t1, utils @dataclass -class T1MSRParameters(t1.T1Parameters): - """T1 MSR runcard inputs.""" +class T1SignalParameters(t1.T1Parameters): + """T1 Signal runcard inputs.""" @dataclass -class T1MSRResults(t1.T1Results): - """T1 MSR outputs.""" +class T1SignalResults(t1.T1Results): + """T1 Signal outputs.""" CoherenceType = np.dtype( - [("wait", np.float64), ("msr", np.float64), ("phase", np.float64)] + [("wait", np.float64), ("signal", np.float64), ("phase", np.float64)] ) """Custom dtype for coherence routines.""" @dataclass -class T1MSRData(Data): +class T1SignalData(Data): """T1 acquisition outputs.""" data: dict[QubitId, npt.NDArray] = field(default_factory=dict) @@ -40,8 +40,8 @@ class T1MSRData(Data): def _acquisition( - params: T1MSRParameters, platform: Platform, qubits: Qubits -) -> T1MSRData: + params: T1SignalParameters, platform: Platform, qubits: Qubits +) -> T1SignalData: r"""Data acquisition for T1 experiment. In a T1 experiment, we measure an excited qubit after a delay. Due to decoherence processes (e.g. amplitude damping channel), it is possible that, at the time of measurement, after the delay, @@ -88,8 +88,7 @@ def _acquisition( type=SweeperType.ABSOLUTE, ) - # create a DataUnits object to store the MSR, phase, i, q and the delay time - data = T1MSRData() + data = T1SignalData() # sweep the parameter # execute the pulse sequence @@ -109,13 +108,13 @@ def _acquisition( data.register_qubit( CoherenceType, (qubit), - dict(wait=ro_wait_range, msr=result.magnitude, phase=result.phase), + dict(wait=ro_wait_range, signal=result.magnitude, phase=result.phase), ) return data -def _fit(data: T1MSRData) -> T1MSRResults: +def _fit(data: T1SignalData) -> T1SignalResults: """ Fitting routine for T1 experiment. The used model is @@ -125,10 +124,10 @@ def _fit(data: T1MSRData) -> T1MSRResults: """ t1s, fitted_parameters = utils.exponential_fit(data) - return T1MSRResults(t1s, fitted_parameters) + return T1SignalResults(t1s, fitted_parameters) -def _plot(data: T1MSRData, qubit, fit: T1MSRResults = None): +def _plot(data: T1SignalData, qubit, fit: T1SignalResults = None): """Plotting function for T1 experiment.""" figures = [] @@ -141,11 +140,11 @@ def _plot(data: T1MSRData, qubit, fit: T1MSRResults = None): fig.add_trace( go.Scatter( x=waits, - y=qubit_data.msr * V_TO_UV, + y=qubit_data.signal, opacity=1, - name="Voltage", + name="Signal", showlegend=True, - legendgroup="Voltage", + legendgroup="Signal", ) ) @@ -172,9 +171,8 @@ def _plot(data: T1MSRData, qubit, fit: T1MSRResults = None): # last part fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="Time (ns)", - yaxis_title="MSR (uV)", + xaxis_title="Time [ns]", + yaxis_title="Signal [a.u.]", ) figures.append(fig) @@ -182,5 +180,5 @@ def _plot(data: T1MSRData, qubit, fit: T1MSRResults = None): return figures, fitting_report -t1_msr = Routine(_acquisition, _fit, _plot, t1._update) -"""T1 MSR Routine object.""" +t1_signal = Routine(_acquisition, _fit, _plot, t1._update) +"""T1 Signal Routine object.""" diff --git a/src/qibocal/protocols/characterization/coherence/t2.py b/src/qibocal/protocols/characterization/coherence/t2.py index 480529493..c8346be00 100644 --- a/src/qibocal/protocols/characterization/coherence/t2.py +++ b/src/qibocal/protocols/characterization/coherence/t2.py @@ -1,4 +1,5 @@ -from dataclasses import dataclass +from dataclasses import dataclass, field +from typing import Optional import numpy as np import plotly.graph_objects as go @@ -11,7 +12,7 @@ from qibocal import update from qibocal.auto.operation import Parameters, Qubits, Results, Routine -from ..utils import table_dict, table_html +from ..utils import chi2_reduced, table_dict, table_html from . import t1, utils @@ -32,9 +33,13 @@ class T2Results(Results): """T2 outputs.""" t2: dict[QubitId, float] - """T2 for each qubit (ns).""" + """T2 for each qubit [ns].""" fitted_parameters: dict[QubitId, dict[str, float]] """Raw fitting output.""" + chi2: Optional[dict[QubitId, tuple[float, Optional[float]]]] = field( + default_factory=dict + ) + """Chi squared estimate mean value and error.""" class T2Data(t1.T1Data): @@ -111,7 +116,18 @@ def _fit(data: T2Data) -> T2Results: y = p_0 - p_1 e^{-x p_2}. """ t2s, fitted_parameters = utils.exponential_fit_probability(data) - return T2Results(t2s, fitted_parameters) + chi2 = { + qubit: ( + chi2_reduced( + data[qubit].prob, + utils.exp_decay(data[qubit].wait, *fitted_parameters[qubit]), + data[qubit].error, + ), + np.sqrt(2 / len(data[qubit].prob)), + ) + for qubit in data.qubits + } + return T2Results(t2s, fitted_parameters, chi2) def _plot(data: T2Data, qubit, fit: T2Results = None): @@ -168,12 +184,19 @@ def _plot(data: T2Data, qubit, fit: T2Results = None): ) ) fitting_report = table_html( - table_dict(qubit, ["T2 [ns]"], [fit.t2[qubit]], display_error=True) + table_dict( + qubit, + [ + "T2 [ns]", + "chi2 reduced", + ], + [fit.t2[qubit], fit.chi2[qubit]], + display_error=True, + ) ) fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="Time (ns)", + xaxis_title="Time [ns]", yaxis_title="Probability of State 1", ) diff --git a/src/qibocal/protocols/characterization/coherence/t2_sequences.py b/src/qibocal/protocols/characterization/coherence/t2_sequences.py index c8dd4a578..f70a7c1e9 100644 --- a/src/qibocal/protocols/characterization/coherence/t2_sequences.py +++ b/src/qibocal/protocols/characterization/coherence/t2_sequences.py @@ -5,15 +5,15 @@ from qibocal.auto.operation import Qubits, Routine -from .t1_msr import CoherenceType -from .t2_msr import T2MSRData, T2MSRParameters, _fit, _plot, _update +from .t1_signal import CoherenceType +from .t2_signal import T2SignalData, T2SignalParameters, _fit, _plot, _update def _acquisition( - params: T2MSRParameters, + params: T2SignalParameters, platform: Platform, qubits: Qubits, -) -> T2MSRData: +) -> T2SignalData: """Data acquisition for Ramsey Experiment (detuned).""" # create a sequence of pulses for the experiment # RX90 - t - RX90 - MZ @@ -42,10 +42,7 @@ def _acquisition( params.delay_between_pulses_step, ) - # create a DataUnits object to store the results, - # DataUnits stores by default MSR, phase, i, q - # additionally include wait time and t_max - data = T2MSRData() + data = T2SignalData() # sweep the parameter for wait in waits: @@ -70,7 +67,7 @@ def _acquisition( (qubit), dict( wait=np.array([wait]), - msr=np.array([result.magnitude]), + signal=np.array([result.magnitude]), phase=np.array([result.phase]), ), ) diff --git a/src/qibocal/protocols/characterization/coherence/t2_msr.py b/src/qibocal/protocols/characterization/coherence/t2_signal.py similarity index 74% rename from src/qibocal/protocols/characterization/coherence/t2_msr.py rename to src/qibocal/protocols/characterization/coherence/t2_signal.py index 25adb7989..2a7b9f1f5 100644 --- a/src/qibocal/protocols/characterization/coherence/t2_msr.py +++ b/src/qibocal/protocols/characterization/coherence/t2_signal.py @@ -11,29 +11,29 @@ from qibocal import update from qibocal.auto.operation import Qubits, Routine -from ..utils import V_TO_UV, table_dict, table_html -from . import t1_msr, t2, utils +from ..utils import table_dict, table_html +from . import t1_signal, t2, utils @dataclass -class T2MSRParameters(t2.T2Parameters): - """T2MSR runcard inputs.""" +class T2SignalParameters(t2.T2Parameters): + """T2Signal runcard inputs.""" @dataclass -class T2MSRResults(t2.T2Results): - """T2MSR outputs.""" +class T2SignalResults(t2.T2Results): + """T2Signal outputs.""" -class T2MSRData(t1_msr.T1MSRData): - """T2MSR acquisition outputs.""" +class T2SignalData(t1_signal.T1SignalData): + """T2Signal acquisition outputs.""" def _acquisition( - params: T2MSRParameters, + params: T2SignalParameters, platform: Platform, qubits: Qubits, -) -> T2MSRData: +) -> T2SignalData: """Data acquisition for Ramsey Experiment (detuned).""" # create a sequence of pulses for the experiment # RX90 - t - RX90 - MZ @@ -62,10 +62,7 @@ def _acquisition( params.delay_between_pulses_step, ) - # create a DataUnits object to store the results, - # DataUnits stores by default MSR, phase, i, q - # additionally include wait time and t_max - data = T2MSRData() + data = T2SignalData() sweeper = Sweeper( Parameter.start, @@ -89,24 +86,24 @@ def _acquisition( for qubit in qubits: result = results[ro_pulses[qubit].serial] data.register_qubit( - t1_msr.CoherenceType, + t1_signal.CoherenceType, (qubit), - dict(wait=waits, msr=result.magnitude, phase=result.phase), + dict(wait=waits, signal=result.magnitude, phase=result.phase), ) return data -def _fit(data: T2MSRData) -> T2MSRResults: +def _fit(data: T2SignalData) -> T2SignalResults: r""" Fitting routine for Ramsey experiment. The used model is .. math:: y = p_0 - p_1 e^{-x p_2}. """ t2s, fitted_parameters = utils.exponential_fit(data) - return T2MSRResults(t2s, fitted_parameters) + return T2SignalResults(t2s, fitted_parameters) -def _plot(data: T2MSRData, qubit, fit: T2MSRResults = None): +def _plot(data: T2SignalData, qubit, fit: T2SignalResults = None): """Plotting function for Ramsey Experiment.""" figures = [] @@ -118,11 +115,11 @@ def _plot(data: T2MSRData, qubit, fit: T2MSRResults = None): fig.add_trace( go.Scatter( x=qubit_data.wait, - y=qubit_data.msr * V_TO_UV, + y=qubit_data.signal, opacity=1, - name="Voltage", + name="Signal", showlegend=True, - legendgroup="Voltage", + legendgroup="Signal", ) ) @@ -152,9 +149,8 @@ def _plot(data: T2MSRData, qubit, fit: T2MSRResults = None): fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="Time (ns)", - yaxis_title="MSR (uV)", + xaxis_title="Time [ns]", + yaxis_title="Signal [a.u.]", ) figures.append(fig) @@ -162,9 +158,9 @@ def _plot(data: T2MSRData, qubit, fit: T2MSRResults = None): return figures, fitting_report -def _update(results: T2MSRResults, platform: Platform, qubit: QubitId): +def _update(results: T2SignalResults, platform: Platform, qubit: QubitId): update.t2(results.t2[qubit], platform, qubit) -t2_msr = Routine(_acquisition, _fit, _plot, _update) -"""T2MSR Routine object.""" +t2_signal = Routine(_acquisition, _fit, _plot, _update) +"""T2Signal Routine object.""" diff --git a/src/qibocal/protocols/characterization/coherence/utils.py b/src/qibocal/protocols/characterization/coherence/utils.py index 836a76a9e..8f403571d 100644 --- a/src/qibocal/protocols/characterization/coherence/utils.py +++ b/src/qibocal/protocols/characterization/coherence/utils.py @@ -3,8 +3,6 @@ from qibocal.config import log -from ..utils import V_TO_UV - def exp_decay(x, *p): return p[0] - p[1] * np.exp(-1 * x / p[2]) @@ -17,9 +15,9 @@ def exponential_fit(data, zeno=None): fitted_parameters = {} for qubit in qubits: - voltages = data[qubit].msr * V_TO_UV + voltages = data[qubit].signal if zeno: - times = np.arange(1, len(data[qubit].msr) + 1) + times = np.arange(1, len(data[qubit].signal) + 1) else: times = data[qubit].wait diff --git a/src/qibocal/protocols/characterization/coherence/zeno.py b/src/qibocal/protocols/characterization/coherence/zeno.py index bf4778e25..703ce13ff 100644 --- a/src/qibocal/protocols/characterization/coherence/zeno.py +++ b/src/qibocal/protocols/characterization/coherence/zeno.py @@ -1,4 +1,5 @@ from dataclasses import dataclass, field +from typing import Optional import numpy as np import plotly.graph_objects as go @@ -10,7 +11,7 @@ from qibocal import update from qibocal.auto.operation import Parameters, Qubits, Results, Routine -from ..utils import table_dict, table_html +from ..utils import chi2_reduced, table_dict, table_html from . import t1, utils @@ -36,6 +37,8 @@ class ZenoResults(Results): """T1 for each qubit.""" fitted_parameters: dict[QubitId, dict[str, float]] """Raw fitting output.""" + chi2: dict[QubitId, tuple[float, Optional[float]]] + """Chi squared estimate mean value and error.""" def _acquisition( @@ -110,8 +113,18 @@ def _fit(data: ZenoData) -> ZenoResults: y = p_0-p_1 e^{-x p_2}. """ t1s, fitted_parameters = utils.exponential_fit_probability(data) - - return ZenoResults(t1s, fitted_parameters) + chi2 = { + qubit: ( + chi2_reduced( + data[qubit].prob, + utils.exp_decay(data[qubit].wait, *fitted_parameters[qubit]), + data[qubit].error, + ), + np.sqrt(2 / len(data[qubit].prob)), + ) + for qubit in data.qubits + } + return ZenoResults(t1s, fitted_parameters, chi2) def _plot(data: ZenoData, fit: ZenoResults, qubit): @@ -166,10 +179,11 @@ def _plot(data: ZenoData, fit: ZenoResults, qubit): fitting_report = table_html( table_dict( qubit, - ["T1 [ns]", "Readout Pulse [ns]"], + ["T1 [ns]", "Readout Pulse [ns]", "chi2 reduced"], [ fit.zeno_t1[qubit], np.array(fit.zeno_t1[qubit]) * data.readout_duration[qubit], + fit.chi2[qubit], ], display_error=True, ) diff --git a/src/qibocal/protocols/characterization/coherence/zeno_msr.py b/src/qibocal/protocols/characterization/coherence/zeno_signal.py similarity index 89% rename from src/qibocal/protocols/characterization/coherence/zeno_msr.py rename to src/qibocal/protocols/characterization/coherence/zeno_signal.py index 9c4c8f88a..95c4341a1 100644 --- a/src/qibocal/protocols/characterization/coherence/zeno_msr.py +++ b/src/qibocal/protocols/characterization/coherence/zeno_signal.py @@ -12,7 +12,7 @@ from qibocal import update from qibocal.auto.operation import Data, Parameters, Qubits, Results, Routine -from ..utils import V_TO_UV, table_dict, table_html +from ..utils import table_dict, table_html from . import utils @@ -25,10 +25,10 @@ class ZenoParameters(Parameters): nshots: Optional[int] = None """Number of shots.""" relaxation_time: Optional[int] = None - """Relaxation time (ns).""" + """Relaxation time [ns].""" -ZenoType = np.dtype([("msr", np.float64), ("phase", np.float64)]) +ZenoType = np.dtype([("signal", np.float64), ("phase", np.float64)]) """Custom dtype for Zeno.""" @@ -39,10 +39,10 @@ class ZenoData(Data): data: dict[QubitId, npt.NDArray] = field(default_factory=dict) """Raw data acquired.""" - def register_qubit(self, qubit, msr, phase): + def register_qubit(self, qubit, signal, phase): """Store output for single qubit.""" ar = np.empty((1,), dtype=ZenoType) - ar["msr"] = msr + ar["signal"] = signal ar["phase"] = phase if qubit in self.data: self.data[qubit] = np.rec.array(np.concatenate((self.data[qubit], ar))) @@ -109,7 +109,9 @@ def _acquisition( for qubit in qubits: for ro_pulse in ro_pulses[qubit]: result = results[ro_pulse.serial] - data.register_qubit(qubit=qubit, msr=result.magnitude, phase=result.phase) + data.register_qubit( + qubit=qubit, signal=result.magnitude, phase=result.phase + ) return data @@ -134,16 +136,16 @@ def _plot(data: ZenoData, fit: ZenoResults, qubit): fitting_report = "" qubit_data = data[qubit] - readouts = np.arange(1, len(qubit_data.msr) + 1) + readouts = np.arange(1, len(qubit_data.signal) + 1) fig.add_trace( go.Scatter( x=readouts, - y=qubit_data.msr * V_TO_UV, + y=qubit_data.signal, opacity=1, - name="Voltage", + name="Signal", showlegend=True, - legendgroup="Voltage", + legendgroup="Signal", ) ) @@ -178,9 +180,8 @@ def _plot(data: ZenoData, fit: ZenoResults, qubit): # last part fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis_title="Number of readouts", - yaxis_title="MSR (uV)", + yaxis_title="Signal [a.u.]", ) figures.append(fig) @@ -192,4 +193,4 @@ def _update(results: ZenoResults, platform: Platform, qubit: QubitId): update.t1(results.zeno_t1[qubit], platform, qubit) -zeno_msr = Routine(_acquisition, _fit, _plot, _update) +zeno_signal = Routine(_acquisition, _fit, _plot, _update) diff --git a/src/qibocal/protocols/characterization/couplers/coupler_qubit_spectroscopy.py b/src/qibocal/protocols/characterization/couplers/coupler_qubit_spectroscopy.py index da82abcf0..4e88306ca 100644 --- a/src/qibocal/protocols/characterization/couplers/coupler_qubit_spectroscopy.py +++ b/src/qibocal/protocols/characterization/couplers/coupler_qubit_spectroscopy.py @@ -106,12 +106,11 @@ def _acquisition( for i, pair in enumerate(qubits): # TODO: May measure both qubits on the pair qubit = platform.qubits[params.measured_qubits[i]].name - # average msr, phase, i and q over the number of shots defined in the runcard result = results[ro_pulses[qubit].serial] # store the results data.register_qubit( qubit, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + qd_pulses[qubit].frequency, bias=delta_bias_range, diff --git a/src/qibocal/protocols/characterization/couplers/coupler_resonator_spectroscopy.py b/src/qibocal/protocols/characterization/couplers/coupler_resonator_spectroscopy.py index 5408817e2..e4e0c685a 100644 --- a/src/qibocal/protocols/characterization/couplers/coupler_resonator_spectroscopy.py +++ b/src/qibocal/protocols/characterization/couplers/coupler_resonator_spectroscopy.py @@ -110,12 +110,11 @@ def _acquisition( for i, pair in enumerate(qubits): # TODO: May measure both qubits on the pair qubit = platform.qubits[params.measured_qubits[i]].name - # average msr, phase, i and q over the number of shots defined in the runcard result = results[ro_pulses[qubit].serial] # store the results data.register_qubit( qubit, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + ro_pulses[qubit].frequency, bias=delta_bias_range, diff --git a/src/qibocal/protocols/characterization/couplers/utils.py b/src/qibocal/protocols/characterization/couplers/utils.py index 311d036c7..3c974afb0 100644 --- a/src/qibocal/protocols/characterization/couplers/utils.py +++ b/src/qibocal/protocols/characterization/couplers/utils.py @@ -15,13 +15,13 @@ class CouplerSpectroscopyParameters(Parameters): """CouplerResonatorSpectroscopy and CouplerQubitSpectroscopy runcard inputs.""" bias_width: int - """Width for bias (V).""" + """Width for bias [a.u.].""" bias_step: int - """Frequency step for bias sweep (V).""" + """Frequency step for bias sweep [a.u.].""" freq_width: int - """Width for frequency sweep relative to the readout frequency (Hz).""" + """Width for frequency sweep relative to the readout frequency [Hz].""" freq_step: int - """Frequency step for frequency sweep (Hz).""" + """Frequency step for frequency sweep [Hz].""" # TODO: It may be better not to use readout multiplex to avoid readout crosstalk measured_qubits: list[QubitId] """Qubit to readout from the pair""" @@ -31,14 +31,14 @@ class CouplerSpectroscopyParameters(Parameters): nshots: Optional[int] = None """Number of shots.""" relaxation_time: Optional[int] = None - """Relaxation time (ns).""" + """Relaxation time [ns].""" CouplerSpecType = np.dtype( [ ("freq", np.float64), ("bias", np.float64), - ("msr", np.float64), + ("signal", np.float64), ("phase", np.float64), ] ) @@ -66,8 +66,8 @@ class CouplerSpectroscopyData(Data): data: dict[QubitId, npt.NDArray[CouplerSpecType]] = field(default_factory=dict) """Raw data acquired.""" - def register_qubit(self, qubit, freq, bias, msr, phase): + def register_qubit(self, qubit, freq, bias, signal, phase): """Store output for single qubit.""" self.data[qubit] = create_data_array( - freq, bias, msr, phase, dtype=CouplerSpecType + freq, bias, signal, phase, dtype=CouplerSpecType ) diff --git a/src/qibocal/protocols/characterization/dispersive_shift.py b/src/qibocal/protocols/characterization/dispersive_shift.py index 4db8a30fe..1bb7aac4c 100644 --- a/src/qibocal/protocols/characterization/dispersive_shift.py +++ b/src/qibocal/protocols/characterization/dispersive_shift.py @@ -13,9 +13,7 @@ from qibocal import update from qibocal.auto.operation import Data, Parameters, Qubits, Results, Routine from qibocal.protocols.characterization.utils import ( - GHZ_TO_HZ, HZ_TO_GHZ, - V_TO_UV, lorentzian, lorentzian_fit, table_dict, @@ -28,9 +26,9 @@ class DispersiveShiftParameters(Parameters): """Dispersive shift inputs.""" freq_width: int - """Width [Hz] for frequency sweep relative to the readout frequency (Hz).""" + """Width [Hz] for frequency sweep relative to the readout frequency [Hz].""" freq_step: int - """Frequency step for sweep (Hz).""" + """Frequency step for sweep [Hz].""" @dataclass @@ -41,9 +39,9 @@ class DispersiveShiftResults(Results): """State zero frequency.""" frequency_state_one: dict[QubitId, float] """State one frequency.""" - fitted_parameters_state_zero: dict[QubitId, dict[str, float]] + fitted_parameters_state_zero: dict[QubitId, list[float]] """Fitted parameters state zero.""" - fitted_parameters_state_one: dict[QubitId, dict[str, float]] + fitted_parameters_state_one: dict[QubitId, list[float]] """Fitted parameters state one.""" best_freq: dict[QubitId, float] """Readout frequency that maximizes the distance of ground and excited states in iq-plane""" @@ -62,7 +60,7 @@ def state_one(self): ("freq", np.float64), ("i", np.float64), ("q", np.float64), - ("msr", np.float64), + ("signal", np.float64), ("phase", np.float64), ] ) @@ -151,7 +149,6 @@ def _acquisition( # retrieve the results for every qubit for qubit in qubits: - # average msr, phase, i and q over the number of shots defined in the runcard for i, results in enumerate([results_0, results_1]): result = results[ro_pulses[qubit].serial] # store the results @@ -160,7 +157,7 @@ def _acquisition( (qubit, i), dict( freq=ro_pulses[qubit].frequency + delta_frequency_range, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, i=result.voltage_i, q=result.voltage_q, @@ -199,7 +196,7 @@ def _fit(data: DispersiveShiftData) -> DispersiveShiftResults: iq_couples = np.array(iq_couples) best_freqs = {} for idx, qubit in enumerate(qubits): - frequencies = data[qubit, 0].freq * HZ_TO_GHZ + frequencies = data[qubit, 0].freq max_index = np.argmax( np.linalg.norm(iq_couples[0][idx] - iq_couples[1][idx], axis=-1) @@ -223,8 +220,8 @@ def _plot(data: DispersiveShiftData, qubit, fit: DispersiveShiftResults): horizontal_spacing=0.1, vertical_spacing=0.1, subplot_titles=( - "MSR (V)", - "phase (rad)", + "Signal [a.u.]", + "phase [rad]", ), ) # iterate over multiple data folders @@ -249,7 +246,7 @@ def _plot(data: DispersiveShiftData, qubit, fit: DispersiveShiftResults): fig.add_trace( go.Scatter( x=frequencies, - y=q_data.msr * V_TO_UV, + y=q_data.signal, opacity=opacity, name=f"{label}", showlegend=True, @@ -284,7 +281,7 @@ def _plot(data: DispersiveShiftData, qubit, fit: DispersiveShiftResults): fig.add_trace( go.Scatter( x=freqrange, - y=lorentzian(freqrange, **params), + y=lorentzian(freqrange, *params), name=f"{label} Fit", line=go.scatter.Line(dash="dot"), ), @@ -295,10 +292,10 @@ def _plot(data: DispersiveShiftData, qubit, fit: DispersiveShiftResults): if fit is not None: fig.add_trace( go.Scatter( - x=[fit.best_freq[qubit], fit.best_freq[qubit]], + x=[fit.best_freq[qubit] * HZ_TO_GHZ, fit.best_freq[qubit] * HZ_TO_GHZ], y=[ - np.min(np.concatenate((data_0.msr, data_1.msr))), - np.max(np.concatenate((data_0.msr, data_1.msr))), + np.min(np.concatenate((data_0.signal, data_1.signal))), + np.max(np.concatenate((data_0.signal, data_1.signal))), ], mode="lines", line=go.scatter.Line(color="orange", width=3, dash="dash"), @@ -309,7 +306,7 @@ def _plot(data: DispersiveShiftData, qubit, fit: DispersiveShiftResults): ) fig.add_vline( - x=fit.best_freq[qubit], + x=fit.best_freq[qubit] * HZ_TO_GHZ, line=dict(color="orange", width=3, dash="dash"), row=1, col=1, @@ -320,30 +317,29 @@ def _plot(data: DispersiveShiftData, qubit, fit: DispersiveShiftResults): [ "State Zero Frequency [Hz]", "State One Frequency [Hz]", - "Chi Best [Hz]", + "Chi [Hz]", "Best Frequency [Hz]", ], np.round( [ - fit_data_0["frequency_state_zero"][qubit] * GHZ_TO_HZ, - fit_data_1["frequency_state_one"][qubit] * GHZ_TO_HZ, + fit_data_0["frequency_state_zero"][qubit], + fit_data_1["frequency_state_one"][qubit], ( fit_data_0["frequency_state_zero"][qubit] - fit_data_1["frequency_state_one"][qubit] ) - / 2 - * GHZ_TO_HZ, - fit.best_freq[qubit] * GHZ_TO_HZ, + / 2, + fit.best_freq[qubit], ] ), ) ) fig.update_layout( showlegend=True, - xaxis_title="Frequency (GHz)", - yaxis_title="MSR (uV)", - xaxis2_title="Frequency (GHz)", - yaxis2_title="Phase (rad)", + xaxis_title="Frequency [GHz]", + yaxis_title="Signal [a.u.]", + xaxis2_title="Frequency [GHz]", + yaxis2_title="Phase [rad]", ) figures.append(fig) diff --git a/src/qibocal/protocols/characterization/dispersive_shift_qutrit.py b/src/qibocal/protocols/characterization/dispersive_shift_qutrit.py index 1b388d34c..da7e5cb77 100644 --- a/src/qibocal/protocols/characterization/dispersive_shift_qutrit.py +++ b/src/qibocal/protocols/characterization/dispersive_shift_qutrit.py @@ -14,7 +14,6 @@ from qibocal.protocols.characterization.utils import ( GHZ_TO_HZ, HZ_TO_GHZ, - V_TO_UV, lorentzian, lorentzian_fit, table_dict, @@ -40,11 +39,11 @@ class DispersiveShiftQutritResults(Results): """State one frequency.""" frequency_state_two: dict[QubitId, float] """State two frequency.""" - fitted_parameters_state_zero: dict[QubitId, dict[str, float]] + fitted_parameters_state_zero: dict[QubitId, list[float]] """Fitted parameters state zero.""" - fitted_parameters_state_one: dict[QubitId, dict[str, float]] + fitted_parameters_state_one: dict[QubitId, list[float]] """Fitted parameters state one.""" - fitted_parameters_state_two: dict[QubitId, dict[str, float]] + fitted_parameters_state_two: dict[QubitId, list[float]] """Fitted parameters state one.""" @property @@ -139,7 +138,7 @@ def _acquisition( dict( freq=sequence.get_qubit_pulses(qubit).ro_pulses[0].frequency + delta_frequency_range, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, ), ) @@ -193,8 +192,8 @@ def _plot(data: DispersiveShiftQutritData, qubit, fit: DispersiveShiftQutritResu horizontal_spacing=0.1, vertical_spacing=0.1, subplot_titles=( - "MSR (uV)", - "phase (rad)", + "Signal [a.u.]", + "phase [rad]", ), ) # iterate over multiple data folders @@ -220,7 +219,7 @@ def _plot(data: DispersiveShiftQutritData, qubit, fit: DispersiveShiftQutritResu fig.add_trace( go.Scatter( x=frequencies, - y=q_data.msr * V_TO_UV, + y=q_data.signal, opacity=opacity, name=f"{label}", showlegend=True, @@ -259,7 +258,7 @@ def _plot(data: DispersiveShiftQutritData, qubit, fit: DispersiveShiftQutritResu fig.add_trace( go.Scatter( x=freqrange, - y=lorentzian(freqrange, **params), + y=lorentzian(freqrange, *params), name=f"{label} Fit", line=go.scatter.Line(dash="dot"), ), @@ -287,10 +286,10 @@ def _plot(data: DispersiveShiftQutritData, qubit, fit: DispersiveShiftQutritResu ) fig.update_layout( showlegend=True, - xaxis_title="Frequency (GHz)", - yaxis_title="MSR (uV)", - xaxis2_title="Frequency (GHz)", - yaxis2_title="Phase (rad)", + xaxis_title="Frequency [GHz]", + yaxis_title="Signal [a.u.]", + xaxis2_title="Frequency [GHz]", + yaxis2_title="Phase [rad]", ) figures.append(fig) diff --git a/src/qibocal/protocols/characterization/fast_reset/fast_reset.py b/src/qibocal/protocols/characterization/fast_reset/fast_reset.py index 6f80e5135..cc805e2e7 100644 --- a/src/qibocal/protocols/characterization/fast_reset/fast_reset.py +++ b/src/qibocal/protocols/characterization/fast_reset/fast_reset.py @@ -168,7 +168,7 @@ def _plot(data: FastResetData, fit: FastResetResults, qubit): vertical_spacing=0.1, subplot_titles=( "Fast Reset", - "Relaxation Time", + "Relaxation Time [ns]", ), ) @@ -221,9 +221,8 @@ def _plot(data: FastResetData, fit: FastResetResults, qubit): # last part fig.update_layout( showlegend=False, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis_title="State prepared", - yaxis_title="State read", + yaxis_title="State measured", ) figures.append(fig) diff --git a/src/qibocal/protocols/characterization/flipping.py b/src/qibocal/protocols/characterization/flipping.py index 054c4ed1b..cb4289c6b 100644 --- a/src/qibocal/protocols/characterization/flipping.py +++ b/src/qibocal/protocols/characterization/flipping.py @@ -15,8 +15,6 @@ from qibocal.config import log from qibocal.protocols.characterization.utils import table_dict, table_html -from .utils import V_TO_UV - @dataclass class FlippingParameters(Parameters): @@ -40,7 +38,7 @@ class FlippingResults(Results): """Raw fitting output.""" -FlippingType = np.dtype([("flips", np.float64), ("msr", np.float64)]) +FlippingType = np.dtype([("flips", np.float64), ("signal", np.float64)]) @dataclass @@ -75,7 +73,6 @@ def _acquisition( data (:class:`FlippingData`) """ - # create a DataUnits object to store MSR, phase, i, q and the number of flips data = FlippingData( resonator_type=platform.resonator_type, pi_pulse_amplitudes={ @@ -120,7 +117,7 @@ def _acquisition( (qubit), dict( flips=np.array([flips]), - msr=np.array([result.magnitude]), + signal=np.array([result.magnitude]), ), ) @@ -147,7 +144,7 @@ def _fit(data: FlippingData) -> FlippingResults: for qubit in qubits: qubit_data = data[qubit] pi_pulse_amplitude = data.pi_pulse_amplitudes[qubit] - voltages = qubit_data.msr + voltages = qubit_data.signal flips = qubit_data.flips y_min = np.min(voltages) # Guessing period using Fourier transform @@ -225,11 +222,11 @@ def _plot(data: FlippingData, qubit, fit: FlippingResults = None): fig.add_trace( go.Scatter( x=qubit_data.flips, - y=qubit_data.msr * V_TO_UV, + y=qubit_data.signal, opacity=1, - name="Voltage", + name="Signal", showlegend=True, - legendgroup="Voltage", + legendgroup="Signal", ), ) @@ -258,7 +255,7 @@ def _plot(data: FlippingData, qubit, fit: FlippingResults = None): fitting_report = table_html( table_dict( qubit, - ["Amplitude correction factor", "Corrected amplitude"], + ["Amplitude correction factor", "Corrected amplitude [a.u.]"], [ np.round(fit.amplitude_factors[qubit], 4), np.round(fit.amplitude[qubit], 4), @@ -269,9 +266,8 @@ def _plot(data: FlippingData, qubit, fit: FlippingResults = None): # last part fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="Flips (dimensionless)", - yaxis_title="MSR (uV)", + xaxis_title="Flips", + yaxis_title="Signal [a.u.]", ) figures.append(fig) diff --git a/src/qibocal/protocols/characterization/flux_dependence/avoided_crossing.py b/src/qibocal/protocols/characterization/flux_dependence/avoided_crossing.py new file mode 100644 index 000000000..a9c00eac9 --- /dev/null +++ b/src/qibocal/protocols/characterization/flux_dependence/avoided_crossing.py @@ -0,0 +1,360 @@ +from copy import deepcopy +from dataclasses import dataclass, field +from enum import Enum +from typing import Optional + +import numpy as np +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 qibocal.auto.operation import Data, QubitsPairs, Results, Routine +from qibocal.protocols.characterization.two_qubit_interaction.utils import order_pair +from qibocal.protocols.characterization.utils import HZ_TO_GHZ, table_dict, table_html + +from .qubit_flux_dependence import QubitFluxParameters, QubitFluxType +from .qubit_flux_dependence import _acquisition as flux_acquisition + +STEP = 60 +POINT_SIZE = 10 + + +@dataclass +class AvoidedCrossingParameters(QubitFluxParameters): + """Avoided Crossing Parameters""" + + +@dataclass +class AvoidedCrossingResults(Results): + """Avoided crossing outputs""" + + parabolas: dict[tuple, list] + """Extracted parabolas""" + fits: dict[tuple, list] + """Fits parameters""" + cz: dict[tuple, list] + """CZ intersection points """ + iswap: dict[tuple, list] + """iSwap intersection points""" + + +@dataclass +class AvoidedCrossingData(Data): + """Avoided crossing acquisition outputs""" + + qubit_pairs: list + """list of qubit pairs ordered following the drive frequency""" + drive_frequency_low: dict = field(default_factory=dict) + """Lowest drive frequency in each qubit pair""" + data: dict[tuple[QubitId, str], npt.NDArray[QubitFluxType]] = field( + default_factory=dict + ) + """Raw data acquired.""" + + +def _acquisition( + params: AvoidedCrossingParameters, + platform: Platform, + qubits: QubitsPairs, # qubit pairs +) -> AvoidedCrossingData: + """ + Data acquisition for avoided crossing. + This routine performs the qubit flux dependency for the "01" and "02" transition + on the qubit pair. It returns the bias and frequency values to perform a CZ + and a iSwap gate. + + Args: + params (AvoidedCrossingParameters): experiment's parameters. + platform (Platform): Qibolab platform object. + qubits (dict): list of targets qubit pairs to perform the action. + """ + qubit_pairs = list(qubits.keys()) + order_pairs = np.array([order_pair(pair, platform.qubits) for pair in qubit_pairs]) + data = AvoidedCrossingData(qubit_pairs=order_pairs.tolist()) + # Extract the qubits in the qubits pairs and evaluate their flux dep + unique_qubits = np.unique( + order_pairs[:, 1] + ) # select qubits with high freq in each couple + new_qubits = {key: platform.qubits[key] for key in unique_qubits} + excitations = [Excitations.ge, Excitations.gf] + for transition in excitations: + params.transition = transition + data_transition = flux_acquisition( + params=params, + platform=platform, + qubits=new_qubits, + ) + for qubit in unique_qubits: + qubit_data = data_transition.data[qubit] + freq = qubit_data["freq"] + bias = qubit_data["bias"] + signal = qubit_data["signal"] + phase = qubit_data["phase"] + data.register_qubit( + QubitFluxType, + (float(qubit), transition), + dict( + freq=freq.tolist(), + bias=bias.tolist(), + signal=signal.tolist(), + phase=phase.tolist(), + ), + ) + + unique_low_qubits = np.unique(order_pairs[:, 0]) + data.drive_frequency_low = { + str(qubit): float(platform.qubits[qubit].drive_frequency) + for qubit in unique_low_qubits + } + return data + + +def _fit(data: AvoidedCrossingData) -> AvoidedCrossingResults: + """ + Post-Processing for avoided crossing. + """ + qubit_data = data.data + fits = {} + cz = {} + iswap = {} + curves = {tuple(key): find_parabola(val) for key, val in qubit_data.items()} + for qubit_pair in data.qubit_pairs: + qubit_pair = tuple(qubit_pair) + fits[qubit_pair] = {} + low = qubit_pair[0] + high = qubit_pair[1] + # Fit the 02*2 curve + curve_02 = np.array(curves[high, Excitations.gf]) * 2 + x_02 = np.unique(qubit_data[high, Excitations.gf]["bias"]) + fit_02 = np.polyfit(x_02, curve_02, 2) + fits[qubit_pair][Excitations.gf] = fit_02.tolist() + + # Fit the 01+10 curve + curve_01 = np.array(curves[high, Excitations.ge]) + x_01 = np.unique(qubit_data[high, Excitations.ge]["bias"]) + fit_01_10 = np.polyfit(x_01, curve_01 + data.drive_frequency_low[str(low)], 2) + fits[qubit_pair][Excitations.all_ge] = fit_01_10.tolist() + # find the intersection of the two parabolas + delta_fit = fit_02 - fit_01_10 + x1, x2 = solve_eq(delta_fit) + cz[qubit_pair] = [ + [x1, np.polyval(fit_02, x1)], + [x2, np.polyval(fit_02, x2)], + ] + # find the intersection of the 01 parabola and the 10 line + fit_01 = np.polyfit(x_01, curve_01, 2) + fits[qubit_pair][Excitations.ge] = fit_01.tolist() + fit_pars = deepcopy(fit_01) + line_val = data.drive_frequency_low[str(low)] + fit_pars[2] -= line_val + x1, x2 = solve_eq(fit_pars) + iswap[qubit_pair] = [[x1, line_val], [x2, line_val]] + + return AvoidedCrossingResults(curves, fits, cz, iswap) + + +def _plot(data: AvoidedCrossingData, fit: Optional[AvoidedCrossingResults], qubit): + """Plotting function for avoided crossing""" + fitting_report = "" + figures = [] + order_pair = tuple(index(data.qubit_pairs, qubit)) + heatmaps = make_subplots( + rows=1, + cols=2, + subplot_titles=[ + f"{i} transition qubit {qubit[0]}" for i in [Excitations.ge, Excitations.gf] + ], + ) + parabolas = make_subplots(rows=1, cols=1, subplot_titles=["Parabolas"]) + for i, transition in enumerate([Excitations.ge, Excitations.gf]): + data_high = data.data[order_pair[1], transition] + bias_unique = np.unique(data_high.bias) + min_bias = min(bias_unique) + max_bias = max(bias_unique) + plot_heatmap( + heatmaps, fit, transition, bias_unique, order_pair, data_high, i + 1 + ) + + figures.append(heatmaps) + + if fit is not None: + cz = np.array(fit.cz[order_pair]) + iswap = np.array(fit.iswap[order_pair]) + min_bias = min(min_bias, *cz[:, 0], *iswap[:, 0]) + max_bias = max(max_bias, *cz[:, 0], *iswap[:, 0]) + bias_range = np.linspace(min_bias, max_bias, STEP) + plot_curves(parabolas, fit, data, order_pair, bias_range) + plot_intersections(parabolas, cz, iswap) + + parabolas.update_layout( + xaxis_title="Bias[V]", + yaxis_title="Frequency[GHz]", + ) + heatmaps.update_layout( + coloraxis_colorbar=dict( + yanchor="top", + y=1, + x=-0.08, + ticks="outside", + ), + xaxis_title="Frequency[GHz]", + yaxis_title="Bias[V]", + xaxis2_title="Frequency[GHz]", + yaxis2_title="Bias[V]", + ) + figures.append(parabolas) + fitting_report = table_html( + table_dict( + qubit, + ["CZ bias", "iSwap bias"], + [np.round(cz[:, 0], 3), np.round(iswap[:, 0], 3)], + ) + ) + return figures, fitting_report + + +avoided_crossing = Routine(_acquisition, _fit, _plot) + + +def find_parabola(data: dict) -> list: + """ + Finds the parabola in `data` + """ + freqs = data["freq"] + currs = data["bias"] + biass = sorted(np.unique(currs)) + frequencies = [] + for bias in biass: + data_bias = data[currs == bias] + index = data_bias["signal"].argmax() + frequencies.append(freqs[index]) + return frequencies + + +def solve_eq(pars: list) -> tuple: + """ + Solver of the quadratic equation + + .. math:: + a x^2 + b x + c = 0 + + `pars` is the list [a, b, c]. + """ + first_term = -1 * pars[1] + second_term = np.sqrt(pars[1] ** 2 - 4 * pars[0] * pars[2]) + x1 = (first_term + second_term) / pars[0] / 2 + x2 = (first_term - second_term) / pars[0] / 2 + return x1, x2 + + +def index(pairs: list, item: list) -> list: + """Find the ordered pair""" + for pair in pairs: + if set(pair) == set(item): + return pair + raise ValueError(f"{item} not in pairs") + + +class Excitations(str, Enum): + """ + Excited two qubits states. + """ + + ge = "01" + """First qubit in ground state, second qubit in excited state""" + gf = "02" + """First qubit in ground state, second qubit in the first excited state out + of the computational basis.""" + all_ge = "01+10" + """One of the qubit in the ground state and the other one in the excited state.""" + + +def plot_heatmap(heatmaps, fit, transition, bias_unique, order_pair, data_high, col): + heatmaps.add_trace( + go.Heatmap( + x=data_high.freq * HZ_TO_GHZ, + y=data_high.bias, + z=data_high.signal, + coloraxis="coloraxis", + ), + row=1, + col=col, + ) + if fit is not None: + # the fit of the parabola in 02 transition was done doubling the frequencies + heatmaps.add_trace( + go.Scatter( + x=np.polyval(fit.fits[order_pair][transition], bias_unique) + / col + * HZ_TO_GHZ, + y=bias_unique, + mode="markers", + marker_color="lime", + showlegend=True, + marker=dict(size=POINT_SIZE), + name=f"Curve estimation {transition}", + ), + row=1, + col=col, + ) + heatmaps.add_trace( + go.Scatter( + x=np.array(fit.parabolas[order_pair[1], transition]) * HZ_TO_GHZ, + y=bias_unique, + mode="markers", + marker_color="black", + showlegend=True, + marker=dict(symbol="cross", size=POINT_SIZE), + name=f"Parabola {transition}", + ), + row=1, + col=col, + ) + + +def plot_curves(parabolas, fit, data, order_pair, bias_range): + for transition in [Excitations.ge, Excitations.gf, Excitations.all_ge]: + parabolas.add_trace( + go.Scatter( + x=bias_range, + y=np.polyval(fit.fits[order_pair][transition], bias_range) * HZ_TO_GHZ, + showlegend=True, + name=transition, + ) + ) + parabolas.add_trace( + go.Scatter( + x=bias_range, + y=np.array([data.drive_frequency_low[str(order_pair[0])]] * STEP) + * HZ_TO_GHZ, + showlegend=True, + name="10", + ) + ) + + +def plot_intersections(parabolas, cz, iswap): + parabolas.add_trace( + go.Scatter( + x=cz[:, 0], + y=cz[:, 1] * HZ_TO_GHZ, + showlegend=True, + name="CZ", + marker_color="black", + mode="markers", + marker=dict(symbol="cross", size=POINT_SIZE), + ) + ) + parabolas.add_trace( + go.Scatter( + x=iswap[:, 0], + y=iswap[:, 1] * HZ_TO_GHZ, + showlegend=True, + name="iswap", + marker_color="blue", + mode="markers", + marker=dict(symbol="cross", size=10), + ) + ) diff --git a/src/qibocal/protocols/characterization/flux_dependence/qubit_crosstalk.py b/src/qibocal/protocols/characterization/flux_dependence/qubit_crosstalk.py index 4bfb7eff4..556d908bc 100644 --- a/src/qibocal/protocols/characterization/flux_dependence/qubit_crosstalk.py +++ b/src/qibocal/protocols/characterization/flux_dependence/qubit_crosstalk.py @@ -42,9 +42,9 @@ class QubitCrosstalkData(QubitFluxData): ) """Raw data acquired for (qubit, qubit_flux) pairs saved in nested dictionaries.""" - def register_qubit(self, qubit, flux_qubit, freq, bias, msr, phase): + def register_qubit(self, qubit, flux_qubit, freq, bias, signal, phase): """Store output for single qubit.""" - ar = utils.create_data_array(freq, bias, msr, phase, dtype=QubitFluxType) + ar = utils.create_data_array(freq, bias, signal, phase, dtype=QubitFluxType) if (qubit, flux_qubit) in self.data: self.data[qubit, flux_qubit] = np.rec.array( np.concatenate((self.data[qubit, flux_qubit], ar)) @@ -144,7 +144,7 @@ def _acquisition( data.register_qubit( qubit, flux_qubit, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + qd_pulses[qubit].frequency, bias=delta_bias_range + sweetspot, diff --git a/src/qibocal/protocols/characterization/flux_dependence/qubit_flux_dependence.py b/src/qibocal/protocols/characterization/flux_dependence/qubit_flux_dependence.py index 61b900ed7..562f3aad3 100644 --- a/src/qibocal/protocols/characterization/flux_dependence/qubit_flux_dependence.py +++ b/src/qibocal/protocols/characterization/flux_dependence/qubit_flux_dependence.py @@ -27,13 +27,13 @@ class QubitFluxParameters(Parameters): """QubitFlux runcard inputs.""" freq_width: int - """Width for frequency sweep relative to the qubit frequency (Hz).""" + """Width for frequency sweep relative to the qubit frequency [Hz].""" freq_step: int """Frequency step for sweep [Hz].""" bias_width: float """Width for bias sweep [V].""" bias_step: float - """Bias step for sweep (V).""" + """Bias step for sweep [a.u.].""" drive_amplitude: Optional[float] = None """Drive amplitude (optional). If defined, same amplitude will be used in all qubits. Otherwise the default amplitude defined on the platform runcard will be used""" @@ -61,7 +61,7 @@ class QubitFluxResults(Results): [ ("freq", np.float64), ("bias", np.float64), - ("msr", np.float64), + ("signal", np.float64), ("phase", np.float64), ] ) @@ -85,10 +85,10 @@ class QubitFluxData(Data): data: dict[QubitId, npt.NDArray[QubitFluxType]] = field(default_factory=dict) """Raw data acquired.""" - def register_qubit(self, qubit, freq, bias, msr, phase): + def register_qubit(self, qubit, freq, bias, signal, phase): """Store output for single qubit.""" self.data[qubit] = utils.create_data_array( - freq, bias, msr, phase, dtype=QubitFluxType + freq, bias, signal, phase, dtype=QubitFluxType ) @@ -166,7 +166,7 @@ def _acquisition( sweetspot = qubits[qubit].sweetspot data.register_qubit( qubit, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + qd_pulses[qubit].frequency, bias=delta_bias_range + sweetspot, @@ -205,13 +205,13 @@ def _fit(data: QubitFluxData) -> QubitFluxResults: biases = qubit_data.bias frequencies = qubit_data.freq - msr = qubit_data.msr + signal = qubit_data.signal if data.resonator_type == "2D": - msr = -msr + signal = -signal frequencies, biases = utils.image_to_curve( - frequencies, biases, msr, msr_mask=0.3 + frequencies, biases, signal, signal_mask=0.3 ) max_c = biases[np.argmax(frequencies)] min_c = biases[np.argmin(frequencies)] @@ -280,7 +280,7 @@ def _fit(data: QubitFluxData) -> QubitFluxResults: 0 ] # Corresponding flux matrix element. - frequency[qubit] = f_qs * HZ_TO_GHZ + frequency[qubit] = f_qs sweetspot[qubit] = popt[0] fitted_parameters[qubit] = { "Xi": popt[1], diff --git a/src/qibocal/protocols/characterization/flux_dependence/qubit_flux_tracking.py b/src/qibocal/protocols/characterization/flux_dependence/qubit_flux_tracking.py index aea13388c..6a14a1cf5 100644 --- a/src/qibocal/protocols/characterization/flux_dependence/qubit_flux_tracking.py +++ b/src/qibocal/protocols/characterization/flux_dependence/qubit_flux_tracking.py @@ -27,13 +27,13 @@ class QubitFluxParameters(Parameters): """QubitFlux runcard inputs.""" freq_width: int - """Width for frequency sweep relative to the qubit frequency (Hz).""" + """Width for frequency sweep relative to the qubit frequency [Hz].""" freq_step: int """Frequency step for sweep [Hz].""" bias_width: float """Width for bias sweep [V].""" bias_step: float - """Bias step for sweep (V).""" + """Bias step for sweep [a.u.].""" drive_duration: int """Drive pulse duration [ns]. Same for all qubits.""" drive_amplitude: Optional[float] = None @@ -42,7 +42,7 @@ class QubitFluxParameters(Parameters): nshots: Optional[int] = None """Number of shots.""" relaxation_time: Optional[int] = None - """Relaxation time (ns).""" + """Relaxation time [ns].""" transition: Optional[str] = "01" """Flux spectroscopy transition type ("01" or "02"). Default value is 01""" @@ -63,7 +63,7 @@ class QubitFluxResults(Results): [ ("freq", np.float64), ("bias", np.float64), - ("msr", np.float64), + ("signal", np.float64), ("phase", np.float64), ] ) @@ -87,14 +87,14 @@ class QubitFluxData(Data): data: dict[QubitId, npt.NDArray[QubitFluxType]] = field(default_factory=dict) """Raw data acquired.""" - def register_qubit_track(self, qubit, freq, bias, msr, phase): + def register_qubit_track(self, qubit, freq, bias, signal, phase): """Store output for single qubit.""" # to be able to handle the 1D sweeper case size = len(freq) ar = np.empty(size, dtype=QubitFluxType) ar["freq"] = freq ar["bias"] = [bias] * size - ar["msr"] = msr + ar["signal"] = signal ar["phase"] = phase if qubit in self.data: self.data[qubit] = np.rec.array(np.concatenate((self.data[qubit], ar))) @@ -201,7 +201,7 @@ def _acquisition( result = results[ro_pulses[qubit].serial] data.register_qubit_track( qubit, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + qd_pulses[qubit].frequency, bias=bias + qubits[qubit].sweetspot, @@ -240,13 +240,13 @@ def _fit(data: QubitFluxData) -> QubitFluxResults: biases = qubit_data.bias frequencies = qubit_data.freq - msr = qubit_data.msr + signal = qubit_data.signal if data.resonator_type == "2D": - msr = -msr + signal = -signal frequencies, biases = utils.image_to_curve( - frequencies, biases, msr, msr_mask=0.3 + frequencies, biases, signal, signal_mask=0.3 ) max_c = biases[np.argmax(frequencies)] min_c = biases[np.argmin(frequencies)] diff --git a/src/qibocal/protocols/characterization/flux_dependence/resonator_crosstalk.py b/src/qibocal/protocols/characterization/flux_dependence/resonator_crosstalk.py index a88a54cda..c14c188e1 100644 --- a/src/qibocal/protocols/characterization/flux_dependence/resonator_crosstalk.py +++ b/src/qibocal/protocols/characterization/flux_dependence/resonator_crosstalk.py @@ -45,9 +45,9 @@ class ResCrosstalkData(ResonatorFluxData): ) """Raw data acquired for (qubit, qubit_flux) pairs saved in nested dictionaries.""" - def register_qubit(self, qubit, flux_qubit, freq, bias, msr, phase): + def register_qubit(self, qubit, flux_qubit, freq, bias, signal, phase): """Store output for single qubit.""" - ar = utils.create_data_array(freq, bias, msr, phase, dtype=ResFluxType) + ar = utils.create_data_array(freq, bias, signal, phase, dtype=ResFluxType) if (qubit, flux_qubit) in self.data: self.data[qubit, flux_qubit] = np.rec.array( np.concatenate((self.data[qubit, flux_qubit], ar)) @@ -134,7 +134,7 @@ def _acquisition( data.register_qubit( qubit, flux_qubit, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + ro_pulses[qubit].frequency, bias=delta_bias_range + sweetspot, diff --git a/src/qibocal/protocols/characterization/flux_dependence/resonator_flux_dependence.py b/src/qibocal/protocols/characterization/flux_dependence/resonator_flux_dependence.py index cbe3d0acf..31e37adcf 100644 --- a/src/qibocal/protocols/characterization/flux_dependence/resonator_flux_dependence.py +++ b/src/qibocal/protocols/characterization/flux_dependence/resonator_flux_dependence.py @@ -23,13 +23,13 @@ class ResonatorFluxParameters(Parameters): """ResonatorFlux runcard inputs.""" freq_width: int - """Width for frequency sweep relative to the readout frequency (Hz).""" + """Width for frequency sweep relative to the readout frequency [Hz].""" freq_step: int """Frequency step for sweep [Hz].""" bias_width: float """Width for bias sweep [V].""" bias_step: float - """Bias step for sweep (V).""" + """Bias step for sweep [a.u.].""" @dataclass @@ -62,7 +62,7 @@ class ResonatorFluxResults(Results): [ ("freq", np.float64), ("bias", np.float64), - ("msr", np.float64), + ("signal", np.float64), ("phase", np.float64), ] ) @@ -91,10 +91,10 @@ class ResonatorFluxData(Data): data: dict[QubitId, npt.NDArray[ResFluxType]] = field(default_factory=dict) """Raw data acquired.""" - def register_qubit(self, qubit, freq, bias, msr, phase): + def register_qubit(self, qubit, freq, bias, signal, phase): """Store output for single qubit.""" self.data[qubit] = utils.create_data_array( - freq, bias, msr, phase, dtype=ResFluxType + freq, bias, signal, phase, dtype=ResFluxType ) @@ -165,7 +165,7 @@ def _acquisition( sweetspot = qubits[qubit].sweetspot data.register_qubit( qubit, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + ro_pulses[qubit].frequency, bias=delta_bias_range + sweetspot, @@ -223,13 +223,13 @@ def _fit(data: ResonatorFluxData) -> ResonatorFluxResults: biases = qubit_data.bias frequencies = qubit_data.freq - msr = qubit_data.msr + signal = qubit_data.signal if data.resonator_type == "3D": - msr = -msr + signal = -signal frequencies, biases = utils.image_to_curve( - frequencies, biases, msr, msr_mask=0.5 + frequencies, biases, signal, signal_mask=0.5 ) bare_resonator_frequency = data.bare_resonator_frequency[ diff --git a/src/qibocal/protocols/characterization/flux_dependence/utils.py b/src/qibocal/protocols/characterization/flux_dependence/utils.py index 1feb3befb..8eb50413d 100644 --- a/src/qibocal/protocols/characterization/flux_dependence/utils.py +++ b/src/qibocal/protocols/characterization/flux_dependence/utils.py @@ -4,28 +4,20 @@ from scipy.special import mathieu_a, mathieu_b from sklearn.linear_model import Ridge -from ..utils import GHZ_TO_HZ, HZ_TO_GHZ, V_TO_UV, table_dict, table_html +from ..utils import HZ_TO_GHZ, table_dict, table_html FLUX_PARAMETERS = { "Xi": "Constant to map flux to bias [V]", "d": "Junction asymmetry", - "Ec": "Charge energy Ec [GHz]", - "Ej": "Josephson energy Ej [GHz]", - "f_q_offset": "Qubit frequency offset [GHz]", - "C_ii": "Flux matrix element C_ii [GHz/V]", + "Ec": "Charge energy Ec [Hz]", + "Ej": "Josephson energy Ej [Hz]", + "f_q_offset": "Qubit frequency offset [Hz]", + "C_ii": "Flux matrix element C_ii [Hz/V]", "g": "Readout coupling", - "bare_resonator_frequency": "Bare resonator frequency [GHz]", - "f_qs": "Qubit frequency [GHz]", - "f_r_offset": "Resonator frequency offset [GHz]", + "bare_resonator_frequency": "Bare resonator frequency [Hz]", + "f_qs": "Qubit frequency [Hz]", + "f_r_offset": "Resonator frequency offset [Hz]", } -FREQUENCY_PARAMETERS = [ - "Ec", - "Ej", - "f_q_offset", - "bare_resonator_frequency", - "f_qs", - "f_r_offset", -] def is_crosstalk(data): @@ -33,14 +25,14 @@ def is_crosstalk(data): return all(isinstance(key, tuple) for key in data.data.keys()) -def create_data_array(freq, bias, msr, phase, dtype): +def create_data_array(freq, bias, signal, phase, dtype): """Create custom dtype array for acquired data.""" size = len(freq) * len(bias) ar = np.empty(size, dtype=dtype) frequency, biases = np.meshgrid(freq, bias) ar["freq"] = frequency.ravel() ar["bias"] = biases.ravel() - ar["msr"] = msr.ravel() + ar["signal"] = signal.ravel() ar["phase"] = phase.ravel() return np.rec.array(ar) @@ -53,12 +45,12 @@ def flux_dependence_plot(data, fit, qubit): if not data.__class__.__name__ == "CouplerSpectroscopyData": subplot_titles = ( - "MSR [V]", + "Signal [a.u.]", "Phase [rad]", ) else: subplot_titles = ( - "MSR [V] Qubit" + str(qubit), + "Signal [a.u.] Qubit" + str(qubit), "Phase [rad] Qubit" + str(qubit), ) @@ -70,26 +62,28 @@ def flux_dependence_plot(data, fit, qubit): subplot_titles=subplot_titles, ) frequencies = qubit_data.freq * HZ_TO_GHZ - msr = qubit_data.msr + signal = qubit_data.signal if data.__class__.__name__ == "ResonatorFluxData": - msr_mask = 0.5 + signal_mask = 0.5 if data.resonator_type == "3D": - msr = -msr + signal = -signal elif ( data.__class__.__name__ == "QubitFluxData" or data.__class__.__name__ == "CouplerSpectroscopyData" ): - msr_mask = 0.3 + signal_mask = 0.3 if data.resonator_type == "2D": - msr = -msr + signal = -signal - frequencies1, biases1 = image_to_curve(frequencies, qubit_data.bias, msr, msr_mask) + frequencies1, biases1 = image_to_curve( + frequencies, qubit_data.bias, signal, signal_mask + ) fig.add_trace( go.Heatmap( x=frequencies, y=qubit_data.bias, - z=qubit_data.msr * V_TO_UV, + z=qubit_data.signal, colorbar_x=0.46, ), row=1, @@ -117,7 +111,7 @@ def flux_dependence_plot(data, fit, qubit): fitting_report_label = "Frequency" if fit.frequency[qubit] != 0: if data.__class__.__name__ == "ResonatorFluxData": - fitting_report_label = "Resonator Frequency [GHz]" + fitting_report_label = "Resonator Frequency [Hz]" if all(param in params for param in ["Ec", "Ej"]): popt = [ params["bare_resonator_frequency"], @@ -128,7 +122,7 @@ def flux_dependence_plot(data, fit, qubit): params["Ec"], params["Ej"], ] - freq_fit = freq_r_mathieu(biases1, *popt) * HZ_TO_GHZ + freq_fit = freq_r_mathieu(biases1, *popt) else: popt = [ fit.sweetspot[qubit], @@ -138,9 +132,9 @@ def flux_dependence_plot(data, fit, qubit): params["g"], params["bare_resonator_frequency"], ] - freq_fit = freq_r_transmon(biases1, *popt) * HZ_TO_GHZ + freq_fit = freq_r_transmon(biases1, *popt) elif data.__class__.__name__ == "QubitFluxData": - fitting_report_label = "Qubit Frequency [GHz]" + fitting_report_label = "Qubit Frequency [Hz]" if all(param in params for param in ["Ec", "Ej"]): popt = [ fit.sweetspot[qubit], @@ -149,15 +143,15 @@ def flux_dependence_plot(data, fit, qubit): params["Ec"], params["Ej"], ] - freq_fit = freq_q_mathieu(biases1, *popt) * HZ_TO_GHZ + freq_fit = freq_q_mathieu(biases1, *popt) else: popt = [ fit.sweetspot[qubit], params["Xi"], params["d"], - fit.frequency[qubit] * GHZ_TO_HZ, + fit.frequency[qubit], ] - freq_fit = freq_q_transmon(biases1, *popt) * HZ_TO_GHZ + freq_fit = freq_q_transmon(biases1, *popt) fig.add_trace( go.Scatter( @@ -174,8 +168,6 @@ def flux_dependence_plot(data, fit, qubit): values = [] for key, value in fit.fitted_parameters[qubit].items(): - if key in FREQUENCY_PARAMETERS: # Select frequency parameters - value *= HZ_TO_GHZ values.append(np.round(value, 5)) parameters.append(FLUX_PARAMETERS[key]) @@ -187,14 +179,14 @@ def flux_dependence_plot(data, fit, qubit): fitting_report = table_html(table_dict(qubit, parameters, values)) fig.update_xaxes( - title_text=f"Frequency (GHz)", + title_text=f"Frequency [GHz]", row=1, col=1, ) if not data.__class__.__name__ == "CouplerSpectroscopyData": - fig.update_yaxes(title_text="Bias (V)", row=1, col=1) + fig.update_yaxes(title_text="Bias [V]", row=1, col=1) else: - fig.update_yaxes(title_text="Pulse Amplitude", row=1, col=1) + fig.update_yaxes(title_text="Pulse Amplitude [a.u.]", row=1, col=1) fig.add_trace( go.Heatmap( @@ -207,21 +199,20 @@ def flux_dependence_plot(data, fit, qubit): col=2, ) fig.update_xaxes( - title_text=f"Frequency (GHz)", + title_text=f"Frequency [GHz]", row=1, col=2, ) if not data.__class__.__name__ == "CouplerSpectroscopyData": - fig.update_yaxes(title_text="Bias (V)", row=1, col=2) + fig.update_yaxes(title_text="Bias [V]", row=1, col=2) else: - fig.update_yaxes(title_text="Pulse Amplitude", row=1, col=2) + fig.update_yaxes(title_text="Pulse Amplitude [a.u.]", row=1, col=2) fig.update_layout(xaxis1=dict(range=[np.min(frequencies), np.max(frequencies)])) fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting legend=dict(orientation="h"), ) @@ -245,39 +236,38 @@ def flux_crosstalk_plot(data, qubit): cols=len(all_qubit_data), horizontal_spacing=0.3 / len(all_qubit_data), vertical_spacing=0.1, - subplot_titles=len(all_qubit_data) * ("MSR [V]",), + subplot_titles=len(all_qubit_data) * ("Signal [a.u.]",), ) for col, (flux_qubit, qubit_data) in enumerate(all_qubit_data.items()): frequencies = qubit_data.freq * HZ_TO_GHZ - msr = qubit_data.msr + signal = qubit_data.signal if data.resonator_type == "2D": - msr = -msr + signal = -signal fig.add_trace( go.Heatmap( x=frequencies, y=qubit_data.bias, - z=qubit_data.msr * V_TO_UV, + z=qubit_data.signal, ), row=1, col=col + 1, ) fig.update_xaxes( - title_text="Frequency (GHz)", + title_text="Frequency [GHz]", row=1, col=col + 1, ) fig.update_yaxes( - title_text=f"Qubit {flux_qubit[1]}: Bias (V)", row=1, col=col + 1 + title_text=f"Qubit {flux_qubit[1]}: Bias [V]", row=1, col=col + 1 ) fig.update_layout(xaxis1=dict(range=[np.min(frequencies), np.max(frequencies)])) fig.update_traces(showscale=False) # disable colorbar fig.update_layout( showlegend=False, - uirevision="0", # ``uirevision`` allows zooming while live plotting ) figures.append(fig) @@ -444,14 +434,14 @@ def feature(x, order=3): return np.power(x, np.arange(order + 1).reshape(1, -1)) -def image_to_curve(x, y, z, msr_mask=0.5, alpha=1e-5, order=50): +def image_to_curve(x, y, z, signal_mask=0.5, alpha=1e-5, order=50): """ Extracts a feature characterized by min(z(x, y)). It considers all the data and applies Ridge regression on a polynomial ansatz in x. This allows obtaining a set of points describing the feature as y vs x. Args: x (ndarray) frequencies y (ndarray) bias - z (ndarray) msr + z (ndarray) signal Returns: y_pred (ndarray) frequencies @@ -474,7 +464,7 @@ def image_to_curve(x, y, z, msr_mask=0.5, alpha=1e-5, order=50): znorm = (z - zmin) / (zmax - zmin) # Mask out region - mask = znorm < msr_mask + mask = znorm < signal_mask z = np.argwhere(mask) weights = znorm[mask] / float(znorm.max()) # Column indices diff --git a/src/qibocal/protocols/characterization/qubit_spectroscopy.py b/src/qibocal/protocols/characterization/qubit_spectroscopy.py index a25a134d6..539eeee6f 100644 --- a/src/qibocal/protocols/characterization/qubit_spectroscopy.py +++ b/src/qibocal/protocols/characterization/qubit_spectroscopy.py @@ -37,7 +37,7 @@ class QubitSpectroscopyResults(Results): """Drive frequecy [GHz] for each qubit.""" amplitude: dict[QubitId, float] """Input drive amplitude. Same for all qubits.""" - fitted_parameters: dict[QubitId, dict[str, float]] + fitted_parameters: dict[QubitId, list[float]] """Raw fitting output.""" @@ -101,14 +101,13 @@ def _acquisition( # retrieve the results for every qubit for qubit, ro_pulse in ro_pulses.items(): - # average msr, phase, i and q over the number of shots defined in the runcard result = results[ro_pulse.serial] # store the results data.register_qubit( ResSpecType, (qubit), dict( - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + qd_pulses[qubit].frequency, ), diff --git a/src/qibocal/protocols/characterization/qubit_spectroscopy_ef.py b/src/qibocal/protocols/characterization/qubit_spectroscopy_ef.py index f45d3c101..30359e74f 100644 --- a/src/qibocal/protocols/characterization/qubit_spectroscopy_ef.py +++ b/src/qibocal/protocols/characterization/qubit_spectroscopy_ef.py @@ -17,7 +17,7 @@ _fit, ) from .resonator_spectroscopy import ResSpecType -from .utils import GHZ_TO_HZ, HZ_TO_GHZ, spectroscopy_plot, table_dict, table_html +from .utils import spectroscopy_plot, table_dict, table_html DEFAULT_ANHARMONICITY = 300e6 """Initial guess for anharmonicity.""" @@ -45,7 +45,7 @@ class QubitSpectroscopyEFData(QubitSpectroscopyData): def _fit_ef(data: QubitSpectroscopyEFData) -> QubitSpectroscopyEFResults: results = _fit(data) anharmoncities = { - qubit: data.drive_frequencies[qubit] * HZ_TO_GHZ - results.frequency[qubit] + qubit: data.drive_frequencies[qubit] - results.frequency[qubit] for qubit in data.qubits } params = asdict(results) @@ -137,14 +137,13 @@ def _acquisition( # retrieve the results for every qubit for qubit, ro_pulse in ro_pulses.items(): - # average msr, phase, i and q over the number of shots defined in the runcard result = results[ro_pulse.serial] # store the results data.register_qubit( ResSpecType, (qubit), dict( - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + qd_pulses[qubit].frequency, ), @@ -159,11 +158,11 @@ def _plot(data: QubitSpectroscopyEFData, qubit, fit: QubitSpectroscopyEFResults) report = table_html( table_dict( qubit, - ["Frequency 1->2", "Amplitude", "Anharmonicity"], + ["Frequency 1->2 [Hz]", "Amplitude [a.u.]", "Anharmonicity [Hz]"], [ - np.round(fit.frequency[qubit] * GHZ_TO_HZ, 0), + np.round(fit.frequency[qubit], 0), fit.amplitude[qubit], - np.round(fit.anharmonicity[qubit] * GHZ_TO_HZ, 0), + np.round(fit.anharmonicity[qubit], 0), ], ) ) diff --git a/src/qibocal/protocols/characterization/rabi/amplitude.py b/src/qibocal/protocols/characterization/rabi/amplitude.py index 15a7ebac6..7bcc8e228 100644 --- a/src/qibocal/protocols/characterization/rabi/amplitude.py +++ b/src/qibocal/protocols/characterization/rabi/amplitude.py @@ -30,7 +30,7 @@ class RabiAmplitudeParameters(Parameters): step_amp_factor: float """Step amplitude multiplicative factor.""" pulse_length: Optional[float] - """RX pulse duration (ns).""" + """RX pulse duration [ns].""" @dataclass @@ -150,10 +150,10 @@ def _fit(data: RabiAmplitudeData) -> RabiAmplitudeResults: index = local_maxima[0] if len(local_maxima) > 0 else None # 0.5 hardcoded guess for less than one oscillation f = x[index] / (x[1] - x[0]) if index is not None else 0.5 - pguess = [0.5, 0.5, 1 / f, np.pi / 2] + pguess = [0.5, 0.5, 1 / f, 0] try: popt, perr = curve_fit( - utils.rabi_amplitude_fit, + utils.rabi_amplitude_function, x, y, p0=pguess, @@ -165,7 +165,9 @@ def _fit(data: RabiAmplitudeData) -> RabiAmplitudeResults: sigma=qubit_data.error, ) perr = np.sqrt(np.diag(perr)) - pi_pulse_parameter = np.abs(popt[2] / 2) + pi_pulse_parameter = ( + popt[2] / 2 * utils.period_correction_factor(phase=popt[3]) + ) except: log.warning("rabi_fit: the fitting was not succesful") @@ -179,7 +181,7 @@ def _fit(data: RabiAmplitudeData) -> RabiAmplitudeResults: chi2[qubit] = ( chi2_reduced( y, - utils.rabi_amplitude_fit(x, *popt), + utils.rabi_amplitude_function(x, *popt), qubit_data.error, ), np.sqrt(2 / len(y)), diff --git a/src/qibocal/protocols/characterization/rabi/amplitude_msr.py b/src/qibocal/protocols/characterization/rabi/amplitude_signal.py similarity index 91% rename from src/qibocal/protocols/characterization/rabi/amplitude_msr.py rename to src/qibocal/protocols/characterization/rabi/amplitude_signal.py index ce0b1ca9c..5c896f1c0 100644 --- a/src/qibocal/protocols/characterization/rabi/amplitude_msr.py +++ b/src/qibocal/protocols/characterization/rabi/amplitude_signal.py @@ -32,7 +32,7 @@ class RabiAmplitudeVoltResults(RabiAmplitudeResults): RabiAmpVoltType = np.dtype( - [("amp", np.float64), ("msr", np.float64), ("phase", np.float64)] + [("amp", np.float64), ("signal", np.float64), ("phase", np.float64)] ) """Custom dtype for rabi amplitude.""" @@ -102,7 +102,7 @@ def _acquisition( (qubit), dict( amp=qd_pulses[qubit].amplitude * qd_pulse_amplitude_range, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, ), ) @@ -120,7 +120,7 @@ def _fit(data: RabiAmplitudeVoltData) -> RabiAmplitudeVoltResults: qubit_data = data[qubit] rabi_parameter = qubit_data.amp - voltages = qubit_data.msr + voltages = qubit_data.signal y_min = np.min(voltages) y_max = np.max(voltages) @@ -136,10 +136,10 @@ def _fit(data: RabiAmplitudeVoltData) -> RabiAmplitudeVoltResults: index = local_maxima[0] if len(local_maxima) > 0 else None # 0.5 hardcoded guess for less than one oscillation f = x[index] / (x[1] - x[0]) if index is not None else 0.5 - pguess = [0.5, 1, 1 / f, np.pi / 2] + pguess = [0.5, 1, 1 / f, 0] try: popt, _ = curve_fit( - utils.rabi_amplitude_fit, + utils.rabi_amplitude_function, x, y, p0=pguess, @@ -155,7 +155,11 @@ def _fit(data: RabiAmplitudeVoltData) -> RabiAmplitudeVoltResults: popt[2] * (x_max - x_min), popt[3] - 2 * np.pi * x_min / (x_max - x_min) / popt[2], ] - pi_pulse_parameter = np.abs((translated_popt[2]) / 2) + pi_pulse_parameter = ( + translated_popt[2] + / 2 + * utils.period_correction_factor(phase=translated_popt[3]) + ) except: log.warning("rabi_fit: the fitting was not succesful") @@ -179,5 +183,5 @@ def _update(results: RabiAmplitudeVoltResults, platform: Platform, qubit: QubitI update.drive_amplitude(results.amplitude[qubit], platform, qubit) -rabi_amplitude_msr = Routine(_acquisition, _fit, _plot, _update) +rabi_amplitude_signal = Routine(_acquisition, _fit, _plot, _update) """RabiAmplitude Routine object.""" diff --git a/src/qibocal/protocols/characterization/rabi/ef.py b/src/qibocal/protocols/characterization/rabi/ef.py index ac632be4a..2bb9b4807 100644 --- a/src/qibocal/protocols/characterization/rabi/ef.py +++ b/src/qibocal/protocols/characterization/rabi/ef.py @@ -10,21 +10,21 @@ from qibocal import update from qibocal.auto.operation import Qubits, Routine -from . import amplitude_msr, utils +from . import amplitude_signal, utils @dataclass -class RabiAmplitudeEFParameters(amplitude_msr.RabiAmplitudeVoltParameters): +class RabiAmplitudeEFParameters(amplitude_signal.RabiAmplitudeVoltParameters): """RabiAmplitudeEF runcard inputs.""" @dataclass -class RabiAmplitudeEFResults(amplitude_msr.RabiAmplitudeVoltResults): +class RabiAmplitudeEFResults(amplitude_signal.RabiAmplitudeVoltResults): """RabiAmplitudeEF outputs.""" @dataclass -class RabiAmplitudeEFData(amplitude_msr.RabiAmplitudeVoltData): +class RabiAmplitudeEFData(amplitude_signal.RabiAmplitudeVoltData): """RabiAmplitude data acquisition.""" @@ -92,11 +92,11 @@ def _acquisition( for qubit in qubits: result = results[ro_pulses[qubit].serial] data.register_qubit( - amplitude_msr.RabiAmpVoltType, + amplitude_signal.RabiAmpVoltType, (qubit), dict( amp=qd_pulses[qubit].amplitude * qd_pulse_amplitude_range, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, ), ) @@ -112,9 +112,9 @@ def _plot(data: RabiAmplitudeEFData, qubit, fit: RabiAmplitudeEFResults = None): def _update(results: RabiAmplitudeEFResults, platform: Platform, qubit: QubitId): - """Update RX2 amplitude_msr""" + """Update RX2 amplitude_signal""" update.drive_12_amplitude(results.amplitude[qubit], platform, qubit) -rabi_amplitude_ef = Routine(_acquisition, amplitude_msr._fit, _plot, _update) +rabi_amplitude_ef = Routine(_acquisition, amplitude_signal._fit, _plot, _update) """RabiAmplitudeEF Routine object.""" diff --git a/src/qibocal/protocols/characterization/rabi/length.py b/src/qibocal/protocols/characterization/rabi/length.py index 83bb332be..a0a8f0662 100644 --- a/src/qibocal/protocols/characterization/rabi/length.py +++ b/src/qibocal/protocols/characterization/rabi/length.py @@ -24,11 +24,11 @@ class RabiLengthParameters(Parameters): """RabiLength runcard inputs.""" pulse_duration_start: float - """Initial pi pulse duration (ns).""" + """Initial pi pulse duration [ns].""" pulse_duration_end: float - """Final pi pulse duration (ns).""" + """Final pi pulse duration [ns].""" pulse_duration_step: float - """Step pi pulse duration (ns).""" + """Step pi pulse duration [ns].""" pulse_amplitude: Optional[float] = None """Pi pulse amplitude. Same for all qubits.""" @@ -154,10 +154,10 @@ def _fit(data: RabiLengthData) -> RabiLengthResults: index = local_maxima[0] if len(local_maxima) > 0 else None # 0.5 hardcoded guess for less than one oscillation f = x[index] / (x[1] - x[0]) if index is not None else 0.5 - pguess = [0.5, 0.5, np.max(x) / f, np.pi / 2, 0] + pguess = [0.5, 0.5, np.max(x) / f, 0, 0] try: popt, perr = curve_fit( - utils.rabi_length_fit, + utils.rabi_length_function, x, y, p0=pguess, @@ -169,7 +169,9 @@ def _fit(data: RabiLengthData) -> RabiLengthResults: sigma=qubit_data.error, ) perr = np.sqrt(np.diag(perr)) - pi_pulse_parameter = np.abs(popt[2] / 2) + pi_pulse_parameter = ( + popt[2] / 2 * utils.period_correction_factor(phase=popt[3]) + ) except: log.warning("rabi_fit: the fitting was not succesful") pi_pulse_parameter = 0 @@ -180,7 +182,7 @@ def _fit(data: RabiLengthData) -> RabiLengthResults: chi2[qubit] = ( chi2_reduced( y, - utils.rabi_length_fit(x, *popt), + utils.rabi_length_function(x, *popt), qubit_data.error, ), np.sqrt(2 / len(y)), diff --git a/src/qibocal/protocols/characterization/rabi/length_sequences.py b/src/qibocal/protocols/characterization/rabi/length_sequences.py index b10399834..1e1bc0aed 100644 --- a/src/qibocal/protocols/characterization/rabi/length_sequences.py +++ b/src/qibocal/protocols/characterization/rabi/length_sequences.py @@ -5,7 +5,7 @@ from qibocal.auto.operation import Qubits, Routine -from .length_msr import ( +from .length_signal import ( RabiLengthVoltData, RabiLengthVoltParameters, RabiLenVoltType, @@ -76,7 +76,7 @@ def _acquisition( (qubit), dict( length=np.array([duration]), - msr=np.array([result.magnitude]), + signal=np.array([result.magnitude]), phase=np.array([result.phase]), ), ) diff --git a/src/qibocal/protocols/characterization/rabi/length_msr.py b/src/qibocal/protocols/characterization/rabi/length_signal.py similarity index 88% rename from src/qibocal/protocols/characterization/rabi/length_msr.py rename to src/qibocal/protocols/characterization/rabi/length_signal.py index 72b30c6ee..9e635cbbb 100644 --- a/src/qibocal/protocols/characterization/rabi/length_msr.py +++ b/src/qibocal/protocols/characterization/rabi/length_signal.py @@ -32,7 +32,7 @@ class RabiLengthVoltResults(RabiLengthResults): RabiLenVoltType = np.dtype( - [("length", np.float64), ("msr", np.float64), ("phase", np.float64)] + [("length", np.float64), ("signal", np.float64), ("phase", np.float64)] ) """Custom dtype for rabi amplitude.""" @@ -107,7 +107,7 @@ def _acquisition( (qubit), dict( length=qd_pulse_duration_range, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, ), ) @@ -124,14 +124,14 @@ def _fit(data: RabiLengthVoltData) -> RabiLengthVoltResults: for qubit in qubits: qubit_data = data[qubit] rabi_parameter = qubit_data.length - voltages = qubit_data.msr + voltages = qubit_data.signal y_min = np.min(voltages) y_max = np.max(voltages) x_min = np.min(rabi_parameter) x_max = np.max(rabi_parameter) x = (rabi_parameter - x_min) / (x_max - x_min) - y = (voltages - y_min) / (y_max - y_min) + y = (voltages - y_min) / (y_max - y_min) - 1 / 2 # Guessing period using fourier transform ft = np.fft.rfft(y) @@ -141,32 +141,36 @@ def _fit(data: RabiLengthVoltData) -> RabiLengthVoltResults: # 0.5 hardcoded guess for less than one oscillation f = x[index] / (x[1] - x[0]) if index is not None else 0.5 - pguess = [0.5, 0.5, 1 / f, np.pi / 2, 0] + pguess = [0, np.sign(y[0]) * 0.5, 1 / f, 0, 0] try: popt, _ = curve_fit( - utils.rabi_length_fit, + utils.rabi_length_function, x, y, p0=pguess, maxfev=100000, bounds=( - [0, 0, 0, -np.pi, 0], + [0, -1, 0, -np.pi, 0], [1, 1, np.inf, np.pi, np.inf], ), ) translated_popt = [ # change it according to the fit function - (y_max - y_min) * popt[0] + y_min, + (y_max - y_min) * (popt[0] + 1 / 2) + y_min, (y_max - y_min) * popt[1] * np.exp(x_min * popt[4] / (x_max - x_min)), popt[2] * (x_max - x_min), popt[3] - 2 * np.pi * x_min / popt[2] / (x_max - x_min), popt[4] / (x_max - x_min), ] - pi_pulse_parameter = np.abs(translated_popt[2] / 2) + pi_pulse_parameter = ( + translated_popt[2] + / 2 + * utils.period_correction_factor(phase=translated_popt[3]) + ) + except: log.warning("rabi_fit: the fitting was not succesful") pi_pulse_parameter = 0 translated_popt = [0, 0, 1, 0, 0] - durations[qubit] = pi_pulse_parameter fitted_parameters[qubit] = translated_popt @@ -182,5 +186,5 @@ def _plot(data: RabiLengthVoltData, fit: RabiLengthVoltResults, qubit): return utils.plot(data, qubit, fit) -rabi_length_msr = Routine(_acquisition, _fit, _plot, _update) +rabi_length_signal = Routine(_acquisition, _fit, _plot, _update) """RabiLength Routine object.""" diff --git a/src/qibocal/protocols/characterization/rabi/utils.py b/src/qibocal/protocols/characterization/rabi/utils.py index 0efda1405..ead560e27 100644 --- a/src/qibocal/protocols/characterization/rabi/utils.py +++ b/src/qibocal/protocols/characterization/rabi/utils.py @@ -2,39 +2,33 @@ import plotly.graph_objects as go from plotly.subplots import make_subplots -from ..utils import COLORBAND, COLORBAND_LINE, V_TO_UV, table_dict, table_html +from ..utils import COLORBAND, COLORBAND_LINE, table_dict, table_html -def rabi_amplitude_fit(x, p0, p1, p2, p3): - # A fit to Superconducting Qubit Rabi Oscillation - # Offset : p[0] - # Oscillation amplitude : p[1] - # Period T : 1/p[2] - # Phase : p[3] - # Arbitrary parameter T_2 : 1/p[4] - return p0 + p1 * np.sin(2 * np.pi * x / p2 + p3) +def rabi_amplitude_function(x, offset, amplitude, period, phase): + """ + Fit function of Rabi amplitude signal experiment. + Args: + x: Input data. + """ + return offset + amplitude * np.cos(2 * np.pi * x / period + phase) -def rabi_length_fit(x, p0, p1, p2, p3, p4): - # A fit to Superconducting Qubit Rabi Oscillation - # Offset : p[0] - # Oscillation amplitude : p[1] - # Period T : 1/p[2] - # Phase : p[3] - # Arbitrary parameter T_2 : 1/p[4] - return p0 + p1 * np.sin(2 * np.pi * x / p2 + p3) * np.exp(-x * p4) +def rabi_length_function(x, offset, amplitude, period, phase, t2_inv): + """ + Fit function of Rabi length signal experiment. -def plot(data, qubit, fit): - if "RabiAmplitude" in data.__class__.__name__: - quantity = "amp" - title = "Amplitude (dimensionless)" - fitting = rabi_amplitude_fit - elif data.__class__.__name__ == "RabiLengthVoltData": - quantity = "length" - title = "Time (ns)" - fitting = rabi_length_fit + Args: + x: Input data. + """ + return offset + amplitude * np.cos(2 * np.pi * x / period + phase) * np.exp( + -x * t2_inv + ) + +def plot(data, qubit, fit): + quantity, title, fitting = extract_rabi(data) figures = [] fitting_report = "" @@ -44,8 +38,8 @@ def plot(data, qubit, fit): horizontal_spacing=0.1, vertical_spacing=0.1, subplot_titles=( - "MSR (uV)", - "phase (rad)", + "Signal [a.u.]", + "phase [rad]", ), ) @@ -55,11 +49,11 @@ def plot(data, qubit, fit): fig.add_trace( go.Scatter( x=rabi_parameters, - y=qubit_data.msr * V_TO_UV, + y=qubit_data.signal, opacity=1, - name="Voltage", + name="Signal", showlegend=True, - legendgroup="Voltage", + legendgroup="Signal", ), row=1, col=1, @@ -87,7 +81,7 @@ def plot(data, qubit, fit): fig.add_trace( go.Scatter( x=rabi_parameter_range, - y=fitting(rabi_parameter_range, *params) * V_TO_UV, + y=fitting(rabi_parameter_range, *params), name="Fit", line=go.scatter.Line(dash="dot"), marker_color="rgb(255, 130, 67)", @@ -99,18 +93,17 @@ def plot(data, qubit, fit): fitting_report = table_html( table_dict( qubit, - ["Pi pulse amplitude", "Pi pulse length"], + ["Pi pulse amplitude [a.u.]", "Pi pulse length [ns]"], [np.round(fit.amplitude[qubit], 3), np.round(fit.length[qubit], 3)], ) ) fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis_title=title, - yaxis_title="MSR (uV)", + yaxis_title="Signal [a.u.]", xaxis2_title=title, - yaxis2_title="Phase (rad)", + yaxis2_title="Phase [rad]", ) figures.append(fig) @@ -119,15 +112,7 @@ def plot(data, qubit, fit): def plot_probabilities(data, qubit, fit): - if data.__class__.__name__ == "RabiAmplitudeData": - quantity = "amp" - title = "Amplitude (dimensionless)" - fitting = rabi_amplitude_fit - elif data.__class__.__name__ == "RabiLengthData": - quantity = "length" - title = "Time (ns)" - fitting = rabi_length_fit - + quantity, title, fitting = extract_rabi(data) figures = [] fitting_report = "" @@ -179,7 +164,7 @@ def plot_probabilities(data, qubit, fit): fitting_report = table_html( table_dict( qubit, - ["Pi pulse amplitude", "Pi pulse length", "chi2 reduced"], + ["Pi pulse amplitude [a.u.]", "Pi pulse length [ns]", "chi2 reduced"], [fit.amplitude[qubit], fit.length[qubit], fit.chi2[qubit]], display_error=True, ) @@ -187,7 +172,6 @@ def plot_probabilities(data, qubit, fit): fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis_title=title, yaxis_title="Excited state probability", ) @@ -195,3 +179,38 @@ def plot_probabilities(data, qubit, fit): figures.append(fig) return figures, fitting_report + + +def extract_rabi(data): + """ + Extract Rabi fit info. + """ + if "RabiAmplitude" in data.__class__.__name__: + return "amp", "Amplitude [dimensionless]", rabi_amplitude_function + if "RabiLength" in data.__class__.__name__: + return "length", "Time [ns]", rabi_length_function + raise RuntimeError("Data has to be a data structure of the Rabi routines.") + + +def period_correction_factor(phase: float): + r"""Correct period by taking phase into account. + + https://github.com/qiboteam/qibocal/issues/656 + + We want to find the first maximum or minimum which will + correspond to an exchange of population between 0 and 1. + To find it we need to solve the following equation + :math:`\cos(2 \pi x / T + \phi) = \pm 1` which will give us + the following solution + + .. math:: + + x = ( k - \phi / \pi) T / 2 + + + for integer :math:`k`, which is chosen such that we get the smallest + multiplicative correction compared to :math:`T/2`. + + """ + + return 1 - np.modf(phase / np.pi)[0] diff --git a/src/qibocal/protocols/characterization/ramsey.py b/src/qibocal/protocols/characterization/ramsey.py index f0980a878..55a726ccd 100644 --- a/src/qibocal/protocols/characterization/ramsey.py +++ b/src/qibocal/protocols/characterization/ramsey.py @@ -15,7 +15,7 @@ from qibocal import update from qibocal.auto.operation import Data, Parameters, Qubits, Results, Routine -from .utils import GHZ_TO_HZ, HZ_TO_GHZ, chi2_reduced, table_dict, table_html +from .utils import GHZ_TO_HZ, chi2_reduced, table_dict, table_html POPT_EXCEPTION = [0, 0, 0, 0, 0] """Fit parameters output to handle exceptions""" @@ -54,6 +54,7 @@ class RamseyResults(Results): fitted_parameters: dict[QubitId, list[float]] """Raw fitting output.""" chi2: dict[QubitId, tuple[float, Optional[float]]] + """Chi squared estimate mean value and error. """ RamseyType = np.dtype( @@ -275,9 +276,9 @@ def _plot(data: RamseyData, qubit, fit: RamseyResults = None): x=waits, y=probs, opacity=1, - name="Voltage", + name="Probability of State 0", showlegend=True, - legendgroup="Voltage", + legendgroup="Probability of State 0", mode="lines", ), go.Scatter( @@ -329,8 +330,7 @@ def _plot(data: RamseyData, qubit, fit: RamseyResults = None): fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="Time (ns)", + xaxis_title="Time [ns]", yaxis_title="Ground state probability", ) @@ -340,7 +340,7 @@ def _plot(data: RamseyData, qubit, fit: RamseyResults = None): def _update(results: RamseyResults, platform: Platform, qubit: QubitId): - update.drive_frequency(results.frequency[qubit][0] * HZ_TO_GHZ, platform, qubit) + update.drive_frequency(results.frequency[qubit][0], platform, qubit) ramsey = Routine(_acquisition, _fit, _plot, _update) diff --git a/src/qibocal/protocols/characterization/ramsey_sequences.py b/src/qibocal/protocols/characterization/ramsey_sequences.py index 843e34f55..547b97597 100644 --- a/src/qibocal/protocols/characterization/ramsey_sequences.py +++ b/src/qibocal/protocols/characterization/ramsey_sequences.py @@ -43,9 +43,6 @@ def _acquisition( params.delay_between_pulses_step, ) - # create a DataUnits object to store the results, - # DataUnits stores by default MSR, phase, i, q - # additionally include wait time and t_max data = RamseyData( n_osc=params.n_osc, t_max=params.delay_between_pulses_end, diff --git a/src/qibocal/protocols/characterization/ramsey_msr.py b/src/qibocal/protocols/characterization/ramsey_signal.py similarity index 85% rename from src/qibocal/protocols/characterization/ramsey_msr.py rename to src/qibocal/protocols/characterization/ramsey_signal.py index 10e36d183..6ee4af47a 100644 --- a/src/qibocal/protocols/characterization/ramsey_msr.py +++ b/src/qibocal/protocols/characterization/ramsey_signal.py @@ -20,16 +20,16 @@ fitting, ramsey_fit, ) -from .utils import GHZ_TO_HZ, V_TO_UV, table_dict, table_html +from .utils import GHZ_TO_HZ, table_dict, table_html @dataclass -class RamseyMSRParameters(RamseyParameters): +class RamseySignalParameters(RamseyParameters): """Ramsey runcard inputs.""" @dataclass -class RamseyMSRResults(Results): +class RamseySignalResults(Results): """Ramsey outputs.""" frequency: dict[QubitId, tuple[float, Optional[float]]] @@ -42,21 +42,21 @@ class RamseyMSRResults(Results): """Raw fitting output.""" -RamseyMSRType = np.dtype([("wait", np.float64), ("msr", np.float64)]) +RamseySignalType = np.dtype([("wait", np.float64), ("signal", np.float64)]) """Custom dtype for coherence routines.""" @dataclass -class RamseyMSRData(RamseyData): +class RamseySignalData(RamseyData): """Ramsey acquisition outputs.""" - def register_qubit(self, qubit, wait, msr): + def register_qubit(self, qubit, wait, signal): """Store output for single qubit.""" # to be able to handle the non-sweeper case - shape = (1,) if np.isscalar(msr) else msr.shape - ar = np.empty(shape, dtype=RamseyMSRType) + shape = (1,) if np.isscalar(signal) else signal.shape + ar = np.empty(shape, dtype=RamseySignalType) ar["wait"] = wait - ar["msr"] = msr + ar["signal"] = signal if qubit in self.data: self.data[qubit] = np.rec.array(np.concatenate((self.data[qubit], ar))) else: @@ -72,10 +72,10 @@ def waits(self): def _acquisition( - params: RamseyMSRParameters, + params: RamseySignalParameters, platform: Platform, qubits: Qubits, -) -> RamseyMSRData: +) -> RamseySignalData: """Data acquisition for Ramsey Experiment (detuned).""" # create a sequence of pulses for the experiment # RX90 - t - RX90 - MZ @@ -106,7 +106,7 @@ def _acquisition( params.delay_between_pulses_step, ) - data = RamseyMSRData( + data = RamseySignalData( n_osc=params.n_osc, t_max=params.delay_between_pulses_end, detuning_sign=+1, @@ -138,7 +138,7 @@ def _acquisition( data.register_qubit( qubit, wait=waits, - msr=result.magnitude, + signal=result.magnitude, ) else: @@ -169,12 +169,12 @@ def _acquisition( data.register_qubit( qubit, wait=wait, - msr=result.magnitude, + signal=result.magnitude, ) return data -def _fit(data: RamseyMSRData) -> RamseyMSRResults: +def _fit(data: RamseySignalData) -> RamseySignalResults: r""" Fitting routine for Ramsey experiment. The used model is .. math:: @@ -189,9 +189,9 @@ def _fit(data: RamseyMSRData) -> RamseyMSRResults: for qubit in qubits: qubit_data = data[qubit] qubit_freq = data.qubit_freqs[qubit] - msr = qubit_data["msr"] + signal = qubit_data["signal"] try: - popt, perr = fitting(waits, msr) + popt, perr = fitting(waits, signal) except: popt = POPT_EXCEPTION perr = PERR_EXCEPTION @@ -213,10 +213,10 @@ def _fit(data: RamseyMSRData) -> RamseyMSRResults: popt[2] * GHZ_TO_HZ / (2 * np.pi * data.t_max), ) - return RamseyMSRResults(freq_measure, t2_measure, delta_phys_measure, popts) + return RamseySignalResults(freq_measure, t2_measure, delta_phys_measure, popts) -def _plot(data: RamseyMSRData, qubit, fit: RamseyMSRResults = None): +def _plot(data: RamseySignalData, qubit, fit: RamseySignalResults = None): """Plotting function for Ramsey Experiment.""" figures = [] @@ -225,16 +225,16 @@ def _plot(data: RamseyMSRData, qubit, fit: RamseyMSRResults = None): qubit_data = data.data[qubit] waits = data.waits - msr = qubit_data["msr"] + signal = qubit_data["signal"] fig = go.Figure( [ go.Scatter( x=waits, - y=msr * V_TO_UV, + y=signal, opacity=1, - name="Voltage", + name="Signal", showlegend=True, - legendgroup="Voltage", + legendgroup="Signal", mode="lines", ), ] @@ -251,8 +251,7 @@ def _plot(data: RamseyMSRData, qubit, fit: RamseyMSRResults = None): float(fit.fitted_parameters[qubit][2]), float(fit.fitted_parameters[qubit][3]), float(fit.fitted_parameters[qubit][4]), - ) - * V_TO_UV, + ), name="Fit", line=go.scatter.Line(dash="dot"), ) @@ -275,9 +274,8 @@ def _plot(data: RamseyMSRData, qubit, fit: RamseyMSRResults = None): fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="Time (ns)", - yaxis_title="MSR [uV]", + xaxis_title="Time [ns]", + yaxis_title="Signal [a.u.]", ) figures.append(fig) @@ -285,5 +283,5 @@ def _plot(data: RamseyMSRData, qubit, fit: RamseyMSRResults = None): return figures, fitting_report -ramsey_msr = Routine(_acquisition, _fit, _plot, _update) +ramsey_signal = Routine(_acquisition, _fit, _plot, _update) """Ramsey Routine object.""" diff --git a/src/qibocal/protocols/characterization/randomized_benchmarking/standard_rb.py b/src/qibocal/protocols/characterization/randomized_benchmarking/standard_rb.py index a1b1929f1..fdcc660e7 100644 --- a/src/qibocal/protocols/characterization/randomized_benchmarking/standard_rb.py +++ b/src/qibocal/protocols/characterization/randomized_benchmarking/standard_rb.py @@ -446,7 +446,6 @@ def _plot(data: RBData, fit: StandardRBResult, qubit) -> tuple[list[go.Figure], fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis_title="Circuit depth", yaxis_title="Survival Probability", ) diff --git a/src/qibocal/protocols/characterization/readout_characterization.py b/src/qibocal/protocols/characterization/readout_characterization.py index c478323b7..5f63300a0 100644 --- a/src/qibocal/protocols/characterization/readout_characterization.py +++ b/src/qibocal/protocols/characterization/readout_characterization.py @@ -3,14 +3,20 @@ import numpy as np import numpy.typing as npt import plotly.graph_objects as go -from qibolab import ExecutionParameters +from qibolab import AcquisitionType, ExecutionParameters from qibolab.platform import Platform from qibolab.pulses import PulseSequence from qibolab.qubits import QubitId from qibocal import update from qibocal.auto.operation import Data, Parameters, Qubits, Results, Routine -from qibocal.protocols.characterization.utils import table_dict, table_html +from qibocal.protocols.characterization.utils import ( + effective_qubit_temperature, + format_error_single_cell, + round_report, + table_dict, + table_html, +) @dataclass @@ -28,13 +34,16 @@ class ReadoutCharacterizationResults(Results): """Assignment fidelity.""" qnd: dict[QubitId, float] "QND-ness of the measurement" + effective_temperature: dict[QubitId, tuple[float, float]] + """Effective qubit temperature.""" Lambda_M: dict[QubitId, float] "Mapping between a given initial state to an outcome adter the measurement" ReadoutCharacterizationType = np.dtype( [ - ("probability", np.float64), + ("i", np.float64), + ("q", np.float64), ] ) """Custom dtype for ReadoutCharacterization.""" @@ -44,10 +53,14 @@ class ReadoutCharacterizationResults(Results): class ReadoutCharacterizationData(Data): """ReadoutCharacterization acquisition outputs.""" + qubit_frequencies: dict[QubitId, float] = field(default_factory=dict) + """Qubit frequencies.""" data: dict[tuple, npt.NDArray[ReadoutCharacterizationType]] = field( default_factory=dict ) """Raw data acquired.""" + samples: dict[tuple, npt.NDArray] = field(default_factory=dict) + """Raw data acquired.""" def _acquisition( @@ -55,7 +68,11 @@ def _acquisition( ) -> ReadoutCharacterizationData: """Data acquisition for resonator spectroscopy.""" - data = ReadoutCharacterizationData() + data = ReadoutCharacterizationData( + qubit_frequencies={ + qubit: platform.qubits[qubit].drive_frequency for qubit in qubits + } + ) # FIXME: ADD 1st measurament and post_selection for accurate state preparation ? @@ -80,6 +97,14 @@ def _acquisition( # execute the pulse sequence results = platform.execute_pulse_sequence( + sequence, + ExecutionParameters( + nshots=params.nshots, + relaxation_time=params.relaxation_time, + acquisition_type=AcquisitionType.INTEGRATION, + ), + ) + results_samples = platform.execute_pulse_sequence( sequence, ExecutionParameters( nshots=params.nshots, @@ -89,16 +114,15 @@ def _acquisition( # Save the data for qubit in qubits: - i = 0 - for ro_pulse in ro_pulses[qubit]: + for i, ro_pulse in enumerate(ro_pulses[qubit]): result = results[ro_pulse.serial] - qubit = ro_pulse.qubit data.register_qubit( ReadoutCharacterizationType, (qubit, state, i), - dict(probability=result.samples), + dict(i=result.voltage_i, q=result.voltage_q), ) - i += 1 + result_samples = results_samples[ro_pulse.serial] + data.samples[qubit, state, i] = result_samples.samples.tolist() return data @@ -109,28 +133,29 @@ def _fit(data: ReadoutCharacterizationData) -> ReadoutCharacterizationResults: qubits = data.qubits assignment_fidelity = {} fidelity = {} + effective_temperature = {} qnd = {} Lambda_M = {} for qubit in qubits: # 1st measurement (m=1) - m1_state_1 = data[qubit, 1, 0].probability + m1_state_1 = data.samples[qubit, 1, 0] nshots = len(m1_state_1) # state 1 state1_count_1_m1 = np.count_nonzero(m1_state_1) state0_count_1_m1 = nshots - state1_count_1_m1 - m1_state_0 = data[qubit, 0, 0].probability + m1_state_0 = data.samples[qubit, 0, 0] # state 0 state1_count_0_m1 = np.count_nonzero(m1_state_0) state0_count_0_m1 = nshots - state1_count_0_m1 # 2nd measurement (m=2) - m2_state_1 = data[qubit, 1, 1].probability + m2_state_1 = data.samples[qubit, 1, 1] # state 1 state1_count_1_m2 = np.count_nonzero(m2_state_1) state0_count_1_m2 = nshots - state1_count_1_m2 - m2_state_0 = data[qubit, 0, 1].probability + m2_state_0 = data.samples[qubit, 0, 1] # state 0 state1_count_0_m2 = np.count_nonzero(m2_state_0) state0_count_0_m2 = nshots - state1_count_0_m2 @@ -157,8 +182,16 @@ def _fit(data: ReadoutCharacterizationData) -> ReadoutCharacterizationResults: P_1o_0i = P_1o_m0_0i + P_1o_m1_0i qnd[qubit] = 1 - (P_0o_1i + P_1o_0i) / 2 + effective_temperature[qubit] = effective_qubit_temperature( + prob_1=state0_count_1_m1 / nshots, + prob_0=state0_count_0_m1 / nshots, + qubit_frequency=data.qubit_frequencies[qubit], + nshots=nshots, + ) - return ReadoutCharacterizationResults(fidelity, assignment_fidelity, qnd, Lambda_M) + return ReadoutCharacterizationResults( + fidelity, assignment_fidelity, qnd, effective_temperature, Lambda_M + ) def _plot( @@ -171,38 +204,50 @@ def _plot( figures = [] fitting_report = "" fig = go.Figure() + for state in range(2): + for measure in range(2): + shots = data.data[qubit, state, measure] + + fig.add_trace( + go.Scatter( + x=shots.i, + y=shots.q, + name=f"state {state} measure {measure}", + mode="markers", + showlegend=True, + opacity=0.7, + marker=dict(size=3), + ) + ) + figures.append(fig) if fit is not None: - fig.add_trace( + fig2 = go.Figure() + + fig2.add_trace( go.Heatmap( z=fit.Lambda_M[qubit], - ), + ) ) fitting_report = table_html( table_dict( qubit, - ["Assignment Fidelity", "Fidelity", "QND"], + [ + "Assignment Fidelity", + "Fidelity", + "QND", + "Effective Qubit Temperature [K]", + ], [ np.round(fit.assignment_fidelity[qubit], 6), np.round(fit.fidelity[qubit], 6), np.round(fit.qnd[qubit], 6), + format_error_single_cell( + round_report([fit.effective_temperature[qubit]]) + ), ], ) ) - - fig.update_xaxes(title_text="Shot") - fig.update_xaxes(tickvals=[0, 1]) - fig.update_yaxes(tickvals=[0, 1]) - - # last part - fig.update_layout( - showlegend=False, - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="State prepared", - yaxis_title="State read", - ) - - figures.append(fig) - + figures.append(fig2) return figures, fitting_report diff --git a/src/qibocal/protocols/characterization/readout_mitigation_matrix.py b/src/qibocal/protocols/characterization/readout_mitigation_matrix.py index 7f4f4b524..e2be1abb7 100644 --- a/src/qibocal/protocols/characterization/readout_mitigation_matrix.py +++ b/src/qibocal/protocols/characterization/readout_mitigation_matrix.py @@ -3,8 +3,7 @@ import numpy as np import numpy.typing as npt -import plotly.figure_factory as ff -import plotly.graph_objects as go +import plotly.express as px from qibo import gates from qibo.models import Circuit from qibolab import ExecutionParameters @@ -27,7 +26,7 @@ class ReadoutMitigationMatrixParameters(Parameters): nshots: Optional[int] = None """Number of shots.""" relaxation_time: Optional[int] = None - """Relaxation time (ns).""" + """Relaxation time [ns].""" @dataclass @@ -172,30 +171,28 @@ def _plot( ): """Plotting function for readout mitigation matrix.""" fitting_report = "" - fig = go.Figure() - + figs = [] if fit is not None: computational_basis = [ format(i, f"0{len(qubit)}b") for i in range(2 ** len(qubit)) ] - - x = computational_basis - y = computational_basis[::-1] - - [X, Y] = np.meshgrid(x, y) - - Z = fit.measurement_matrix[tuple(qubit)] - - fig = ff.create_annotated_heatmap(Z, showscale=True) - fig.update_layout( - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="State prepared", - yaxis_title="State measured", + z = fit.measurement_matrix[tuple(qubit)] + + fig = px.imshow( + z, + x=computational_basis, + y=computational_basis[::-1], + text_auto=True, + labels={ + "x": "Prepeared States", + "y": "Measured States", + "color": "Probabilities", + }, width=700, height=700, ) - - return [fig], None + figs.append(fig) + return figs, fitting_report readout_mitigation_matrix = Routine(_acquisition, _fit, _plot) diff --git a/src/qibocal/protocols/characterization/readout_optimization/resonator_amplitude.py b/src/qibocal/protocols/characterization/readout_optimization/resonator_amplitude.py index 9707236d7..1142256f7 100644 --- a/src/qibocal/protocols/characterization/readout_optimization/resonator_amplitude.py +++ b/src/qibocal/protocols/characterization/readout_optimization/resonator_amplitude.py @@ -185,15 +185,14 @@ def _plot(data: ResonatorAmplitudeData, fit: ResonatorAmplitudeResults, qubit): fitting_report = table_html( table_dict( qubit, - "Best Readout Amplitude", + "Best Readout Amplitude [a.u.]", np.round(fit.best_amp[qubit], 4), ) ) fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="Readout Amplitude", + xaxis_title="Readout Amplitude [a.u.]", yaxis_title="Probability Error", ) diff --git a/src/qibocal/protocols/characterization/readout_optimization/resonator_frequency.py b/src/qibocal/protocols/characterization/readout_optimization/resonator_frequency.py index f1c4dbc11..5ff474db4 100644 --- a/src/qibocal/protocols/characterization/readout_optimization/resonator_frequency.py +++ b/src/qibocal/protocols/characterization/readout_optimization/resonator_frequency.py @@ -21,9 +21,9 @@ class ResonatorFrequencyParameters(Parameters): """Optimization RO frequency inputs.""" freq_width: int - """Width [Hz] for frequency sweep relative to the readout frequency (Hz).""" + """Width [Hz] for frequency sweep relative to the readout frequency [Hz].""" freq_step: int - """Frequency step for sweep (Hz).""" + """Frequency step for sweep [Hz].""" @dataclass @@ -208,15 +208,14 @@ def _plot(data: ResonatorFrequencyData, fit: ResonatorFrequencyResults, qubit): fitting_report = table_html( table_dict( qubit, - "Best Resonator Frequency [GHz]", - np.round(fit.best_freq[qubit] * HZ_TO_GHZ, 4), + "Best Resonator Frequency [Hz]", + np.round(fit.best_freq[qubit], 4), ) ) fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="Resonator Frequencies (GHz)", + xaxis_title="Resonator Frequencies [GHz]", yaxis_title="Assignment Fidelities", ) diff --git a/src/qibocal/protocols/characterization/readout_optimization/twpa_calibration/power.py b/src/qibocal/protocols/characterization/readout_optimization/twpa_calibration/power.py index caf6d53b3..5540fae40 100644 --- a/src/qibocal/protocols/characterization/readout_optimization/twpa_calibration/power.py +++ b/src/qibocal/protocols/characterization/readout_optimization/twpa_calibration/power.py @@ -155,7 +155,7 @@ def _plot(data: TwpaPowerData, fit: TwpaPowerResults, qubit): fitting_report = table_html( table_dict( qubit, - ["Best assignment fidelity", "TWPA Power"], + ["Best assignment fidelity", "TWPA Power [dBm]"], [ np.round(fit.best_fidelities[qubit], 3), np.round(fit.best_powers[qubit], 3), @@ -167,7 +167,6 @@ def _plot(data: TwpaPowerData, fit: TwpaPowerResults, qubit): fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis_title="TWPA Power [dB]", yaxis_title="Assignment Fidelity", ) diff --git a/src/qibocal/protocols/characterization/resonator_punchout.py b/src/qibocal/protocols/characterization/resonator_punchout.py index 773e7fe3e..a97c26091 100644 --- a/src/qibocal/protocols/characterization/resonator_punchout.py +++ b/src/qibocal/protocols/characterization/resonator_punchout.py @@ -14,15 +14,7 @@ from qibocal import update from qibocal.auto.operation import Data, Parameters, Qubits, Results, Routine -from .utils import ( - GHZ_TO_HZ, - HZ_TO_GHZ, - V_TO_UV, - fit_punchout, - norm, - table_dict, - table_html, -) +from .utils import HZ_TO_GHZ, fit_punchout, norm, table_dict, table_html @dataclass @@ -30,9 +22,9 @@ class ResonatorPunchoutParameters(Parameters): """ "ResonatorPunchout runcard inputs.""" freq_width: int - """Width for frequency sweep relative to the readout frequency (Hz).""" + """Width for frequency sweep relative to the readout frequency [Hz].""" freq_step: int - """Frequency step for sweep (Hz).""" + """Frequency step for sweep [Hz].""" min_amp_factor: float """Minimum amplitude multiplicative factor.""" max_amp_factor: float @@ -59,7 +51,7 @@ class ResonatorPunchoutResults(Results): [ ("freq", np.float64), ("amp", np.float64), - ("msr", np.float64), + ("signal", np.float64), ("phase", np.float64), ] ) @@ -77,14 +69,14 @@ class ResonatorPunchoutData(Data): data: dict[QubitId, npt.NDArray[ResPunchoutType]] = field(default_factory=dict) """Raw data acquired.""" - def register_qubit(self, qubit, freq, amp, msr, phase): + def register_qubit(self, qubit, freq, amp, signal, phase): """Store output for single qubit.""" size = len(freq) * len(amp) frequency, amplitude = np.meshgrid(freq, amp) ar = np.empty(size, dtype=ResPunchoutType) ar["freq"] = frequency.ravel() ar["amp"] = amplitude.ravel() - ar["msr"] = msr.ravel() + ar["signal"] = signal.ravel() ar["phase"] = phase.ravel() self.data[qubit] = np.rec.array(ar) @@ -134,9 +126,6 @@ def _acquisition( type=SweeperType.FACTOR, ) - # create a DataUnits object to store the results, - # DataUnits stores by default MSR, phase, i, q - # additionally include resonator frequency and attenuation data = ResonatorPunchoutData( amplitudes=amplitudes, resonator_type=platform.resonator_type, @@ -156,11 +145,11 @@ def _acquisition( # retrieve the results for every qubit for qubit, ro_pulse in ro_pulses.items(): - # average msr, phase, i and q over the number of shots defined in the runcard + # average signal, phase, i and q over the number of shots defined in the runcard result = results[ro_pulse.serial] data.register_qubit( qubit, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + ro_pulse.frequency, amp=amplitude_range * amplitudes[qubit], @@ -185,8 +174,8 @@ def _plot(data: ResonatorPunchoutData, qubit, fit: ResonatorPunchoutResults = No horizontal_spacing=0.1, vertical_spacing=0.2, subplot_titles=( - "Normalised MSR", - "phase (rad)", + "Normalised Signal [a.u.]", + "phase [rad]", ), ) qubit_data = data[qubit] @@ -195,24 +184,21 @@ def _plot(data: ResonatorPunchoutData, qubit, fit: ResonatorPunchoutResults = No n_amps = len(np.unique(qubit_data.amp)) n_freq = len(np.unique(qubit_data.freq)) for i in range(n_amps): - qubit_data.msr[i * n_freq : (i + 1) * n_freq] = norm( - qubit_data.msr[i * n_freq : (i + 1) * n_freq] + qubit_data.signal[i * n_freq : (i + 1) * n_freq] = norm( + qubit_data.signal[i * n_freq : (i + 1) * n_freq] ) fig.add_trace( go.Heatmap( x=frequencies, y=amplitudes, - z=qubit_data.msr * V_TO_UV, + z=qubit_data.signal, colorbar_x=0.46, ), row=1, col=1, ) - fig.update_xaxes(title_text="Frequency (GHz)", row=1, col=1) - fig.update_xaxes(title_text="Frequency (GHz)", row=1, col=2) - fig.update_yaxes(title_text="Amplitude", row=1, col=1) - fig.update_yaxes(title_text="Amplitude", row=1, col=2) + fig.add_trace( go.Heatmap( x=frequencies, @@ -228,7 +214,7 @@ def _plot(data: ResonatorPunchoutData, qubit, fit: ResonatorPunchoutResults = No fig.add_trace( go.Scatter( x=[ - fit.readout_frequency[qubit], + fit.readout_frequency[qubit] * HZ_TO_GHZ, ], y=[ fit.readout_amplitude[qubit], @@ -239,29 +225,35 @@ def _plot(data: ResonatorPunchoutData, qubit, fit: ResonatorPunchoutResults = No color="gray", symbol="circle", ), + name="Estimated readout point", + showlegend=True, ) ) fitting_report = table_html( table_dict( qubit, [ - "Low Power Resonator Frequency", - "Low Power readout amplitude", - "High Power Resonator Frequency", + "Low Power Resonator Frequency [Hz]", + "Low Power readout amplitude [a.u.]", + "High Power Resonator Frequency [Hz]", ], [ - np.round(fit.readout_frequency[qubit] * GHZ_TO_HZ), + np.round(fit.readout_frequency[qubit]), np.round(fit.readout_amplitude[qubit], 3), - np.round(fit.bare_frequency[qubit] * GHZ_TO_HZ), + np.round(fit.bare_frequency[qubit]), ], ) ) fig.update_layout( - showlegend=False, - uirevision="0", # ``uirevision`` allows zooming while live plotting + showlegend=True, + legend=dict(orientation="h"), ) + fig.update_xaxes(title_text="Frequency [GHz]", row=1, col=1) + fig.update_xaxes(title_text="Frequency [GHz]", row=1, col=2) + fig.update_yaxes(title_text="Amplitude [a.u.]", row=1, col=1) + figures.append(fig) return figures, fitting_report diff --git a/src/qibocal/protocols/characterization/resonator_punchout_attenuation.py b/src/qibocal/protocols/characterization/resonator_punchout_attenuation.py index 6202c75ba..ab4ebfe52 100644 --- a/src/qibocal/protocols/characterization/resonator_punchout_attenuation.py +++ b/src/qibocal/protocols/characterization/resonator_punchout_attenuation.py @@ -14,15 +14,7 @@ from qibocal import update from qibocal.auto.operation import Data, Parameters, Qubits, Results, Routine -from .utils import ( - GHZ_TO_HZ, - HZ_TO_GHZ, - V_TO_UV, - fit_punchout, - norm, - table_dict, - table_html, -) +from .utils import HZ_TO_GHZ, fit_punchout, norm, table_dict, table_html @dataclass @@ -30,15 +22,15 @@ class ResonatorPunchoutAttenuationParameters(Parameters): """ResonatorPunchoutAttenuation runcard inputs.""" freq_width: int - """Width for frequency sweep relative to the readout frequency (Hz).""" + """Width for frequency sweep relative to the readout frequency [Hz].""" freq_step: int - """Frequency step for sweep (Hz).""" + """Frequency step for sweep [Hz].""" min_att: int - """Attenuation minimum value (dB).""" + """Attenuation minimum value [dB].""" max_att: int - """Attenuation maximum value (dB).""" + """Attenuation maximum value [dB].""" step_att: int - """Attenuation step (dB).""" + """Attenuation step [dB].""" @dataclass @@ -57,7 +49,7 @@ class ResonatorPunchoutAttenuationResults(Results): [ ("freq", np.float64), ("att", np.float64), - ("msr", np.float64), + ("signal", np.float64), ("phase", np.float64), ] ) @@ -73,14 +65,14 @@ class ResonatorPunchoutAttenuationData(Data): data: dict[QubitId, npt.NDArray[ResPunchoutAttType]] = field(default_factory=dict) """Raw data acquired.""" - def register_qubit(self, qubit, freq, att, msr, phase): + def register_qubit(self, qubit, freq, att, signal, phase): """Store output for single qubit.""" size = len(freq) * len(att) ar = np.empty(size, dtype=ResPunchoutAttType) frequency, attenuation = np.meshgrid(freq, att) ar["freq"] = frequency.ravel() ar["att"] = attenuation.ravel() - ar["msr"] = msr.ravel() + ar["signal"] = signal.ravel() ar["phase"] = phase.ravel() self.data[qubit] = np.rec.array(ar) @@ -139,11 +131,10 @@ def _acquisition( # retrieve the results for every qubit for qubit in qubits: - # average msr, phase, i and q over the number of shots defined in the runcard result = results[ro_pulses[qubit].serial] data.register_qubit( qubit, - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + ro_pulses[qubit].frequency, att=attenuation_range, @@ -180,8 +171,8 @@ def _plot( horizontal_spacing=0.1, vertical_spacing=0.2, subplot_titles=( - "Normalised MSR", - "phase (rad)", + "Normalised Signal [a.u.]", + "phase [rad]", ), ) @@ -191,22 +182,22 @@ def _plot( n_att = len(np.unique(qubit_data.att)) n_freq = len(np.unique(qubit_data.freq)) for i in range(n_att): - qubit_data.msr[i * n_freq : (i + 1) * n_freq] = norm( - qubit_data.msr[i * n_freq : (i + 1) * n_freq] + qubit_data.signal[i * n_freq : (i + 1) * n_freq] = norm( + qubit_data.signal[i * n_freq : (i + 1) * n_freq] ) fig.add_trace( go.Heatmap( x=frequencies, y=attenuations, - z=qubit_data.msr * V_TO_UV, + z=qubit_data.signal, colorbar_x=0.46, ), row=1, col=1, ) - fig.update_xaxes(title_text="Frequency (Hz)", row=1, col=1) - fig.update_yaxes(title_text="Attenuation (dB)", row=1, col=1) + fig.update_xaxes(title_text="Frequency [GHz]", row=1, col=1) + fig.update_yaxes(title_text="Attenuation [dB]", row=1, col=1) fig.add_trace( go.Heatmap( x=frequencies, @@ -217,14 +208,13 @@ def _plot( row=1, col=2, ) - fig.update_xaxes(title_text="Frequency (Hz)", row=1, col=2) - fig.update_yaxes(title_text="Attenuation (dB)", row=1, col=2) + fig.update_xaxes(title_text="Frequency [GHz]", row=1, col=2) if fit is not None: fig.add_trace( go.Scatter( x=[ - fit.readout_frequency[qubit], + fit.readout_frequency[qubit] * HZ_TO_GHZ, ], y=[ fit.readout_attenuation[qubit], @@ -235,26 +225,28 @@ def _plot( color="gray", symbol="circle", ), + name="Estimated readout point", + showlegend=True, ) ) fitting_report = table_html( table_dict( qubit, [ - "Low Power Resonator Frequency", - "Readout Attenuation", - "High Power Resonator Frequency", + "Low Power Resonator Frequency [Hz]", + "Readout Attenuation [dB]", + "High Power Resonator Frequency [Hz]", ], [ - np.round(fit.readout_frequency[qubit] * GHZ_TO_HZ, 0), + np.round(fit.readout_frequency[qubit], 0), fit.readout_attenuation[qubit], - np.round(fit.bare_frequency[qubit] * GHZ_TO_HZ), + np.round(fit.bare_frequency[qubit]), ], ) ) fig.update_layout( - showlegend=False, - uirevision="0", # ``uirevision`` allows zooming while live plotting + showlegend=True, + legend=dict(orientation="h"), ) figures.append(fig) diff --git a/src/qibocal/protocols/characterization/resonator_spectroscopy.py b/src/qibocal/protocols/characterization/resonator_spectroscopy.py index d748c6787..d16c038bd 100644 --- a/src/qibocal/protocols/characterization/resonator_spectroscopy.py +++ b/src/qibocal/protocols/characterization/resonator_spectroscopy.py @@ -20,9 +20,9 @@ class ResonatorSpectroscopyParameters(Parameters): """ResonatorSpectroscopy runcard inputs.""" freq_width: int - """Width for frequency sweep relative to the readout frequency (Hz).""" + """Width for frequency sweep relative to the readout frequency [Hz].""" freq_step: int - """Frequency step for sweep (Hz).""" + """Frequency step for sweep [Hz].""" power_level: PowerLevel """Power regime (low or high). If low the readout frequency will be updated. If high both the readout frequency and the bare resonator frequency will be updated.""" @@ -41,7 +41,7 @@ class ResonatorSpectroscopyResults(Results): frequency: dict[QubitId, float] = field(metadata=dict(update="readout_frequency")) """Readout frequency [GHz] for each qubit.""" - fitted_parameters: dict[QubitId, dict[str, float]] + fitted_parameters: dict[QubitId, list[float]] """Raw fitted parameters.""" bare_frequency: Optional[dict[QubitId, float]] = field( default_factory=dict, metadata=dict(update="bare_resonator_frequency") @@ -58,7 +58,7 @@ class ResonatorSpectroscopyResults(Results): ResSpecType = np.dtype( - [("freq", np.float64), ("msr", np.float64), ("phase", np.float64)] + [("freq", np.float64), ("signal", np.float64), ("phase", np.float64)] ) """Custom dtype for resonator spectroscopy.""" @@ -135,14 +135,13 @@ def _acquisition( # retrieve the results for every qubit for qubit in qubits: - # average msr, phase, i and q over the number of shots defined in the runcard result = results[ro_pulses[qubit].serial] # store the results data.register_qubit( ResSpecType, (qubit), dict( - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + ro_pulses[qubit].frequency, ), diff --git a/src/qibocal/protocols/characterization/resonator_spectroscopy_attenuation.py b/src/qibocal/protocols/characterization/resonator_spectroscopy_attenuation.py index 2b2343164..71d1fd37a 100644 --- a/src/qibocal/protocols/characterization/resonator_spectroscopy_attenuation.py +++ b/src/qibocal/protocols/characterization/resonator_spectroscopy_attenuation.py @@ -20,7 +20,7 @@ class ResonatorSpectroscopyAttenuationParameters(Parameters): """ResonatorSpectroscopy runcard inputs.""" freq_width: int - """Width for frequency sweep relative to the readout frequency (Hz).""" + """Width for frequency sweep relative to the readout frequency [Hz].""" freq_step: int """Frequency step for sweep [Hz].""" power_level: PowerLevel @@ -44,7 +44,7 @@ class ResonatorSpectroscopyAttenuationResults(Results): frequency: dict[QubitId, float] """Readout frequency [GHz] for each qubit.""" - fitted_parameters: dict[QubitId, dict[str, float]] + fitted_parameters: dict[QubitId, list[float]] """Raw fitted parameters.""" bare_frequency: Optional[dict[QubitId, float]] = field( default_factory=dict, @@ -126,14 +126,13 @@ def _acquisition( # retrieve the results for every qubit for qubit in qubits: - # average msr, phase, i and q over the number of shots defined in the runcard result = results[ro_pulses[qubit].serial] # store the results data.register_qubit( ResSpecType, (qubit), dict( - msr=result.magnitude, + signal=result.magnitude, phase=result.phase, freq=delta_frequency_range + ro_pulses[qubit].frequency, ), diff --git a/src/qibocal/protocols/characterization/signal_experiments/time_of_flight_readout.py b/src/qibocal/protocols/characterization/signal_experiments/time_of_flight_readout.py index aa94c3040..4e9d6bd3e 100644 --- a/src/qibocal/protocols/characterization/signal_experiments/time_of_flight_readout.py +++ b/src/qibocal/protocols/characterization/signal_experiments/time_of_flight_readout.py @@ -132,9 +132,8 @@ def _plot(data: TimeOfFlightReadoutData, qubit, fit: TimeOfFlightReadoutResults) fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis_title="Sample", - yaxis_title="MSR (uV)", + yaxis_title="Signal [a.u.]", ) if fit is not None: fig.add_vline( @@ -150,9 +149,8 @@ def _plot(data: TimeOfFlightReadoutData, qubit, fit: TimeOfFlightReadoutResults) ) fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis_title="Sample", - yaxis_title="MSR (uV)", + yaxis_title="Signal [a.u.]", ) figures.append(fig) diff --git a/src/qibocal/protocols/characterization/two_qubit_interaction/chevron.py b/src/qibocal/protocols/characterization/two_qubit_interaction/chevron.py index 1a2c9e8b5..dd17d998e 100644 --- a/src/qibocal/protocols/characterization/two_qubit_interaction/chevron.py +++ b/src/qibocal/protocols/characterization/two_qubit_interaction/chevron.py @@ -209,13 +209,13 @@ def _fit(data: ChevronData) -> ChevronResults: times = np.unique(data[pair].length) for qubit in pair: - msr = data[pair].prob_low if pair[0] == qubit else data[pair].prob_high - msr_matrix = msr.reshape(len(times), len(amps)).T + signal = data[pair].prob_low if pair[0] == qubit else data[pair].prob_high + signal_matrix = signal.reshape(len(times), len(amps)).T # guess amplitude computing FFT - amplitude, index, delta = fit_flux_amplitude(msr_matrix, amps, times) + amplitude, index, delta = fit_flux_amplitude(signal_matrix, amps, times) # estimate duration by rabi curve at amplitude previously estimated - y = msr_matrix[index, :].ravel() + y = signal_matrix[index, :].ravel() popt, _ = curve_fit(cos, times, y, p0=[delta, 0, np.mean(y), np.mean(y)]) @@ -298,7 +298,7 @@ def _plot(data: ChevronData, fit: ChevronResults, qubit): fig.update_layout( xaxis_title="Duration [ns]", xaxis2_title="Duration [ns]", - yaxis_title="Amplitude [dimensionless]", + yaxis_title="Amplitude [a.u.]", legend=dict(orientation="h"), ) fig.update_layout( diff --git a/src/qibocal/protocols/characterization/two_qubit_interaction/chsh/protocol.py b/src/qibocal/protocols/characterization/two_qubit_interaction/chsh/protocol.py index 85bfc7818..6f20ebe1f 100644 --- a/src/qibocal/protocols/characterization/two_qubit_interaction/chsh/protocol.py +++ b/src/qibocal/protocols/characterization/two_qubit_interaction/chsh/protocol.py @@ -239,8 +239,7 @@ def _plot(data: CHSHData, fit: CHSHResults, qubit): ) fig.update_layout( - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="Theta[rad]", + xaxis_title="Theta [rad]", yaxis_title="CHSH value", ) figures.append(fig) diff --git a/src/qibocal/protocols/characterization/two_qubit_interaction/cz_virtualz.py b/src/qibocal/protocols/characterization/two_qubit_interaction/cz_virtualz.py index aac273781..fa48a5268 100644 --- a/src/qibocal/protocols/characterization/two_qubit_interaction/cz_virtualz.py +++ b/src/qibocal/protocols/characterization/two_qubit_interaction/cz_virtualz.py @@ -14,7 +14,7 @@ from scipy.optimize import curve_fit from qibocal import update -from qibocal.auto.operation import Data, Parameters, Qubits, Results, Routine +from qibocal.auto.operation import Data, Parameters, QubitsPairs, Results, Routine from qibocal.config import log from qibocal.protocols.characterization.two_qubit_interaction.chevron import order_pair from qibocal.protocols.characterization.utils import table_dict, table_html @@ -147,7 +147,7 @@ def create_sequence( def _acquisition( params: CZVirtualZParameters, platform: Platform, - qubits: Qubits, + qubits: QubitsPairs, ) -> CZVirtualZData: r""" Acquisition for CZVirtualZ. @@ -160,14 +160,13 @@ def _acquisition( is undone in the high frequency qubit and a theta90 pulse is applied to the low frequency qubit before measurement. That is, a pi-half pulse around the relative phase parametereized by the angle theta. - Measurements on the low frequency qubit yield the the 2Q-phase of the gate and the + Measurements on the low frequency qubit yield the 2Q-phase of the gate and the remnant single qubit Z phase aquired during the execution to be corrected. Population of the high frequency qubit yield the leakage to the non-computational states during the execution of the flux pulse. """ theta_absolute = np.arange(params.theta_start, params.theta_end, params.theta_step) - data = CZVirtualZData(thetas=theta_absolute.tolist()) for pair in qubits: # order the qubits so that the low frequency one is the first @@ -364,7 +363,11 @@ def _plot(data: CZVirtualZData, fit: CZVirtualZResults, qubit): fitting_report = table_html( table_dict( [target, target, qubits[1]], - ["CZ angle", "Virtual Z phase", "Flux pulse amplitude"], + [ + "CZ angle [rad]", + "Virtual Z phase [rad]", + "Flux pulse amplitude [a.u.]", + ], [ np.round(fit.cz_angle[target, control], 4), np.round(fit.virtual_phase[tuple(sorted(qubit))][target], 4), @@ -376,19 +379,17 @@ def _plot(data: CZVirtualZData, fit: CZVirtualZResults, qubit): fig1.update_layout( title_text=f"Phase correction Qubit {qubits[0]}", showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis1_title="theta [rad] + virtual phase[rad]", xaxis2_title="theta [rad] + virtual phase [rad]", - yaxis_title="MSR[V]", + yaxis_title="Signal [a.u.]", ) fig2.update_layout( title_text=f"Phase correction Qubit {qubits[1]}", showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting xaxis1_title="theta [rad] + virtual phase[rad]", xaxis2_title="theta [rad] + virtual phase[rad]", - yaxis_title="MSR[V]", + yaxis_title="Signal [a.u.]", ) return [fig1, fig2], fitting_report diff --git a/src/qibocal/protocols/characterization/two_qubit_interaction/utils.py b/src/qibocal/protocols/characterization/two_qubit_interaction/utils.py index 41912bd89..89a38c6bb 100644 --- a/src/qibocal/protocols/characterization/two_qubit_interaction/utils.py +++ b/src/qibocal/protocols/characterization/two_qubit_interaction/utils.py @@ -27,7 +27,7 @@ def fit_flux_amplitude(matrix, amps, times): The FFT also gives a first estimate for the duration of the CZ gate. Args: - matrix (np.ndarray): msr matrix + matrix (np.ndarray): signal matrix amps (np.ndarray): amplitudes swept times (np.ndarray): duration swept diff --git a/src/qibocal/protocols/characterization/utils.py b/src/qibocal/protocols/characterization/utils.py index 39f898bff..ac95f3090 100644 --- a/src/qibocal/protocols/characterization/utils.py +++ b/src/qibocal/protocols/characterization/utils.py @@ -2,14 +2,14 @@ from enum import Enum from typing import Union -import lmfit import numpy as np import numpy.typing as npt import pandas as pd import plotly.graph_objects as go -from numba import njit from plotly.subplots import make_subplots from qibolab.qubits import QubitId +from scipy import constants +from scipy.optimize import curve_fit from scipy.stats import mode from qibocal.auto.operation import Data, Results @@ -27,11 +27,45 @@ LEGEND_FONT_SIZE = 20 TITLE_SIZE = 25 EXTREME_CHI = 1e4 +KB = constants.k +HBAR = constants.hbar """Chi2 output when errors list contains zero elements""" COLORBAND = "rgba(0,100,80,0.2)" COLORBAND_LINE = "rgba(255,255,255,0)" +def effective_qubit_temperature( + prob_0: np.array, prob_1: np.array, qubit_frequency: float, nshots: int +): + """Calculates the qubit effective temperature. + + The formula used is the following one: + + kB Teff = - hbar qubit_freq / ln(prob_1/prob_0) + + Args: + prob_0 (np.array): population 0 samples + prob_1 (np.array): population 1 samples + qubit_frequency(float): frequency of qubit + nshots (int): number of shots + Returns: + temp (float): effective temperature + error (float): error on effective temperature + + """ + error_prob_0 = np.sqrt(prob_0 * (1 - prob_0) / nshots) + error_prob_1 = np.sqrt(prob_1 * (1 - prob_1) / nshots) + try: + temp = -HBAR * qubit_frequency / (np.log(prob_1 / prob_0) * KB) + dT_dp0 = temp / prob_0 / np.log(prob_1 / prob_0) + dT_dp1 = -temp / prob_1 / np.log(prob_1 / prob_0) + error = np.sqrt((dT_dp0 * error_prob_0) ** 2 + (dT_dp1 * error_prob_1) ** 2) + except ZeroDivisionError: + temp = np.nan + error = np.nan + return temp, error + + def calculate_frequencies(results, qubit_list): """Calculates outcome frequencies from individual shots. Args: @@ -63,8 +97,7 @@ def lorentzian(frequency, amplitude, center, sigma, offset): def lorentzian_fit(data, resonator_type=None, fit=None): frequencies = data.freq * HZ_TO_GHZ - voltages = data.msr * V_TO_UV - model_Q = lmfit.Model(lorentzian) + voltages = data.signal # Guess parameters for Lorentzian max or min # TODO: probably this is not working on HW @@ -87,25 +120,25 @@ def lorentzian_fit(data, resonator_type=None, fit=None): guess_sigma = abs(frequencies[np.argmax(voltages)] - guess_center) guess_amp = (np.min(voltages) - guess_offset) * guess_sigma * np.pi - # Add guessed parameters to the model - model_Q.set_param_hint("center", value=guess_center, vary=True) - model_Q.set_param_hint("sigma", value=guess_sigma, vary=True) - model_Q.set_param_hint("amplitude", value=guess_amp, vary=True) - model_Q.set_param_hint("offset", value=guess_offset, vary=True) - guess_parameters = model_Q.make_params() - + model_parameters = [ + guess_amp, + guess_center, + guess_sigma, + guess_offset, + ] # fit the model with the data and guessed parameters try: - fit_res = model_Q.fit( - data=voltages, frequency=frequencies, params=guess_parameters + fit_parameters, _ = curve_fit( + lorentzian, + frequencies, + voltages, + p0=model_parameters, ) - # get the values for postprocessing and for legend. - return fit_res.best_values["center"], fit_res.best_values - - except: + model_parameters = list(fit_parameters) + except RuntimeError: log.warning("lorentzian_fit: the fitting was not successful") - fit_res = lmfit.model.ModelResult(model=model_Q, params=guess_parameters) - return guess_center, fit_res.params.valuesdict() + + return model_parameters[1] * GHZ_TO_HZ, model_parameters def spectroscopy_plot(data, qubit, fit: Results = None): @@ -123,7 +156,7 @@ def spectroscopy_plot(data, qubit, fit: Results = None): fig.add_trace( go.Scatter( x=frequencies, - y=qubit_data.msr * 1e6, + y=qubit_data.signal, opacity=1, name="Frequency", showlegend=True, @@ -157,7 +190,7 @@ def spectroscopy_plot(data, qubit, fit: Results = None): fig.add_trace( go.Scatter( x=freqrange, - y=lorentzian(freqrange, **params), + y=lorentzian(freqrange, *params), name="Fit", line=go.scatter.Line(dash="dot"), ), @@ -180,7 +213,7 @@ def spectroscopy_plot(data, qubit, fit: Results = None): table_dict( qubit, [label, "amplitude"], - [np.round(freq[qubit] * GHZ_TO_HZ, 0), fit.amplitude[qubit]], + [np.round(freq[qubit], 0), fit.amplitude[qubit]], ) ) @@ -190,17 +223,16 @@ def spectroscopy_plot(data, qubit, fit: Results = None): table_dict( qubit, [label, "attenuation"], - [np.round(freq[qubit] * GHZ_TO_HZ, 0), fit.attenuation[qubit]], + [np.round(freq[qubit], 0), fit.attenuation[qubit]], ) ) fig.update_layout( showlegend=True, - uirevision="0", # ``uirevision`` allows zooming while live plotting - xaxis_title="Frequency (GHz)", - yaxis_title="MSR (uV)", - xaxis2_title="Frequency (GHz)", - yaxis2_title="Phase (rad)", + xaxis_title="Frequency [GHz]", + yaxis_title="Signal [a.u.]", + xaxis2_title="Frequency [GHz]", + yaxis2_title="Phase [rad]", ) figures.append(fig) @@ -211,23 +243,11 @@ def norm(x_mags): return (x_mags - np.min(x_mags)) / (np.max(x_mags) - np.min(x_mags)) -@njit(["float64[:] (float64[:], float64[:])"], parallel=True, cache=True) def cumulative(input_data, points): r"""Evaluates in data the cumulative distribution function of `points`. - WARNING: `input_data` and `points` should be sorted data. """ - input_data = np.sort(input_data) - points = np.sort(points) - # data and points sorted - prob = [] - app = 0 - - for val in input_data: - app += np.maximum(np.searchsorted(points[app::], val), 0) - prob.append(float(app)) - - return np.array(prob) + return np.searchsorted(np.sort(points), np.sort(input_data)) def fit_punchout(data: Data, fit_type: str): @@ -257,11 +277,11 @@ def fit_punchout(data: Data, fit_type: str): freqs = np.unique(qubit_data.freq) nvalues = len(np.unique(qubit_data[fit_type])) nfreq = len(freqs) - msrs = np.reshape(qubit_data.msr, (nvalues, nfreq)) + signals = np.reshape(qubit_data.signal, (nvalues, nfreq)) if data.resonator_type == "3D": - peak_freqs = freqs[np.argmax(msrs, axis=1)] + peak_freqs = freqs[np.argmax(signals, axis=1)] else: - peak_freqs = freqs[np.argmin(msrs, axis=1)] + peak_freqs = freqs[np.argmin(signals, axis=1)] max_freq = np.max(peak_freqs) min_freq = np.min(peak_freqs) @@ -276,11 +296,15 @@ def fit_punchout(data: Data, fit_type: str): if fit_type == "amp": if data.resonator_type == "3D": ro_val = getattr(qubit_data, fit_type)[ - np.argmax(qubit_data.msr[np.where(qubit_data.freq == freq_lp)[0]]) + np.argmax( + qubit_data.signal[np.where(qubit_data.freq == freq_lp)[0]] + ) ] else: ro_val = getattr(qubit_data, fit_type)[ - np.argmin(qubit_data.msr[np.where(qubit_data.freq == freq_lp)[0]]) + np.argmin( + qubit_data.signal[np.where(qubit_data.freq == freq_lp)[0]] + ) ] else: high_att_max = np.max( @@ -293,8 +317,8 @@ def fit_punchout(data: Data, fit_type: str): ro_val = round((high_att_max + high_att_min) / 2) ro_val = ro_val + (ro_val % 2) - low_freqs[qubit] = freq_lp.item() * HZ_TO_GHZ - high_freqs[qubit] = freq_hp[0] * HZ_TO_GHZ + low_freqs[qubit] = freq_lp.item() + high_freqs[qubit] = freq_hp[0] ro_values[qubit] = ro_val return [low_freqs, high_freqs, ro_values] @@ -327,16 +351,33 @@ def round_report( magnitude = 0 ndigits = max(significant_digit(error * 10 ** (-1 * magnitude)), 0) - rounded_values.append( - f"{round(value * 10 ** (-1 * magnitude), ndigits)} * 10 ^{magnitude}" - ) - rounded_errors.append( - f"{np.format_float_positional(round(error*10**(-1*magnitude), ndigits), trim = '-')}* 10 ^ {magnitude}" - ) + if magnitude != 0: + rounded_values.append( + f"{round(value * 10 ** (-1 * magnitude), ndigits)}e{magnitude}" + ) + rounded_errors.append( + f"{np.format_float_positional(round(error*10**(-1*magnitude), ndigits), trim = '-')}e{magnitude}" + ) + else: + rounded_values.append(f"{round(value * 10 ** (-1 * magnitude), ndigits)}") + rounded_errors.append( + f"{np.format_float_positional(round(error*10**(-1*magnitude), ndigits), trim = '-')}" + ) return rounded_values, rounded_errors +def format_error_single_cell(measure: tuple): + """Helper function to print mean value and error in one line.""" + # extract mean value and error + mean = measure[0][0] + error = measure[1][0] + if all("e" in number for number in measure[0] + measure[1]): + magn = mean.split("e")[1] + return f"({mean.split('e')[0]} ± {error.split('e')[0]}) 10{magn}" + return f"{mean} ± {error}" + + def chi2_reduced( observed: npt.NDArray, estimated: npt.NDArray, @@ -373,7 +414,12 @@ def significant_digit(number: float): is ``>= 1``, ``= 0`` or ``inf``. """ - if np.isinf(np.real(number)) or np.real(number) >= 1 or number == 0: + if ( + np.isinf(np.real(number)) + or np.real(number) >= 1 + or number == 0 + or np.isnan(number) + ): return -1 position = max(np.ceil(-np.log10(abs(np.real(number)))), -1) @@ -508,7 +554,7 @@ def plot_results(data: Data, qubit: QubitId, qubit_states: list, fit: Results): ) fig.update_xaxes( - title_text=f"i (V)", + title_text=f"i [a.u.]", range=[min_x, max_x], row=1, col=i + 1, @@ -516,7 +562,7 @@ def plot_results(data: Data, qubit: QubitId, qubit_states: list, fit: Results): rangeslider=dict(visible=False), ) fig.update_yaxes( - title_text="q (V)", + title_text="q [a.u.]", range=[min_y, max_y], scaleanchor="x", scaleratio=1, @@ -525,7 +571,6 @@ def plot_results(data: Data, qubit: QubitId, qubit_states: list, fit: Results): ) fig.update_layout( - uirevision="0", # ``uirevision`` allows zooming while live plotting autosize=False, height=COLUMNWIDTH, width=COLUMNWIDTH * len(models_name), @@ -550,8 +595,8 @@ def plot_results(data: Data, qubit: QubitId, qubit_states: list, fit: Results): vertical_spacing=SPACING, subplot_titles=( "accuracy", - "testing time (s)", - "training time (s)", + "testing time [s]", + "training time [s]", ) # pylint: disable=E1101 ) @@ -628,8 +673,11 @@ def table_html(data: dict) -> str: Args: data (dict): the keys will be converted into table entries and the values will be the columns of the table. + Values must be valid HTML strings. Return: str """ - return pd.DataFrame(data).to_html(classes="fitting-table", index=False, border=0) + return pd.DataFrame(data).to_html( + classes="fitting-table", index=False, border=0, escape=False + ) diff --git a/src/qibocal/update.py b/src/qibocal/update.py index a1ecfe6b4..d7004b0e4 100644 --- a/src/qibocal/update.py +++ b/src/qibocal/update.py @@ -6,8 +6,6 @@ from qibolab.platform import Platform from qibolab.qubits import QubitId, QubitPairId -from qibocal.protocols.characterization.utils import GHZ_TO_HZ - CLASSIFICATION_PARAMS = [ "threshold", "iq_angle", @@ -20,7 +18,7 @@ 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 * GHZ_TO_HZ) + 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 @@ -29,7 +27,7 @@ def readout_frequency(freq: float, platform: Platform, qubit: QubitId): 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 * GHZ_TO_HZ) + platform.qubits[qubit].bare_resonator_frequency = int(freq) def readout_amplitude(amp: float, platform: Platform, qubit: QubitId): @@ -46,7 +44,7 @@ def drive_frequency(freq: Union[float, tuple], platform: Platform, qubit: QubitI """Update drive frequency value in platform for specific qubit.""" if isinstance(freq, tuple): freq = freq[0] - freq = int(freq * GHZ_TO_HZ) + freq = int(freq) platform.qubits[qubit].native_gates.RX.frequency = int(freq) platform.qubits[qubit].drive_frequency = int(freq) @@ -169,7 +167,7 @@ def sweetspot(sweetspot: float, platform: Platform, qubit: QubitId): def frequency_12_transition(frequency: int, platform: Platform, qubit: QubitId): - platform.qubits[qubit].native_gates.RX12.frequency = int(frequency * GHZ_TO_HZ) + platform.qubits[qubit].native_gates.RX12.frequency = int(frequency) def drive_12_amplitude(amplitude: float, platform: Platform, qubit: QubitId): @@ -185,14 +183,14 @@ def twpa_power(power: float, platform: Platform, qubit: QubitId): def anharmonicity(anharmonicity: float, platform: Platform, qubit: QubitId): - platform.qubits[qubit].anharmonicity = int(anharmonicity * GHZ_TO_HZ) + platform.qubits[qubit].anharmonicity = int(anharmonicity) def bare_resonator_frequency_sweetspot( bare_resonator_frequency_sweetspot: float, platform: Platform, qubit: QubitId ): platform.qubits[qubit].bare_resonator_frequency_sweetspot = int( - bare_resonator_frequency_sweetspot * GHZ_TO_HZ + bare_resonator_frequency_sweetspot ) diff --git a/src/qibocal/web/templates/autocalibration.html b/src/qibocal/web/templates/autocalibration.html deleted file mode 100644 index 3731fd924..000000000 --- a/src/qibocal/web/templates/autocalibration.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - {% if report %} - {{ report.title }} - {% else %} - Qibocal {{version}} - {% endif %} - - - - - - - {% if is_static %} - - - - - {{ css_styles }} - {% else %} - - {% endif %} - - - - - - - -
- - - -
- - {% if report.path %} -
-

{{ report.title }}

- -
-

- Platform: {{ report.metadata.get('platform')}}
- Run date: {{ report.metadata.get('date') }}
- Start time (UTC): {{ report.metadata.get('start-time') }}
- End time (UTC): {{ report.metadata.get('end-time') }} -

-

- Summary

- -

In the table below we show the libraries and respective versions used in {{ report.title }}.

- -
- - - - - - - - - {% for library, version in report.metadata.get('versions').items() %} - - - - - {% endfor %} - -
LibraryVersion
{{ library }}{{ version }}
-
- -

- Actions

-

Please find below data generated by actions:

- - {% for task in report.history %} - -
-

- {{ report.routine_name(*task) }}

- {% set local_qubits=report.routine_qubits(task) %} - {% set qubits = local_qubits if local_qubits != [] else report.qubits%} - {% for qubit in report.routine_qubits(task) %} -
-
- {{ header }} - Qubit {{ qubit }}
- - - {% set figures, fitting_report = report.plot(task, qubit) %} - {% if "No fitting data" not in fitting_report %} - {% set fitting_params= fitting_report.split('
') %} -
- - - - - - - - - - {% for row in fitting_params %} - {% if row != '' %} - {% set run = row.split('|') %} - {% set fparam_value = run[1].split(':') %} - - - - - - {% endif %} - {% endfor %} - -
qubit Fitting Parameter Value
{{ run[0] }}{{ fparam_value[0] }}{{ fparam_value[1] }}
-
- {% endif %} - {{ figures }} - -
- {% endfor %} -
- {% endfor %} - {% endif %} -
-
- - - - - - - - diff --git a/src/qibocal/web/templates/template.html b/src/qibocal/web/templates/template.html index 245a00069..fb1daefda 100644 --- a/src/qibocal/web/templates/template.html +++ b/src/qibocal/web/templates/template.html @@ -63,15 +63,13 @@ Actions
- {% for routine, iteration in report.history %} - {% endfor %}
@@ -132,7 +130,7 @@

{{ report.title }}

{% for task_uid in report.history %} -
+

{{ report.routine_name(*task_uid) }}

diff --git a/tests/runcards/chi_squared.yml b/tests/runcards/chi_squared.yml new file mode 100644 index 000000000..dffaf72a3 --- /dev/null +++ b/tests/runcards/chi_squared.yml @@ -0,0 +1,20 @@ +actions: + - id: t1 + priority: 0 + main: single shot + operation: t1 + validator: + scheme: chi2 + parameters: + chi2_max_value: 0 + parameters: + delay_before_readout_start: 0 + delay_before_readout_end: 20_000 + delay_before_readout_step: 2000 + nshots: 1024 + + - id: single shot + priority: 0 + operation: single_shot_classification + parameters: + nshots: 10 diff --git a/tests/runcards/protocols.yml b/tests/runcards/protocols.yml index 1a6be8c12..f71fd9d55 100644 --- a/tests/runcards/protocols.yml +++ b/tests/runcards/protocols.yml @@ -234,9 +234,9 @@ actions: step_amp_factor: 0.1 pulse_length: 30 - - id: rabi msr + - id: rabi signal priority: 0 - operation: rabi_amplitude_msr + operation: rabi_amplitude_signal update: false parameters: min_amp_factor: 0.0 @@ -268,9 +268,9 @@ actions: pulse_amplitude: 0.5 nshots: 1024 - - id: rabi length msr + - id: rabi length signal priority: 0 - operation: rabi_length_msr + operation: rabi_length_signal parameters: pulse_duration_start: 4 pulse_duration_end: 84 @@ -297,9 +297,9 @@ actions: delay_before_readout_step: 2000 nshots: 1024 - - id: t1_msr + - id: t1_signal priority: 0 - operation: t1_msr + operation: t1_signal parameters: delay_before_readout_start: 0 delay_before_readout_end: 20_000 @@ -322,9 +322,9 @@ actions: readouts: 10 nshots: 10 - - id: zeno_msr + - id: zeno_signal priority: 00 - operation: zeno_msr + operation: zeno_signal parameters: readouts: 10 nshots: 10 @@ -338,9 +338,9 @@ actions: delay_between_pulses_step: 100 nshots: 10 - - id: t2_msr + - id: t2_signal priority: 0 - operation: t2_msr + operation: t2_signal parameters: delay_between_pulses_start: 16 delay_between_pulses_end: 20000 @@ -366,9 +366,9 @@ actions: n_osc: 2 nshots: 10 - - id: ramsey_msr + - id: ramsey_signal priority: 0 - operation: ramsey_msr + operation: ramsey_signal parameters: delay_between_pulses_start: 0 delay_between_pulses_end: 50 @@ -376,9 +376,9 @@ actions: n_osc: 2 nshots: 10 - - id: ramsey_msr_detuned + - id: ramsey_signal_detuned priority: 0 - operation: ramsey_msr + operation: ramsey_signal parameters: delay_between_pulses_start: 0 delay_between_pulses_end: 50 @@ -432,6 +432,13 @@ actions: beta_param: null nshots: 10 + - id: allXY unrolling + priority: 0 + operation: allxy + parameters: + beta_param: null + unrolling: True + nshots: 10 - id: allxy_drag_pulse_tuning priority: 0 @@ -461,9 +468,9 @@ actions: delay_between_pulses_step: 1 nshots: 10 - - id: spin_echo_msr + - id: spin_echo_sequence priority: 0 - operation: spin_echo_msr + operation: spin_echo_sequence parameters: delay_between_pulses_start: 0 delay_between_pulses_end: 5 @@ -677,3 +684,14 @@ actions: parameters: nshots: 100 classifiers_list: ["naive_bayes", "decision_tree"] + + - id: avoided crossing + priority: 0 + operation: avoided_crossing + qubits: [[2,1],[0,2]] + parameters: + freq_width: 100_000_000 + freq_step: 50_000_000 + bias_width: 0.2 + bias_step: 0.05 + drive_amplitude: 0.5 diff --git a/tests/test_protocols.py b/tests/test_protocols.py index 9d9155880..d94fd7f3f 100644 --- a/tests/test_protocols.py +++ b/tests/test_protocols.py @@ -7,6 +7,14 @@ from qibolab import create_platform from qibocal.cli._base import command +from qibocal.protocols.characterization.rabi.amplitude import RabiAmplitudeData +from qibocal.protocols.characterization.rabi.ef import RabiAmplitudeEFData +from qibocal.protocols.characterization.rabi.length import RabiLengthData +from qibocal.protocols.characterization.rabi.utils import ( + extract_rabi, + rabi_amplitude_function, + rabi_length_function, +) PATH_TO_RUNCARD = pathlib.Path(__file__).parent / "runcards/protocols.yml" PLATFORM = create_platform("dummy") @@ -14,6 +22,7 @@ def generate_runcard_single_protocol(): + actions = yaml.safe_load(PATH_TO_RUNCARD.read_text(encoding="utf-8")) with open(PATH_TO_RUNCARD) as file: actions = yaml.safe_load(file) for action in actions["actions"]: @@ -118,4 +127,19 @@ def test_fit_command(runcard, tmp_path): assert results_plot.exit_code == 0 +def test_extract_rabi(): + assert extract_rabi(RabiAmplitudeData()) == ( + "amp", + "Amplitude [dimensionless]", + rabi_amplitude_function, + ) + assert extract_rabi(RabiLengthData()) == ( + "length", + "Time [ns]", + rabi_length_function, + ) + with pytest.raises(RuntimeError): + extract_rabi(RabiAmplitudeEFData) + + # TODO: compare report by calling qq report diff --git a/tests/test_update.py b/tests/test_update.py index 591175e38..a3b7f181c 100644 --- a/tests/test_update.py +++ b/tests/test_update.py @@ -8,13 +8,10 @@ from qibolab.pulses import Drag from qibocal import update -from qibocal.protocols.characterization.utils import GHZ_TO_HZ PLATFORM = create_platform("dummy") QUBITS = list(PLATFORM.qubits.values()) PAIRS = list(PLATFORM.pairs) -FREQUENCIES_GHZ = random.randint(5, 9) -FREQUENCIES_HZ = int(FREQUENCIES_GHZ * GHZ_TO_HZ) RANDOM_FLOAT = random.random() RANDOM_INT = random.randint(0, 10) @@ -25,20 +22,19 @@ def generate_update_list(length): @pytest.mark.parametrize("qubit", QUBITS) def test_readout_frequency_update(qubit): - update.readout_frequency(FREQUENCIES_GHZ, PLATFORM, qubit.name) - assert qubit.native_gates.MZ.frequency == FREQUENCIES_HZ + update.readout_frequency(RANDOM_INT, PLATFORM, qubit.name) + assert qubit.native_gates.MZ.frequency == RANDOM_INT if qubit.native_gates.MZ.if_frequency is not None: - assert qubit.readout_frequency == FREQUENCIES_HZ + assert qubit.readout_frequency == RANDOM_INT assert ( - qubit.native_gates.MZ.if_frequency - == FREQUENCIES_HZ - qubit.readout_frequency + qubit.native_gates.MZ.if_frequency == RANDOM_INT - qubit.readout_frequency ) @pytest.mark.parametrize("qubit", QUBITS) def test_update_bare_resonator_frequency_update(qubit): - update.bare_resonator_frequency(FREQUENCIES_GHZ, PLATFORM, qubit.name) - assert qubit.bare_resonator_frequency == FREQUENCIES_HZ + update.bare_resonator_frequency(RANDOM_INT, PLATFORM, qubit.name) + assert qubit.bare_resonator_frequency == RANDOM_INT @pytest.mark.parametrize("qubit", QUBITS) @@ -55,9 +51,9 @@ def test_readout_attenuation_update(qubit): @pytest.mark.parametrize("qubit", QUBITS) def test_drive_frequency_update(qubit): - update.drive_frequency(FREQUENCIES_GHZ, PLATFORM, qubit.name) - assert qubit.native_gates.RX.frequency == FREQUENCIES_HZ - assert qubit.drive_frequency == FREQUENCIES_HZ + update.drive_frequency(RANDOM_INT, PLATFORM, qubit.name) + assert qubit.native_gates.RX.frequency == RANDOM_INT + assert qubit.drive_frequency == RANDOM_INT @pytest.mark.parametrize("qubit", QUBITS) @@ -151,12 +147,12 @@ def test_sweetspot_update(qubit): @pytest.mark.parametrize("qubit", QUBITS[:-1]) def test_12_transition_update(qubit): update.drive_12_amplitude(RANDOM_FLOAT, PLATFORM, qubit.name) - update.frequency_12_transition(FREQUENCIES_GHZ, PLATFORM, qubit.name) - update.anharmonicity(FREQUENCIES_GHZ, PLATFORM, qubit.name) + update.frequency_12_transition(RANDOM_INT, PLATFORM, qubit.name) + update.anharmonicity(RANDOM_INT, PLATFORM, qubit.name) assert qubit.native_gates.RX12.amplitude == RANDOM_FLOAT - assert qubit.native_gates.RX12.frequency == FREQUENCIES_HZ - assert qubit.anharmonicity == FREQUENCIES_HZ + assert qubit.native_gates.RX12.frequency == RANDOM_INT + assert qubit.anharmonicity == RANDOM_INT @pytest.mark.parametrize("qubit", QUBITS) diff --git a/tests/test_validators.py b/tests/test_validators.py new file mode 100644 index 000000000..e620674fe --- /dev/null +++ b/tests/test_validators.py @@ -0,0 +1,33 @@ +"""Testing validators.""" + +import pathlib + +import pytest +import yaml +from qibolab import create_platform + +from qibocal.auto.execute import Executor +from qibocal.auto.runcard import Runcard +from qibocal.cli.report import ExecutionMode + +RUNCARD = pathlib.Path(__file__).parent / "runcards/chi_squared.yml" +PLATFORM = create_platform("dummy") + + +@pytest.mark.parametrize("chi2_max_value", [1000, 1e-5]) +def test_chi2(chi2_max_value, tmp_path): + """Dummy test only for t1""" + card = yaml.safe_load(RUNCARD.read_text(encoding="utf-8")) + card["actions"][0]["validator"]["parameters"]["chi2_max_value"] = chi2_max_value + executor = Executor.load( + Runcard.load(card), + tmp_path, + PLATFORM, + list(PLATFORM.qubits), + ) + + list(executor.run(mode=ExecutionMode.autocalibration)) + + # for large chi2 value executor will execute 2 protocols + # only 1 with low chi2 + assert len(executor.history.keys()) == 2 if chi2_max_value == 100 else 1