iqm-benchmarks 1.11__tar.gz → 2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of iqm-benchmarks might be problematic. Click here for more details.

Files changed (87) hide show
  1. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/CHANGELOG.rst +11 -0
  2. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/PKG-INFO +1 -1
  3. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/examples/example_experiment_all.ipynb +89 -22
  4. iqm_benchmarks-2.0/examples/example_qscore.ipynb +188 -0
  5. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/__init__.py +1 -0
  6. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/benchmark_definition.py +15 -12
  7. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/benchmark_experiment.py +4 -4
  8. iqm_benchmarks-2.0/src/iqm/benchmarks/circuit_containers.py +221 -0
  9. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/compressive_gst/compressive_gst.py +11 -4
  10. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/entanglement/ghz.py +101 -89
  11. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/optimization/qscore.py +11 -8
  12. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/quantum_volume/clops.py +13 -32
  13. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/quantum_volume/quantum_volume.py +18 -19
  14. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py +23 -14
  15. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py +48 -30
  16. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py +14 -31
  17. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/randomized_benchmarking/randomized_benchmarking_common.py +4 -3
  18. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/readout_mitigation.py +2 -1
  19. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/utils.py +2 -1
  20. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm_benchmarks.egg-info/PKG-INFO +1 -1
  21. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm_benchmarks.egg-info/SOURCES.txt +3 -1
  22. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/mGST/qiskit_interface.py +1 -1
  23. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/tests/test_ghz.py +10 -11
  24. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/tests/test_gst.py +2 -2
  25. iqm_benchmarks-2.0/tests/unit/test_benchmark_circuit.py +56 -0
  26. iqm_benchmarks-1.11/examples/example_qscore.ipynb +0 -142
  27. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/.github/workflows/main.yml +0 -0
  28. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/.github/workflows/publish.yml +0 -0
  29. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/.github/workflows/tag_and_release.yml +0 -0
  30. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/.gitignore +0 -0
  31. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/LICENSE +0 -0
  32. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/README.md +0 -0
  33. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/benchmark_runner.py +0 -0
  34. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/docs/API.rst +0 -0
  35. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/docs/Makefile +0 -0
  36. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/docs/_static/images/favicon.ico +0 -0
  37. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/docs/_templates/autosummary-class-template.rst +0 -0
  38. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/docs/_templates/autosummary-module-template.rst +0 -0
  39. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/docs/changelog.rst +0 -0
  40. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/docs/conf.py +0 -0
  41. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/docs/index.rst +0 -0
  42. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/docs/license.rst +0 -0
  43. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/docs/readme.md +0 -0
  44. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/examples/example_clifford_rb.ipynb +0 -0
  45. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/examples/example_clops.ipynb +0 -0
  46. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/examples/example_ghz.ipynb +0 -0
  47. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/examples/example_gst.ipynb +0 -0
  48. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/examples/example_interleaved_rb.ipynb +0 -0
  49. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/examples/example_mirror_rb.ipynb +0 -0
  50. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/examples/example_quantum_volume.ipynb +0 -0
  51. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/examples/generate_2qubit_cliffords.ipynb +0 -0
  52. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/examples/how_to_make_your_own_benchmark.ipynb +0 -0
  53. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/pyproject.toml +0 -0
  54. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/scheduled_experiments/adonis/__init__.py +0 -0
  55. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/scheduled_experiments/adonis/weekly.py +0 -0
  56. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/setup.cfg +0 -0
  57. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/benchmark.py +0 -0
  58. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/compressive_gst/__init__.py +0 -0
  59. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/compressive_gst/gst_analysis.py +0 -0
  60. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/entanglement/__init__.py +0 -0
  61. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/logging_config.py +0 -0
  62. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/optimization/__init__.py +0 -0
  63. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/quantum_volume/__init__.py +0 -0
  64. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/randomized_benchmarking/__init__.py +0 -0
  65. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl +0 -0
  66. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/randomized_benchmarking/clifford_2q.pkl +0 -0
  67. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/__init__.py +0 -0
  68. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py +0 -0
  69. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py +0 -0
  70. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm/benchmarks/randomized_benchmarking/multi_lmfit.py +0 -0
  71. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm_benchmarks.egg-info/dependency_links.txt +0 -0
  72. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm_benchmarks.egg-info/requires.txt +0 -0
  73. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/iqm_benchmarks.egg-info/top_level.txt +0 -0
  74. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/mGST/LICENSE +0 -0
  75. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/mGST/README.md +0 -0
  76. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/mGST/additional_fns.py +0 -0
  77. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/mGST/algorithm.py +0 -0
  78. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/mGST/compatibility.py +0 -0
  79. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/mGST/low_level_jit.py +0 -0
  80. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/mGST/optimization.py +0 -0
  81. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/mGST/reporting/figure_gen.py +0 -0
  82. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/src/mGST/reporting/reporting.py +0 -0
  83. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/tag-from-pipeline.sh +0 -0
  84. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/tests/test_qscore.py +0 -0
  85. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/tests/test_qv.py +0 -0
  86. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/tests/test_rb.py +0 -0
  87. {iqm_benchmarks-1.11 → iqm_benchmarks-2.0}/tox.ini +0 -0
