iqm-benchmarks 2.4__tar.gz → 2.5__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.
Files changed (87) hide show
  1. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/.github/workflows/main.yml +3 -1
  2. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/CHANGELOG.rst +4 -0
  3. {iqm_benchmarks-2.4/src/iqm_benchmarks.egg-info → iqm_benchmarks-2.5}/PKG-INFO +1 -1
  4. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py +25 -25
  5. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5/src/iqm_benchmarks.egg-info}/PKG-INFO +1 -1
  6. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/.github/workflows/publish.yml +0 -0
  7. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/.github/workflows/tag_and_release.yml +0 -0
  8. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/.gitignore +0 -0
  9. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/LICENSE +0 -0
  10. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/README.md +0 -0
  11. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/benchmark_runner.py +0 -0
  12. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/API.rst +0 -0
  13. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/Makefile +0 -0
  14. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/_static/images/favicon.ico +0 -0
  15. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/_static/images/logo.png +0 -0
  16. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/_templates/autosummary-class-template.rst +0 -0
  17. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/_templates/autosummary-module-template.rst +0 -0
  18. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/changelog.rst +0 -0
  19. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/conf.py +0 -0
  20. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/example_clifford_rb.ipynb +0 -0
  21. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/examples.rst +0 -0
  22. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/index.rst +0 -0
  23. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/license.rst +0 -0
  24. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/docs/readme.md +0 -0
  25. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/examples/example_clops.ipynb +0 -0
  26. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/examples/example_experiment_all.ipynb +0 -0
  27. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/examples/example_ghz.ipynb +0 -0
  28. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/examples/example_gst.ipynb +0 -0
  29. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/examples/example_interleaved_rb.ipynb +0 -0
  30. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/examples/example_mirror_rb.ipynb +0 -0
  31. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/examples/example_qscore.ipynb +0 -0
  32. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/examples/example_quantum_volume.ipynb +0 -0
  33. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/examples/generate_2qubit_cliffords.ipynb +0 -0
  34. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/examples/how_to_make_your_own_benchmark.ipynb +0 -0
  35. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/pyproject.toml +0 -0
  36. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/scheduled_experiments/adonis/__init__.py +0 -0
  37. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/scheduled_experiments/adonis/weekly.py +0 -0
  38. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/setup.cfg +0 -0
  39. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/__init__.py +0 -0
  40. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/benchmark.py +0 -0
  41. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/benchmark_definition.py +0 -0
  42. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/circuit_containers.py +0 -0
  43. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/compressive_gst/__init__.py +0 -0
  44. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/compressive_gst/compressive_gst.py +0 -0
  45. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/compressive_gst/gst_analysis.py +0 -0
  46. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/entanglement/__init__.py +0 -0
  47. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/entanglement/ghz.py +0 -0
  48. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/logging_config.py +0 -0
  49. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/optimization/__init__.py +0 -0
  50. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/optimization/qscore.py +0 -0
  51. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/quantum_volume/__init__.py +0 -0
  52. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/quantum_volume/clops.py +0 -0
  53. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/quantum_volume/quantum_volume.py +0 -0
  54. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/randomized_benchmarking/__init__.py +0 -0
  55. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl +0 -0
  56. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/randomized_benchmarking/clifford_2q.pkl +0 -0
  57. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/__init__.py +0 -0
  58. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py +0 -0
  59. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py +0 -0
  60. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py +0 -0
  61. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py +0 -0
  62. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/randomized_benchmarking/multi_lmfit.py +0 -0
  63. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/randomized_benchmarking/randomized_benchmarking_common.py +0 -0
  64. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/readout_mitigation.py +0 -0
  65. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm/benchmarks/utils.py +0 -0
  66. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm_benchmarks.egg-info/SOURCES.txt +0 -0
  67. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm_benchmarks.egg-info/dependency_links.txt +0 -0
  68. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm_benchmarks.egg-info/requires.txt +0 -0
  69. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/iqm_benchmarks.egg-info/top_level.txt +0 -0
  70. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/mGST/LICENSE +0 -0
  71. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/mGST/README.md +0 -0
  72. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/mGST/additional_fns.py +0 -0
  73. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/mGST/algorithm.py +0 -0
  74. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/mGST/compatibility.py +0 -0
  75. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/mGST/low_level_jit.py +0 -0
  76. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/mGST/optimization.py +0 -0
  77. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/mGST/qiskit_interface.py +0 -0
  78. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/mGST/reporting/figure_gen.py +0 -0
  79. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/src/mGST/reporting/reporting.py +0 -0
  80. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/tag-from-pipeline.sh +0 -0
  81. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/tests/test_ghz.py +0 -0
  82. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/tests/test_gst.py +0 -0
  83. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/tests/test_qscore.py +0 -0
  84. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/tests/test_qv.py +0 -0
  85. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/tests/test_rb.py +0 -0
  86. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/tests/unit/test_benchmark_circuit.py +0 -0
  87. {iqm_benchmarks-2.4 → iqm_benchmarks-2.5}/tox.ini +0 -0
