iqm-benchmarks 2.17__py3-none-any.whl → 2.19__py3-none-any.whl

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.
@@ -602,6 +602,7 @@ class QScoreBenchmark(Benchmark):
602
602
  self.session_timestamp = strftime("%Y%m%d-%H%M%S")
603
603
  self.execution_timestamp = ""
604
604
  self.seed = configuration.seed
605
+ self.qpu_topology = configuration.qpu_topology
605
606
 
606
607
  self.graph_physical: Graph
607
608
  self.virtual_nodes: List[Tuple[int, int]]
@@ -747,11 +748,16 @@ class QScoreBenchmark(Benchmark):
747
748
  dataset = xr.Dataset()
748
749
  self.add_all_meta_to_dataset(dataset)
749
750
 
750
- if self.max_num_nodes is None or self.max_num_nodes == self.backend.num_qubits + 1:
751
+ if self.qpu_topology == "star":
752
+ nqubits = self.backend.num_qubits - 1 # need to leave out the resonator
753
+ else:
754
+ nqubits = self.backend.num_qubits
755
+
756
+ if self.max_num_nodes is None or self.max_num_nodes == nqubits + 1:
751
757
  if self.use_virtual_node:
752
- max_num_nodes = self.backend.num_qubits + 1
758
+ max_num_nodes = nqubits + 1
753
759
  else:
754
- max_num_nodes = self.backend.num_qubits
760
+ max_num_nodes = nqubits
755
761
  else:
756
762
  max_num_nodes = self.max_num_nodes
757
763
 
@@ -808,7 +814,6 @@ class QScoreBenchmark(Benchmark):
808
814
  qcvv_logger.debug(f"Graph {instance+1}/{self.num_instances} had no edges: cut size = 0.")
809
815
 
810
816
  # Choose the qubit layout
811
-
812
817
  if self.choose_qubits_routine.lower() == "naive":
813
818
  qubit_set = self.choose_qubits_naive(updated_num_nodes)
814
819
  elif (
@@ -932,9 +937,11 @@ class QScoreConfiguration(BenchmarkConfigurationBase):
932
937
  * Default is True.
933
938
  choose_qubits_routine (Literal["custom"]): The routine to select qubit layouts.
934
939
  * Default is "custom".
935
- min_num_qubits (int): Minumum number of qubits.
940
+ min_num_qubits (int): Minumum number of qubits.
936
941
  * Default is 2
937
942
  custom_qubits_array (Optional[Sequence[Sequence[int]]]): The physical qubit layouts to perform the benchmark on.
943
+ If virtual_node is set to True, then a given graph with n nodes requires n-1 selected qubits.
944
+ If virtual_node is set to False, then a given graph with n nodes requires n selected qubits.
938
945
  * Default is None.
939
946
  qiskit_optim_level (int): The Qiskit transpilation optimization level.
940
947
  * Default is 3.
@@ -946,6 +953,8 @@ class QScoreConfiguration(BenchmarkConfigurationBase):
946
953
  * Default is False.
947
954
  mit_shots: (int): Number of shots used in readout error mitigation.
948
955
  * Default is 1000.
956
+ qpu_topology: (str): Topology of the QPU, either "crystal" or "star".
957
+ * Default is "crystal".
949
958
  """
950
959
 
951
960
  benchmark: Type[Benchmark] = QScoreBenchmark
@@ -963,3 +972,4 @@ class QScoreConfiguration(BenchmarkConfigurationBase):
963
972
  seed: int = 1
964
973
  REM: bool = False
965
974
  mit_shots: int = 1000
975
+ qpu_topology: str = "crystal"
@@ -198,29 +198,20 @@ class M3IQM(mthree.M3Mitigation):
198
198
  trans_qcs[(num_jobs - 1) * circ_slice :]
199
199
  ]
200
200
  # Do job submission here
201
- # This Backend check is here for Qiskit direct access. Should be removed later.
202
201
  jobs = []
203
- if not isinstance(self.system, Backend):
204
- for circs in circs_list:
205
- transpiled_circuit = transpile(circs, self.system, optimization_level=0)
202
+ for circs in circs_list:
203
+ transpiled_circuit = transpile(circs, self.system, optimization_level=0)
204
+ if cal_id is None:
206
205
  _job = self.system.run(transpiled_circuit, shots=shots, rep_delay=self.rep_delay)
207
- jobs.append(_job)
208
-
209
- # *****************************************
210
- else: # That's what IQM backend do!
211
- # *****************************************
212
- for circs in circs_list:
213
- if cal_id is None:
214
- _job = self.system.run(circs, shots=shots, rep_delay=self.rep_delay)
215
- else:
216
- _job = self.system.run(
217
- circs,
218
- shots=shots,
219
- rep_delay=self.rep_delay,
220
- calibration_set_id=cal_id,
221
- )
222
- jobs.append(_job)
223
- qcvv_logger.info(f"REM: {len(circs)} calibration circuits to be executed!")
206
+ else:
207
+ _job = self.system.run(
208
+ transpiled_circuit,
209
+ shots=shots,
210
+ rep_delay=self.rep_delay,
211
+ calibration_set_id=cal_id,
212
+ )
213
+ jobs.append(_job)
214
+ qcvv_logger.info(f"REM: {len(circs)} calibration circuits to be executed!")
224
215
 
225
216
  # Execute job and cal building in new thread.
226
217
  self._job_error = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: iqm-benchmarks
3
- Version: 2.17
3
+ Version: 2.19
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>, Miikka Koistinen <miikka@meetiqm.com>, Adrian Auer <adrian.auer@meetiqm.com>, Nadia Milazzo <nadia.milazzo@meetiqm.com>
6
6
  Project-URL: Homepage, https://github.com/iqm-finland/iqm-benchmarks
@@ -3,7 +3,7 @@ iqm/benchmarks/benchmark.py,sha256=SGhBcSxLPUu-cVXAjG4Db2TRobFCRBYoE1NtTDK1lJg,4
3
3
  iqm/benchmarks/benchmark_definition.py,sha256=AZkvANrf0_0glbq_P_uo_YqbBU9IZa2gJlMVz6qT6VU,10500
4
4
  iqm/benchmarks/circuit_containers.py,sha256=anEtZEsodYqOX-34oZRmuKGeEpp_VfgG5045Mz4-4hI,7562
5
5
  iqm/benchmarks/logging_config.py,sha256=U7olP5Kr75AcLJqNODf9VBhJLVqIvA4AYR6J39D5rww,1052
6
- iqm/benchmarks/readout_mitigation.py,sha256=7FlbSH-RJTtQuRYLChwkQV_vBv0ZfMQTH519cAbyxQ4,12252
6
+ iqm/benchmarks/readout_mitigation.py,sha256=HLRka3LAlOiH0XdsQCAXmU1K8QVAbG29O_WJj1qv1Dg,11765
7
7
  iqm/benchmarks/utils.py,sha256=wOgf8x1Z-DsVUL5KQSaKXjGDXDBSvhmwg4Qo-vTOoo0,21172
8
8
  iqm/benchmarks/compressive_gst/__init__.py,sha256=LneifgYXtcwo2jcXo7GdUEHL6_peipukShhkrdaTRCA,929
9
9
  iqm/benchmarks/compressive_gst/compressive_gst.py,sha256=spq6jP0NLbjaJDzESpbfRPs0N_YheFWl2Wa6USHS5sI,22398
@@ -11,7 +11,7 @@ iqm/benchmarks/compressive_gst/gst_analysis.py,sha256=PxCThBfh2zdQpipI-6gAvLKdmk
11
11
  iqm/benchmarks/entanglement/__init__.py,sha256=9T7prOwqMmFWdb4t6ETAHZXKK5o6FvU2DvVb6WhNi-U,682
12
12
  iqm/benchmarks/entanglement/ghz.py,sha256=0C3zppwGGn_gIkxRWkV_mYqpkygZsu1Ap-xV9PcN0wY,42668
13
13
  iqm/benchmarks/optimization/__init__.py,sha256=_ajW_OibYLCtzU5AUv5c2zuuVYn8ZNeZUcUUSIGt51M,747
14
- iqm/benchmarks/optimization/qscore.py,sha256=q2gIU2blRagLfA6fU_iDg6WjdFgWMIqnKVvGgr-t3bI,36943
14
+ iqm/benchmarks/optimization/qscore.py,sha256=xAv97MRVUNB_YjRbxzM6Ph0Pz0ctJjSA46J9lrbwe-w,37541
15
15
  iqm/benchmarks/quantum_volume/__init__.py,sha256=i-Q4SpDWELBw7frXnxm1j4wJRcxbIyrS5uEK_v06YHo,951
16
16
  iqm/benchmarks/quantum_volume/clops.py,sha256=aLxq2sC6cvRmtbmgr7TvluE2edkARH_ZzpTD1LEQEjw,30957
17
17
  iqm/benchmarks/quantum_volume/quantum_volume.py,sha256=njX5lBty9jcWMuJnl7uNqRfwE9akMe5gcX-f1_uYDXk,36791
@@ -36,8 +36,8 @@ mGST/optimization.py,sha256=YHwkzIkYvsZOPjclR-BCQWh24jeqjuXp0BB0WX5Lwow,10559
36
36
  mGST/qiskit_interface.py,sha256=L4H-4SdhP_bjSFFvpQoF1E7EyGbIJ_CI_y4a7_YEwmU,10102
37
37
  mGST/reporting/figure_gen.py,sha256=6Xd8vwfy09hLY1YbJY6TRevuMsQSU4MsWqemly3ZO0I,12970
38
38
  mGST/reporting/reporting.py,sha256=We1cccz9BKbITYcSlZHdmBGdjMWAa1xNZe5tKP-yh_E,26004
39
- iqm_benchmarks-2.17.dist-info/LICENSE,sha256=2Ncb40-hqkTil78RPv3-YiJfKaJ8te9USJgliKqIdSY,11558
40
- iqm_benchmarks-2.17.dist-info/METADATA,sha256=V6mJE3LgQJMGIX3pzLmu_UQ-WhWfJSKnQJy0QpnCqzs,10286
41
- iqm_benchmarks-2.17.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
42
- iqm_benchmarks-2.17.dist-info/top_level.txt,sha256=3G23Z-1LGf-IOzTCUl6QwWqiQ3USz25Zt90Ihq192to,9
43
- iqm_benchmarks-2.17.dist-info/RECORD,,
39
+ iqm_benchmarks-2.19.dist-info/LICENSE,sha256=2Ncb40-hqkTil78RPv3-YiJfKaJ8te9USJgliKqIdSY,11558
40
+ iqm_benchmarks-2.19.dist-info/METADATA,sha256=dcQbluz1EOWN1M-n7hymt641XmnXgbAQKsN9NqbRVLY,10286
41
+ iqm_benchmarks-2.19.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
42
+ iqm_benchmarks-2.19.dist-info/top_level.txt,sha256=3G23Z-1LGf-IOzTCUl6QwWqiQ3USz25Zt90Ihq192to,9
43
+ iqm_benchmarks-2.19.dist-info/RECORD,,