@@ -2,6 +2,17 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 2.0
6
+ ===========
7
+ * Adds `Circuits`, `BenchmarkCircuit` and `CircuitGroup` as a way to easily store and interact with multiple quantum circuits.
8
+ * `BenchmarkRunResult` now takes a `circuits` argument, expecting an instance of `Circuits`. `QuantumCircuit` instances can now exist there instead of inside xarray Datasets. All analysis methods should also expect to use an instance of `BenchmarkRunResult`.
9
+ * Ported all of the benchmarks subclassing from `Benchmark` to use the new containers.
10
+ * Updates the usage of `qiskit.QuantumCircuit` to `iqm.qiskit_iqm.IQMCircuit` in many places.
11
+
12
+ Version 1.12
13
+ ===========
14
+ * Miscellaneous small bugs fixed.
15
+
5
16
  Version 1.11
6
17
  ===========
7
18
  * Relaxes dependencies to allow for ranges.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-benchmarks
3
- Version: 1.11
3
+ Version: 2.0
4
4
  Summary: A package for implementation of Quantum Characterization, Verification and Validation (QCVV) techniques on IQM's hardware at gate level abstraction
5
5
  Author-email: IQM Finland Oy <developers@meetiqm.com>, Aniket Rath <aniket.rath@meetiqm.com>, Jami Rönkkö <jami@meetiqm.com>, Pedro Figueroa Romero <pedro.romero@meetiqm.com>, Vicente Pina Canelles <vicente.pina@meetiqm.com>, Raphael Brieger <raphael.brieger@meetiqm.com>, Stefan Seegerer <stefan.seegerer@meetiqm.com>
6
6
  Project-URL: Homepage, https://github.com/iqm-finland/iqm-benchmarks
@@ -126,7 +126,9 @@
126
126
  "cell_type": "code",
127
127
  "execution_count": null,
128
128
  "id": "5bb7f891ebb5acfb",
129
- "metadata": {},
129
+ "metadata": {
130
+ "scrolled": true
131
+ },
130
132
  "outputs": [],