@@ -51,7 +51,9 @@ jobs:
51
51
  - name: Install dependencies
52
52
  run: pip install tox==4.16.0
53
53
  - name: Run benchmark
54
- run: tox -e benchmark -- --backend=${{ github.event.inputs.backend || 'iqmfakeadonis' }}
54
+ run: tox -e benchmark -- --backend=${BACKEND}
55
+ env:
56
+ BACKEND: ${{ github.event.inputs.backend || 'iqmfakeadonis' }}
55
57
  - name: Upload benchmark results
56
58
  uses: actions/upload-artifact@v2
57
59
  with:
@@ -2,6 +2,10 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 2.5
6
+ ===========
7
+ * Changed simulation method for MRB to 'stabilizer' and simulation circuits are compiled in circuit generation stage.
8
+
5
9
  Version 2.4
6
10
  ===========
7
11
  * Changed Qscore to operate under the new base class.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-benchmarks
3
- Version: 2.4
3
+ Version: 2.5
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
@@ -10,8 +10,8 @@ import warnings
10
10
 
11
11
  import numpy as np
12
12
  from qiskit import transpile
13
- from qiskit.quantum_info import random_clifford, random_pauli
14
- from qiskit_aer import Aer
13
+ from qiskit.quantum_info import Clifford, random_clifford, random_pauli
14
+ from qiskit_aer import Aer, AerSimulator
15
15
  from scipy.spatial.distance import hamming
16
16
  import xarray as xr
17
17
 
