iqm-benchmarks 2.49__py3-none-any.whl → 2.51__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.
- iqm/benchmarks/optimization/qscore.py +247 -44
- {iqm_benchmarks-2.49.dist-info → iqm_benchmarks-2.51.dist-info}/METADATA +3 -3
- {iqm_benchmarks-2.49.dist-info → iqm_benchmarks-2.51.dist-info}/RECORD +6 -6
- {iqm_benchmarks-2.49.dist-info → iqm_benchmarks-2.51.dist-info}/WHEEL +0 -0
- {iqm_benchmarks-2.49.dist-info → iqm_benchmarks-2.51.dist-info}/licenses/LICENSE +0 -0
- {iqm_benchmarks-2.49.dist-info → iqm_benchmarks-2.51.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
# pylint: disable=too-many-lines
|
|
1
2
|
"""
|
|
2
|
-
Qscore
|
|
3
|
+
This module contains functions and classes for the Qscore benchmarking process.
|
|
3
4
|
"""
|
|
4
5
|
|
|
5
6
|
import itertools
|
|
@@ -12,7 +13,8 @@ import matplotlib.pyplot as plt
|
|
|
12
13
|
from networkx import Graph
|
|
13
14
|
import networkx as nx
|
|
14
15
|
import numpy as np
|
|
15
|
-
from qiskit import QuantumCircuit
|
|
16
|
+
from qiskit import ClassicalRegister, QuantumCircuit, QuantumRegister
|
|
17
|
+
from qiskit.circuit.library import RZZGate
|
|
16
18
|
from scipy.optimize import basinhopping, minimize
|
|
17
19
|
import xarray as xr
|
|
18
20
|
|
|
@@ -34,6 +36,8 @@ from iqm.benchmarks.utils import ( # execute_with_dd,
|
|
|
34
36
|
submit_execute,
|
|
35
37
|
xrvariable_to_counts,
|
|
36
38
|
)
|
|
39
|
+
from iqm.iqm_client.transpile import ExistingMoveHandlingOptions
|
|
40
|
+
from iqm.qiskit_iqm import IQMCircuit, transpile_to_IQM
|
|
37
41
|
from iqm.qiskit_iqm.iqm_backend import IQMBackendBase
|
|
38
42
|
|
|
39
43
|
|
|
@@ -195,7 +199,7 @@ def get_optimal_angles(num_layers: int) -> List[float]:
|
|
|
195
199
|
# "The fixed angle conjecture for QAOA on regular MaxCut graphs."
|
|
196
200
|
# arXiv preprint arXiv:2107.00677 (2021).
|
|
197
201
|
|
|
198
|
-
OPTIMAL_INITIAL_ANGLES = {
|
|
202
|
+
OPTIMAL_INITIAL_ANGLES = { # pylint: disable=undefined-variable
|
|
199
203
|
"1": [-0.616, 0.393 / 2],
|
|
200
204
|
"2": [-0.488, 0.898 / 2, 0.555 / 2, 0.293 / 2],
|
|
201
205
|
"3": [-0.422, 0.798 / 2, 0.937 / 2, 0.609 / 2, 0.459 / 2, 0.235 / 2],
|
|
@@ -323,6 +327,76 @@ def get_optimal_angles(num_layers: int) -> List[float]:
|
|
|
323
327
|
return OPTIMAL_INITIAL_ANGLES[str(num_layers)]
|
|
324
328
|
|
|
325
329
|
|
|
330
|
+
def group_rzz_gates(circuit: QuantumCircuit):
|
|
331
|
+
"""
|
|
332
|
+
Extract and group commuting RZZ gates so that gates sharing a qubit
|
|
333
|
+
are placed next to each other.
|
|
334
|
+
|
|
335
|
+
Args:
|
|
336
|
+
circuit: QuantumCircuit containing RZZ gates.
|
|
337
|
+
|
|
338
|
+
Returns:
|
|
339
|
+
grouped_rzz: list of tuples (instr, [q0_idx, q1_idx])
|
|
340
|
+
in reordered grouping.
|
|
341
|
+
"""
|
|
342
|
+
# Collect RZZ gates as (gate_pos, instr, [q0, q1])
|
|
343
|
+
rzz_entries = []
|
|
344
|
+
for pos, (instr, qargs, _) in enumerate(circuit.data):
|
|
345
|
+
if isinstance(instr, RZZGate) or getattr(instr, "name", "") == "rzz":
|
|
346
|
+
qidxs = [circuit.find_bit(q).index for q in qargs]
|
|
347
|
+
rzz_entries.append((pos, instr, qidxs))
|
|
348
|
+
|
|
349
|
+
if not rzz_entries:
|
|
350
|
+
return []
|
|
351
|
+
|
|
352
|
+
# Build bipartite graph: gate nodes <-> qubit nodes
|
|
353
|
+
B = nx.Graph()
|
|
354
|
+
for gate_pos, instr, qidxs in rzz_entries:
|
|
355
|
+
gnode = f"g{gate_pos}"
|
|
356
|
+
B.add_node(gnode, kind="gate", instr=instr, qidxs=qidxs)
|
|
357
|
+
for q in qidxs:
|
|
358
|
+
qnode = f"q{q}"
|
|
359
|
+
B.add_node(qnode, kind="qubit", qidx=q)
|
|
360
|
+
B.add_edge(gnode, qnode)
|
|
361
|
+
|
|
362
|
+
grouped_rzz = []
|
|
363
|
+
|
|
364
|
+
# Repeatedly pick the hub qubit with the most RZZs
|
|
365
|
+
while True:
|
|
366
|
+
qubit_nodes = [n for n, d in B.nodes(data=True) if d["kind"] == "qubit"]
|
|
367
|
+
if not qubit_nodes:
|
|
368
|
+
break
|
|
369
|
+
|
|
370
|
+
# Pick hub: max degree, tie-break by smallest index
|
|
371
|
+
hub = max(qubit_nodes, key=lambda q: (B.degree(q), -int(q[1:])))
|
|
372
|
+
hub_idx = int(hub[1:])
|
|
373
|
+
|
|
374
|
+
# Gates connected to hub
|
|
375
|
+
connected_gates = [nbr for nbr in B.neighbors(hub) if nbr.startswith("g")]
|
|
376
|
+
if not connected_gates:
|
|
377
|
+
B.remove_node(hub)
|
|
378
|
+
continue
|
|
379
|
+
|
|
380
|
+
# Sort gates: prioritize partner qubits with higher degree
|
|
381
|
+
def sort_key(g):
|
|
382
|
+
qidxs = B.nodes[g]["qidxs"]
|
|
383
|
+
other = [q for q in qidxs if q != hub_idx][0]
|
|
384
|
+
return (-B.degree(f"q{other}"), other)
|
|
385
|
+
|
|
386
|
+
connected_gates.sort(key=sort_key)
|
|
387
|
+
|
|
388
|
+
# Append in chosen order
|
|
389
|
+
for g in connected_gates:
|
|
390
|
+
data = B.nodes[g]
|
|
391
|
+
grouped_rzz.append((data["qidxs"]))
|
|
392
|
+
B.remove_node(g)
|
|
393
|
+
|
|
394
|
+
# Remove hub itself
|
|
395
|
+
B.remove_node(hub)
|
|
396
|
+
|
|
397
|
+
return grouped_rzz
|
|
398
|
+
|
|
399
|
+
|
|
326
400
|
def plot_approximation_ratios(
|
|
327
401
|
nodes: list[int],
|
|
328
402
|
beta_ratio: list[float],
|
|
@@ -369,7 +443,7 @@ def plot_approximation_ratios(
|
|
|
369
443
|
ax.set_ylabel(r"Q-score ratio $\beta(n)$")
|
|
370
444
|
ax.set_xlabel("Number of nodes $(n)$")
|
|
371
445
|
plt.xticks(range(min(nodes), max(nodes) + 1))
|
|
372
|
-
plt.legend(loc="
|
|
446
|
+
plt.legend(loc="upper right")
|
|
373
447
|
plt.grid(True)
|
|
374
448
|
|
|
375
449
|
if use_virtual_node and use_classically_optimized_angles:
|
|
@@ -600,6 +674,7 @@ class QScoreBenchmark(Benchmark):
|
|
|
600
674
|
self.session_timestamp = strftime("%Y%m%d-%H%M%S")
|
|
601
675
|
self.execution_timestamp = ""
|
|
602
676
|
self.seed = configuration.seed
|
|
677
|
+
self.num_trials = configuration.num_trials
|
|
603
678
|
|
|
604
679
|
self.graph_physical: Graph
|
|
605
680
|
self.virtual_nodes: List[Tuple[int, int]]
|
|
@@ -622,10 +697,107 @@ class QScoreBenchmark(Benchmark):
|
|
|
622
697
|
list(x) for x in cast(Sequence[Sequence[int]], configuration.custom_qubits_array)
|
|
623
698
|
]
|
|
624
699
|
|
|
700
|
+
def greedy_vertex_cover_with_mapping(self, G: nx.Graph):
|
|
701
|
+
"""
|
|
702
|
+
Approximate a minimum vertex cover for a given graph, providing a mapping of nodes to the edges they cover.
|
|
703
|
+
|
|
704
|
+
Args:
|
|
705
|
+
G (nx.Graph): The input graph for which the vertex cover is to be computed.
|
|
706
|
+
|
|
707
|
+
Returns:
|
|
708
|
+
dict: A dictionary where keys are nodes and values are lists of edges that each node covers.
|
|
709
|
+
"""
|
|
710
|
+
|
|
711
|
+
G = G.copy()
|
|
712
|
+
cover_map = {}
|
|
713
|
+
|
|
714
|
+
while G.number_of_edges() > 0:
|
|
715
|
+
# Pick node with max degree
|
|
716
|
+
node = max(G.degree, key=lambda x: x[1])[0]
|
|
717
|
+
|
|
718
|
+
# Collect neighbors (unique)
|
|
719
|
+
neighbors = list(G.neighbors(node))
|
|
720
|
+
cover_map[node] = neighbors
|
|
721
|
+
|
|
722
|
+
# Remove node (and incident edges)
|
|
723
|
+
G.remove_node(node)
|
|
724
|
+
|
|
725
|
+
return cover_map
|
|
726
|
+
|
|
727
|
+
def generate_maxcut_ansatz_star( # pylint: disable=too-many-branches
|
|
728
|
+
self,
|
|
729
|
+
graph,
|
|
730
|
+
theta,
|
|
731
|
+
):
|
|
732
|
+
"""Generate an ansatz circuit for QAOA MaxCut, with measurements at the end.
|
|
733
|
+
|
|
734
|
+
Args:
|
|
735
|
+
graph (networkx graph): the MaxCut problem graph
|
|
736
|
+
theta (list[float]): the variational parameters for QAOA, first gammas then betas
|
|
737
|
+
|
|
738
|
+
Returns:
|
|
739
|
+
QuantumCircuit: the QAOA ansatz quantum circuit.
|
|
740
|
+
"""
|
|
741
|
+
|
|
742
|
+
gamma = theta[: self.num_qaoa_layers]
|
|
743
|
+
beta = theta[self.num_qaoa_layers :]
|
|
744
|
+
|
|
745
|
+
if self.graph_physical.number_of_nodes() != graph.number_of_nodes():
|
|
746
|
+
num_qubits = self.graph_physical.number_of_nodes()
|
|
747
|
+
# re-label the nodes to be between 0 and _num_qubits
|
|
748
|
+
self.node_to_qubit = {node: qubit for qubit, node in enumerate(list(self.graph_physical.nodes))}
|
|
749
|
+
self.qubit_to_node = dict(enumerate(list(self.graph_physical.nodes)))
|
|
750
|
+
else:
|
|
751
|
+
num_qubits = graph.number_of_nodes()
|
|
752
|
+
self.node_to_qubit = {node: node for node in list(self.graph_physical.nodes)} # no relabeling
|
|
753
|
+
self.qubit_to_node = self.node_to_qubit
|
|
754
|
+
|
|
755
|
+
covermap = self.greedy_vertex_cover_with_mapping(self.graph_physical)
|
|
756
|
+
new_covermap = {}
|
|
757
|
+
for key, value in covermap.items():
|
|
758
|
+
new_covermap[self.node_to_qubit[key]] = [self.node_to_qubit[i] for i in value]
|
|
759
|
+
covermap = new_covermap
|
|
760
|
+
|
|
761
|
+
compr = QuantumRegister(1, "compr")
|
|
762
|
+
q = QuantumRegister(num_qubits, "q")
|
|
763
|
+
c = ClassicalRegister(num_qubits, "c")
|
|
764
|
+
qaoa_qc = IQMCircuit(compr, q, c) # num_qb+1,num_qb)
|
|
765
|
+
# in case the graph is trivial: return empty circuit
|
|
766
|
+
if num_qubits == 0:
|
|
767
|
+
return QuantumCircuit(1)
|
|
768
|
+
for i in range(1, num_qubits + 1):
|
|
769
|
+
qaoa_qc.h(i)
|
|
770
|
+
for layer in range(self.num_qaoa_layers):
|
|
771
|
+
for move_qubit, edge_qubits in covermap.items():
|
|
772
|
+
qaoa_qc.move(move_qubit + 1, 0)
|
|
773
|
+
for edge_qubit in edge_qubits:
|
|
774
|
+
qaoa_qc.rzz(2 * gamma[layer], 0, edge_qubit + 1)
|
|
775
|
+
qaoa_qc.move(move_qubit + 1, 0)
|
|
776
|
+
|
|
777
|
+
# include edges of the virtual node as rz terms
|
|
778
|
+
for vn in self.virtual_nodes:
|
|
779
|
+
for edge in graph.edges(vn[0]):
|
|
780
|
+
# exclude edges between virtual nodes
|
|
781
|
+
edges_between_virtual_nodes = list(itertools.combinations([i[0] for i in self.virtual_nodes], 2))
|
|
782
|
+
if set(edge) not in list(map(set, edges_between_virtual_nodes)):
|
|
783
|
+
# The value of the fixed node defines the sign of the rz gate
|
|
784
|
+
sign = 1.0
|
|
785
|
+
if vn[1] == 1:
|
|
786
|
+
sign = -1.0
|
|
787
|
+
qaoa_qc.rz(sign * 2.0 * gamma[layer], self.node_to_qubit[edge[1]] + 1)
|
|
788
|
+
|
|
789
|
+
for i in range(1, num_qubits + 1):
|
|
790
|
+
qaoa_qc.rx(2 * beta[layer], i)
|
|
791
|
+
qaoa_qc.barrier()
|
|
792
|
+
qaoa_qc.measure(q, c)
|
|
793
|
+
|
|
794
|
+
return qaoa_qc
|
|
795
|
+
|
|
625
796
|
def generate_maxcut_ansatz( # pylint: disable=too-many-branches
|
|
626
797
|
self,
|
|
627
798
|
graph: Graph,
|
|
628
799
|
theta: list[float],
|
|
800
|
+
rzz_list=None,
|
|
629
801
|
) -> QuantumCircuit:
|
|
630
802
|
"""Generate an ansatz circuit for QAOA MaxCut, with measurements at the end.
|
|
631
803
|
|
|
@@ -656,10 +828,14 @@ class QScoreBenchmark(Benchmark):
|
|
|
656
828
|
for i in range(0, num_qubits):
|
|
657
829
|
qaoa_qc.h(i)
|
|
658
830
|
for layer in range(self.num_qaoa_layers):
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
831
|
+
if rzz_list is not None and layer == 0:
|
|
832
|
+
for rzzs in rzz_list:
|
|
833
|
+
qaoa_qc.rzz(2 * gamma[layer], rzzs[0], rzzs[1])
|
|
834
|
+
else:
|
|
835
|
+
for edge in self.graph_physical.edges():
|
|
836
|
+
i = self.node_to_qubit[edge[0]]
|
|
837
|
+
j = self.node_to_qubit[edge[1]]
|
|
838
|
+
qaoa_qc.rzz(2 * gamma[layer], i, j)
|
|
663
839
|
|
|
664
840
|
# include edges of the virtual node as rz terms
|
|
665
841
|
for vn in self.virtual_nodes:
|
|
@@ -792,6 +968,33 @@ class QScoreBenchmark(Benchmark):
|
|
|
792
968
|
no_edge_instances = []
|
|
793
969
|
qc_all = [] # all circuits, including those with no edges
|
|
794
970
|
start_seed = seed
|
|
971
|
+
|
|
972
|
+
# Choose the qubit layout
|
|
973
|
+
if self.choose_qubits_routine.lower() == "naive":
|
|
974
|
+
qubit_set = self.choose_qubits_naive(updated_num_nodes)
|
|
975
|
+
elif self.choose_qubits_routine.lower() == "custom" or self.choose_qubits_routine.lower() == "mapomatic":
|
|
976
|
+
qubit_set = self.choose_qubits_custom(updated_num_nodes)
|
|
977
|
+
else:
|
|
978
|
+
raise ValueError('choose_qubits_routine must either be "naive" or "custom".')
|
|
979
|
+
qubit_set_list.append(qubit_set)
|
|
980
|
+
|
|
981
|
+
qcvv_logger.setLevel(logging.WARNING)
|
|
982
|
+
if self.choose_qubits_routine == "naive":
|
|
983
|
+
active_qubit_set = None
|
|
984
|
+
effective_coupling_map = self.backend.coupling_map
|
|
985
|
+
else:
|
|
986
|
+
active_qubit_set = qubit_set
|
|
987
|
+
effective_coupling_map = self.backend.coupling_map.reduce(active_qubit_set)
|
|
988
|
+
|
|
989
|
+
transpilation_params = {
|
|
990
|
+
"backend": self.backend,
|
|
991
|
+
"qubits": active_qubit_set,
|
|
992
|
+
"coupling_map": effective_coupling_map,
|
|
993
|
+
"qiskit_optim_level": self.qiskit_optim_level,
|
|
994
|
+
"optimize_sqg": self.optimize_sqg,
|
|
995
|
+
"routing_method": self.routing_method,
|
|
996
|
+
}
|
|
997
|
+
|
|
795
998
|
for instance in range(self.num_instances):
|
|
796
999
|
qcvv_logger.debug(f"Executing graph {instance} with {num_nodes} nodes.")
|
|
797
1000
|
graph = nx.generators.erdos_renyi_graph(num_nodes, 0.5, seed=seed)
|
|
@@ -820,17 +1023,6 @@ class QScoreBenchmark(Benchmark):
|
|
|
820
1023
|
no_edge_instances.append(instance)
|
|
821
1024
|
qcvv_logger.debug(f"Graph {instance+1}/{self.num_instances} had no edges: cut size = 0.")
|
|
822
1025
|
|
|
823
|
-
# Choose the qubit layout
|
|
824
|
-
if self.choose_qubits_routine.lower() == "naive":
|
|
825
|
-
qubit_set = self.choose_qubits_naive(updated_num_nodes)
|
|
826
|
-
elif (
|
|
827
|
-
self.choose_qubits_routine.lower() == "custom" or self.choose_qubits_routine.lower() == "mapomatic"
|
|
828
|
-
):
|
|
829
|
-
qubit_set = self.choose_qubits_custom(updated_num_nodes)
|
|
830
|
-
else:
|
|
831
|
-
raise ValueError('choose_qubits_routine must either be "naive" or "custom".')
|
|
832
|
-
qubit_set_list.append(qubit_set)
|
|
833
|
-
|
|
834
1026
|
if self.use_classically_optimized_angles:
|
|
835
1027
|
if graph.number_of_edges() != 0:
|
|
836
1028
|
theta = calculate_optimal_angles_for_QAOA_p1(graph)
|
|
@@ -841,11 +1033,26 @@ class QScoreBenchmark(Benchmark):
|
|
|
841
1033
|
|
|
842
1034
|
theta_list.append(theta)
|
|
843
1035
|
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
1036
|
+
if self.backend.has_resonators():
|
|
1037
|
+
qc_opt = self.generate_maxcut_ansatz_star(graph, theta)
|
|
1038
|
+
else:
|
|
1039
|
+
qc_list_temp = []
|
|
1040
|
+
cz_count_temp = []
|
|
1041
|
+
for _ in range(self.num_trials):
|
|
1042
|
+
perm = np.random.permutation(num_nodes)
|
|
1043
|
+
mapping = dict(zip(graph.nodes, perm))
|
|
1044
|
+
G1_permuted = nx.relabel_nodes(graph, mapping)
|
|
1045
|
+
theta = calculate_optimal_angles_for_QAOA_p1(G1_permuted)
|
|
1046
|
+
qc_perm = self.generate_maxcut_ansatz(G1_permuted, theta)
|
|
1047
|
+
transpiled_qc_temp, _ = perform_backend_transpilation([qc_perm], **transpilation_params)
|
|
1048
|
+
cz_count_temp.append(transpiled_qc_temp[0].count_ops().get("cz", 0))
|
|
1049
|
+
qc_list_temp.append(qc_perm)
|
|
1050
|
+
min_cz_index = cz_count_temp.index(min(cz_count_temp))
|
|
1051
|
+
qc_opt = qc_list_temp[min_cz_index]
|
|
1052
|
+
|
|
1053
|
+
if len(qc_opt.count_ops()) != 0:
|
|
1054
|
+
qc_list.append(qc_opt)
|
|
1055
|
+
qc_all.append(qc_opt)
|
|
849
1056
|
qubit_to_node_copy = self.qubit_to_node.copy()
|
|
850
1057
|
qubit_to_node_list.append(qubit_to_node_copy)
|
|
851
1058
|
else:
|
|
@@ -855,24 +1062,20 @@ class QScoreBenchmark(Benchmark):
|
|
|
855
1062
|
seed += 1
|
|
856
1063
|
qcvv_logger.debug(f"Solved the MaxCut on graph {instance+1}/{self.num_instances}.")
|
|
857
1064
|
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
1065
|
+
if self.backend.has_resonators():
|
|
1066
|
+
transpiled_qc = [
|
|
1067
|
+
transpile_to_IQM(
|
|
1068
|
+
qc,
|
|
1069
|
+
self.backend,
|
|
1070
|
+
optimize_single_qubits=self.optimize_sqg,
|
|
1071
|
+
existing_moves_handling=ExistingMoveHandlingOptions.KEEP,
|
|
1072
|
+
perform_move_routing=False,
|
|
1073
|
+
optimization_level=self.qiskit_optim_level,
|
|
1074
|
+
)
|
|
1075
|
+
for qc in qc_list
|
|
1076
|
+
]
|
|
862
1077
|
else:
|
|
863
|
-
|
|
864
|
-
effective_coupling_map = self.backend.coupling_map.reduce(active_qubit_set)
|
|
865
|
-
|
|
866
|
-
transpilation_params = {
|
|
867
|
-
"backend": self.backend,
|
|
868
|
-
"qubits": active_qubit_set,
|
|
869
|
-
"coupling_map": effective_coupling_map,
|
|
870
|
-
"qiskit_optim_level": self.qiskit_optim_level,
|
|
871
|
-
"optimize_sqg": self.optimize_sqg,
|
|
872
|
-
"routing_method": self.routing_method,
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
transpiled_qc, _ = perform_backend_transpilation(qc_list, **transpilation_params)
|
|
1078
|
+
transpiled_qc, _ = perform_backend_transpilation(qc_list, **transpilation_params)
|
|
876
1079
|
|
|
877
1080
|
sorted_transpiled_qc_list = {tuple(qubit_set): transpiled_qc}
|
|
878
1081
|
# Execute on the backend
|
|
@@ -892,9 +1095,7 @@ class QScoreBenchmark(Benchmark):
|
|
|
892
1095
|
num_instances_with_edges = len(instance_with_edges)
|
|
893
1096
|
if self.REM:
|
|
894
1097
|
counts_retrieved, time_retrieve = retrieve_all_counts(jobs)
|
|
895
|
-
rem_counts = apply_readout_error_mitigation(
|
|
896
|
-
backend, transpiled_qc, counts_retrieved, self.mit_shots
|
|
897
|
-
)
|
|
1098
|
+
rem_counts = apply_readout_error_mitigation(backend, transpiled_qc, counts_retrieved, self.mit_shots)
|
|
898
1099
|
execution_results.extend(
|
|
899
1100
|
rem_counts[0][instance].nearest_probability_distribution()
|
|
900
1101
|
for instance in range(num_instances_with_edges)
|
|
@@ -960,6 +1161,7 @@ class QScoreConfiguration(BenchmarkConfigurationBase):
|
|
|
960
1161
|
* Default is 3.
|
|
961
1162
|
optimize_sqg (bool): Whether Single Qubit Gate Optimization is performed upon transpilation.
|
|
962
1163
|
* Default is True.
|
|
1164
|
+
num_trials (Optional[int]): Number of trials to perform when choosing graph permutations to minimize CZ gates.
|
|
963
1165
|
seed (int): The random seed.
|
|
964
1166
|
* Default is 1.
|
|
965
1167
|
REM (bool): Use readout error mitigation.
|
|
@@ -980,6 +1182,7 @@ class QScoreConfiguration(BenchmarkConfigurationBase):
|
|
|
980
1182
|
custom_qubits_array: Optional[Sequence[Sequence[int]]] = None
|
|
981
1183
|
qiskit_optim_level: int = 3
|
|
982
1184
|
optimize_sqg: bool = True
|
|
1185
|
+
num_trials: int = 10
|
|
983
1186
|
seed: int = 1
|
|
984
1187
|
REM: bool = False
|
|
985
1188
|
mit_shots: int = 1000
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: iqm-benchmarks
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.51
|
|
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>, Adrian Auer <adrian.auer@meetiqm.com>, Raphael Brieger <raphael.brieger@meetiqm.com>, Alessio Calzona <alessio.calzona@meetiqm.com>, Pedro Figueroa Romero <pedro.romero@meetiqm.com>, Amin Hosseinkhani <amin.hosseinkhani@meetiqm.com>, Miikka Koistinen <miikka@meetiqm.com>, Nadia Milazzo <nadia.milazzo@meetiqm.com>, Vicente Pina Canelles <vicente.pina@meetiqm.com>, Aniket Rath <aniket.rath@meetiqm.com>, Jami Rönkkö <jami@meetiqm.com>, Stefan Seegerer <stefan.seegerer@meetiqm.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/iqm-finland/iqm-benchmarks
|
|
@@ -19,8 +19,8 @@ Requires-Dist: networkx<4.0,>=3.3
|
|
|
19
19
|
Requires-Dist: rustworkx>=0.16.0
|
|
20
20
|
Requires-Dist: numpy<2.0,>=1.25.2
|
|
21
21
|
Requires-Dist: qiskit<=1.4.2,>=1.2.4
|
|
22
|
-
Requires-Dist: iqm-client[qiskit]<
|
|
23
|
-
Requires-Dist: iqm-station-control-client
|
|
22
|
+
Requires-Dist: iqm-client[qiskit]<33.0,>=32.1.1
|
|
23
|
+
Requires-Dist: iqm-station-control-client<12.0,>=11.3.1
|
|
24
24
|
Requires-Dist: requests<3.0,>=2.32.3
|
|
25
25
|
Requires-Dist: scikit-optimize<0.11.0,>=0.10.2
|
|
26
26
|
Requires-Dist: tabulate<1.0.0,>=0.9.0
|
|
@@ -16,7 +16,7 @@ iqm/benchmarks/entanglement/__init__.py,sha256=sHVVToRWRCz0LSntk1rQaoSNNeyZLPoiT
|
|
|
16
16
|
iqm/benchmarks/entanglement/ghz.py,sha256=bM0bqKnyyT3gnN4QNQfzOS8lXp7bqo1pNlUfo4LK3ug,41586
|
|
17
17
|
iqm/benchmarks/entanglement/graph_states.py,sha256=6qACedd3UXpiowXc9GW4QhSwO-CzHXnBA3dIC6nCIbE,62788
|
|
18
18
|
iqm/benchmarks/optimization/__init__.py,sha256=_ajW_OibYLCtzU5AUv5c2zuuVYn8ZNeZUcUUSIGt51M,747
|
|
19
|
-
iqm/benchmarks/optimization/qscore.py,sha256=
|
|
19
|
+
iqm/benchmarks/optimization/qscore.py,sha256=iDbL9aKR-fgw1kQA7cdjkEjwKW6ySufs9kexXgzxwMk,46058
|
|
20
20
|
iqm/benchmarks/quantum_volume/__init__.py,sha256=i-Q4SpDWELBw7frXnxm1j4wJRcxbIyrS5uEK_v06YHo,951
|
|
21
21
|
iqm/benchmarks/quantum_volume/clops.py,sha256=EUtO-_OYBYvwqb4xY3aubI2gc2Z6cBokRzt_E0608WA,31242
|
|
22
22
|
iqm/benchmarks/quantum_volume/quantum_volume.py,sha256=af9C4SdEPcYyZgQgtJYy2h_F8QWv1a0hEtN6hr4KeM0,36861
|
|
@@ -35,7 +35,7 @@ iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py,sha256=sq6MgN_
|
|
|
35
35
|
iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py,sha256=OHoAWajCE48dRDInwQUT8VvtzKad0ExefdqvZFTaYzs,28918
|
|
36
36
|
iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py,sha256=jRKbivWCZ3xdO1k0sx-ygC3s5DUkGSModd975PoAtcg,692
|
|
37
37
|
iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py,sha256=ijieNymik3BeEUpXS-m64mtgdHz9iAFELuLooHeZY0E,33252
|
|
38
|
-
iqm_benchmarks-2.
|
|
38
|
+
iqm_benchmarks-2.51.dist-info/licenses/LICENSE,sha256=2Ncb40-hqkTil78RPv3-YiJfKaJ8te9USJgliKqIdSY,11558
|
|
39
39
|
mGST/LICENSE,sha256=TtHNq55cUcbglb7uhVudeBLUh_qPdUoAEvU0BBwFz-k,1098
|
|
40
40
|
mGST/README.md,sha256=v_5kw253csHF4-RfE-44KqFmBXIsSMRmOtN0AUPrRxE,5050
|
|
41
41
|
mGST/additional_fns.py,sha256=MV0Pm5ap59IjhT_E3QhsZyM7lXOF1RZ9SD11zoaf43A,31781
|
|
@@ -46,7 +46,7 @@ mGST/optimization.py,sha256=x9tJ9wMQ5aONWpNpBMVtK0rwE6DRcOU33htNgrt0tx4,11015
|
|
|
46
46
|
mGST/qiskit_interface.py,sha256=uCdn-Q9CXI2f4FQSxGUy8GmmzQhr9NhCOFb2VPj0gTs,10061
|
|
47
47
|
mGST/reporting/figure_gen.py,sha256=xFPAHx1Trdqz7swn0kRqwc_jbRaNxhG9Nvx0jeitooo,25847
|
|
48
48
|
mGST/reporting/reporting.py,sha256=Wss1-zFsMEhzrrXKfP-RICau80ezjDIzcN555KhSehc,34160
|
|
49
|
-
iqm_benchmarks-2.
|
|
50
|
-
iqm_benchmarks-2.
|
|
51
|
-
iqm_benchmarks-2.
|
|
52
|
-
iqm_benchmarks-2.
|
|
49
|
+
iqm_benchmarks-2.51.dist-info/METADATA,sha256=jVyI05sFKgiBDmFwkfhIfoB-HT4gHIf9CDv7s4dRFvM,10968
|
|
50
|
+
iqm_benchmarks-2.51.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
51
|
+
iqm_benchmarks-2.51.dist-info/top_level.txt,sha256=3G23Z-1LGf-IOzTCUl6QwWqiQ3USz25Zt90Ihq192to,9
|
|
52
|
+
iqm_benchmarks-2.51.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|