131
133
  "source": [
132
134
  "benchmark_clifford_rb = CliffordRandomizedBenchmarking(backend, EXAMPLE_CRB)\n",
@@ -197,7 +199,9 @@
197
199
  "cell_type": "code",
198
200
  "execution_count": null,
199
201
  "id": "6dd964b0bd64b75b",
200
- "metadata": {},
202
+ "metadata": {
203
+ "scrolled": true
204
+ },
201
205
  "outputs": [],
202
206
  "source": [
203
207
  "benchmark_irb_1Q = InterleavedRandomizedBenchmarking(backend, EXAMPLE_IRB_1Q)\n",
@@ -628,19 +632,13 @@
628
632
  "source": [
629
633
  "MINIMAL_GHZ = GHZConfiguration(\n",
630
634
  " state_generation_routine=\"tree\",\n",
631
- " custom_qubits_array=[[0,2],\n",
632
- " [0,1,2],\n",
633
- " [0,1,2,3],\n",
634
- " [0,1,2,3,4]],\n",
635
- " # [0,1,3,4,8,9,13,14,17,18],\n",
636
- " # [0,1,3,4,8,9,13,14,17,18,2,7],\n",
637
- " # [0,1,3,4,8,9,13,14,17,18,2,7,5,10],\n",
638
- " # [0,1,3,4,8,9,13,14,17,18,2,7,5,10,6,11],\n",
639
- " # [0,1,3,4,8,9,13,14,17,18,2,7,5,10,6,11,15,16],\n",
640
- " # [0,1,3,4,8,9,13,14,17,18,2,7,5,10,6,11,15,16,12,19]],\n",
635
+ " custom_qubits_array=[\n",
636
+ " [0,2],\n",
637
+ " [0,1,2],\n",
638
+ " [0,1,2,4],\n",
639
+ " [0,1,2,3,4],\n",
640
+ " ],\n",
641
641
  " shots=1000,\n",
642
- " qiskit_optim_level=3,\n",
643
- " optimize_sqg=True,\n",
644
642
  " fidelity_routine=\"coherences\", \n",
645
643
  " rem=True,\n",
646
644
  " mit_shots=1000,\n",
@@ -665,7 +663,7 @@
665
663
  "metadata": {},
666
664
  "outputs": [],
667
665
  "source": [
668
- "result_ghz = benchmark_ghz.analyze()"
666
+ "result = benchmark_ghz.analyze()"
669
667
  ]
670
668
  },
671
669
  {
@@ -675,19 +673,88 @@
675
673
  "metadata": {},
676
674
  "outputs": [],
677
675
  "source": [
678
- "for qubits, data in result_ghz.observations.items():\n",
679
- " print(f\"Qubits {qubits}:\")\n",
680
- " for k,v in data.items():\n",
681
- " print(f\"\\t{k}: {v}\")"
676
+ "# Show observations for a specific qubit layout\n",
677
+ "qubit_layout = [0,1,2]\n",
678
+ "for observation in result.observations:\n",
679
+ " if observation.identifier.string_identifier == str(qubit_layout):\n",
680
+ " print(f\"{observation.name}: {observation.value} +/- {observation.uncertainty}\")\n",
681
+ "# Plot fidelities for all layouts\n",
682
+ "result.plot_all()"
683
+ ]
684
+ },
685
+ {
686
+ "cell_type": "markdown",
687
+ "id": "f693035f-a859-426e-aa87-f6607c602f9f",
688
+ "metadata": {},
689
+ "source": [
690
+ "# QScore"
691
+ ]
692
+ },
693
+ {
694
+ "cell_type": "markdown",
695
+ "id": "650798c9-db56-4599-8115-f3917da2be2f",
696
+ "metadata": {},
697
+ "source": [
698
+ "*QScore currently works in a slightly different way to the other benchmarks, e.g., it uses* `run_experiment` *method instead of* `run`*; this will be changed in future releases.*"
699
+ ]
700
+ },
701
+ {
702
+ "cell_type": "code",
703
+ "execution_count": null,
704
+ "id": "9f8ad91c-1a42-4fd5-bf24-dd6f5820e560",
705
+ "metadata": {},
706
+ "outputs": [],
707
+ "source": [
708
+ "from iqm.benchmarks.optimization.qscore import QScoreConfiguration\n",
709
+ "from iqm.benchmarks.benchmark_experiment import BenchmarkExperiment"
682
710
  ]
683
711
  },
684
712
  {
685
713
  "cell_type": "code",
686
714
  "execution_count": null,
687
- "id": "9ded1726373bd1d2",
715
+ "id": "ceb9c2a3-c197-4f13-8877-6b56e356f00a",
688
716
  "metadata": {},
689
717
  "outputs": [],
690
- "source": []
718
+ "source": [
719
+ "EXAMPLE_QSCORE = QScoreConfiguration(\n",
720
+ " num_instances = 100,\n",
721
+ " num_qaoa_layers= 1,\n",
722
+ " shots = 20_000,\n",
723
+ " calset_id=None, # calibration set ID, default is None\n",
724
+ " min_num_nodes = 2,\n",
725
+ " max_num_nodes = 5,\n",
726
+ " use_virtual_node = True,\n",
727
+ " use_classically_optimized_angles = True,\n",
728
+ " choose_qubits_routine = \"custom\",\n",
729
+ " custom_qubits_array=[[2],\n",
730
+ " [2, 0],\n",
731
+ " [2, 0, 1],\n",
732
+ " [2, 0, 1, 3],\n",
733
+ " [2, 0, 1, 3, 4]],\n",
734
+ " seed = 1\n",
735
+ " )"
736
+ ]
737
+ },
738
+ {
739
+ "cell_type": "code",
740
+ "execution_count": null,
741
+ "id": "f4969b8c-033f-4357-856f-23c340d84822",
742
+ "metadata": {},
743
+ "outputs": [],
744
+ "source": [
745
+ "benchmark = [EXAMPLE_QSCORE]"
746
+ ]
747
+ },
748
+ {
749
+ "cell_type": "code",
750
+ "execution_count": null,
751
+ "id": "56c7751c-77d9-4983-a972-a53f07774ba5",
752
+ "metadata": {},
753
+ "outputs": [],
754
+ "source": [
755
+ "EXAMPLE_EXPERIMENT = BenchmarkExperiment(backend, benchmark)\n",
756
+ "EXAMPLE_EXPERIMENT.run_experiment()"
757
+ ]
691
758
  }
692
759
  ],
693
760
  "metadata": {
@@ -706,7 +773,7 @@
706
773
  "name": "python",
707
774
  "nbconvert_exporter": "python",
708
775
  "pygments_lexer": "ipython3",
709
- "version": "3.11.0"
776
+ "version": "3.11.10"
710
777
  }
711
778
  },
712
779
  "nbformat": 4,