@@ -262,9 +262,13 @@ def generate_pauli_dressed_mrb_circuits(
262
262
  pauli_dressed_circuits_untranspiled: List[QuantumCircuit] = []
263
263
  pauli_dressed_circuits_transpiled: List[QuantumCircuit] = []
264
264
 
265
+ sim_method = "stabilizer"
266
+ simulator = AerSimulator(method=sim_method)
267
+
265
268
  for _ in range(pauli_samples_per_circ):
266
269
  # Initialize the quantum circuit object
267
270
  circ = QuantumCircuit(num_qubits)
271
+ circ_untransp = QuantumCircuit(num_qubits)
268
272
  # Sample all the random Paulis
269
273
  paulis = [random_pauli(num_qubits) for _ in range(depth + 1)]
270
274
 
@@ -282,6 +286,7 @@ def generate_pauli_dressed_mrb_circuits(
282
286
  )
283
287
  circ.barrier()
284
288
  circ.compose(cycle_layers[k], inplace=True)
289
+ circ_untransp.compose(cycle_layers[k], inplace=True)
285
290
  circ.barrier()
286
291
 
287
292
  # Apply middle Pauli
@@ -307,9 +312,6 @@ def generate_pauli_dressed_mrb_circuits(
307
312
  for i in range(num_qubits):
308
313
  circ.compose(clifford_layer[i].to_instruction().inverse(), qubits=[i], inplace=True)
309
314
 
310
- # Add measurements
311
- circ.measure_all()
312
-
313
315
  # Transpile to backend - no optimize SQG should be used!
314
316
  if isinstance(backend_arg, str):
315
317
  retrieved_backend = get_iqm_backend(backend_arg)
@@ -317,6 +319,13 @@ def generate_pauli_dressed_mrb_circuits(
317
319
  assert isinstance(backend_arg, IQMBackendBase)
318
320
  retrieved_backend = backend_arg
319
321
 
322
+ circ_untransp = circ.copy()
323
+ # Add measurements to untranspiled - after!
324
+ circ_untranspiled = transpile(Clifford(circ_untransp).to_circuit(), simulator)
325
+ circ_untranspiled.measure_all()
326
+
327
+ # Add measurements to transpiled - before!
328
+ circ.measure_all()
320
329
  circ_transpiled = transpile(
321
330
  circ,
322
331
  backend=retrieved_backend,
@@ -325,7 +334,7 @@ def generate_pauli_dressed_mrb_circuits(
325
334
  routing_method=routing_method,
326
335
  )
327
336
 
328
- pauli_dressed_circuits_untranspiled.append(circ)
337
+ pauli_dressed_circuits_untranspiled.append(circ_untranspiled)
329
338
  pauli_dressed_circuits_transpiled.append(circ_transpiled)
330
339
 
331
340
  # Store the circuit
@@ -418,14 +427,14 @@ def mrb_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
418
427
  observations = {}
419
428
  dataset = run.dataset.copy(deep=True)
420
429
 
421
- shots = dataset.attrs["shots"]
430
+ # shots = dataset.attrs["shots"]
422
431
  num_circuit_samples = dataset.attrs["num_circuit_samples"]
423
432
  num_pauli_samples = dataset.attrs["num_pauli_samples"]
424
433
 
425
434
  density_2q_gates = dataset.attrs["density_2q_gates"]
426
435
  two_qubit_gate_ensemble = dataset.attrs["two_qubit_gate_ensemble"]
427
436
 
428
- max_gates_per_batch = dataset.attrs["max_gates_per_batch"]
437
+ # max_gates_per_batch = dataset.attrs["max_gates_per_batch"]
429
438
 
430
439
  # Analyze the results for each qubit layout of the experiment dataset
431
440
  qubits_array = dataset.attrs["qubits_array"]
@@ -445,8 +454,9 @@ def mrb_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
445
454
  else:
446
455
  assigned_mrb_depths = {str(qubits_array[i]): [2 * m for m in depths_array[i]] for i in range(len(depths_array))}
447
456
 
448
- transpiled_circuits = run.circuits["transpiled_circuits"]
449
- simulator = Aer.get_backend("qasm_simulator")
457
+ mrb_sim_circuits = run.circuits["untranspiled_circuits"]
458
+ sim_method = "stabilizer"
459
+ simulator = AerSimulator(method=sim_method) # Aer.get_backend("stabilizer")
450
460
 
451
461
  all_noisy_counts: Dict[str, Dict[int, List[Dict[str, int]]]] = {}
452
462
  all_noiseless_counts: Dict[str, Dict[int, List[Dict[str, int]]]] = {}
@@ -465,22 +475,12 @@ def mrb_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
465
475
  all_noisy_counts[str(qubits)][depth] = xrvariable_to_counts(
466
476
  dataset, identifier, num_circuit_samples * num_pauli_samples
467
477
  )
468
-
469
478
  qcvv_logger.info(f"Depth {depth}")
470
- # Execute the quantum circuits on the simulated, ideal backend
471
- # pylint: disable=unbalanced-tuple-unpacking
472
- all_noiseless_jobs, _ = submit_execute(
473
- {tuple(qubits): transpiled_circuits[f"{str(qubits)}_depth_{str(depth)}"].circuits},
474
- simulator,
475
- shots,
476
- calset_id=None,
477
- max_gates_per_batch=max_gates_per_batch,
478
- )
479
479
 
480
- # Retrieve counts
481
- all_noiseless_counts[str(qubits)][depth], time_retrieve_noiseless[str(qubits)][depth] = retrieve_all_counts(
482
- all_noiseless_jobs
483
- )
480
+ mrb_circs = mrb_sim_circuits[f"{str(qubits)}_depth_{str(depth)}"].circuits
481
+
482
+ qcvv_logger.info("Getting simulation counts")
483
+ all_noiseless_counts[str(qubits)][depth] = simulator.run(mrb_circs).result().get_counts()
484
484
 
485
485
  # Compute polarizations for the current depth
486
486
  polarizations[depth] = compute_polarizations(
@@ -695,7 +695,7 @@ class MirrorRandomizedBenchmarking(Benchmark):
695
695
  mrb_untranspiled_circuits_lists: Dict[int, List[QuantumCircuit]] = {}
696
696
  time_circuit_generation[str(qubits)] = 0
697
697
  for depth in assigned_mrb_depths[str(qubits)]:
698
- qcvv_logger.info(f"Depth {depth}")
698
+ qcvv_logger.info(f"Depth {depth} - Generating all circuits")
699
699
  mrb_circuits[depth], elapsed_time = generate_fixed_depth_mrb_circuits(
700
700
  qubits,
701
701
  self.num_circuit_samples,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-benchmarks
3
- Version: 2.4
3
+ Version: 2.5
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes