From fe606c49223820ee05f72318bfe3169041666d3f Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:57:16 +0200 Subject: [PATCH 01/90] update git_ignore --- .gitignore | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 90137b308..c0b563690 100644 --- a/.gitignore +++ b/.gitignore @@ -174,3 +174,11 @@ out/build node_modules/ wheelhouse/ + +pytest.ini + +# ----------------------------------------------------------------------------- +# Personal / local development ignore rules +# (Feel free to add your own scratch or playground folders here) +# ----------------------------------------------------------------------------- +playground/ From 892cba331ac9293293a30a3bd85f91144c885337 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 27 Oct 2025 10:01:24 +0100 Subject: [PATCH 02/90] add networkx to mypy ignore --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1518bbb20..adb108a2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -153,7 +153,7 @@ exclude = [ [[tool.mypy.overrides]] module = ["qiskit.*", "qecsim.*", "qiskit_aer.*", "matplotlib.*", "scipy.*", "ldpc.*", "pytest_console_scripts.*", - "z3.*", "bposd.*", "numba.*", "pymatching.*", "stim.*", "multiprocess.*", "sinter.*", "qsample.*", "pandas.*", "tqdm.*"] + "z3.*", "bposd.*", "numba.*", "pymatching.*", "stim.*", "multiprocess.*", "sinter.*", "qsample.*", "pandas.*", "tqdm.*", "networkx.*"] ignore_missing_imports = true From 9d5fdb8841d1976e7da9e604a56c7e54b566a59b Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 27 Oct 2025 10:02:05 +0100 Subject: [PATCH 03/90] implement first version of min-cut solution --- src/mqt/qecc/circuit_compilation/__init__.py | 14 ++ .../code_switching_compiler.py | 179 ++++++++++++++++++ 2 files changed, 193 insertions(+) create mode 100644 src/mqt/qecc/circuit_compilation/__init__.py create mode 100644 src/mqt/qecc/circuit_compilation/code_switching_compiler.py diff --git a/src/mqt/qecc/circuit_compilation/__init__.py b/src/mqt/qecc/circuit_compilation/__init__.py new file mode 100644 index 000000000..88fca06d0 --- /dev/null +++ b/src/mqt/qecc/circuit_compilation/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +"""Methods and utilities for code switching compilation.""" + +from __future__ import annotations + +from .code_switching_compiler import CodeSwitchGraph + +__all__ = ["CodeSwitchGraph"] diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py new file mode 100644 index 000000000..843454585 --- /dev/null +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -0,0 +1,179 @@ +# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +"""Code Switching Compiler to find the minimum number of switches.""" + +from __future__ import annotations + +from typing import TYPE_CHECKING + +import networkx as nx + +if TYPE_CHECKING: + from qiskit import QuantumCircuit + + +class CodeSwitchGraph: + """A directed graph representation of a quantum circuit for code-switching analysis using min-cut / max-flow optimization. + + The graph is constructed such that: + - Each quantum operation (T, H, CNOT) corresponds to one or more nodes. + - Source (SRC) and sink (SNK) nodes represent two different codes: + * Source-connected nodes (T, CNOT) → operations that can be done transversally in code A. + * Sink-connected nodes (H, CNOT) → operations that can be done transversally in code B. + - Infinite-capacity edges enforce code consistency between operations (e.g., CNOT links). + - Finite-capacity edges (default 1.0) represent potential code transitions along qubit timelines. + + Attributes: + ---------- + G : nx.DiGraph + Directed graph storing the nodes and edges. + source : str + Identifier for the source node ("SRC"). + sink : str + Identifier for the sink node ("SNK"). + """ + + def __init__(self) -> None: + """Initialize the CodeSwitchGraph with source and sink nodes.""" + self.G: nx.DiGraph = nx.DiGraph() + self.source: str = "SRC" + self.sink: str = "SNK" + self.G.add_node(self.source) + self.G.add_node(self.sink) + + def add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: + """Add a node representing a quantum gate operation. + + Parameters + ---------- + gate_type : str + The gate type (e.g., "H", "T", "CNOTc", "CNOTt"). + qubit : int + Index of the qubit the gate acts on. + depth : int + Depth (or layer index) of the operation in the circuit. + + Returns: + ------- + str + The unique node identifier created for this operation. + """ + node_id = f"{gate_type}_q{qubit}_d{depth}" + self.G.add_node(node_id, gate=gate_type, qubit=qubit, depth=depth) + return node_id + + def add_infinite_edge(self, u: str, v: str) -> None: + """Add an edge of infinite capacity between two nodes. + + Parameters + ---------- + u : str + Source node identifier. + v : str + Target node identifier. + """ + self.G.add_edge(u, v, capacity=float("inf")) + self.G.add_edge(v, u, capacity=float("inf")) + + def add_regular_edge(self, u: str, v: str, capacity: float = 1.0) -> None: + """Add a regular (finite-capacity) directed edge. + + Parameters + ---------- + u : str + Source node identifier. + v : str + Target node identifier. + capacity : float, optional + Edge capacity (default is 1.0). + """ + self.G.add_edge(u, v, capacity=capacity) + self.G.add_edge(v, u, capacity=capacity) + + def connect_to_code(self, node_id: str, gate_type: str) -> None: + """Connect a gate node to the source and/or sink according to which code can perform the operation transversally. + + Parameters + ---------- + node_id : str + Node identifier of the gate operation. + gate_type : str + Type of the gate (e.g., "H", "T", "CNOT"). + """ + # Source code can perform T and CNOT gates + if gate_type == "T": + self.add_infinite_edge(self.source, node_id) + # Sink code can perform H and CNOT gates + if gate_type == "H": + self.add_infinite_edge(node_id, self.sink) + + def add_cnot_links(self, control_node: str, target_node: str) -> None: + """Add bidirectional infinite-capacity edges between two CNOT-related nodes to enforce that both qubits remain in the same code. + + Parameters + ---------- + control_node : str + Node representing the control qubit's CNOT operation. + target_node : str + Node representing the target qubit's CNOT operation. + """ + self.add_infinite_edge(control_node, target_node) + self.add_infinite_edge(target_node, control_node) + + def build_from_qiskit(self, circuit: QuantumCircuit) -> None: + """Construct the code-switch graph from a Qiskit QuantumCircuit. + + Parameters + ---------- + circuit : QuantumCircuit + The input quantum circuit containing H, T, and CX (CNOT) gates. + + Notes: + ----- + - For each gate, a node is created per qubit. + - Temporal ordering along qubit lines is maintained via regular edges. + - CNOT gates create two linked nodes (control, target) with infinite capacity. + """ + qubit_last_node: list[str | None] = [None] * circuit.num_qubits + depth = 0 + + for depth, instr in enumerate(circuit.data): + gate = instr.operation.name.upper() + qubits = [circuit.find_bit(q).index for q in instr.qubits] + + if gate in {"H", "T"}: + q = qubits[0] + node = self.add_gate_node(gate, q, depth) + self.connect_to_code(node, gate) + if qubit_last_node[q]: + self.add_regular_edge(qubit_last_node[q], node) + qubit_last_node[q] = node + + elif gate == "CX": + ctrl, tgt = qubits + node_ctrl = self.add_gate_node("CNOTc", ctrl, depth) + node_tgt = self.add_gate_node("CNOTt", tgt, depth) + self.add_cnot_links(node_ctrl, node_tgt) + for q, node in [(ctrl, node_ctrl), (tgt, node_tgt)]: + if qubit_last_node[q]: + self.add_regular_edge(qubit_last_node[q], node) + qubit_last_node[q] = node + + def compute_min_cut(self) -> tuple[float, set[str], set[str]]: + """Compute the minimum s-t cut between the source and sink. + + Returns: + ------- + Tuple[float, Set[str], Set[str]] + A tuple (cut_value, S, T) where: + - cut_value is the total capacity of the minimum cut, + - S is the set of nodes reachable from the source, + - T is the complementary set of nodes. + """ + cut_value, (S, T) = nx.minimum_cut(self.G, self.source, self.sink, capacity="capacity") # noqa: N806 + return cut_value, S, T From e5e16fc2d536ef9ad263851401c7bfc0e675be1b Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 28 Oct 2025 13:41:56 +0100 Subject: [PATCH 04/90] add one way transveral CNOTs to be allowed For this we fixed the arbitrary convention that the 2D Code corresponds to the source and the 3D code to the sink. --- .../code_switching_compiler.py | 45 +++++++++++++------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 843454585..4fe181639 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -67,7 +67,23 @@ def add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: self.G.add_node(node_id, gate=gate_type, qubit=qubit, depth=depth) return node_id - def add_infinite_edge(self, u: str, v: str) -> None: + def add_edge_with_capacity(self, u: str, v: str, capacity: float, bidirectional: bool = True) -> None: + """Add a directed edge with specified capacity between two nodes. + + Parameters + ---------- + u : str + Source node identifier. + v : str + Target node identifier. + capacity : float + Edge capacity. + """ + self.G.add_edge(u, v, capacity=capacity) + if bidirectional: + self.G.add_edge(v, u, capacity=capacity) + + def add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: """Add an edge of infinite capacity between two nodes. Parameters @@ -77,10 +93,9 @@ def add_infinite_edge(self, u: str, v: str) -> None: v : str Target node identifier. """ - self.G.add_edge(u, v, capacity=float("inf")) - self.G.add_edge(v, u, capacity=float("inf")) + self.add_edge_with_capacity(u, v, capacity=float("inf"), bidirectional=bidirectional) - def add_regular_edge(self, u: str, v: str, capacity: float = 1.0) -> None: + def add_regular_edge(self, u: str, v: str, capacity: float = 1.0, bidirectional: bool = True) -> None: """Add a regular (finite-capacity) directed edge. Parameters @@ -92,12 +107,17 @@ def add_regular_edge(self, u: str, v: str, capacity: float = 1.0) -> None: capacity : float, optional Edge capacity (default is 1.0). """ - self.G.add_edge(u, v, capacity=capacity) - self.G.add_edge(v, u, capacity=capacity) + self.add_edge_with_capacity(u, v, capacity=capacity, bidirectional=bidirectional) def connect_to_code(self, node_id: str, gate_type: str) -> None: """Connect a gate node to the source and/or sink according to which code can perform the operation transversally. + Note: Here we fix the convention that the 2D Color Code corresponds to the source (can perform H and CNOT) + and the 3D Surface Code corresponds to the sink (can perform T and CNOT). This convention is arbitrary and can be swapped. + However, swapping the convention requires to change the one-way transversal CNOT setting: + 2D Source + 3D Sink <-> (infinite edge) Control -> Target + 3D Source + 2D Sink <-> (infinite edge) Control <- Target + Parameters ---------- node_id : str @@ -107,12 +127,12 @@ def connect_to_code(self, node_id: str, gate_type: str) -> None: """ # Source code can perform T and CNOT gates if gate_type == "T": - self.add_infinite_edge(self.source, node_id) + self.add_infinite_edge(self.sink, node_id) # Sink code can perform H and CNOT gates if gate_type == "H": - self.add_infinite_edge(node_id, self.sink) + self.add_infinite_edge(node_id, self.source) - def add_cnot_links(self, control_node: str, target_node: str) -> None: + def add_cnot_links(self, control_node: str, target_node: str, one_way_transversal_cnot: bool = False) -> None: """Add bidirectional infinite-capacity edges between two CNOT-related nodes to enforce that both qubits remain in the same code. Parameters @@ -122,10 +142,9 @@ def add_cnot_links(self, control_node: str, target_node: str) -> None: target_node : str Node representing the target qubit's CNOT operation. """ - self.add_infinite_edge(control_node, target_node) - self.add_infinite_edge(target_node, control_node) + self.add_infinite_edge(control_node, target_node, bidirectional=not (one_way_transversal_cnot)) - def build_from_qiskit(self, circuit: QuantumCircuit) -> None: + def build_from_qiskit(self, circuit: QuantumCircuit, one_way_transversal_cnot: bool = False) -> None: """Construct the code-switch graph from a Qiskit QuantumCircuit. Parameters @@ -158,7 +177,7 @@ def build_from_qiskit(self, circuit: QuantumCircuit) -> None: ctrl, tgt = qubits node_ctrl = self.add_gate_node("CNOTc", ctrl, depth) node_tgt = self.add_gate_node("CNOTt", tgt, depth) - self.add_cnot_links(node_ctrl, node_tgt) + self.add_cnot_links(node_ctrl, node_tgt, one_way_transversal_cnot=one_way_transversal_cnot) for q, node in [(ctrl, node_ctrl), (tgt, node_tgt)]: if qubit_last_node[q]: self.add_regular_edge(qubit_last_node[q], node) From bdb5b9bc7b3567ea35be84c938c72f9c4dae2764 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 4 Nov 2025 08:41:02 +0100 Subject: [PATCH 05/90] add edge_type keyword to edges this helps to distinguish between unary edges used for bias and temporal edges used for actual switching locations --- .../circuit_compilation/code_switching_compiler.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 4fe181639..9ec7a2c03 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -67,7 +67,9 @@ def add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: self.G.add_node(node_id, gate=gate_type, qubit=qubit, depth=depth) return node_id - def add_edge_with_capacity(self, u: str, v: str, capacity: float, bidirectional: bool = True) -> None: + def add_edge_with_capacity( + self, u: str, v: str, capacity: float, edge_type: str = "temporal", bidirectional: bool = True + ) -> None: """Add a directed edge with specified capacity between two nodes. Parameters @@ -79,9 +81,9 @@ def add_edge_with_capacity(self, u: str, v: str, capacity: float, bidirectional: capacity : float Edge capacity. """ - self.G.add_edge(u, v, capacity=capacity) + self.G.add_edge(u, v, capacity=capacity, edge_type=edge_type) if bidirectional: - self.G.add_edge(v, u, capacity=capacity) + self.G.add_edge(v, u, capacity=capacity, edge_type=edge_type) def add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: """Add an edge of infinite capacity between two nodes. @@ -107,7 +109,7 @@ def add_regular_edge(self, u: str, v: str, capacity: float = 1.0, bidirectional: capacity : float, optional Edge capacity (default is 1.0). """ - self.add_edge_with_capacity(u, v, capacity=capacity, bidirectional=bidirectional) + self.add_edge_with_capacity(u, v, capacity=capacity, edge_type="temporal", bidirectional=bidirectional) def connect_to_code(self, node_id: str, gate_type: str) -> None: """Connect a gate node to the source and/or sink according to which code can perform the operation transversally. From 0e9b3cfa45ac76712bcef3f4d3f963d8f91ca4c4 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 4 Nov 2025 08:42:17 +0100 Subject: [PATCH 06/90] change default order of magnitude for temporal edges --- src/mqt/qecc/circuit_compilation/code_switching_compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 9ec7a2c03..a2b4774b5 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -97,7 +97,7 @@ def add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: """ self.add_edge_with_capacity(u, v, capacity=float("inf"), bidirectional=bidirectional) - def add_regular_edge(self, u: str, v: str, capacity: float = 1.0, bidirectional: bool = True) -> None: + def add_regular_edge(self, u: str, v: str, capacity: float = 100.0, bidirectional: bool = True) -> None: """Add a regular (finite-capacity) directed edge. Parameters From bb33537f5ef00037762792a29f6e4849b5aa105c Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 4 Nov 2025 08:44:40 +0100 Subject: [PATCH 07/90] add code bias functionality --- .../code_switching_compiler.py | 40 +++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index a2b4774b5..cc296dd02 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -146,7 +146,9 @@ def add_cnot_links(self, control_node: str, target_node: str, one_way_transversa """ self.add_infinite_edge(control_node, target_node, bidirectional=not (one_way_transversal_cnot)) - def build_from_qiskit(self, circuit: QuantumCircuit, one_way_transversal_cnot: bool = False) -> None: + def build_from_qiskit( + self, circuit: QuantumCircuit, one_way_transversal_cnot: bool = False, code_bias: bool = False + ) -> None: """Construct the code-switch graph from a Qiskit QuantumCircuit. Parameters @@ -180,12 +182,30 @@ def build_from_qiskit(self, circuit: QuantumCircuit, one_way_transversal_cnot: b node_ctrl = self.add_gate_node("CNOTc", ctrl, depth) node_tgt = self.add_gate_node("CNOTt", tgt, depth) self.add_cnot_links(node_ctrl, node_tgt, one_way_transversal_cnot=one_way_transversal_cnot) + if code_bias: + self.add_bias_edges(node_ctrl) + self.add_bias_edges(node_tgt) for q, node in [(ctrl, node_ctrl), (tgt, node_tgt)]: if qubit_last_node[q]: self.add_regular_edge(qubit_last_node[q], node) qubit_last_node[q] = node - def compute_min_cut(self) -> tuple[float, set[str], set[str]]: + def add_bias_edges(self, node_id: str, biased_code: str = "SRC") -> None: + """Add biased_code unary edges to the terminal nodes slightly preferring one code over the other. + + Parameters + ---------- + biased_code : float + Capacity of the biased_code edges to be added. + """ + if biased_code == "SRC": + self.add_edge_with_capacity(self.source, node_id, capacity=2.0, edge_type="unary") + self.add_edge_with_capacity(self.sink, node_id, capacity=1.0, edge_type="unary") + elif biased_code == "SNK": + self.add_edge_with_capacity(self.source, node_id, capacity=1.0, edge_type="unary") + self.add_edge_with_capacity(self.sink, node_id, capacity=2.0, edge_type="unary") + + def compute_min_cut(self, return_raw_data: bool = False) -> tuple[float, set[str], set[str]]: """Compute the minimum s-t cut between the source and sink. Returns: @@ -197,4 +217,18 @@ def compute_min_cut(self) -> tuple[float, set[str], set[str]]: - T is the complementary set of nodes. """ cut_value, (S, T) = nx.minimum_cut(self.G, self.source, self.sink, capacity="capacity") # noqa: N806 - return cut_value, S, T + num_switches = 0 + switch_cost = 0 + seen = set() + for u, v, data in self.G.edges(data=True): + if data["edge_type"] in {"temporal", "entangling"}: + # needed to avoid double counting edges in undirected sense + key = tuple(sorted((u, v))) + if key not in seen: + if (u in S and v in T) or (v in S and u in T): + num_switches += 1 + switch_cost += data["capacity"] + seen.add(key) + if return_raw_data: + return cut_value, S, T + return num_switches, S, T From 91df0eb062a686a605a5cd82e3728f77210318ba Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 4 Nov 2025 08:55:10 +0100 Subject: [PATCH 08/90] clear/ reorder code --- .../code_switching_compiler.py | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index cc296dd02..5400f4ff4 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -111,6 +111,21 @@ def add_regular_edge(self, u: str, v: str, capacity: float = 100.0, bidirectiona """ self.add_edge_with_capacity(u, v, capacity=capacity, edge_type="temporal", bidirectional=bidirectional) + def add_bias_edges(self, node_id: str, biased_code: str = "SRC") -> None: + """Add biased_code unary edges to the terminal nodes slightly preferring one code over the other. + + Parameters + ---------- + biased_code : float + Capacity of the biased_code edges to be added. + """ + if biased_code == "SRC": + self.add_edge_with_capacity(self.source, node_id, capacity=2.0, edge_type="unary") + self.add_edge_with_capacity(self.sink, node_id, capacity=1.0, edge_type="unary") + elif biased_code == "SNK": + self.add_edge_with_capacity(self.source, node_id, capacity=1.0, edge_type="unary") + self.add_edge_with_capacity(self.sink, node_id, capacity=2.0, edge_type="unary") + def connect_to_code(self, node_id: str, gate_type: str) -> None: """Connect a gate node to the source and/or sink according to which code can perform the operation transversally. @@ -190,21 +205,6 @@ def build_from_qiskit( self.add_regular_edge(qubit_last_node[q], node) qubit_last_node[q] = node - def add_bias_edges(self, node_id: str, biased_code: str = "SRC") -> None: - """Add biased_code unary edges to the terminal nodes slightly preferring one code over the other. - - Parameters - ---------- - biased_code : float - Capacity of the biased_code edges to be added. - """ - if biased_code == "SRC": - self.add_edge_with_capacity(self.source, node_id, capacity=2.0, edge_type="unary") - self.add_edge_with_capacity(self.sink, node_id, capacity=1.0, edge_type="unary") - elif biased_code == "SNK": - self.add_edge_with_capacity(self.source, node_id, capacity=1.0, edge_type="unary") - self.add_edge_with_capacity(self.sink, node_id, capacity=2.0, edge_type="unary") - def compute_min_cut(self, return_raw_data: bool = False) -> tuple[float, set[str], set[str]]: """Compute the minimum s-t cut between the source and sink. From eee407a4a6bf6d0cd75900b4305d6d8e20095f1a Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 5 Nov 2025 08:10:08 +0100 Subject: [PATCH 09/90] read in QC as dag to support depth and prepare idle switching --- .../code_switching_compiler.py | 57 +++++++++++-------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 5400f4ff4..1f07e1eaf 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -12,6 +12,7 @@ from typing import TYPE_CHECKING import networkx as nx +from qiskit.converters import circuit_to_dag if TYPE_CHECKING: from qiskit import QuantumCircuit @@ -177,33 +178,38 @@ def build_from_qiskit( - Temporal ordering along qubit lines is maintained via regular edges. - CNOT gates create two linked nodes (control, target) with infinite capacity. """ + dag = circuit_to_dag(circuit) + layers = list(dag.layers()) + qubit_activity: dict[int, set[int]] = {q: set() for q in range(circuit.num_qubits)} qubit_last_node: list[str | None] = [None] * circuit.num_qubits - depth = 0 - - for depth, instr in enumerate(circuit.data): - gate = instr.operation.name.upper() - qubits = [circuit.find_bit(q).index for q in instr.qubits] - - if gate in {"H", "T"}: - q = qubits[0] - node = self.add_gate_node(gate, q, depth) - self.connect_to_code(node, gate) - if qubit_last_node[q]: - self.add_regular_edge(qubit_last_node[q], node) - qubit_last_node[q] = node - - elif gate == "CX": - ctrl, tgt = qubits - node_ctrl = self.add_gate_node("CNOTc", ctrl, depth) - node_tgt = self.add_gate_node("CNOTt", tgt, depth) - self.add_cnot_links(node_ctrl, node_tgt, one_way_transversal_cnot=one_way_transversal_cnot) - if code_bias: - self.add_bias_edges(node_ctrl) - self.add_bias_edges(node_tgt) - for q, node in [(ctrl, node_ctrl), (tgt, node_tgt)]: + + for depth, layer in enumerate(layers): + for node in layer["graph"].op_nodes(): + qubits = [circuit.find_bit(q).index for q in node.qargs] + gate = node.name.upper() + for qubit_index in qubits: + qubit_activity[qubit_index].add(depth) + + if gate in {"H", "T"}: + q = qubits[0] + gate_node = self.add_gate_node(gate, q, depth) + self.connect_to_code(gate_node, gate) if qubit_last_node[q]: - self.add_regular_edge(qubit_last_node[q], node) - qubit_last_node[q] = node + self.add_regular_edge(qubit_last_node[q], gate_node) + qubit_last_node[q] = gate_node + + elif gate == "CX": + ctrl, tgt = qubits + node_ctrl = self.add_gate_node("CNOTc", ctrl, depth) + node_tgt = self.add_gate_node("CNOTt", tgt, depth) + self.add_cnot_links(node_ctrl, node_tgt, one_way_transversal_cnot=one_way_transversal_cnot) + if code_bias: + self.add_bias_edges(node_ctrl) + self.add_bias_edges(node_tgt) + for q, gate_node in [(ctrl, node_ctrl), (tgt, node_tgt)]: + if qubit_last_node[q]: + self.add_regular_edge(qubit_last_node[q], gate_node) + qubit_last_node[q] = gate_node def compute_min_cut(self, return_raw_data: bool = False) -> tuple[float, set[str], set[str]]: """Compute the minimum s-t cut between the source and sink. @@ -223,6 +229,7 @@ def compute_min_cut(self, return_raw_data: bool = False) -> tuple[float, set[str for u, v, data in self.G.edges(data=True): if data["edge_type"] in {"temporal", "entangling"}: # needed to avoid double counting edges in undirected sense + # BUG: must be repaired for one-way CNOTs (currently counts a valid edge as switch because we only check here if u and v are in different sets) key = tuple(sorted((u, v))) if key not in seen: if (u in S and v in T) or (v in S and u in T): From c1d3f52014d139feeb9c892d2829b04e1b048d90 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 5 Nov 2025 09:18:23 +0100 Subject: [PATCH 10/90] change qubit activity collection to list instead of set --- src/mqt/qecc/circuit_compilation/code_switching_compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 1f07e1eaf..daa14b764 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -180,7 +180,7 @@ def build_from_qiskit( """ dag = circuit_to_dag(circuit) layers = list(dag.layers()) - qubit_activity: dict[int, set[int]] = {q: set() for q in range(circuit.num_qubits)} + qubit_activity: dict[int, list[int]] = {q: [] for q in range(circuit.num_qubits)} qubit_last_node: list[str | None] = [None] * circuit.num_qubits for depth, layer in enumerate(layers): @@ -188,7 +188,7 @@ def build_from_qiskit( qubits = [circuit.find_bit(q).index for q in node.qargs] gate = node.name.upper() for qubit_index in qubits: - qubit_activity[qubit_index].add(depth) + qubit_activity[qubit_index].append(depth) if gate in {"H", "T"}: q = qubits[0] From adc87f5dddc7eb2ed58795142b61e588511c3ad9 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 5 Nov 2025 10:17:57 +0100 Subject: [PATCH 11/90] make Global default temporal edge weight --- src/mqt/qecc/circuit_compilation/code_switching_compiler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index daa14b764..c9d389adc 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -17,6 +17,8 @@ if TYPE_CHECKING: from qiskit import QuantumCircuit +DEFAULT_TEMPORAL_EDGE_CAPACITY = 100.0 + class CodeSwitchGraph: """A directed graph representation of a quantum circuit for code-switching analysis using min-cut / max-flow optimization. @@ -98,7 +100,9 @@ def add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: """ self.add_edge_with_capacity(u, v, capacity=float("inf"), bidirectional=bidirectional) - def add_regular_edge(self, u: str, v: str, capacity: float = 100.0, bidirectional: bool = True) -> None: + def add_regular_edge( + self, u: str, v: str, capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY, bidirectional: bool = True + ) -> None: """Add a regular (finite-capacity) directed edge. Parameters From 3bf1bff2f25c2b3449427f3f1e6066397f988e5e Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 5 Nov 2025 10:19:06 +0100 Subject: [PATCH 12/90] add idle bonus calculation and idle switching funcitonality --- .../code_switching_compiler.py | 70 ++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index c9d389adc..295b2e25c 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -166,8 +166,64 @@ def add_cnot_links(self, control_node: str, target_node: str, one_way_transversa """ self.add_infinite_edge(control_node, target_node, bidirectional=not (one_way_transversal_cnot)) + @staticmethod + def compute_idle_bonus(previous_depth: int, current_depth: int) -> float: + """Compute a bonus (capacity reduction) for idling qubits. + + The idea: if a qubit has been idle for several depth layers, + we reduce the capacity of the temporal edge between its last + and next gate nodes to encourage reuse of that qubit. + + Parameters + ---------- + previous_depth : int + The depth index of the previous active gate on the qubit. + current_depth : int + The depth index of the current active gate on the qubit. + + Returns: + ------- + float + The capacity reduction (bonus) to apply. Can be tuned by formula. + """ + idle_length = max(0, current_depth - previous_depth - 1) + + max_bonus = 5 + proportional_factor = 1 + return min(max_bonus, proportional_factor * idle_length) + + def _edge_capacity_with_idle_bonus( + self, depths: list[int], base_capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY + ) -> float: + """Compute the effective temporal edge capacity. + + Optionally reduced by an idle bonus if the qubit has been inactive for several layers. + + Parameters + ---------- + depths : list[int] + The ordered list of depth indices for a given qubit's gates. + base_capacity : float, optional + The default temporal edge capacity. + + Returns: + ------- + float + The adjusted edge capacity, ensuring a lower bound of 1.0. + """ + if len(depths) < 2: + return base_capacity + + prev_depth, curr_depth = depths[-2], depths[-1] + bonus = self.compute_idle_bonus(prev_depth, curr_depth) + return max(1.0, base_capacity - bonus) + def build_from_qiskit( - self, circuit: QuantumCircuit, one_way_transversal_cnot: bool = False, code_bias: bool = False + self, + circuit: QuantumCircuit, + one_way_transversal_cnot: bool = False, + code_bias: bool = False, + idle_bonus: bool = False, ) -> None: """Construct the code-switch graph from a Qiskit QuantumCircuit. @@ -175,12 +231,17 @@ def build_from_qiskit( ---------- circuit : QuantumCircuit The input quantum circuit containing H, T, and CX (CNOT) gates. + one_way_transversal_cnot : bool, optional + If True, restrict transversal CNOTs to one direction. + code_bias : bool, optional + If True, add bias edges for CNOT nodes. Notes: ----- - For each gate, a node is created per qubit. - Temporal ordering along qubit lines is maintained via regular edges. - CNOT gates create two linked nodes (control, target) with infinite capacity. + - Optionally adds code bias edges or one-way transversal CNOT constraints. """ dag = circuit_to_dag(circuit) layers = list(dag.layers()) @@ -212,7 +273,12 @@ def build_from_qiskit( self.add_bias_edges(node_tgt) for q, gate_node in [(ctrl, node_ctrl), (tgt, node_tgt)]: if qubit_last_node[q]: - self.add_regular_edge(qubit_last_node[q], gate_node) + capacity = ( + self._edge_capacity_with_idle_bonus(qubit_activity[q]) + if idle_bonus + else DEFAULT_TEMPORAL_EDGE_CAPACITY + ) + self.add_regular_edge(qubit_last_node[q], gate_node, capacity=capacity) qubit_last_node[q] = gate_node def compute_min_cut(self, return_raw_data: bool = False) -> tuple[float, set[str], set[str]]: From 1c7684e9a09304db164af647e0680f2b22a625e7 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 5 Nov 2025 12:51:27 +0100 Subject: [PATCH 13/90] update docstrings and comments --- .../code_switching_compiler.py | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 295b2e25c..9982a2356 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -26,10 +26,10 @@ class CodeSwitchGraph: The graph is constructed such that: - Each quantum operation (T, H, CNOT) corresponds to one or more nodes. - Source (SRC) and sink (SNK) nodes represent two different codes: - * Source-connected nodes (T, CNOT) → operations that can be done transversally in code A. - * Sink-connected nodes (H, CNOT) → operations that can be done transversally in code B. + * Source-connected nodes (H, CNOT) → operations that can be done transversally in code a 2D Color Code. + * Sink-connected nodes (T, CNOT) → operations that can be done transversally in code a 3D Color Code. - Infinite-capacity edges enforce code consistency between operations (e.g., CNOT links). - - Finite-capacity edges (default 1.0) represent potential code transitions along qubit timelines. + - Finite-capacity (temporal) edges represent potential code transitions along qubit timelines. Attributes: ---------- @@ -83,6 +83,10 @@ def add_edge_with_capacity( Target node identifier. capacity : float Edge capacity. + edge_type : str, optional + Type of the edge (default is "temporal"). + bidirectional : bool, optional + If True, add the reverse edge as well (default is True). """ self.G.add_edge(u, v, capacity=capacity, edge_type=edge_type) if bidirectional: @@ -97,6 +101,8 @@ def add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: Source node identifier. v : str Target node identifier. + bidirectional : bool, optional + If True, add the reverse edge as well (default is True). """ self.add_edge_with_capacity(u, v, capacity=float("inf"), bidirectional=bidirectional) @@ -112,7 +118,9 @@ def add_regular_edge( v : str Target node identifier. capacity : float, optional - Edge capacity (default is 1.0). + Edge capacity. + bidirectional : bool, optional + If True, add the reverse edge as well (default is True). """ self.add_edge_with_capacity(u, v, capacity=capacity, edge_type="temporal", bidirectional=bidirectional) @@ -147,10 +155,10 @@ def connect_to_code(self, node_id: str, gate_type: str) -> None: gate_type : str Type of the gate (e.g., "H", "T", "CNOT"). """ - # Source code can perform T and CNOT gates + # Sink code can perform T and CNOT gates if gate_type == "T": self.add_infinite_edge(self.sink, node_id) - # Sink code can perform H and CNOT gates + # Source code can perform H and CNOT gates if gate_type == "H": self.add_infinite_edge(node_id, self.source) @@ -163,6 +171,8 @@ def add_cnot_links(self, control_node: str, target_node: str, one_way_transversa Node representing the control qubit's CNOT operation. target_node : str Node representing the target qubit's CNOT operation. + one_way_transversal_cnot : bool, optional + If True, allow transversal CNOTs from 3D (control) to 2D (target) besides the usual requirement that both qubits remain in the same code. """ self.add_infinite_edge(control_node, target_node, bidirectional=not (one_way_transversal_cnot)) @@ -235,6 +245,8 @@ def build_from_qiskit( If True, restrict transversal CNOTs to one direction. code_bias : bool, optional If True, add bias edges for CNOT nodes. + idle_bonus : bool, optional + If True, apply idle bonuses to temporal edges. Notes: ----- @@ -242,6 +254,7 @@ def build_from_qiskit( - Temporal ordering along qubit lines is maintained via regular edges. - CNOT gates create two linked nodes (control, target) with infinite capacity. - Optionally adds code bias edges or one-way transversal CNOT constraints. + - Idle bonuses reduce temporal edge capacities for qubits idle over multiple layers. """ dag = circuit_to_dag(circuit) layers = list(dag.layers()) From 73ffd1c36c4349104c8a4fb628370fed062627ee Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 5 Nov 2025 14:44:15 +0100 Subject: [PATCH 14/90] fix counting of switches prior every edge with nodes in different codes were counted but this included one-way --- src/mqt/qecc/circuit_compilation/code_switching_compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 9982a2356..81d7f1e12 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -104,7 +104,7 @@ def add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: bidirectional : bool, optional If True, add the reverse edge as well (default is True). """ - self.add_edge_with_capacity(u, v, capacity=float("inf"), bidirectional=bidirectional) + self.add_edge_with_capacity(u, v, capacity=float("inf"), edge_type="cnot", bidirectional=bidirectional) def add_regular_edge( self, u: str, v: str, capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY, bidirectional: bool = True @@ -310,7 +310,7 @@ def compute_min_cut(self, return_raw_data: bool = False) -> tuple[float, set[str switch_cost = 0 seen = set() for u, v, data in self.G.edges(data=True): - if data["edge_type"] in {"temporal", "entangling"}: + if data["edge_type"] == "temporal": # needed to avoid double counting edges in undirected sense # BUG: must be repaired for one-way CNOTs (currently counts a valid edge as switch because we only check here if u and v are in different sets) key = tuple(sorted((u, v))) From 5b08d68bd66fcdb8dd8cc8a8d1eb6d7900cec3b8 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 5 Nov 2025 14:46:32 +0100 Subject: [PATCH 15/90] Revert "fix counting of switches" This reverts commit 73ffd1c36c4349104c8a4fb628370fed062627ee. --- src/mqt/qecc/circuit_compilation/code_switching_compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 81d7f1e12..9982a2356 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -104,7 +104,7 @@ def add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: bidirectional : bool, optional If True, add the reverse edge as well (default is True). """ - self.add_edge_with_capacity(u, v, capacity=float("inf"), edge_type="cnot", bidirectional=bidirectional) + self.add_edge_with_capacity(u, v, capacity=float("inf"), bidirectional=bidirectional) def add_regular_edge( self, u: str, v: str, capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY, bidirectional: bool = True @@ -310,7 +310,7 @@ def compute_min_cut(self, return_raw_data: bool = False) -> tuple[float, set[str switch_cost = 0 seen = set() for u, v, data in self.G.edges(data=True): - if data["edge_type"] == "temporal": + if data["edge_type"] in {"temporal", "entangling"}: # needed to avoid double counting edges in undirected sense # BUG: must be repaired for one-way CNOTs (currently counts a valid edge as switch because we only check here if u and v are in different sets) key = tuple(sorted((u, v))) From ad6ff67946dc3058304d6e6ad548dfdbba9e28ea Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 5 Nov 2025 14:52:52 +0100 Subject: [PATCH 16/90] fix counting of switching operations now infinite edges are of type "fixed" and won't be count --- src/mqt/qecc/circuit_compilation/code_switching_compiler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 9982a2356..35a5201dd 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -104,7 +104,7 @@ def add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: bidirectional : bool, optional If True, add the reverse edge as well (default is True). """ - self.add_edge_with_capacity(u, v, capacity=float("inf"), bidirectional=bidirectional) + self.add_edge_with_capacity(u, v, capacity=float("inf"), edge_type="fixed", bidirectional=bidirectional) def add_regular_edge( self, u: str, v: str, capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY, bidirectional: bool = True @@ -310,9 +310,8 @@ def compute_min_cut(self, return_raw_data: bool = False) -> tuple[float, set[str switch_cost = 0 seen = set() for u, v, data in self.G.edges(data=True): - if data["edge_type"] in {"temporal", "entangling"}: + if data["edge_type"] == "temporal": # needed to avoid double counting edges in undirected sense - # BUG: must be repaired for one-way CNOTs (currently counts a valid edge as switch because we only check here if u and v are in different sets) key = tuple(sorted((u, v))) if key not in seen: if (u in S and v in T) or (v in S and u in T): From c63e2aa7bd02699e9e332d14e79de3b7e4c7f8e6 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Thu, 6 Nov 2025 10:27:41 +0100 Subject: [PATCH 17/90] add placeholder switch operations to qiskit circuit now we can add to a given qiskit circuit the switching operations as placeholder operations with a given depth to simulate how much switching operations increase circuit depth --- src/mqt/qecc/circuit_compilation/__init__.py | 4 +- .../code_switching_compiler.py | 134 +++++++++++++++++- 2 files changed, 131 insertions(+), 7 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/__init__.py b/src/mqt/qecc/circuit_compilation/__init__.py index 88fca06d0..e2c173779 100644 --- a/src/mqt/qecc/circuit_compilation/__init__.py +++ b/src/mqt/qecc/circuit_compilation/__init__.py @@ -9,6 +9,6 @@ from __future__ import annotations -from .code_switching_compiler import CodeSwitchGraph +from .code_switching_compiler import CodeSwitchGraph, insert_switch_placeholders -__all__ = ["CodeSwitchGraph"] +__all__ = ["CodeSwitchGraph", "insert_switch_placeholders"] diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 35a5201dd..407f83e53 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -9,13 +9,10 @@ from __future__ import annotations -from typing import TYPE_CHECKING - import networkx as nx +from qiskit import QuantumCircuit from qiskit.converters import circuit_to_dag - -if TYPE_CHECKING: - from qiskit import QuantumCircuit +from qiskit.dagcircuit import DAGOpNode DEFAULT_TEMPORAL_EDGE_CAPACITY = 100.0 @@ -321,3 +318,130 @@ def compute_min_cut(self, return_raw_data: bool = False) -> tuple[float, set[str if return_raw_data: return cut_value, S, T return num_switches, S, T + + +def inspect_serial_layers(circuit: QuantumCircuit) -> list[dict[str, object]]: + """Return a lightweight description of `dag.layers()` for debugging. + + Each list element corresponds to one serial layer and contains: + - 'ops': list of (op.name, [qubit indices touched]) tuples for the layer. + + Parameters + ---------- + circuit : QuantumCircuit + Circuit to inspect. + + Returns: + ------- + List[Dict] + A list describing each layer. Use this to confirm layer indices and which + qubits are active in each layer. + """ + dag = circuit_to_dag(circuit) + layers = list(dag.layers()) + layers_descr = [] + + for layer_idx, layer in enumerate(layers): + layer_graph = layer["graph"] + ops_in_layer = [] + for node in layer_graph.op_nodes(): + assert isinstance(node, DAGOpNode) + # map Qubit objects to their indices in the original circuit + q_indices = [circuit.find_bit(q).index for q in node.qargs] if node.qargs else [] + ops_in_layer.append((getattr(node.op, "name", repr(node.op)), q_indices)) + layers_descr.append({"layer_index": layer_idx, "ops": ops_in_layer}) + + return layers_descr + + +def insert_switch_placeholders( + circuit: QuantumCircuit, + switch_positions: list[tuple[int, int]], + placeholder_depth: int = 1, +) -> QuantumCircuit: + """Return a new circuit with 'switch' placeholders inserted between global DAG layers. + + This function inserts placeholders *after* the entire global layer with index + `layer_index` (i.e., between layer `layer_index` and the next). Placeholders are + placed on the requested qubit regardless of whether that qubit was active in that layer. + + Parameters + ---------- + circuit : QuantumCircuit + The original circuit to augment. + switch_positions : List[Tuple[int, int]] + List of (qubit_index, layer_index). `layer_index` refers to the index + from `list(circuit_to_dag(circuit).layers())`. A placeholder for + `(q, k)` will be inserted after global layer `k`. + placeholder_depth : int, optional + Virtual depth (single-qubit layers) the placeholder should represent. + expand_placeholder : bool, optional + If True, expand each placeholder into `placeholder_depth` calls to + `QuantumCircuit.id(qubit)` so that `QuantumCircuit.depth()` increases. + If False, append a single `SwitchGate` marker (informational only). + + Returns: + ------- + QuantumCircuit + New circuit with placeholders inserted. + """ + # Build DAG and layers + dag = circuit_to_dag(circuit) + layers = list(dag.layers()) + + # Normalize and group requested placeholders by qubit + placeholders_by_qubit: dict[int, list[int]] = {} + for qidx, layer_idx in switch_positions: + if layer_idx < 0: + # ignore negative indices (could alternatively raise) + continue + placeholders_by_qubit.setdefault(qidx, []).append(layer_idx) + + # Sort layer indices per qubit for deterministic behavior + for depths in placeholders_by_qubit.values(): + depths.sort() + + # Prepare output circuit with same registers + new_qc = QuantumCircuit(*circuit.qregs, *circuit.cregs, name=circuit.name + "_with_switches") + + # Track which placeholders we already inserted + inserted_placeholders: dict[int, set[int]] = {q: set() for q in placeholders_by_qubit} + + def _append_placeholder_on_qubit(q_index: int, depth_equiv: int) -> None: + """Append a placeholder (either expanded ids or a SwitchGate) on the qubit.""" + qubit = circuit.qubits[q_index] + # append id several times so `.depth()` counts them + for _ in range(max(1, int(depth_equiv))): + new_qc.id(qubit) + + # Iterate layers in order; copy each op, then after the whole layer insert placeholders for that layer + for depth_idx, layer in enumerate(layers): + layer_graph = layer["graph"] + # append ops of the layer to new_qc (deterministic order: iterate nodes) + for node in layer_graph.op_nodes(): + assert isinstance(node, DAGOpNode) + # Map node.qargs (Qubit objects) to the corresponding qubit objects of the original circuit + q_indices = [circuit.find_bit(q).index for q in node.qargs] if node.qargs else [] + qbit_objs = [circuit.qubits[i] for i in q_indices] + c_indices = [circuit.find_bit(c).index for c in node.cargs] if getattr(node, "cargs", None) else [] + cbit_objs = [circuit.clbits[i] for i in c_indices] if c_indices else [] + + # Append the operation to the new circuit on the same physical qubits/bits + new_qc.append(node.op, qbit_objs, cbit_objs) + + # --- AFTER FINISHING THIS GLOBAL LAYER: insert placeholders targeted at this layer --- + for q_index, depths in placeholders_by_qubit.items(): + for target_depth in depths: + if target_depth == depth_idx and target_depth not in inserted_placeholders[q_index]: + _append_placeholder_on_qubit(q_index, placeholder_depth) + inserted_placeholders[q_index].add(target_depth) + + # Append any placeholders whose requested layer index was beyond the number of layers + for q_index, depths in placeholders_by_qubit.items(): + for target_depth in depths: + if target_depth not in inserted_placeholders[q_index]: + # target was never inserted (layer out of range) -> append at end + _append_placeholder_on_qubit(q_index, placeholder_depth) + inserted_placeholders[q_index].add(target_depth) + + return new_qc From 9b5bb384c8eb1c20814afd3210fe9d15b19721a4 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Thu, 6 Nov 2025 12:57:30 +0100 Subject: [PATCH 18/90] add extraction of switching position --- .../code_switching_compiler.py | 48 ++++++++++++++----- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 407f83e53..5677d826c 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -9,6 +9,8 @@ from __future__ import annotations +import re + import networkx as nx from qiskit import QuantumCircuit from qiskit.converters import circuit_to_dag @@ -291,7 +293,9 @@ def build_from_qiskit( self.add_regular_edge(qubit_last_node[q], gate_node, capacity=capacity) qubit_last_node[q] = gate_node - def compute_min_cut(self, return_raw_data: bool = False) -> tuple[float, set[str], set[str]]: + def compute_min_cut( + self, return_raw_data: bool = False + ) -> tuple[int, list[tuple[int, int]]] | tuple[float, set[str], set[str]]: """Compute the minimum s-t cut between the source and sink. Returns: @@ -303,21 +307,39 @@ def compute_min_cut(self, return_raw_data: bool = False) -> tuple[float, set[str - T is the complementary set of nodes. """ cut_value, (S, T) = nx.minimum_cut(self.G, self.source, self.sink, capacity="capacity") # noqa: N806 - num_switches = 0 - switch_cost = 0 + num_switches, switch_positions = self.extract_switch_locations(S, T) + if return_raw_data: + return cut_value, S, T + return num_switches, switch_positions + + def extract_switch_locations(self, S: set[str], T: set[str]) -> tuple[int, list[tuple[int, int]]]: # noqa: N803 + """Return a list of (qubit, depth) pairs where switches should be inserted.""" + switch_positions = [] seen = set() for u, v, data in self.G.edges(data=True): - if data["edge_type"] == "temporal": - # needed to avoid double counting edges in undirected sense + if data.get("edge_type") == "temporal": key = tuple(sorted((u, v))) - if key not in seen: - if (u in S and v in T) or (v in S and u in T): - num_switches += 1 - switch_cost += data["capacity"] - seen.add(key) - if return_raw_data: - return cut_value, S, T - return num_switches, S, T + if key in seen: + continue + seen.add(key) + if (u in S and v in T) or (v in S and u in T): + # We can take e.g. the 'earlier' node in time as the insertion point + qubit, depth = parse_node_id(u) + switch_positions.append((qubit, depth)) + return len(switch_positions), switch_positions + + +pattern = re.compile(r".*_q(\d+)_d(\d+)") + + +def parse_node_id(node_id: str) -> tuple[int, int]: + """Extract (qubit, depth) from a node_id like 'H_q0_d3'.""" + match = pattern.match(node_id) + if not match: + msg = f"Invalid node_id format: {node_id}" + raise ValueError(msg) + qubit, depth = map(int, match.groups()) + return qubit, depth def inspect_serial_layers(circuit: QuantumCircuit) -> list[dict[str, object]]: From 4317cd4d4274cb423a7a072fc16544b1ea6db448 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 12 Nov 2025 11:37:19 +0100 Subject: [PATCH 19/90] add feature that idle bonus only considered for certain length bonus will only be applied when the idle lenght is longer than the assumed switching length in units of single qubit lengths --- src/mqt/qecc/circuit_compilation/code_switching_compiler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 5677d826c..ff96cc01b 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -16,7 +16,8 @@ from qiskit.converters import circuit_to_dag from qiskit.dagcircuit import DAGOpNode -DEFAULT_TEMPORAL_EDGE_CAPACITY = 100.0 +DEFAULT_TEMPORAL_EDGE_CAPACITY = 1000.0 +SWITCHING_LENGTH = 2 # minimum idle length before considering a bonus class CodeSwitchGraph: @@ -197,6 +198,9 @@ def compute_idle_bonus(previous_depth: int, current_depth: int) -> float: """ idle_length = max(0, current_depth - previous_depth - 1) + if idle_length <= SWITCHING_LENGTH: + idle_length = 0 + max_bonus = 5 proportional_factor = 1 return min(max_bonus, proportional_factor * idle_length) From 2c58f776a8596aeeeb6e423bcd30c34c5e8c9fda Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 12 Nov 2025 11:40:09 +0100 Subject: [PATCH 20/90] change return of min-cut function --- src/mqt/qecc/circuit_compilation/code_switching_compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index ff96cc01b..abf9c7553 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -299,7 +299,7 @@ def build_from_qiskit( def compute_min_cut( self, return_raw_data: bool = False - ) -> tuple[int, list[tuple[int, int]]] | tuple[float, set[str], set[str]]: + ) -> tuple[int, list[tuple[int, int]], set[str], set[str]] | tuple[float, set[str], set[str]]: """Compute the minimum s-t cut between the source and sink. Returns: @@ -314,7 +314,7 @@ def compute_min_cut( num_switches, switch_positions = self.extract_switch_locations(S, T) if return_raw_data: return cut_value, S, T - return num_switches, switch_positions + return num_switches, switch_positions, S, T def extract_switch_locations(self, S: set[str], T: set[str]) -> tuple[int, list[tuple[int, int]]]: # noqa: N803 """Return a list of (qubit, depth) pairs where switches should be inserted.""" From 38d1304bc1ce4504f66a12706589edd5f2eff02a Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Thu, 13 Nov 2025 17:52:33 +0100 Subject: [PATCH 21/90] add scripts for generating ciruits --- .../cs_compiler/generate_random_circuits.py | 67 +++++++++++++++++++ scripts/cs_compiler/run_generate_circuits.sh | 26 +++++++ 2 files changed, 93 insertions(+) create mode 100644 scripts/cs_compiler/generate_random_circuits.py create mode 100644 scripts/cs_compiler/run_generate_circuits.sh diff --git a/scripts/cs_compiler/generate_random_circuits.py b/scripts/cs_compiler/generate_random_circuits.py new file mode 100644 index 000000000..8dbcaf893 --- /dev/null +++ b/scripts/cs_compiler/generate_random_circuits.py @@ -0,0 +1,67 @@ +# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +"""Generate and save random universal circuits as QASM 2.0 files. + +This script creates a set of random circuits for a given number of qubits `n` +and saves them under `output_dir/n/` as QASM 2.0 files named `{n}_{seed}.qasm`. + +Example: + python generate_random_circuits.py --n 128 --num_circuits 400 +""" + +from __future__ import annotations + +import argparse +from pathlib import Path + +from qiskit.qasm2 import dumps + +# Import your circuit generator (adjust this import!) +from mqt.qecc.circuit_compilation import random_universal_circuit + + +def generate_circuits(n: int, num_circuits: int, output_dir: Path) -> None: + """Generate and save random universal circuits. + + Args: + n: Number of qubits. + num_circuits: Number of circuits to generate. + output_dir: Base directory to store generated circuits. + """ + depth = 2 * n + folder = output_dir / str(n) + folder.mkdir(parents=True, exist_ok=True) + + print(f"Generating {num_circuits} circuits for n={n}, depth={depth}...") + + for seed in range(num_circuits): + qc = random_universal_circuit(num_qubits=n, depth=depth, seed=seed) + filename = folder / f"{n}_{seed}.qasm" + + with filename.open("w", encoding="utf-8") as f: + f.write(dumps(qc)) + + if seed % 50 == 0: + print(f" → Generated {seed}/{num_circuits}") + + print(f"✅ Finished generating circuits for n={n}. Saved in: {folder}") + + +def main() -> None: + """Parse arguments and trigger circuit generation.""" + parser = argparse.ArgumentParser(description="Generate random universal circuits.") + parser.add_argument("--n", type=int, required=True, help="Number of qubits.") + parser.add_argument("--num_circuits", type=int, default=400, help="Number of circuits to generate.") + parser.add_argument("--output_dir", type=Path, default=Path("circuits"), help="Base output directory.") + args = parser.parse_args() + + generate_circuits(args.n, args.num_circuits, args.output_dir) + + +if __name__ == "__main__": + main() diff --git a/scripts/cs_compiler/run_generate_circuits.sh b/scripts/cs_compiler/run_generate_circuits.sh new file mode 100644 index 000000000..91383ef5b --- /dev/null +++ b/scripts/cs_compiler/run_generate_circuits.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +# Copyright ... +# SPDX-License-Identifier: MIT +# +# Generate random universal circuits for different system sizes in parallel. + +declare -a n_values=("128" "256" "512") +num_circuits=1 +export num_circuits + +run_and_generate() { + local n=$1 + python generate_random_circuits.py --n "$n" --num_circuits "$num_circuits" +} + +export -f run_and_generate + +# Run 3 jobs in parallel (adjust --jobs/-j according to your server) +parallel --jobs 3 run_and_generate ::: ${n_values[@]} From 1914d5b09792cd33730d0f88723948c159b2eae7 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Thu, 13 Nov 2025 17:53:21 +0100 Subject: [PATCH 22/90] add function to generate universal random qiskit circuit --- src/mqt/qecc/circuit_compilation/__init__.py | 3 +- .../circuit_compilation/compilation_utils.py | 108 ++++++++++++++++++ 2 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 src/mqt/qecc/circuit_compilation/compilation_utils.py diff --git a/src/mqt/qecc/circuit_compilation/__init__.py b/src/mqt/qecc/circuit_compilation/__init__.py index e2c173779..a9449ea86 100644 --- a/src/mqt/qecc/circuit_compilation/__init__.py +++ b/src/mqt/qecc/circuit_compilation/__init__.py @@ -10,5 +10,6 @@ from __future__ import annotations from .code_switching_compiler import CodeSwitchGraph, insert_switch_placeholders +from .compilation_utils import random_universal_circuit -__all__ = ["CodeSwitchGraph", "insert_switch_placeholders"] +__all__ = ["CodeSwitchGraph", "insert_switch_placeholders", "random_universal_circuit"] diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/circuit_compilation/compilation_utils.py new file mode 100644 index 000000000..670852e77 --- /dev/null +++ b/src/mqt/qecc/circuit_compilation/compilation_utils.py @@ -0,0 +1,108 @@ +# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +"""Utility to generate random universal quantum circuits.""" + +import numpy as np +from qiskit import QuantumCircuit + + +def random_universal_circuit( + num_qubits: int, depth: int, gate_probs: dict[str, float] | None = None, seed: int | None = None +) -> QuantumCircuit: + """Generate a random universal quantum circuit using H, T, CNOT, and ID gates. + + Each depth layer assigns one operation per qubit (unless it's part of a CNOT). + Avoids consecutive identical non-ID single-qubit gates (even across ID layers). + + Args: + num_qubits (int): Number of qubits in the circuit. + depth (int): Number of layers. + gate_probs (dict): Probabilities for each gate, e.g. {"h": 0.3, "t": 0.3, "cx": 0.2, "id": 0.2}. + seed (int, optional): RNG seed for reproducibility. + + Returns: + QuantumCircuit: Randomly generated circuit. + """ + if gate_probs is None: + gate_probs = {"h": 0.15, "t": 0.15, "cx": 0.15, "id": 0.55} + + # Normalize probabilities + total = sum(gate_probs.values()) + gate_probs = {k: v / total for k, v in gate_probs.items()} + + rng = np.random.default_rng(seed) + circuit = QuantumCircuit(num_qubits) + + gates = list(gate_probs.keys()) + probs = list(gate_probs.values()) + + # Track last gate and last non-id single-qubit gate + last_gate = ["id"] * num_qubits + last_non_id_gate = ["id"] * num_qubits + + for _ in range(depth): + available_qubits = set(range(num_qubits)) + + for q in available_qubits.copy(): + if q not in available_qubits: + continue # already consumed by a CNOT + + # Draw a gate with back-to-back restrictions + while True: + gate = rng.choice(gates, p=probs) + + # Always allow id + if gate == "id": + break + + # For single-qubit gates, avoid repeating last non-id gate + if gate in {"h", "t"} and gate != last_non_id_gate[q]: + break + + # For CX, handled separately + if gate == "cx": + break + + # Two-qubit gate handling + if gate == "cx": + others = list(available_qubits - {q}) + if not others: + # Fallback to single-qubit gate if no partner available + gate = rng.choice( + ["h", "t", "id"], + p=[ + gate_probs[g] / (gate_probs["h"] + gate_probs["t"] + gate_probs["id"]) + for g in ["h", "t", "id"] + ], + ) + else: + target = rng.choice(others) + if rng.random() < 0.5: + circuit.cx(q, target) + else: + circuit.cx(target, q) + available_qubits.discard(q) + available_qubits.discard(target) + last_gate[q] = last_gate[target] = "cx" + # don't update last_non_id_gate (CX isn't a single-qubit gate) + continue + + # Apply single-qubit gate + if gate == "h": + circuit.h(q) + elif gate == "t": + circuit.t(q) + elif gate == "id": + pass # do nothing + + available_qubits.discard(q) + last_gate[q] = gate + if gate != "id": + last_non_id_gate[q] = gate + + return circuit From 4b40503d0298de7c58e35ecb08eea434629cf69d Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Thu, 13 Nov 2025 17:54:55 +0100 Subject: [PATCH 23/90] add edge ration now difference betweem biased (old unary) edges and temporal edges is given by a ration --- .../code_switching_compiler.py | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index abf9c7553..3808b0d3b 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -16,7 +16,7 @@ from qiskit.converters import circuit_to_dag from qiskit.dagcircuit import DAGOpNode -DEFAULT_TEMPORAL_EDGE_CAPACITY = 1000.0 +DEFAULT_TEMPORAL_EDGE_CAPACITY = 1.0 SWITCHING_LENGTH = 2 # minimum idle length before considering a bonus @@ -41,13 +41,15 @@ class CodeSwitchGraph: Identifier for the sink node ("SNK"). """ - def __init__(self) -> None: + def __init__(self, edge_cap_ratio: float = 0.001) -> None: """Initialize the CodeSwitchGraph with source and sink nodes.""" self.G: nx.DiGraph = nx.DiGraph() self.source: str = "SRC" self.sink: str = "SNK" self.G.add_node(self.source) self.G.add_node(self.sink) + self.edge_cap_ratio: float = edge_cap_ratio + self.base_unary_capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY * self.edge_cap_ratio def add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: """Add a node representing a quantum gate operation. @@ -133,11 +135,13 @@ def add_bias_edges(self, node_id: str, biased_code: str = "SRC") -> None: Capacity of the biased_code edges to be added. """ if biased_code == "SRC": - self.add_edge_with_capacity(self.source, node_id, capacity=2.0, edge_type="unary") - self.add_edge_with_capacity(self.sink, node_id, capacity=1.0, edge_type="unary") + self.add_edge_with_capacity( + self.source, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="unary" + ) + self.add_edge_with_capacity(self.sink, node_id, capacity=self.base_unary_capacity, edge_type="unary") elif biased_code == "SNK": - self.add_edge_with_capacity(self.source, node_id, capacity=1.0, edge_type="unary") - self.add_edge_with_capacity(self.sink, node_id, capacity=2.0, edge_type="unary") + self.add_edge_with_capacity(self.source, node_id, capacity=self.base_unary_capacity, edge_type="unary") + self.add_edge_with_capacity(self.sink, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="unary") def connect_to_code(self, node_id: str, gate_type: str) -> None: """Connect a gate node to the source and/or sink according to which code can perform the operation transversally. @@ -176,8 +180,7 @@ def add_cnot_links(self, control_node: str, target_node: str, one_way_transversa """ self.add_infinite_edge(control_node, target_node, bidirectional=not (one_way_transversal_cnot)) - @staticmethod - def compute_idle_bonus(previous_depth: int, current_depth: int) -> float: + def compute_idle_bonus(self, previous_depth: int, current_depth: int) -> float: """Compute a bonus (capacity reduction) for idling qubits. The idea: if a qubit has been idle for several depth layers, @@ -202,8 +205,7 @@ def compute_idle_bonus(previous_depth: int, current_depth: int) -> float: idle_length = 0 max_bonus = 5 - proportional_factor = 1 - return min(max_bonus, proportional_factor * idle_length) + return min(max_bonus, idle_length) * self.base_unary_capacity def _edge_capacity_with_idle_bonus( self, depths: list[int], base_capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY @@ -229,7 +231,7 @@ def _edge_capacity_with_idle_bonus( prev_depth, curr_depth = depths[-2], depths[-1] bonus = self.compute_idle_bonus(prev_depth, curr_depth) - return max(1.0, base_capacity - bonus) + return base_capacity - bonus def build_from_qiskit( self, From 796e03246152948a0c7a3979215814db4ced5f7a Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Thu, 13 Nov 2025 18:01:40 +0100 Subject: [PATCH 24/90] change default folder name of circuit output --- scripts/cs_compiler/generate_random_circuits.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/cs_compiler/generate_random_circuits.py b/scripts/cs_compiler/generate_random_circuits.py index 8dbcaf893..3e441c27c 100644 --- a/scripts/cs_compiler/generate_random_circuits.py +++ b/scripts/cs_compiler/generate_random_circuits.py @@ -57,7 +57,9 @@ def main() -> None: parser = argparse.ArgumentParser(description="Generate random universal circuits.") parser.add_argument("--n", type=int, required=True, help="Number of qubits.") parser.add_argument("--num_circuits", type=int, default=400, help="Number of circuits to generate.") - parser.add_argument("--output_dir", type=Path, default=Path("circuits"), help="Base output directory.") + parser.add_argument( + "--output_dir", type=Path, default=Path("circuits_performance_benchmarking"), help="Base output directory." + ) args = parser.parse_args() generate_circuits(args.n, args.num_circuits, args.output_dir) From 926fb014c3a86ff71a25535a682a1c75b7282019 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Thu, 13 Nov 2025 18:11:16 +0100 Subject: [PATCH 25/90] update default number of seeds --- scripts/cs_compiler/run_generate_circuits.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cs_compiler/run_generate_circuits.sh b/scripts/cs_compiler/run_generate_circuits.sh index 91383ef5b..d78d0877d 100644 --- a/scripts/cs_compiler/run_generate_circuits.sh +++ b/scripts/cs_compiler/run_generate_circuits.sh @@ -12,7 +12,7 @@ # Generate random universal circuits for different system sizes in parallel. declare -a n_values=("128" "256" "512") -num_circuits=1 +num_circuits=1000 export num_circuits run_and_generate() { From e330bcaa5f1fd575cd6d16d1c2a5f495fb62d82f Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Thu, 13 Nov 2025 18:39:44 +0100 Subject: [PATCH 26/90] add lookahead function --- .../circuit_compilation/compilation_utils.py | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/circuit_compilation/compilation_utils.py index 670852e77..adde2a08d 100644 --- a/src/mqt/qecc/circuit_compilation/compilation_utils.py +++ b/src/mqt/qecc/circuit_compilation/compilation_utils.py @@ -106,3 +106,75 @@ def random_universal_circuit( last_non_id_gate[q] = gate return circuit + + +def count_code_switches(circuit: QuantumCircuit) -> tuple[int, list[str | None]]: + """Count how many code switches are needed for a circuit assuming. + + - Code A supports H, CNOT + - Code B supports CNOT, T + - CNOT can only occur between qubits in the same code + - Each qubit starts in the code of its first gate. + + Returns: + int: total number of code switches + dict: final code assignment per qubit + """ + # Define transversal capabilities + code_a = {"h", "cx"} + code_b = {"t", "cx"} + + num_qubits = circuit.num_qubits + current_code: list[str | None] = [None] * num_qubits + switch_count: int = 0 + + # Helper: which codes support a gate + def compatible_codes(gate_name: str) -> set[str]: + if gate_name in code_a and gate_name in code_b: + return {"A", "B"} + if gate_name in code_a: + return {"A"} + if gate_name in code_b: + return {"B"} + return set() + + for instr in circuit.data: + gate = instr.operation.name + qubits = [circuit.find_bit(q).index for q in instr.qubits] + + # Skip ID gates, they don't constrain anything + if gate == "id": + continue + + compat = compatible_codes(gate) + if not compat: + msg = f"Gate {gate} not supported by any code" + raise ValueError(msg) + + # Initialize codes for untouched qubits + for q in qubits: + if current_code[q] is None: + # Assign to one of the compatible codes (deterministically) + current_code[q] = next(iter(compat)) + + # If it's a multi-qubit gate, ensure code consistency + involved_codes = {current_code[q] for q in qubits} + + if len(involved_codes) > 1: + # Must synchronize codes before performing CNOT + # For simplicity: switch all involved to one common valid code + target_code = "A" if "A" in compat else "B" + for q in qubits: + if current_code[q] != target_code: + current_code[q] = target_code + switch_count += 1 + + # Check if qubits are in a valid code for this gate + for q in qubits: + if current_code[q] not in compat: + # Need to switch this qubit's code + new_code = ({"A", "B"} - {current_code[q]}).pop() + current_code[q] = new_code + switch_count += 1 + + return switch_count, current_code From 46895790a816a56c4be5de6230cd3e53a27d74d9 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 14 Nov 2025 12:34:48 +0100 Subject: [PATCH 27/90] add scripts for performance analysis --- .../run_performance_simulations.sh | 36 ++++++ .../simulate_circuit_performance.py | 106 ++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 scripts/cs_compiler/run_performance_simulations.sh create mode 100644 scripts/cs_compiler/simulate_circuit_performance.py diff --git a/scripts/cs_compiler/run_performance_simulations.sh b/scripts/cs_compiler/run_performance_simulations.sh new file mode 100644 index 000000000..f50948622 --- /dev/null +++ b/scripts/cs_compiler/run_performance_simulations.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +declare -a n_values=("128" "256" "512") +base_dir="circuits_performance_benchmarking" +results_dir="results_performance_benchmarking" +mkdir -p "$results_dir" + +export base_dir +export results_dir + +run_and_simulate() { + local n=$1 + local seed=$2 + + local qasm_path="${base_dir}/${n}/${n}_${seed}.qasm" + local csv_path="${results_dir}/results_${n}.csv" + + python simulate_circuit_performance.py \ + --qasm_path "$qasm_path" \ + --n "$n" \ + --seed "$seed" \ + --output_csv "$csv_path" +} + +export -f run_and_simulate + +# parallelize circuits, not n's +for n in "${n_values[@]}"; do + seq 0 4 | parallel --jobs 16 run_and_simulate "$n" {} +done diff --git a/scripts/cs_compiler/simulate_circuit_performance.py b/scripts/cs_compiler/simulate_circuit_performance.py new file mode 100644 index 000000000..03675239d --- /dev/null +++ b/scripts/cs_compiler/simulate_circuit_performance.py @@ -0,0 +1,106 @@ +# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +"""Simulate existing QASM circuits and record results to CSV. + +Each circuit is loaded from a folder structure like: + circuits/{n}/{n}_{seed}.qasm + +Example: + python simulate_circuits.py --n 128 --input_dir circuits --output_csv results_128.csv +""" + +from __future__ import annotations + +import argparse +import csv +import time +from pathlib import Path +from typing import TYPE_CHECKING + +from qiskit.qasm2 import loads + +from mqt.qecc.circuit_compilation import CodeSwitchGraph, count_code_switches + +if TYPE_CHECKING: + from qiskit.circuit import QuantumCircuit + + +def append_to_csv(csv_path: Path, row: dict) -> None: + """Append a row to a CSV file, creating it with headers if it doesn't exist.""" + write_header = not csv_path.exists() + with csv_path.open("a", newline="", encoding="utf-8") as f: + writer = csv.DictWriter(f, fieldnames=row.keys()) + if write_header: + writer.writeheader() + writer.writerow(row) + + +def already_done(csv_path: Path, seed: int) -> bool: + """Return True if the CSV contains a row whose 'seed' column equals the given seed.""" + if not csv_path.exists(): + return False + + with csv_path.open("r", newline="", encoding="utf-8") as f: + reader = csv.DictReader(f) + for row in reader: + # safe integer comparison + if int(row["seed"]) == seed: + return True + return False + + +def run_trial(qc: QuantumCircuit, n_qubits: int, depth: int, seed: int, probs_type: str) -> dict: + """Run a single trial comparing naive and min-cut code switch counting.""" + t0_lookahead = time.time() + naive = count_code_switches(qc)[0] + t1_lookahead = time.time() + + builder = CodeSwitchGraph() + builder.build_from_qiskit(qc, one_way_transversal_cnot=True) + + t0_mincut = time.time() + switches_mc, _, _, _ = builder.compute_min_cut() + t1_mincut = time.time() + + return { + "n_qubits": n_qubits, + "layer_per_qubit": depth, + "seed": seed, + "gate_probs_type": probs_type, + "naive": naive, + "mincut": switches_mc, + "abs_saving": naive - switches_mc, + "rel_saving": (naive - switches_mc) / naive if naive > 0 else None, + "t_naive": t1_lookahead - t0_lookahead, + "t_mincut": t1_mincut - t0_mincut, + } + + +def main() -> None: + """Parse arguments and run simulation trials.""" + parser = argparse.ArgumentParser() + parser.add_argument("--qasm_path", type=Path, required=True) + parser.add_argument("--n", type=int, required=True) + parser.add_argument("--seed", type=int, required=True) + parser.add_argument("--output_csv", type=Path, required=True) + parser.add_argument("--probs_type", type=str, default="default") + args = parser.parse_args() + + qc = loads(args.qasm_path.read_text()) + depth = 2 * args.n + + if already_done(args.output_csv, args.seed): + print(f"Seed {args.seed} already done, skipping.") + return + + result = run_trial(qc, args.n, depth, args.seed, args.probs_type) + append_to_csv(args.output_csv, result) + + +if __name__ == "__main__": + main() From f07cc684b62be9527ea72a31c223c7b91adbc141 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 14 Nov 2025 12:35:43 +0100 Subject: [PATCH 28/90] change default number of generated cicuits --- scripts/cs_compiler/run_generate_circuits.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cs_compiler/run_generate_circuits.sh b/scripts/cs_compiler/run_generate_circuits.sh index d78d0877d..50ad9be65 100644 --- a/scripts/cs_compiler/run_generate_circuits.sh +++ b/scripts/cs_compiler/run_generate_circuits.sh @@ -12,7 +12,7 @@ # Generate random universal circuits for different system sizes in parallel. declare -a n_values=("128" "256" "512") -num_circuits=1000 +num_circuits=5 export num_circuits run_and_generate() { From ef3dfd4b58b2b70b24c73a5c06b63ca9581c2058 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 14 Nov 2025 12:36:46 +0100 Subject: [PATCH 29/90] remove raw data return form min_cut --- .../qecc/circuit_compilation/code_switching_compiler.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 3808b0d3b..b1062c130 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -299,9 +299,7 @@ def build_from_qiskit( self.add_regular_edge(qubit_last_node[q], gate_node, capacity=capacity) qubit_last_node[q] = gate_node - def compute_min_cut( - self, return_raw_data: bool = False - ) -> tuple[int, list[tuple[int, int]], set[str], set[str]] | tuple[float, set[str], set[str]]: + def compute_min_cut(self) -> tuple[int, list[tuple[int, int]], set[str], set[str]]: """Compute the minimum s-t cut between the source and sink. Returns: @@ -312,10 +310,8 @@ def compute_min_cut( - S is the set of nodes reachable from the source, - T is the complementary set of nodes. """ - cut_value, (S, T) = nx.minimum_cut(self.G, self.source, self.sink, capacity="capacity") # noqa: N806 + _cut_value, (S, T) = nx.minimum_cut(self.G, self.source, self.sink, capacity="capacity") # noqa: N806 num_switches, switch_positions = self.extract_switch_locations(S, T) - if return_raw_data: - return cut_value, S, T return num_switches, switch_positions, S, T def extract_switch_locations(self, S: set[str], T: set[str]) -> tuple[int, list[tuple[int, int]]]: # noqa: N803 From 0ec634dfe4939a065857abcb2248e5829c142bda Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 14 Nov 2025 12:37:26 +0100 Subject: [PATCH 30/90] make lookahead deterministic --- src/mqt/qecc/circuit_compilation/compilation_utils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/circuit_compilation/compilation_utils.py index adde2a08d..a876e134c 100644 --- a/src/mqt/qecc/circuit_compilation/compilation_utils.py +++ b/src/mqt/qecc/circuit_compilation/compilation_utils.py @@ -154,8 +154,10 @@ def compatible_codes(gate_name: str) -> set[str]: # Initialize codes for untouched qubits for q in qubits: if current_code[q] is None: - # Assign to one of the compatible codes (deterministically) - current_code[q] = next(iter(compat)) + # Assign to one of the compatible codes (non-deterministically -> set has no order) + # current_code[q] = next(iter(compat)) + # deterministic choice for testing + current_code[q] = "A" if "A" in compat else "B" # If it's a multi-qubit gate, ensure code consistency involved_codes = {current_code[q] for q in qubits} @@ -173,7 +175,8 @@ def compatible_codes(gate_name: str) -> set[str]: for q in qubits: if current_code[q] not in compat: # Need to switch this qubit's code - new_code = ({"A", "B"} - {current_code[q]}).pop() + # new_code = ({"A", "B"} - {current_code[q]}).pop() + new_code = "A" if current_code[q] == "B" else "B" current_code[q] = new_code switch_count += 1 From 63c982db8c3ff8f3409ab633a398919fc56ac951 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 14 Nov 2025 12:38:09 +0100 Subject: [PATCH 31/90] add lookahead to init file --- src/mqt/qecc/circuit_compilation/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/__init__.py b/src/mqt/qecc/circuit_compilation/__init__.py index a9449ea86..0dbd3b6b1 100644 --- a/src/mqt/qecc/circuit_compilation/__init__.py +++ b/src/mqt/qecc/circuit_compilation/__init__.py @@ -10,6 +10,6 @@ from __future__ import annotations from .code_switching_compiler import CodeSwitchGraph, insert_switch_placeholders -from .compilation_utils import random_universal_circuit +from .compilation_utils import count_code_switches, random_universal_circuit -__all__ = ["CodeSwitchGraph", "insert_switch_placeholders", "random_universal_circuit"] +__all__ = ["CodeSwitchGraph", "count_code_switches", "insert_switch_placeholders", "random_universal_circuit"] From a5c02ddb19cdf74bff76edf07346e5a9a60d3030 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 14 Nov 2025 15:12:15 +0100 Subject: [PATCH 32/90] change simulations to be gate distribution sensitive --- .../cs_compiler/generate_random_circuits.py | 22 ++++++++++++++----- scripts/cs_compiler/run_generate_circuits.sh | 10 +++++---- .../run_performance_simulations.sh | 17 +++++++------- .../simulate_circuit_performance.py | 4 ++-- 4 files changed, 34 insertions(+), 19 deletions(-) diff --git a/scripts/cs_compiler/generate_random_circuits.py b/scripts/cs_compiler/generate_random_circuits.py index 3e441c27c..a4606a9bb 100644 --- a/scripts/cs_compiler/generate_random_circuits.py +++ b/scripts/cs_compiler/generate_random_circuits.py @@ -25,22 +25,31 @@ from mqt.qecc.circuit_compilation import random_universal_circuit -def generate_circuits(n: int, num_circuits: int, output_dir: Path) -> None: +def generate_circuits(n: int, num_circuits: int, output_dir: Path, gate_distr_type: str = "even") -> None: """Generate and save random universal circuits. Args: n: Number of qubits. num_circuits: Number of circuits to generate. output_dir: Base directory to store generated circuits. + gate_distr_type: Type of gate distribution to use ('even', 'ht_heavy', 'cx_heavy'). """ depth = 2 * n - folder = output_dir / str(n) + folder = output_dir / gate_distr_type / str(n) folder.mkdir(parents=True, exist_ok=True) - print(f"Generating {num_circuits} circuits for n={n}, depth={depth}...") + gate_probs_options = { + "even": {"h": 0.15, "t": 0.15, "cx": 0.15, "id": 0.55}, + "ht_heavy": {"h": 0.2, "t": 0.2, "cx": 0.05, "id": 0.55}, + "cx_heavy": {"h": 0.1, "t": 0.1, "cx": 0.3, "id": 0.5}, + } + + print(f"Generating {num_circuits} {gate_distr_type} circuits for n={n}, depth={depth}...") for seed in range(num_circuits): - qc = random_universal_circuit(num_qubits=n, depth=depth, seed=seed) + qc = random_universal_circuit( + num_qubits=n, depth=depth, seed=seed, gate_probs=gate_probs_options[gate_distr_type] + ) filename = folder / f"{n}_{seed}.qasm" with filename.open("w", encoding="utf-8") as f: @@ -57,12 +66,15 @@ def main() -> None: parser = argparse.ArgumentParser(description="Generate random universal circuits.") parser.add_argument("--n", type=int, required=True, help="Number of qubits.") parser.add_argument("--num_circuits", type=int, default=400, help="Number of circuits to generate.") + parser.add_argument( + "--distr_type", type=str, default="even", help="Gate distribution type: 'even', 'ht_heavy', or 'cx_heavy'." + ) parser.add_argument( "--output_dir", type=Path, default=Path("circuits_performance_benchmarking"), help="Base output directory." ) args = parser.parse_args() - generate_circuits(args.n, args.num_circuits, args.output_dir) + generate_circuits(args.n, args.num_circuits, args.output_dir, args.distr_type) if __name__ == "__main__": diff --git a/scripts/cs_compiler/run_generate_circuits.sh b/scripts/cs_compiler/run_generate_circuits.sh index 50ad9be65..cd8e66b1a 100644 --- a/scripts/cs_compiler/run_generate_circuits.sh +++ b/scripts/cs_compiler/run_generate_circuits.sh @@ -11,16 +11,18 @@ # # Generate random universal circuits for different system sizes in parallel. -declare -a n_values=("128" "256" "512") -num_circuits=5 +declare -a n_values=("64" "128" "256" "512") +declare -a distr_types=("even" "ht_heavy" "cx_heavy") +num_circuits=10 export num_circuits run_and_generate() { local n=$1 - python generate_random_circuits.py --n "$n" --num_circuits "$num_circuits" + local distr_type=$2 + python generate_random_circuits.py --n "$n" --num_circuits "$num_circuits" --distr_type "$distr_type" } export -f run_and_generate # Run 3 jobs in parallel (adjust --jobs/-j according to your server) -parallel --jobs 3 run_and_generate ::: ${n_values[@]} +parallel --jobs 3 run_and_generate ::: "${n_values[@]}" ::: "${distr_types[@]}" diff --git a/scripts/cs_compiler/run_performance_simulations.sh b/scripts/cs_compiler/run_performance_simulations.sh index f50948622..dd77afe32 100644 --- a/scripts/cs_compiler/run_performance_simulations.sh +++ b/scripts/cs_compiler/run_performance_simulations.sh @@ -6,7 +6,8 @@ # # Licensed under the MIT License -declare -a n_values=("128" "256" "512") +declare -a n_values=("64" "128" "256" "512") +declare -a distr_types=("even" "ht_heavy" "cx_heavy") base_dir="circuits_performance_benchmarking" results_dir="results_performance_benchmarking" mkdir -p "$results_dir" @@ -16,21 +17,21 @@ export results_dir run_and_simulate() { local n=$1 - local seed=$2 + local distr_type=$2 + local seed=$3 - local qasm_path="${base_dir}/${n}/${n}_${seed}.qasm" - local csv_path="${results_dir}/results_${n}.csv" + local qasm_path="${base_dir}/${distr_type}/${n}/${n}_${seed}.qasm" + local csv_path="${results_dir}/${distr_type}/results_${n}.csv" python simulate_circuit_performance.py \ --qasm_path "$qasm_path" \ --n "$n" \ --seed "$seed" \ - --output_csv "$csv_path" + --output_csv "$csv_path" \ + --distr_type "$distr_type" } export -f run_and_simulate # parallelize circuits, not n's -for n in "${n_values[@]}"; do - seq 0 4 | parallel --jobs 16 run_and_simulate "$n" {} -done +parallel --jobs 5 run_and_simulate ::: "${n_values[@]}" ::: "${distr_types[@]}" ::: $(seq 0 9) diff --git a/scripts/cs_compiler/simulate_circuit_performance.py b/scripts/cs_compiler/simulate_circuit_performance.py index 03675239d..56ee0375b 100644 --- a/scripts/cs_compiler/simulate_circuit_performance.py +++ b/scripts/cs_compiler/simulate_circuit_performance.py @@ -88,7 +88,7 @@ def main() -> None: parser.add_argument("--n", type=int, required=True) parser.add_argument("--seed", type=int, required=True) parser.add_argument("--output_csv", type=Path, required=True) - parser.add_argument("--probs_type", type=str, default="default") + parser.add_argument("--distr_type", type=str, default="even") args = parser.parse_args() qc = loads(args.qasm_path.read_text()) @@ -98,7 +98,7 @@ def main() -> None: print(f"Seed {args.seed} already done, skipping.") return - result = run_trial(qc, args.n, depth, args.seed, args.probs_type) + result = run_trial(qc, args.n, depth, args.seed, args.distr_type) append_to_csv(args.output_csv, result) From f99ee418fe4fa381a6a1a2bf2480f2f1823715a1 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Sun, 16 Nov 2025 12:27:26 +0100 Subject: [PATCH 33/90] add feature to avoid generating circuits twice --- scripts/cs_compiler/generate_random_circuits.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/cs_compiler/generate_random_circuits.py b/scripts/cs_compiler/generate_random_circuits.py index a4606a9bb..2ef4679e7 100644 --- a/scripts/cs_compiler/generate_random_circuits.py +++ b/scripts/cs_compiler/generate_random_circuits.py @@ -46,19 +46,30 @@ def generate_circuits(n: int, num_circuits: int, output_dir: Path, gate_distr_ty print(f"Generating {num_circuits} {gate_distr_type} circuits for n={n}, depth={depth}...") + skipped = 0 + generated = 0 + for seed in range(num_circuits): + filename = folder / f"{n}_{seed}.qasm" + + if filename.exists(): + print(f" → Skipping existing circuit: {filename.name}") + skipped += 1 + continue qc = random_universal_circuit( num_qubits=n, depth=depth, seed=seed, gate_probs=gate_probs_options[gate_distr_type] ) - filename = folder / f"{n}_{seed}.qasm" with filename.open("w", encoding="utf-8") as f: f.write(dumps(qc)) + generated += 1 + if seed % 50 == 0: print(f" → Generated {seed}/{num_circuits}") - print(f"✅ Finished generating circuits for n={n}. Saved in: {folder}") + print(f"🟢 Finished: {generated} new circuits generated, {skipped} skipped.") + print(f"Saved in: {folder}") def main() -> None: From 6d9e3acd1482765bdabe589faa2f0a523fbec95f Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Sun, 16 Nov 2025 12:53:09 +0100 Subject: [PATCH 34/90] add script to generate array with steps of 64 --- scripts/cs_compiler/run_generate_circuits.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/cs_compiler/run_generate_circuits.sh b/scripts/cs_compiler/run_generate_circuits.sh index cd8e66b1a..b3a3b0f02 100644 --- a/scripts/cs_compiler/run_generate_circuits.sh +++ b/scripts/cs_compiler/run_generate_circuits.sh @@ -11,9 +11,14 @@ # # Generate random universal circuits for different system sizes in parallel. -declare -a n_values=("64" "128" "256" "512") -declare -a distr_types=("even" "ht_heavy" "cx_heavy") -num_circuits=10 +# declare -a n_values=("64" "128" "256" "512") +# declare -a n_values=("64" "128" "192" "256" "320" "384" "448" "512") +declare -a n_values=() +for ((i=64; i<=1024; i+=64)); do + n_values+=("$i") +done +declare -a distr_types=("even" "cx_heavy") +num_circuits=100 export num_circuits run_and_generate() { From 1436eb82844c6a1e56259e1439a2a62fd53c0697 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Sun, 16 Nov 2025 20:27:19 +0100 Subject: [PATCH 35/90] add all qubits numbers to performance bash --- scripts/cs_compiler/run_performance_simulations.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/cs_compiler/run_performance_simulations.sh b/scripts/cs_compiler/run_performance_simulations.sh index dd77afe32..f9c45372e 100644 --- a/scripts/cs_compiler/run_performance_simulations.sh +++ b/scripts/cs_compiler/run_performance_simulations.sh @@ -6,8 +6,12 @@ # # Licensed under the MIT License -declare -a n_values=("64" "128" "256" "512") -declare -a distr_types=("even" "ht_heavy" "cx_heavy") +# declare -a n_values=("64" "128" "256" "512") +declare -a n_values=() +for ((i=64; i<=1024; i+=64)); do + n_values+=("$i") +done +declare -a distr_types=("even" "cx_heavy") base_dir="circuits_performance_benchmarking" results_dir="results_performance_benchmarking" mkdir -p "$results_dir" @@ -34,4 +38,4 @@ run_and_simulate() { export -f run_and_simulate # parallelize circuits, not n's -parallel --jobs 5 run_and_simulate ::: "${n_values[@]}" ::: "${distr_types[@]}" ::: $(seq 0 9) +parallel --jobs 5 run_and_simulate ::: "${n_values[@]}" ::: "${distr_types[@]}" ::: $(seq 0 99) From 80fbb0939ff7529b5528928098a85ea17dc7288c Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 17 Nov 2025 10:51:56 +0100 Subject: [PATCH 36/90] add intermediate results --- .../cx_heavy/results_1024.csv | 88 +++++++++++++++ .../cx_heavy/results_128.csv | 101 ++++++++++++++++++ .../cx_heavy/results_192.csv | 101 ++++++++++++++++++ .../cx_heavy/results_256.csv | 101 ++++++++++++++++++ .../cx_heavy/results_320.csv | 101 ++++++++++++++++++ .../cx_heavy/results_384.csv | 101 ++++++++++++++++++ .../cx_heavy/results_448.csv | 101 ++++++++++++++++++ .../cx_heavy/results_512.csv | 101 ++++++++++++++++++ .../cx_heavy/results_576.csv | 101 ++++++++++++++++++ .../cx_heavy/results_64.csv | 101 ++++++++++++++++++ .../cx_heavy/results_640.csv | 101 ++++++++++++++++++ .../cx_heavy/results_704.csv | 77 +++++++++++++ .../even/results_1024.csv | 101 ++++++++++++++++++ .../even/results_128.csv | 101 ++++++++++++++++++ .../even/results_192.csv | 101 ++++++++++++++++++ .../even/results_256.csv | 101 ++++++++++++++++++ .../even/results_320.csv | 101 ++++++++++++++++++ .../even/results_384.csv | 101 ++++++++++++++++++ .../even/results_448.csv | 101 ++++++++++++++++++ .../even/results_512.csv | 101 ++++++++++++++++++ .../even/results_576.csv | 101 ++++++++++++++++++ .../even/results_64.csv | 101 ++++++++++++++++++ .../even/results_640.csv | 101 ++++++++++++++++++ .../even/results_704.csv | 101 ++++++++++++++++++ .../even/results_768.csv | 5 + .../even/results_832.csv | 3 + 26 files changed, 2395 insertions(+) create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_1024.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_128.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_192.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_256.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_320.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_384.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_448.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_512.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_576.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_64.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_640.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_704.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_1024.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_128.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_192.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_256.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_320.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_384.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_448.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_512.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_576.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_64.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_640.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_704.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_768.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_832.csv diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_1024.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_1024.csv new file mode 100644 index 000000000..3d6f127f5 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_1024.csv @@ -0,0 +1,88 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +1024,2048,99,cx_heavy,174693,174478,215,0.001230730481473213,1.5060713291168213,893.7048044204712 +1024,2048,98,cx_heavy,174534,174250,284,0.0016271901176848065,1.677976369857788,779.1869015693665 +1024,2048,50,cx_heavy,175111,174866,245,0.001399112562888682,0.8958983421325684,732.9573767185211 +1024,2048,51,cx_heavy,175385,175153,232,0.001322804116657639,1.7363317012786865,639.4764251708984 +1024,2048,52,cx_heavy,175548,175273,275,0.0015665231161847472,1.709808588027954,638.1167407035828 +1024,2048,53,cx_heavy,175154,174951,203,0.0011589800975141875,1.3498256206512451,669.3189537525177 +1024,2048,54,cx_heavy,174718,174467,251,0.0014366006936892594,0.8485825061798096,607.2099192142487 +1024,2048,55,cx_heavy,174918,174714,204,0.0011662607621857099,0.8354732990264893,548.8291079998016 +1024,2048,56,cx_heavy,174927,174646,281,0.0016063843774831786,0.8714418411254883,556.3011195659637 +1024,2048,57,cx_heavy,174826,174611,215,0.0012297941953713979,0.8389492034912109,540.6028120517731 +1024,2048,58,cx_heavy,175402,175141,261,0.001488010398969225,0.8594763278961182,876.9018051624298 +1024,2048,59,cx_heavy,175238,175042,196,0.0011184788687385156,1.7380282878875732,851.3318667411804 +1024,2048,60,cx_heavy,174126,173900,226,0.0012979107083376405,1.6892993450164795,861.1546359062195 +1024,2048,61,cx_heavy,175497,175274,223,0.0012706769916294865,0.9308483600616455,582.0129055976868 +1024,2048,62,cx_heavy,175487,175301,186,0.0010599075715010228,0.886371374130249,561.8537373542786 +1024,2048,63,cx_heavy,175610,175353,257,0.0014634701896247366,0.8372189998626709,590.1447637081146 +1024,2048,64,cx_heavy,175504,175257,247,0.0014073753304767983,0.8437204360961914,576.6166400909424 +1024,2048,65,cx_heavy,175107,174898,209,0.0011935559400823496,0.8507695198059082,556.0909893512726 +1024,2048,66,cx_heavy,174909,174679,230,0.0013149694984248951,0.8495745658874512,565.4185221195221 +1024,2048,67,cx_heavy,174852,174615,237,0.001355432022510466,0.8420641422271729,566.5653736591339 +1024,2048,68,cx_heavy,174583,174403,180,0.0010310282215335973,0.8526298999786377,561.5167164802551 +1024,2048,69,cx_heavy,175602,175343,259,0.0014749262536873156,0.8724920749664307,586.5177230834961 +1024,2048,70,cx_heavy,176148,175896,252,0.001430615164520744,0.8588466644287109,542.2167851924896 +1024,2048,71,cx_heavy,175258,175062,196,0.0011183512307569412,0.8543298244476318,567.2998163700104 +1024,2048,72,cx_heavy,174495,174244,251,0.0014384366314221038,0.8725283145904541,568.3190810680389 +1024,2048,73,cx_heavy,175717,175480,237,0.0013487596533061684,0.8354032039642334,576.3463547229767 +1024,2048,74,cx_heavy,174694,174471,223,0.00127651779683332,0.8464493751525879,583.6021716594696 +1024,2048,0,cx_heavy,175257,175030,227,0.0012952407036523506,1.394413948059082,883.6115341186523 +1024,2048,1,cx_heavy,175008,174791,217,0.0012399433168769427,1.3087267875671387,913.3499386310577 +1024,2048,97,cx_heavy,175544,175292,252,0.0014355375290525452,0.8533849716186523,597.1074879169464 +1024,2048,2,cx_heavy,174809,174542,267,0.0015273813133191083,1.3426151275634766,918.2870948314667 +1024,2048,3,cx_heavy,175365,175140,225,0.0012830382345393892,1.402820110321045,899.6249876022339 +1024,2048,4,cx_heavy,175478,175246,232,0.0013221030556537002,1.3253371715545654,967.8174376487732 +1024,2048,5,cx_heavy,175128,174898,230,0.001313325110776118,1.328242301940918,919.7836575508118 +1024,2048,6,cx_heavy,175207,175008,199,0.0011357993687466825,1.3395798206329346,947.4087927341461 +1024,2048,7,cx_heavy,175464,175257,207,0.0011797291752154288,1.338970422744751,910.993236541748 +1024,2048,8,cx_heavy,174814,174575,239,0.0013671673893395266,1.3153634071350098,940.6652467250824 +1024,2048,9,cx_heavy,175928,175718,210,0.0011936701377836389,1.3938066959381104,890.5216705799103 +1024,2048,10,cx_heavy,175450,175216,234,0.0013337133086349388,1.2885892391204834,884.7611198425293 +1024,2048,11,cx_heavy,175498,175286,212,0.001207990974256117,1.2901661396026611,856.3665864467621 +1024,2048,12,cx_heavy,174984,174718,266,0.0015201389841356923,1.3545849323272705,834.6691255569458 +1024,2048,13,cx_heavy,174980,174745,235,0.0013430106297862613,1.2786755561828613,964.1436269283295 +1024,2048,14,cx_heavy,175572,175334,238,0.0013555692251611875,1.2869670391082764,890.9924561977386 +1024,2048,15,cx_heavy,174841,174635,206,0.0011782133481277274,1.3486571311950684,886.4959545135498 +1024,2048,16,cx_heavy,174668,174445,223,0.0012767078113907527,1.2991786003112793,915.7471008300781 +1024,2048,17,cx_heavy,175450,175210,240,0.0013679110857794244,1.3708124160766602,915.2083766460419 +1024,2048,18,cx_heavy,175440,175211,229,0.0013052895576835385,1.282433271408081,939.0858142375946 +1024,2048,19,cx_heavy,175897,175665,232,0.0013189537058619534,1.2754490375518799,837.4406988620758 +1024,2048,20,cx_heavy,174750,174532,218,0.0012474964234620886,1.2785305976867676,857.3484182357788 +1024,2048,21,cx_heavy,175284,175049,235,0.0013406814084571325,1.3718388080596924,865.2222013473511 +1024,2048,22,cx_heavy,174656,174452,204,0.00116801026016856,1.2933776378631592,885.6524448394775 +1024,2048,23,cx_heavy,175152,174835,317,0.0018098565817118845,1.2943828105926514,883.8452570438385 +1024,2048,24,cx_heavy,175322,175072,250,0.0014259476848313389,1.3494856357574463,891.5820591449738 +1024,2048,25,cx_heavy,175053,174837,216,0.001233912015218248,1.3787524700164795,910.881843328476 +1024,2048,26,cx_heavy,174885,174657,228,0.0013037138691139893,1.2831339836120605,885.8725929260254 +1024,2048,27,cx_heavy,175016,174788,228,0.0013027380353796225,1.3049447536468506,860.7761626243591 +1024,2048,28,cx_heavy,175715,175430,285,0.0016219446262413567,1.2756986618041992,868.1320331096649 +1024,2048,29,cx_heavy,174777,174513,264,0.0015104962323417841,1.2790334224700928,844.9726071357727 +1024,2048,30,cx_heavy,175081,174870,211,0.001205156470433685,1.2930676937103271,900.335283279419 +1024,2048,31,cx_heavy,175052,174817,235,0.001342458240979823,1.2955703735351562,855.4126040935516 +1024,2048,32,cx_heavy,174861,174641,220,0.0012581421815041662,1.2670509815216064,857.502845287323 +1024,2048,33,cx_heavy,175556,175286,270,0.0015379707899473671,1.3775825500488281,890.2048857212067 +1024,2048,34,cx_heavy,175393,175159,234,0.0013341467447389576,1.2604877948760986,912.8841152191162 +1024,2048,35,cx_heavy,175371,175151,220,0.0012544833524356935,1.2782506942749023,926.9589774608612 +1024,2048,36,cx_heavy,176515,176317,198,0.001121717701045237,1.3333160877227783,912.9868078231812 +1024,2048,37,cx_heavy,175421,175226,195,0.0011116114946329116,1.3770129680633545,863.730607509613 +1024,2048,38,cx_heavy,175722,175462,260,0.0014796098382672631,1.2730076313018799,865.2095336914062 +1024,2048,39,cx_heavy,175076,174767,309,0.0017649477941008476,1.2584595680236816,861.850750207901 +1024,2048,40,cx_heavy,175250,175034,216,0.001232524964336662,1.2815444469451904,852.164647102356 +1024,2048,41,cx_heavy,175004,174773,231,0.0013199698292610455,1.3893921375274658,863.7928056716919 +1024,2048,42,cx_heavy,174787,174546,241,0.0013788210793708915,1.2872366905212402,859.6200380325317 +1024,2048,43,cx_heavy,175071,174835,236,0.0013480245157678884,1.3207736015319824,899.8712532520294 +1024,2048,44,cx_heavy,175242,175018,224,0.001278232387213111,1.2787771224975586,882.3730576038361 +1024,2048,45,cx_heavy,174926,174723,203,0.0011604907217909288,1.2838871479034424,936.8797714710236 +1024,2048,96,cx_heavy,175259,175038,221,0.0012609908763601299,1.6435480117797852,835.9623758792877 +1024,2048,46,cx_heavy,175315,175022,293,0.0016712774149388245,1.2696120738983154,861.2332866191864 +1024,2048,47,cx_heavy,174796,174499,297,0.0016991235497379803,1.3605542182922363,836.6435222625732 +1024,2048,48,cx_heavy,175467,175237,230,0.0013107877834578582,1.3410801887512207,889.4765274524689 +1024,2048,49,cx_heavy,175031,174820,211,0.0012055007398689376,1.3501956462860107,887.8825471401215 +1024,2048,75,cx_heavy,175845,175630,215,0.0012226676902954306,1.2760581970214844,911.9410626888275 +1024,2048,76,cx_heavy,175784,175526,258,0.0014677103718199608,1.3780899047851562,861.8651127815247 +1024,2048,77,cx_heavy,174858,174625,233,0.0013325098079584577,1.2905535697937012,888.4061982631683 +1024,2048,78,cx_heavy,175243,175004,239,0.001363820523501652,1.2946052551269531,919.3199360370636 +1024,2048,79,cx_heavy,175466,175243,223,0.0012709014851880135,1.3479673862457275,935.2032785415649 +1024,2048,80,cx_heavy,174452,174222,230,0.0013184142342879417,1.3437654972076416,902.9114961624146 +1024,2048,80,cx_heavy,174452,174222,230,0.0013184142342879417,1.715003252029419,654.3674418926239 +1024,2048,95,cx_heavy,175293,175045,248,0.0014147741210430536,1.7313716411590576,860.3346655368805 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_128.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_128.csv new file mode 100644 index 000000000..cbac323a5 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_128.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +128,256,0,cx_heavy,2754,2733,21,0.007625272331154684,0.020255565643310547,3.625842571258545 +128,256,1,cx_heavy,2815,2787,28,0.00994671403197158,0.021774768829345703,3.0684757232666016 +128,256,2,cx_heavy,2787,2754,33,0.011840688912809472,0.020180225372314453,3.2316746711730957 +128,256,3,cx_heavy,2758,2732,26,0.009427121102248005,0.034291982650756836,3.4478394985198975 +128,256,4,cx_heavy,2809,2781,28,0.009967960128159488,0.02203536033630371,3.450812578201294 +128,256,5,cx_heavy,2812,2788,24,0.008534850640113799,0.021461963653564453,3.4673879146575928 +128,256,6,cx_heavy,2831,2804,27,0.009537265983751325,0.035573720932006836,3.122034788131714 +128,256,8,cx_heavy,2794,2742,52,0.018611309949892626,0.0352625846862793,2.8785758018493652 +128,256,7,cx_heavy,2788,2762,26,0.009325681492109038,0.021001338958740234,3.9433658123016357 +128,256,9,cx_heavy,2858,2829,29,0.010146955913226032,0.02165532112121582,3.6688194274902344 +128,256,11,cx_heavy,2805,2770,35,0.012477718360071301,0.021867990493774414,3.070176601409912 +128,256,10,cx_heavy,2763,2730,33,0.011943539630836048,0.021749496459960938,3.9087398052215576 +128,256,12,cx_heavy,2801,2781,20,0.007140307033202428,0.022971153259277344,3.454773187637329 +128,256,14,cx_heavy,2825,2773,52,0.018407079646017697,0.02115488052368164,2.8612377643585205 +128,256,13,cx_heavy,2764,2736,28,0.010130246020260492,0.022070646286010742,3.584190607070923 +128,256,16,cx_heavy,2817,2758,59,0.020944266950656727,0.02354717254638672,2.237983465194702 +128,256,15,cx_heavy,2789,2761,28,0.010039440659734672,0.037123680114746094,3.562718391418457 +128,256,17,cx_heavy,2851,2813,38,0.013328656611715188,0.021786928176879883,3.211442470550537 +128,256,18,cx_heavy,2792,2761,31,0.011103151862464184,0.0225069522857666,3.101576566696167 +128,256,19,cx_heavy,2742,2708,34,0.012399708242159009,0.02120804786682129,3.7828738689422607 +128,256,20,cx_heavy,2790,2748,42,0.015053763440860216,0.022254467010498047,3.218095064163208 +128,256,21,cx_heavy,2735,2710,25,0.009140767824497258,0.02114105224609375,3.0800185203552246 +128,256,23,cx_heavy,2869,2823,46,0.01603346113628442,0.021440505981445312,2.672879934310913 +128,256,22,cx_heavy,2847,2814,33,0.011591148577449948,0.02205801010131836,3.525148630142212 +128,256,24,cx_heavy,2690,2662,28,0.010408921933085501,0.02186870574951172,3.6600136756896973 +128,256,25,cx_heavy,2801,2767,34,0.012138521956444126,0.020855188369750977,3.226390838623047 +128,256,27,cx_heavy,2809,2764,45,0.016019935920256318,0.02147984504699707,2.409485101699829 +128,256,26,cx_heavy,2859,2824,35,0.01224204267226303,0.02482748031616211,3.2891225814819336 +128,256,28,cx_heavy,2819,2783,36,0.012770485987938986,0.020962953567504883,3.276585340499878 +128,256,29,cx_heavy,2846,2798,48,0.016865776528460996,0.021009206771850586,2.870060443878174 +128,256,31,cx_heavy,2699,2670,29,0.010744720266765468,0.020639419555664062,3.4474997520446777 +128,256,30,cx_heavy,2704,2672,32,0.011834319526627219,0.04100227355957031,3.968838930130005 +128,256,32,cx_heavy,2763,2734,29,0.010495837857401375,0.021111249923706055,3.4912807941436768 +128,256,33,cx_heavy,2878,2854,24,0.008339124391938846,0.020531177520751953,3.0171995162963867 +128,256,34,cx_heavy,2710,2659,51,0.018819188191881917,0.022235631942749023,2.790003776550293 +128,256,36,cx_heavy,2860,2831,29,0.01013986013986014,0.02164483070373535,2.968365430831909 +128,256,38,cx_heavy,2840,2799,41,0.014436619718309859,0.021019935607910156,2.623379945755005 +128,256,35,cx_heavy,2711,2684,27,0.009959424566580598,0.022940397262573242,3.5849997997283936 +128,256,37,cx_heavy,2773,2734,39,0.014064190407500902,0.02160501480102539,3.4703927040100098 +128,256,39,cx_heavy,2878,2849,29,0.010076441973592773,0.021074295043945312,4.063452482223511 +128,256,41,cx_heavy,2776,2722,54,0.019452449567723344,0.03453493118286133,2.965043544769287 +128,256,40,cx_heavy,2800,2765,35,0.0125,0.020701885223388672,3.4400293827056885 +128,256,42,cx_heavy,2808,2780,28,0.009971509971509971,0.020416259765625,3.4444098472595215 +128,256,43,cx_heavy,2789,2767,22,0.007888131946934385,0.020732879638671875,3.0337040424346924 +128,256,44,cx_heavy,2770,2744,26,0.009386281588447653,0.02159571647644043,3.5747227668762207 +128,256,45,cx_heavy,2819,2775,44,0.015608371763036538,0.021157026290893555,2.698711633682251 +128,256,46,cx_heavy,2823,2785,38,0.013460857244066596,0.02121901512145996,3.4150118827819824 +128,256,47,cx_heavy,2739,2710,29,0.01058780576852866,0.020303726196289062,3.3615145683288574 +128,256,48,cx_heavy,2774,2745,29,0.010454217736121124,0.024180889129638672,3.568118095397949 +128,256,49,cx_heavy,2787,2761,26,0.009329027628274129,0.020928621292114258,3.511409282684326 +128,256,50,cx_heavy,2761,2731,30,0.010865628395508874,0.02126169204711914,3.1559791564941406 +128,256,51,cx_heavy,2700,2671,29,0.01074074074074074,0.03319239616394043,2.846956491470337 +128,256,52,cx_heavy,2719,2684,35,0.012872379551305628,0.02018284797668457,3.135645627975464 +128,256,53,cx_heavy,2715,2691,24,0.008839779005524863,0.03598380088806152,3.0893473625183105 +128,256,54,cx_heavy,2794,2766,28,0.010021474588403722,0.0206453800201416,4.0137715339660645 +128,256,56,cx_heavy,2798,2759,39,0.013938527519656898,0.022258758544921875,2.7566540241241455 +128,256,55,cx_heavy,2730,2692,38,0.01391941391941392,0.021494388580322266,3.9193129539489746 +128,256,57,cx_heavy,2770,2750,20,0.007220216606498195,0.028626680374145508,2.9643702507019043 +128,256,58,cx_heavy,2885,2873,12,0.004159445407279029,0.020169734954833984,3.471113443374634 +128,256,59,cx_heavy,2890,2864,26,0.008996539792387544,0.02066326141357422,3.175518274307251 +128,256,60,cx_heavy,2747,2709,38,0.01383327266108482,0.02207803726196289,3.0655975341796875 +128,256,62,cx_heavy,2771,2732,39,0.014074341392998917,0.029953956604003906,3.059986114501953 +128,256,63,cx_heavy,2855,2811,44,0.015411558669001752,0.021682262420654297,2.8797709941864014 +128,256,61,cx_heavy,2690,2663,27,0.010037174721189592,0.02199244499206543,4.080195426940918 +128,256,64,cx_heavy,2839,2813,26,0.009158154279675942,0.02102828025817871,3.5976955890655518 +128,256,65,cx_heavy,2784,2761,23,0.008261494252873564,0.020238876342773438,3.5648348331451416 +128,256,66,cx_heavy,2789,2758,31,0.011115095016134816,0.021728992462158203,3.019083261489868 +128,256,67,cx_heavy,2810,2782,28,0.0099644128113879,0.021278858184814453,3.131861448287964 +128,256,68,cx_heavy,2859,2811,48,0.016789087093389297,0.02088451385498047,2.726921319961548 +128,256,69,cx_heavy,2763,2741,22,0.007962359753890699,0.021939516067504883,3.575449228286743 +128,256,70,cx_heavy,2755,2707,48,0.017422867513611617,0.020600080490112305,2.6670737266540527 +128,256,72,cx_heavy,2765,2731,34,0.012296564195298372,0.03434133529663086,2.2627148628234863 +128,256,71,cx_heavy,2766,2745,21,0.007592190889370932,0.021137714385986328,3.5181596279144287 +128,256,73,cx_heavy,2770,2744,26,0.009386281588447653,0.020606279373168945,3.171358346939087 +128,256,76,cx_heavy,2835,2802,33,0.01164021164021164,0.02254509925842285,2.692591428756714 +128,256,74,cx_heavy,2779,2749,30,0.010795250089960417,0.021547317504882812,3.1072726249694824 +128,256,75,cx_heavy,2751,2725,26,0.009451108687749909,0.022040843963623047,3.457435369491577 +128,256,78,cx_heavy,2791,2754,37,0.013256897169473307,0.020138025283813477,3.3922171592712402 +128,256,77,cx_heavy,2820,2784,36,0.01276595744680851,0.03794407844543457,3.5475525856018066 +128,256,79,cx_heavy,2801,2762,39,0.013923598714744734,0.02087092399597168,2.7557687759399414 +128,256,80,cx_heavy,2824,2783,41,0.01451841359773371,0.020394325256347656,2.9571900367736816 +128,256,83,cx_heavy,2690,2640,50,0.01858736059479554,0.022724628448486328,2.780282497406006 +128,256,81,cx_heavy,2782,2758,24,0.008626887131560028,0.021367311477661133,3.7124733924865723 +128,256,82,cx_heavy,2715,2693,22,0.008103130755064457,0.020769834518432617,3.9680004119873047 +128,256,84,cx_heavy,2753,2715,38,0.013803123864874683,0.021218299865722656,3.2273921966552734 +128,256,85,cx_heavy,2681,2664,17,0.006340917568071615,0.020545482635498047,3.2644169330596924 +128,256,87,cx_heavy,2753,2732,21,0.007628042135851798,0.02047586441040039,3.640448808670044 +128,256,86,cx_heavy,2802,2783,19,0.006780870806566738,0.03800487518310547,3.915653944015503 +128,256,88,cx_heavy,2761,2735,26,0.009416877942774357,0.021791934967041016,3.328836679458618 +128,256,89,cx_heavy,2817,2782,35,0.012424565140220093,0.021182537078857422,3.262587308883667 +128,256,90,cx_heavy,2842,2815,27,0.009500351864883884,0.020561933517456055,3.473818063735962 +128,256,91,cx_heavy,2823,2798,25,0.008855827134254339,0.021605253219604492,3.194540500640869 +128,256,92,cx_heavy,2740,2710,30,0.010948905109489052,0.020176410675048828,3.5610837936401367 +128,256,93,cx_heavy,2846,2813,33,0.011595221363316937,0.02078866958618164,3.0832197666168213 +128,256,94,cx_heavy,2774,2746,28,0.010093727469358327,0.020899057388305664,3.5035252571105957 +128,256,95,cx_heavy,2713,2684,29,0.010689273866568375,0.02109813690185547,3.6508588790893555 +128,256,96,cx_heavy,2897,2862,35,0.012081463583016915,0.02710437774658203,3.5311083793640137 +128,256,98,cx_heavy,2791,2759,32,0.01146542457900394,0.024513959884643555,3.211653232574463 +128,256,97,cx_heavy,2851,2821,30,0.01052262364082778,0.02263331413269043,3.5105364322662354 +128,256,99,cx_heavy,2793,2733,60,0.021482277121374866,0.020229101181030273,3.1453728675842285 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_192.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_192.csv new file mode 100644 index 000000000..73927d04a --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_192.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +192,384,1,cx_heavy,6208,6153,55,0.008859536082474227,0.05915665626525879,9.336485147476196 +192,384,0,cx_heavy,6277,6222,55,0.008762147522701928,0.11342263221740723,10.486837148666382 +192,384,6,cx_heavy,6271,6226,45,0.0071758890129166005,0.056664466857910156,8.778360605239868 +192,384,2,cx_heavy,6049,5983,66,0.010910894362704579,0.059356689453125,10.217912435531616 +192,384,4,cx_heavy,6195,6147,48,0.00774818401937046,0.05951237678527832,10.132739305496216 +192,384,5,cx_heavy,6294,6239,55,0.008738481093104544,0.05948019027709961,11.009731769561768 +192,384,7,cx_heavy,6257,6192,65,0.010388365031165095,0.0680696964263916,10.571857690811157 +192,384,3,cx_heavy,6288,6249,39,0.006202290076335878,0.10115170478820801,12.440218925476074 +192,384,8,cx_heavy,6093,6035,58,0.009519120301985885,0.055873870849609375,9.548831701278687 +192,384,10,cx_heavy,6200,6132,68,0.01096774193548387,0.11209940910339355,8.822561740875244 +192,384,13,cx_heavy,6124,6069,55,0.008981058131939909,0.05791211128234863,8.832369327545166 +192,384,11,cx_heavy,6142,6100,42,0.006838163464669489,0.10965132713317871,10.271458148956299 +192,384,9,cx_heavy,6287,6248,39,0.0062032766025131225,0.08400559425354004,11.712997436523438 +192,384,15,cx_heavy,6288,6197,91,0.014472010178117048,0.06624674797058105,7.250017404556274 +192,384,12,cx_heavy,6375,6335,40,0.006274509803921568,0.125,11.71639895439148 +192,384,14,cx_heavy,6220,6176,44,0.00707395498392283,0.07578897476196289,10.22253131866455 +192,384,16,cx_heavy,6267,6217,50,0.007978299026647519,0.05999469757080078,11.41335415840149 +192,384,17,cx_heavy,6211,6175,36,0.005796168088874577,0.07063651084899902,11.735298871994019 +192,384,18,cx_heavy,6363,6303,60,0.00942951438000943,0.07351469993591309,10.461268186569214 +192,384,20,cx_heavy,6025,5974,51,0.008464730290456432,0.05576658248901367,9.692607879638672 +192,384,21,cx_heavy,6196,6152,44,0.0071013557133634605,0.09179449081420898,10.044300079345703 +192,384,22,cx_heavy,6281,6214,67,0.010667091227511543,0.0605015754699707,9.8000807762146 +192,384,19,cx_heavy,6306,6270,36,0.005708848715509039,0.06778740882873535,11.529431104660034 +192,384,23,cx_heavy,6274,6223,51,0.008128785463818936,0.06512641906738281,11.576297521591187 +192,384,24,cx_heavy,6237,6193,44,0.007054673721340388,0.11172795295715332,11.155819177627563 +192,384,25,cx_heavy,6210,6166,44,0.007085346215780998,0.05943918228149414,10.975572109222412 +192,384,26,cx_heavy,6320,6270,50,0.007911392405063292,0.07486176490783691,11.866185665130615 +192,384,28,cx_heavy,6226,6169,57,0.00915515579826534,0.0856633186340332,9.158692598342896 +192,384,27,cx_heavy,6326,6286,40,0.006323110970597534,0.06360507011413574,11.5674467086792 +192,384,31,cx_heavy,6186,6136,50,0.008082767539605561,0.06859779357910156,9.141381978988647 +192,384,30,cx_heavy,6077,6028,49,0.008063189073556031,0.06244063377380371,9.555087089538574 +192,384,29,cx_heavy,6199,6167,32,0.005162122923052105,0.05866599082946777,11.704736471176147 +192,384,34,cx_heavy,6249,6187,62,0.00992158745399264,0.06022930145263672,8.47720718383789 +192,384,32,cx_heavy,6155,6129,26,0.004224207961007311,0.08517885208129883,11.40017580986023 +192,384,33,cx_heavy,6264,6209,55,0.008780332056194126,0.0765843391418457,9.770399808883667 +192,384,38,cx_heavy,6307,6256,51,0.008086253369272238,0.057195425033569336,9.023969888687134 +192,384,36,cx_heavy,6355,6308,47,0.007395751376868607,0.07856297492980957,10.295918464660645 +192,384,35,cx_heavy,6076,6024,52,0.008558262014483212,0.062148332595825195,10.415210723876953 +192,384,37,cx_heavy,6184,6126,58,0.009379042690815007,0.05751919746398926,9.94965410232544 +192,384,39,cx_heavy,6342,6286,56,0.008830022075055188,0.07544350624084473,10.616153478622437 +192,384,40,cx_heavy,6201,6156,45,0.00725689404934688,0.10265016555786133,9.629728317260742 +192,384,41,cx_heavy,6126,6080,46,0.0075089781260202415,0.06009960174560547,10.496615171432495 +192,384,43,cx_heavy,6262,6186,76,0.012136697540721815,0.07535409927368164,10.34505295753479 +192,384,42,cx_heavy,6145,6107,38,0.006183889340927584,0.06669831275939941,11.488541841506958 +192,384,46,cx_heavy,6245,6193,52,0.008326661329063251,0.05739235877990723,9.029820680618286 +192,384,44,cx_heavy,6251,6204,47,0.007518796992481203,0.06884527206420898,9.853914499282837 +192,384,47,cx_heavy,6201,6156,45,0.00725689404934688,0.0823514461517334,9.224544763565063 +192,384,45,cx_heavy,6133,6089,44,0.0071743029512473504,0.12288641929626465,9.989641189575195 +192,384,48,cx_heavy,6113,6050,63,0.010305905447407166,0.05490469932556152,10.180066585540771 +192,384,49,cx_heavy,6218,6166,52,0.008362817626246381,0.049214839935302734,10.576935529708862 +192,384,50,cx_heavy,6108,6056,52,0.008513425016371971,0.10515356063842773,9.155334234237671 +192,384,52,cx_heavy,6197,6129,68,0.010973051476520897,0.05111265182495117,10.242212057113647 +192,384,51,cx_heavy,6181,6119,62,0.010030739362562692,0.07405567169189453,11.800076246261597 +192,384,55,cx_heavy,6171,6108,63,0.010209042294603793,0.07508397102355957,8.68112325668335 +192,384,54,cx_heavy,6301,6259,42,0.0066656086335502305,0.11484336853027344,10.848526000976562 +192,384,53,cx_heavy,6082,6051,31,0.005097007563301546,0.05762457847595215,11.901136875152588 +192,384,57,cx_heavy,6192,6153,39,0.006298449612403101,0.11696267127990723,9.5728280544281 +192,384,56,cx_heavy,6283,6230,53,0.00843546076714945,0.0668635368347168,11.412594079971313 +192,384,58,cx_heavy,6301,6266,35,0.005554673861291859,0.1148672103881836,11.667515754699707 +192,384,59,cx_heavy,6288,6245,43,0.006838422391857507,0.05930638313293457,10.66615891456604 +192,384,61,cx_heavy,6174,6120,54,0.008746355685131196,0.07477402687072754,9.56137752532959 +192,384,60,cx_heavy,6313,6258,55,0.008712181213369238,0.05611991882324219,11.819213628768921 +192,384,62,cx_heavy,6152,6114,38,0.006176853055916775,0.05847668647766113,12.12900424003601 +192,384,65,cx_heavy,6197,6155,42,0.006777472970792319,0.06879115104675293,10.532219648361206 +192,384,63,cx_heavy,6228,6180,48,0.007707129094412331,0.05662035942077637,11.715073585510254 +192,384,64,cx_heavy,6123,6085,38,0.006206108116936142,0.11821413040161133,12.501721858978271 +192,384,66,cx_heavy,6164,6110,54,0.008760545100584036,0.0753786563873291,11.552880764007568 +192,384,68,cx_heavy,6290,6241,49,0.0077901430842607314,0.07131099700927734,10.481255769729614 +192,384,67,cx_heavy,6372,6324,48,0.007532956685499058,0.059448957443237305,11.44066596031189 +192,384,69,cx_heavy,6202,6161,41,0.006610770719122864,0.07238268852233887,10.903240203857422 +192,384,70,cx_heavy,6194,6147,47,0.007587988375847595,0.06189250946044922,10.163739204406738 +192,384,73,cx_heavy,6100,6050,50,0.00819672131147541,0.07432866096496582,10.245641231536865 +192,384,71,cx_heavy,6238,6211,27,0.004328310355883296,0.07916808128356934,11.037895679473877 +192,384,77,cx_heavy,6302,6250,52,0.008251348778165662,0.0593256950378418,8.340699672698975 +192,384,72,cx_heavy,6143,6102,41,0.0066742633892235064,0.08817267417907715,11.567254781723022 +192,384,75,cx_heavy,6299,6251,48,0.007620257183679949,0.07545685768127441,11.015212297439575 +192,384,74,cx_heavy,6199,6154,45,0.007259235360542023,0.05727434158325195,11.766112804412842 +192,384,76,cx_heavy,6119,6075,44,0.007190717437489786,0.08055567741394043,10.645101070404053 +192,384,78,cx_heavy,6185,6141,44,0.0071139854486661274,0.05254840850830078,10.941181421279907 +192,384,79,cx_heavy,6185,6146,39,0.006305578011317704,0.08493256568908691,11.050558805465698 +192,384,80,cx_heavy,6093,6039,54,0.008862629246676515,0.09888482093811035,9.882275581359863 +192,384,81,cx_heavy,6247,6177,70,0.011205378581719225,0.06403231620788574,10.029029130935669 +192,384,82,cx_heavy,6063,6015,48,0.007916872835230085,0.11599183082580566,10.502073764801025 +192,384,84,cx_heavy,6208,6164,44,0.007087628865979381,0.10004591941833496,10.378608465194702 +192,384,83,cx_heavy,6329,6281,48,0.007584136514457261,0.05870366096496582,10.536473989486694 +192,384,85,cx_heavy,6046,5999,47,0.007773734700628514,0.06507110595703125,11.621386766433716 +192,384,86,cx_heavy,6303,6270,33,0.005235602094240838,0.07303953170776367,9.925051212310791 +192,384,87,cx_heavy,6129,6097,32,0.0052210801109479526,0.06732559204101562,10.63979983329773 +192,384,88,cx_heavy,6272,6236,36,0.005739795918367347,0.06852459907531738,10.42997670173645 +192,384,90,cx_heavy,6160,6118,42,0.006818181818181818,0.05985736846923828,9.0446457862854 +192,384,89,cx_heavy,6273,6234,39,0.006217120994739359,0.062284231185913086,10.282379388809204 +192,384,91,cx_heavy,6339,6286,53,0.00836094021138981,0.05014181137084961,10.178744792938232 +192,384,94,cx_heavy,6239,6199,40,0.006411283859592883,0.059372901916503906,9.111717224121094 +192,384,92,cx_heavy,6288,6254,34,0.005407124681933842,0.13669514656066895,12.41325831413269 +192,384,93,cx_heavy,6273,6243,30,0.004782400765184123,0.07659149169921875,10.914571285247803 +192,384,95,cx_heavy,6146,6119,27,0.004393101204035145,0.06275057792663574,10.134480714797974 +192,384,96,cx_heavy,6295,6223,72,0.011437648927720413,0.06422901153564453,9.641643047332764 +192,384,97,cx_heavy,6325,6282,43,0.006798418972332016,0.0697317123413086,9.743156909942627 +192,384,98,cx_heavy,6310,6285,25,0.003961965134706815,0.06608438491821289,10.754282712936401 +192,384,99,cx_heavy,6255,6202,53,0.00847322142286171,0.058844804763793945,11.181523323059082 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_256.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_256.csv new file mode 100644 index 000000000..bddfefdf1 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_256.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +256,512,0,cx_heavy,10847,10778,69,0.0063612058633723614,0.08411526679992676,19.81896662712097 +256,512,1,cx_heavy,10965,10902,63,0.005745554035567715,0.08187675476074219,21.739771604537964 +256,512,2,cx_heavy,10969,10909,60,0.0054699607986142765,0.08487796783447266,21.528332710266113 +256,512,4,cx_heavy,11068,11006,62,0.005601734730755331,0.0871281623840332,21.61903429031372 +256,512,3,cx_heavy,11153,11106,47,0.004214112794763741,0.08316898345947266,23.365206956863403 +256,512,5,cx_heavy,10936,10873,63,0.005760790051207023,0.0895090103149414,22.41569447517395 +256,512,6,cx_heavy,10950,10877,73,0.006666666666666667,0.0852513313293457,20.462015628814697 +256,512,7,cx_heavy,11073,10990,83,0.007495710286281947,0.08600854873657227,17.14758539199829 +256,512,9,cx_heavy,11033,10966,67,0.006072691017855524,0.08217477798461914,16.12584376335144 +256,512,8,cx_heavy,10897,10826,71,0.006515554739836653,0.08940792083740234,20.014920949935913 +256,512,11,cx_heavy,10960,10889,71,0.006478102189781022,0.12092351913452148,18.367836952209473 +256,512,10,cx_heavy,11173,11122,51,0.004564575315492705,0.0867462158203125,22.713499307632446 +256,512,12,cx_heavy,10942,10892,50,0.0045695485286053735,0.08933305740356445,19.83634066581726 +256,512,14,cx_heavy,11018,10962,56,0.005082592121982211,0.08198428153991699,17.818547248840332 +256,512,13,cx_heavy,10935,10899,36,0.0032921810699588477,0.08342146873474121,21.65278196334839 +256,512,15,cx_heavy,11154,11053,101,0.009055047516585979,0.08804035186767578,17.696715116500854 +256,512,17,cx_heavy,11056,10995,61,0.005517366136034732,0.08509349822998047,18.779326677322388 +256,512,16,cx_heavy,11097,11026,71,0.006398125619536812,0.12286663055419922,20.014049768447876 +256,512,18,cx_heavy,11160,11103,57,0.00510752688172043,0.08527326583862305,22.020682096481323 +256,512,19,cx_heavy,11042,10973,69,0.006248867958703133,0.08151698112487793,21.496822834014893 +256,512,21,cx_heavy,11066,11006,60,0.005422013374299656,0.08242416381835938,17.275959014892578 +256,512,20,cx_heavy,10945,10900,45,0.004111466423024212,0.08877301216125488,20.174404621124268 +256,512,22,cx_heavy,10975,10915,60,0.005466970387243736,0.08226132392883301,23.161612272262573 +256,512,23,cx_heavy,11170,11112,58,0.0051924798567591765,0.0829629898071289,20.14376163482666 +256,512,24,cx_heavy,11005,10939,66,0.005997273966378919,0.08639931678771973,20.94250798225403 +256,512,26,cx_heavy,11180,11119,61,0.005456171735241502,0.08410072326660156,20.201372623443604 +256,512,25,cx_heavy,10990,10942,48,0.004367606915377616,0.08447265625,21.914729356765747 +256,512,27,cx_heavy,11120,11040,80,0.007194244604316547,0.08170175552368164,19.882195234298706 +256,512,28,cx_heavy,11028,10963,65,0.005894087776568734,0.0875251293182373,20.5903263092041 +256,512,29,cx_heavy,10977,10928,49,0.004463879019768607,0.08720541000366211,21.77120065689087 +256,512,30,cx_heavy,10705,10656,49,0.004577300326950024,0.08287358283996582,20.070136308670044 +256,512,31,cx_heavy,10767,10717,50,0.004643819076808767,0.08443975448608398,19.87762475013733 +256,512,32,cx_heavy,10910,10861,49,0.004491292392300642,0.0911409854888916,21.75892996788025 +256,512,33,cx_heavy,11095,10997,98,0.008832807570977918,0.08299541473388672,19.218435764312744 +256,512,34,cx_heavy,11008,10952,56,0.005087209302325582,0.08049798011779785,20.094552755355835 +256,512,35,cx_heavy,10969,10918,51,0.004649466678822135,0.08299112319946289,19.889482021331787 +256,512,36,cx_heavy,11164,11108,56,0.005016123253314225,0.08464837074279785,20.076923370361328 +256,512,37,cx_heavy,11063,10993,70,0.006327397631745458,0.08856439590454102,20.00394082069397 +256,512,38,cx_heavy,10984,10904,80,0.007283321194464676,0.08430242538452148,19.15147876739502 +256,512,39,cx_heavy,11173,11117,56,0.0050120826993645395,0.09199285507202148,20.22799062728882 +256,512,40,cx_heavy,11023,10924,99,0.008981221083189694,0.08382964134216309,18.397151708602905 +256,512,41,cx_heavy,11010,10959,51,0.004632152588555858,0.09001731872558594,22.551002740859985 +256,512,43,cx_heavy,11015,10932,83,0.007535179300953245,0.08265161514282227,17.930343866348267 +256,512,42,cx_heavy,11057,11009,48,0.004341141358415484,0.08125138282775879,20.69124960899353 +256,512,44,cx_heavy,11099,11054,45,0.00405441931705559,0.08943653106689453,21.662933111190796 +256,512,45,cx_heavy,10932,10867,65,0.005945847054518844,0.08233284950256348,20.289989709854126 +256,512,46,cx_heavy,10968,10897,71,0.006473377097009482,0.08282470703125,20.917925596237183 +256,512,48,cx_heavy,10921,10832,89,0.008149436864755975,0.08207845687866211,18.48033833503723 +256,512,47,cx_heavy,11021,10967,54,0.004899736865983123,0.08904552459716797,21.710436582565308 +256,512,49,cx_heavy,11087,11034,53,0.004780373410300352,0.08648037910461426,21.752354860305786 +256,512,50,cx_heavy,10973,10907,66,0.006014763510434703,0.08117556571960449,21.68799901008606 +256,512,51,cx_heavy,11062,11017,45,0.004067980473693726,0.0817258358001709,21.318511962890625 +256,512,52,cx_heavy,10895,10838,57,0.005231757687012391,0.08383941650390625,19.368189334869385 +256,512,53,cx_heavy,11126,11058,68,0.006111810174366349,0.08156633377075195,17.700599670410156 +256,512,54,cx_heavy,11034,10988,46,0.004168932390792097,0.08698034286499023,20.349328994750977 +256,512,55,cx_heavy,11009,10940,69,0.006267599236987919,0.08254337310791016,20.56406021118164 +256,512,56,cx_heavy,11159,11069,90,0.008065238820682857,0.14031744003295898,14.718780040740967 +256,512,58,cx_heavy,11131,11051,80,0.0071871350282993445,0.08543157577514648,18.33815312385559 +256,512,57,cx_heavy,11018,10964,54,0.0049010709747685606,0.08210515975952148,21.939094305038452 +256,512,59,cx_heavy,11017,10978,39,0.0035399836616138696,0.08831381797790527,22.322714805603027 +256,512,61,cx_heavy,11043,10982,61,0.005523861269582541,0.08208751678466797,17.84218692779541 +256,512,60,cx_heavy,10995,10936,59,0.005366075488858572,0.08695125579833984,21.68651032447815 +256,512,62,cx_heavy,11132,11069,63,0.005659360402443406,0.08445906639099121,21.832980155944824 +256,512,63,cx_heavy,11024,10967,57,0.005170537010159652,0.08362722396850586,23.168050050735474 +256,512,64,cx_heavy,10942,10892,50,0.0045695485286053735,0.08115911483764648,21.558133125305176 +256,512,65,cx_heavy,11070,11014,56,0.005058717253839205,0.08447980880737305,22.12438154220581 +256,512,66,cx_heavy,11006,10945,61,0.005542431401053971,0.08733725547790527,20.809298992156982 +256,512,67,cx_heavy,11284,11179,105,0.009305210918114143,0.08282327651977539,18.280085802078247 +256,512,68,cx_heavy,11027,10974,53,0.004806384329373356,0.08107376098632812,22.42332911491394 +256,512,70,cx_heavy,11124,11031,93,0.008360302049622438,0.09699797630310059,16.846730947494507 +256,512,69,cx_heavy,10892,10845,47,0.004315093646713184,0.08037066459655762,22.37643551826477 +256,512,71,cx_heavy,11181,11118,63,0.005634558626240944,0.09087204933166504,18.68740487098694 +256,512,72,cx_heavy,10862,10805,57,0.005247652366046769,0.09071683883666992,21.99443769454956 +256,512,74,cx_heavy,11161,11102,59,0.005286264671624406,0.0887749195098877,15.537357568740845 +256,512,73,cx_heavy,10956,10905,51,0.004654983570646221,0.08572936058044434,23.924504041671753 +256,512,75,cx_heavy,11265,11204,61,0.005415002219263204,0.08888530731201172,16.27565360069275 +256,512,76,cx_heavy,10861,10810,51,0.004695700211766872,0.0831296443939209,20.14537262916565 +256,512,77,cx_heavy,11041,10965,76,0.006883434471515262,0.08967137336730957,21.890079259872437 +256,512,78,cx_heavy,10919,10854,65,0.005952926092132979,0.08722925186157227,20.202067136764526 +256,512,80,cx_heavy,11000,10928,72,0.006545454545454545,0.08426451683044434,18.57129693031311 +256,512,79,cx_heavy,11109,11047,62,0.005581060401476281,0.08394241333007812,21.811724424362183 +256,512,81,cx_heavy,11044,11005,39,0.003531329228540384,0.08303618431091309,22.548296689987183 +256,512,82,cx_heavy,10975,10914,61,0.005558086560364464,0.08770966529846191,20.5891010761261 +256,512,83,cx_heavy,11030,10952,78,0.007071622846781505,0.11359620094299316,16.811177492141724 +256,512,84,cx_heavy,11015,10946,69,0.006264185201997277,0.09224081039428711,20.264973163604736 +256,512,85,cx_heavy,10944,10880,64,0.005847953216374269,0.08231878280639648,21.97313356399536 +256,512,86,cx_heavy,11113,11054,59,0.005309097453432917,0.08813905715942383,21.849549770355225 +256,512,87,cx_heavy,11006,10952,54,0.004906414682900236,0.08496212959289551,20.52542805671692 +256,512,88,cx_heavy,11170,11120,50,0.004476275738585497,0.08835959434509277,20.456401348114014 +256,512,89,cx_heavy,11068,11005,63,0.005692085290928804,0.08810782432556152,20.48742413520813 +256,512,90,cx_heavy,11041,10973,68,0.0061588624218820755,0.09863781929016113,22.869003295898438 +256,512,91,cx_heavy,11194,11123,71,0.006342683580489548,0.08597326278686523,20.56241202354431 +256,512,92,cx_heavy,11216,11157,59,0.005260342368045649,0.08376598358154297,22.261187076568604 +256,512,93,cx_heavy,11019,10952,67,0.006080406570469189,0.08348512649536133,22.438182592391968 +256,512,94,cx_heavy,10938,10889,49,0.004479795209361858,0.08860206604003906,23.38670802116394 +256,512,95,cx_heavy,10990,10930,60,0.00545950864422202,0.08112645149230957,21.51253581047058 +256,512,96,cx_heavy,11080,11032,48,0.004332129963898917,0.08986186981201172,20.19445276260376 +256,512,97,cx_heavy,11191,11140,51,0.004557233491198284,0.08377313613891602,20.705275774002075 +256,512,98,cx_heavy,10939,10884,55,0.005027881890483591,0.08656835556030273,19.996461391448975 +256,512,99,cx_heavy,10848,10773,75,0.006913716814159292,0.08568429946899414,22.49933958053589 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_320.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_320.csv new file mode 100644 index 000000000..9ec1c02e2 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_320.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +320,640,2,cx_heavy,17140,17064,76,0.004434072345390899,0.08672642707824707,26.26118564605713 +320,640,1,cx_heavy,17367,17287,80,0.004606437496401221,0.12822222709655762,27.87004852294922 +320,640,0,cx_heavy,17193,17116,77,0.004478566858605247,0.09636592864990234,28.938657522201538 +320,640,6,cx_heavy,17109,17044,65,0.0037991700274709215,0.09809446334838867,25.076823949813843 +320,640,4,cx_heavy,17306,17233,73,0.004218190223044031,0.10189986228942871,26.578639268875122 +320,640,7,cx_heavy,16980,16911,69,0.004063604240282685,0.08592343330383301,25.775379419326782 +320,640,3,cx_heavy,17243,17189,54,0.003131705619671751,0.10094976425170898,31.540977954864502 +320,640,5,cx_heavy,17123,17048,75,0.004380073585236232,0.08225560188293457,31.417765140533447 +320,640,8,cx_heavy,16967,16874,93,0.005481228266635233,0.08207440376281738,28.88640856742859 +320,640,9,cx_heavy,17296,17215,81,0.0046831637372802964,0.16432666778564453,28.484369039535522 +320,640,10,cx_heavy,17243,17146,97,0.0056254712057066635,0.1633315086364746,32.59636378288269 +320,640,11,cx_heavy,17048,16980,68,0.003988737681839512,0.15709710121154785,33.32123017311096 +320,640,13,cx_heavy,17164,17090,74,0.004311349335819156,0.16569042205810547,32.53320670127869 +320,640,12,cx_heavy,16953,16894,59,0.003480209992331741,0.0993187427520752,34.9533166885376 +320,640,16,cx_heavy,17241,17172,69,0.00400208804593701,0.08654403686523438,31.579012155532837 +320,640,15,cx_heavy,17421,17331,90,0.0051661787497847425,0.08676290512084961,33.02850341796875 +320,640,14,cx_heavy,17280,17185,95,0.005497685185185185,0.13966846466064453,36.30639600753784 +320,640,17,cx_heavy,17365,17284,81,0.004664555139648719,0.08444929122924805,31.62510657310486 +320,640,18,cx_heavy,17407,17311,96,0.005515022692020452,0.10766816139221191,24.775550365447998 +320,640,21,cx_heavy,17237,17167,70,0.004061031502001509,0.09627699851989746,25.64311695098877 +320,640,19,cx_heavy,17119,17054,65,0.00379695075646942,0.08658742904663086,27.812731742858887 +320,640,22,cx_heavy,17328,17265,63,0.0036357340720221606,0.08467936515808105,27.10350012779236 +320,640,20,cx_heavy,17235,17162,73,0.004235567159849144,0.10679745674133301,29.137956142425537 +320,640,23,cx_heavy,17455,17393,62,0.003551990833572042,0.08363032341003418,29.541671991348267 +320,640,25,cx_heavy,17359,17275,84,0.004838988420991993,0.0846858024597168,28.306052923202515 +320,640,24,cx_heavy,17427,17351,76,0.004361048947036208,0.08386945724487305,30.6567165851593 +320,640,26,cx_heavy,17177,17105,72,0.004191651627175875,0.08051228523254395,30.99039101600647 +320,640,27,cx_heavy,17174,17099,75,0.004367066495865843,0.08156776428222656,33.20882487297058 +320,640,28,cx_heavy,17319,17235,84,0.004850164559154686,0.1672511100769043,27.335999011993408 +320,640,29,cx_heavy,17093,17009,84,0.004914292400397824,0.16537880897521973,28.018115758895874 +320,640,30,cx_heavy,16958,16885,73,0.004304752918976295,0.1654508113861084,29.267776012420654 +320,640,31,cx_heavy,16814,16722,92,0.005471630783870584,0.1630246639251709,29.546514749526978 +320,640,33,cx_heavy,17135,17030,105,0.00612780857893201,0.08626556396484375,28.32194185256958 +320,640,32,cx_heavy,17111,17054,57,0.003331190462275729,0.1600942611694336,30.044269323349 +320,640,34,cx_heavy,17187,17112,75,0.004363763309478094,0.0852057933807373,31.1345956325531 +320,640,35,cx_heavy,17187,17110,77,0.004480130331064177,0.08266592025756836,31.07314896583557 +320,640,37,cx_heavy,17291,17173,118,0.006824359493378058,0.08364105224609375,22.84031105041504 +320,640,36,cx_heavy,17607,17539,68,0.003862100301016641,0.0833899974822998,27.551135778427124 +320,640,38,cx_heavy,17447,17356,91,0.0052157964119906005,0.08255481719970703,27.997910499572754 +320,640,39,cx_heavy,17403,17296,107,0.0061483652243866,0.09252429008483887,26.730478763580322 +320,640,42,cx_heavy,17183,17100,83,0.004830355584007449,0.12111115455627441,24.466776132583618 +320,640,41,cx_heavy,17276,17199,77,0.004457050243111832,0.1579146385192871,27.14075517654419 +320,640,40,cx_heavy,17185,17106,79,0.004597032295606634,0.15877532958984375,28.604066610336304 +320,640,43,cx_heavy,17384,17286,98,0.005637367694431661,0.08601856231689453,26.574302196502686 +320,640,44,cx_heavy,17162,17063,99,0.005768558443071903,0.08196473121643066,22.26234459877014 +320,640,45,cx_heavy,17138,17065,73,0.004259540203057533,0.08378458023071289,24.291213512420654 +320,640,46,cx_heavy,17059,16996,63,0.0036930652441526466,0.08859729766845703,24.355032444000244 +320,640,47,cx_heavy,17032,16963,69,0.0040511977454203854,0.08539152145385742,23.72847318649292 +320,640,51,cx_heavy,17040,16954,86,0.005046948356807511,0.08435273170471191,23.57857036590576 +320,640,49,cx_heavy,17146,17068,78,0.004549165986235857,0.10488152503967285,25.829867362976074 +320,640,48,cx_heavy,17074,16971,103,0.006032564132599273,0.15889263153076172,26.278986930847168 +320,640,52,cx_heavy,17049,16952,97,0.005689483254149803,0.08313226699829102,22.595027685165405 +320,640,50,cx_heavy,17018,16954,64,0.0037607239393583265,0.08493685722351074,27.45245337486267 +320,640,53,cx_heavy,17292,17215,77,0.004452926208651399,0.08331584930419922,27.21228051185608 +320,640,54,cx_heavy,17388,17327,61,0.0035081665516448124,0.08414411544799805,27.31899094581604 +320,640,55,cx_heavy,17169,17095,74,0.004310093773661833,0.12603378295898438,25.93315362930298 +320,640,56,cx_heavy,17145,17062,83,0.00484106153397492,0.08395886421203613,27.482191801071167 +320,640,59,cx_heavy,17173,17109,64,0.003726780411110464,0.08476901054382324,23.379993677139282 +320,640,57,cx_heavy,17281,17177,104,0.006018170244777501,0.13573956489562988,24.249056339263916 +320,640,58,cx_heavy,17287,17208,79,0.004569908023370163,0.19421744346618652,26.6547954082489 +320,640,60,cx_heavy,17097,17007,90,0.005264081417792595,0.12172198295593262,27.222525119781494 +320,640,61,cx_heavy,17059,16997,62,0.0036344451609121287,0.08461999893188477,29.007848262786865 +320,640,62,cx_heavy,17298,17217,81,0.004682622268470343,0.08419966697692871,26.867384433746338 +320,640,63,cx_heavy,17352,17260,92,0.005301982480405717,0.0830390453338623,23.00599718093872 +320,640,64,cx_heavy,17302,17230,72,0.004161368627904289,0.14868974685668945,26.43447732925415 +320,640,65,cx_heavy,16952,16876,76,0.004483246814535158,0.08155512809753418,26.148572206497192 +320,640,68,cx_heavy,17193,17108,85,0.004943872506252544,0.08359718322753906,25.565797567367554 +320,640,67,cx_heavy,17354,17287,67,0.0038607813760516306,0.08296918869018555,29.98156428337097 +320,640,66,cx_heavy,17164,17090,74,0.004311349335819156,0.08397960662841797,30.075482845306396 +320,640,71,cx_heavy,17393,17289,104,0.0059794170068418325,0.0836496353149414,22.724093914031982 +320,640,69,cx_heavy,17144,17076,68,0.003966402239850677,0.08295798301696777,27.37639808654785 +320,640,70,cx_heavy,17256,17180,76,0.00440426518312471,0.08593297004699707,28.021519660949707 +320,640,72,cx_heavy,17050,16981,69,0.00404692082111437,0.0807960033416748,27.705171585083008 +320,640,74,cx_heavy,17243,17125,118,0.0068433567244679,0.08219146728515625,25.365588665008545 +320,640,73,cx_heavy,17286,17233,53,0.0030660650237186162,0.08729672431945801,29.16146230697632 +320,640,75,cx_heavy,17326,17212,114,0.006579706799030359,0.08202934265136719,24.728248357772827 +320,640,79,cx_heavy,17323,17260,63,0.0036367834670669053,0.08500909805297852,23.640119075775146 +320,640,77,cx_heavy,17299,17200,99,0.005722874154575409,0.08443689346313477,24.97621178627014 +320,640,76,cx_heavy,17197,17094,103,0.005989416758736989,0.10524654388427734,25.641762018203735 +320,640,78,cx_heavy,17289,17227,62,0.003586095205043669,0.08617234230041504,25.646555423736572 +320,640,80,cx_heavy,17045,16960,85,0.004986799647990613,0.08201074600219727,24.91845726966858 +320,640,81,cx_heavy,17241,17145,96,0.005568122498694972,0.08374834060668945,25.350773334503174 +320,640,83,cx_heavy,17147,17084,63,0.003674112089578352,0.08393311500549316,25.91791605949402 +320,640,82,cx_heavy,17187,17115,72,0.0041892127770989706,0.08214426040649414,27.17173480987549 +320,640,84,cx_heavy,17216,17138,78,0.0045306691449814125,0.08338785171508789,27.50962495803833 +320,640,88,cx_heavy,17475,17392,83,0.00474964234620887,0.0824882984161377,25.906726360321045 +320,640,85,cx_heavy,17087,17014,73,0.004272253760168549,0.10322022438049316,27.508423566818237 +320,640,86,cx_heavy,17202,17127,75,0.004359958144401814,0.0858759880065918,27.618285179138184 +320,640,87,cx_heavy,17080,17027,53,0.0031030444964871193,0.08207917213439941,27.377718687057495 +320,640,89,cx_heavy,17236,17164,72,0.004177303318635414,0.0840144157409668,26.38891339302063 +320,640,90,cx_heavy,17205,17109,96,0.005579773321708806,0.08159327507019043,26.72418475151062 +320,640,92,cx_heavy,17002,16930,72,0.004234795906363957,0.08051753044128418,25.834646224975586 +320,640,91,cx_heavy,17353,17298,55,0.00316948078142108,0.08155941963195801,27.927798986434937 +320,640,97,cx_heavy,17257,17176,81,0.004693747464796894,0.08466839790344238,24.84082555770874 +320,640,93,cx_heavy,17295,17216,79,0.004567794160161897,0.08142352104187012,27.543810606002808 +320,640,95,cx_heavy,17209,17089,120,0.006973095473298855,0.0843348503112793,25.784019947052002 +320,640,96,cx_heavy,17210,17127,83,0.004822777454968042,0.0837714672088623,27.46620750427246 +320,640,94,cx_heavy,17256,17183,73,0.0042304126101066295,0.09340333938598633,29.68706727027893 +320,640,98,cx_heavy,17096,17021,75,0.004386991109031352,0.08184123039245605,25.9281587600708 +320,640,99,cx_heavy,17107,17028,79,0.004617992634594026,0.08115482330322266,30.037296056747437 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_384.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_384.csv new file mode 100644 index 000000000..650e4d41a --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_384.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +384,768,0,cx_heavy,24862,24777,85,0.003418872174402703,0.22910308837890625,64.14647436141968 +384,768,1,cx_heavy,24807,24731,76,0.0030636513887209254,0.22996306419372559,60.71980857849121 +384,768,4,cx_heavy,24914,24819,95,0.0038131171229027856,0.2276625633239746,55.23775553703308 +384,768,2,cx_heavy,24587,24519,68,0.0027656891853418473,0.22884750366210938,64.4366226196289 +384,768,3,cx_heavy,24802,24724,78,0.0031449076687363924,0.3068423271179199,60.26888179779053 +384,768,6,cx_heavy,24848,24734,114,0.004587894397939472,0.2288823127746582,55.83569025993347 +384,768,5,cx_heavy,24760,24669,91,0.0036752827140549274,0.22828149795532227,60.75231099128723 +384,768,8,cx_heavy,24492,24385,107,0.004368773477053732,0.232987642288208,57.17789101600647 +384,768,7,cx_heavy,24634,24542,92,0.003734675651538524,0.22119379043579102,64.24318742752075 +384,768,12,cx_heavy,24454,24346,108,0.0044164553856219846,0.3707764148712158,48.29965400695801 +384,768,10,cx_heavy,25017,24900,117,0.004676819762561458,0.2629072666168213,54.93082904815674 +384,768,13,cx_heavy,24796,24670,126,0.005081464752379416,0.22913527488708496,52.83742070198059 +384,768,14,cx_heavy,24932,24844,88,0.003529600513396438,0.31590867042541504,54.05348062515259 +384,768,9,cx_heavy,24911,24847,64,0.0025691461603307778,0.2500743865966797,65.25979781150818 +384,768,11,cx_heavy,24760,24673,87,0.0035137318255250402,0.1567091941833496,60.26435732841492 +384,768,15,cx_heavy,25140,25060,80,0.0031821797931583136,0.23029088973999023,64.16718602180481 +384,768,16,cx_heavy,24714,24612,102,0.004127215343529983,0.2690918445587158,55.715210914611816 +384,768,17,cx_heavy,24884,24792,92,0.0036971547982639448,0.24357986450195312,69.35813856124878 +384,768,18,cx_heavy,24987,24889,98,0.00392203946051947,0.22753334045410156,56.048216581344604 +384,768,21,cx_heavy,24830,24746,84,0.003383004430124849,0.2277698516845703,54.879570960998535 +384,768,19,cx_heavy,24919,24825,94,0.00377222199927766,0.23768854141235352,64.22758793830872 +384,768,22,cx_heavy,24847,24718,129,0.005191773654767175,0.2551839351654053,55.7691376209259 +384,768,20,cx_heavy,24557,24474,83,0.0033798916805798753,0.24376964569091797,60.66446399688721 +384,768,23,cx_heavy,24828,24741,87,0.0035041082648622525,0.2344663143157959,58.932379961013794 +384,768,24,cx_heavy,24673,24579,94,0.003809832610545941,0.22085142135620117,62.05014371871948 +384,768,25,cx_heavy,24667,24596,71,0.0028783394818988933,0.22881698608398438,59.530569553375244 +384,768,26,cx_heavy,24923,24832,91,0.0036512458371785097,0.22966837882995605,60.52410006523132 +384,768,27,cx_heavy,24541,24442,99,0.004034065441506051,0.22932219505310059,54.941964864730835 +384,768,30,cx_heavy,24525,24448,77,0.0031396534148827727,0.269359827041626,50.80872201919556 +384,768,28,cx_heavy,24890,24801,89,0.0035757332261952593,0.2531318664550781,59.2176034450531 +384,768,29,cx_heavy,24603,24536,67,0.0027232451327073933,0.23017501831054688,60.425398111343384 +384,768,32,cx_heavy,24816,24753,63,0.002538684719535783,0.2543315887451172,58.05169630050659 +384,768,31,cx_heavy,24502,24406,96,0.003918047506326014,0.25442004203796387,64.1745343208313 +384,768,33,cx_heavy,24704,24617,87,0.0035216968911917098,0.22792577743530273,60.763407468795776 +384,768,34,cx_heavy,24575,24486,89,0.0036215666327568665,0.2524862289428711,63.9547975063324 +384,768,35,cx_heavy,24723,24640,83,0.0033571977510819884,0.22637033462524414,56.99892830848694 +384,768,36,cx_heavy,25224,25143,81,0.0032112274024738343,0.22800707817077637,59.84455466270447 +384,768,38,cx_heavy,24816,24657,159,0.00640715667311412,0.23124384880065918,54.821633100509644 +384,768,37,cx_heavy,24659,24576,83,0.0033659110264000975,0.23524188995361328,64.87582063674927 +384,768,39,cx_heavy,24974,24872,102,0.0040842476175222235,0.23326754570007324,57.25301766395569 +384,768,41,cx_heavy,24576,24484,92,0.0037434895833333335,0.25649333000183105,51.66234874725342 +384,768,40,cx_heavy,24655,24546,109,0.004421009937132427,0.22417283058166504,60.93150544166565 +384,768,42,cx_heavy,24760,24672,88,0.003554119547657512,0.2279520034790039,55.48905277252197 +384,768,43,cx_heavy,24934,24849,85,0.003408999759364723,0.24962425231933594,59.38828086853027 +384,768,45,cx_heavy,24720,24619,101,0.004085760517799353,0.24033594131469727,61.371806383132935 +384,768,47,cx_heavy,24679,24585,94,0.0038089063576319947,0.306751012802124,52.180716037750244 +384,768,44,cx_heavy,24811,24734,77,0.00310346217403571,0.23728227615356445,64.16339993476868 +384,768,48,cx_heavy,24632,24546,86,0.0034913933095160766,0.22936105728149414,60.47279953956604 +384,768,46,cx_heavy,24450,24375,75,0.003067484662576687,0.23477983474731445,63.40704560279846 +384,768,49,cx_heavy,24900,24810,90,0.0036144578313253013,0.23268580436706543,63.93830370903015 +384,768,51,cx_heavy,24463,24347,116,0.004741855046396599,0.2536180019378662,51.92073321342468 +384,768,50,cx_heavy,24525,24450,75,0.0030581039755351682,0.23313045501708984,62.572017431259155 +384,768,52,cx_heavy,24800,24729,71,0.0028629032258064516,0.3128807544708252,59.51005959510803 +384,768,54,cx_heavy,24702,24621,81,0.003279086713626427,0.30417776107788086,59.32367563247681 +384,768,55,cx_heavy,24734,24665,69,0.0027896822188081183,0.2604053020477295,59.80956268310547 +384,768,53,cx_heavy,24690,24601,89,0.003604698258404212,0.36376190185546875,63.22566556930542 +384,768,57,cx_heavy,24484,24369,115,0.004696944943636661,0.23014020919799805,61.28360366821289 +384,768,56,cx_heavy,24798,24699,99,0.003992257440116139,0.23757195472717285,64.17763948440552 +384,768,58,cx_heavy,24789,24724,65,0.002622130783815402,0.27103304862976074,63.99345064163208 +384,768,59,cx_heavy,24872,24799,73,0.0029350273399807014,0.23412179946899414,63.374037742614746 +384,768,60,cx_heavy,24727,24653,74,0.002992680066324261,0.23979663848876953,63.941967487335205 +384,768,63,cx_heavy,24785,24643,142,0.005729271736937664,0.2794485092163086,52.56243395805359 +384,768,61,cx_heavy,24758,24664,94,0.0037967525648275307,0.22571873664855957,55.98103308677673 +384,768,65,cx_heavy,24606,24531,75,0.0030480370641307,0.2286827564239502,50.03233480453491 +384,768,64,cx_heavy,24701,24600,101,0.004088903283267884,0.2296147346496582,60.22615623474121 +384,768,62,cx_heavy,24899,24815,84,0.0033736294630306437,0.22893905639648438,63.05528998374939 +384,768,66,cx_heavy,24628,24515,113,0.004588273509826214,0.23398041725158691,53.16818428039551 +384,768,67,cx_heavy,25014,24948,66,0.002638522427440633,0.27291250228881836,59.734333753585815 +384,768,69,cx_heavy,24686,24581,105,0.0042534229927894355,0.22854351997375488,58.02313685417175 +384,768,68,cx_heavy,24925,24833,92,0.0036910732196589768,0.2303769588470459,61.04511070251465 +384,768,70,cx_heavy,24799,24695,104,0.004193717488608412,0.24135208129882812,47.3937554359436 +384,768,71,cx_heavy,24751,24668,83,0.0033533998626318127,0.23408269882202148,59.04169678688049 +384,768,72,cx_heavy,24691,24577,114,0.0046170669474707385,0.21721315383911133,55.643306732177734 +384,768,74,cx_heavy,24614,24511,103,0.004184610384334118,0.2270047664642334,58.88030457496643 +384,768,73,cx_heavy,24644,24538,106,0.004301249797110858,0.22922873497009277,60.46002435684204 +384,768,75,cx_heavy,24855,24731,124,0.004988935827801248,0.2600071430206299,52.90948033332825 +384,768,77,cx_heavy,24849,24737,112,0.004507223630729607,0.23719334602355957,57.281179428100586 +384,768,78,cx_heavy,24720,24596,124,0.005016181229773463,0.22860193252563477,57.710437059402466 +384,768,76,cx_heavy,24496,24411,85,0.00346995427824951,0.25815486907958984,65.16415286064148 +384,768,79,cx_heavy,24856,24762,94,0.0037817830704859993,0.23369431495666504,58.475162506103516 +384,768,81,cx_heavy,24842,24718,124,0.004991546574349891,0.27320075035095215,53.35991716384888 +384,768,80,cx_heavy,24614,24527,87,0.0035345738197773624,0.23326373100280762,56.50616669654846 +384,768,82,cx_heavy,24723,24572,151,0.006107673017028678,0.2502124309539795,55.80096077919006 +384,768,83,cx_heavy,24562,24465,97,0.003949189805390441,0.22949814796447754,59.87116527557373 +384,768,84,cx_heavy,24584,24481,103,0.004189716889033517,0.22914934158325195,58.95169401168823 +384,768,85,cx_heavy,24491,24420,71,0.002899024131313544,0.2841918468475342,54.96589732170105 +384,768,86,cx_heavy,24873,24800,73,0.0029349093394443774,0.2571406364440918,64.78656816482544 +384,768,87,cx_heavy,24683,24606,77,0.003119555969695742,0.23848724365234375,60.63347005844116 +384,768,89,cx_heavy,24712,24656,56,0.0022661055357720947,0.2438046932220459,55.68106007575989 +384,768,88,cx_heavy,24999,24921,78,0.0031201248049922,0.23106622695922852,59.85044074058533 +384,768,91,cx_heavy,24893,24808,85,0.0034146145502751777,0.23139739036560059,54.4623076915741 +384,768,90,cx_heavy,24725,24638,87,0.003518705763397371,0.24723339080810547,59.549640417099 +384,768,92,cx_heavy,24763,24684,79,0.003190243508460203,0.232957124710083,56.5877890586853 +384,768,93,cx_heavy,25013,24941,72,0.0028785031783472594,0.29335594177246094,63.97894740104675 +384,768,94,cx_heavy,24693,24620,73,0.002956303405823513,0.24323105812072754,63.684245109558105 +384,768,95,cx_heavy,24670,24566,104,0.004215646534252128,0.2599649429321289,56.30104160308838 +384,768,96,cx_heavy,24832,24761,71,0.002859213917525773,0.23579001426696777,68.11660552024841 +384,768,99,cx_heavy,24536,24401,135,0.0055021193348549075,0.25426197052001953,61.48212122917175 +384,768,97,cx_heavy,24813,24719,94,0.003788336758956998,0.3376893997192383,64.61888575553894 +384,768,98,cx_heavy,24787,24681,106,0.004276435228143785,0.23969554901123047,64.43619728088379 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_448.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_448.csv new file mode 100644 index 000000000..c3d24f0c5 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_448.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +448,896,1,cx_heavy,33611,33508,103,0.0030644729404064146,0.31089019775390625,80.0670440196991 +448,896,0,cx_heavy,33619,33514,105,0.0031232338856004046,0.2996814250946045,87.25664615631104 +448,896,2,cx_heavy,33602,33447,155,0.004612820665436581,0.3122518062591553,80.48066139221191 +448,896,3,cx_heavy,33597,33488,109,0.0032443372920201207,0.31313586235046387,92.94416642189026 +448,896,5,cx_heavy,33850,33753,97,0.0028655834564254063,0.3124818801879883,87.22328901290894 +448,896,4,cx_heavy,33879,33783,96,0.0028336137430266537,0.3110642433166504,91.68124532699585 +448,896,6,cx_heavy,33680,33594,86,0.0025534441805225654,0.3101320266723633,88.57039737701416 +448,896,7,cx_heavy,33528,33444,84,0.0025053686471009306,0.3141016960144043,93.0227723121643 +448,896,8,cx_heavy,33332,33251,81,0.0024300972038881555,0.31294941902160645,98.85026216506958 +448,896,10,cx_heavy,33655,33555,100,0.0029713266973703757,0.311767578125,88.76694202423096 +448,896,9,cx_heavy,33678,33597,81,0.002405130946018172,0.3261864185333252,91.06172966957092 +448,896,11,cx_heavy,34018,33926,92,0.00270445058498442,0.3117804527282715,98.08296537399292 +448,896,13,cx_heavy,33638,33540,98,0.0029133717819133124,0.310671329498291,86.16788506507874 +448,896,12,cx_heavy,33630,33551,79,0.0023490930716622066,0.3113980293273926,95.50946068763733 +448,896,14,cx_heavy,33793,33693,100,0.0029591927322226495,0.3106262683868408,91.68095445632935 +448,896,15,cx_heavy,33769,33656,113,0.0033462643252687376,0.33958888053894043,92.01276016235352 +448,896,16,cx_heavy,33814,33701,113,0.0033418110841663216,0.32077836990356445,91.28300142288208 +448,896,17,cx_heavy,33707,33598,109,0.0032337496662414337,0.31355881690979004,93.53433179855347 +448,896,18,cx_heavy,33689,33558,131,0.0038885096025408888,0.3169095516204834,94.13170790672302 +448,896,19,cx_heavy,33724,33620,104,0.0030838571936899536,0.34455275535583496,97.06382441520691 +448,896,20,cx_heavy,33388,33306,82,0.002455972205582844,0.31085848808288574,95.58560276031494 +448,896,21,cx_heavy,33756,33666,90,0.0026661926768574476,0.3080594539642334,93.393878698349 +448,896,24,cx_heavy,33423,33285,138,0.004128893277084642,0.3262062072753906,79.33445858955383 +448,896,22,cx_heavy,33490,33399,91,0.002717229023589131,0.3507828712463379,92.04355978965759 +448,896,23,cx_heavy,33774,33644,130,0.003849114703618168,0.31330204010009766,93.88740611076355 +448,896,25,cx_heavy,33574,33454,120,0.003574194317031036,0.3100461959838867,86.61963248252869 +448,896,26,cx_heavy,33570,33480,90,0.002680965147453083,0.32876062393188477,96.58744359016418 +448,896,28,cx_heavy,34110,34007,103,0.0030196423336265026,0.3481109142303467,83.2246515750885 +448,896,27,cx_heavy,33709,33614,95,0.0028182384526387614,0.3305022716522217,93.18260025978088 +448,896,31,cx_heavy,33531,33436,95,0.0028331991291640573,0.3187575340270996,81.24328994750977 +448,896,29,cx_heavy,33450,33367,83,0.0024813153961136024,0.3524589538574219,93.45761227607727 +448,896,33,cx_heavy,33603,33494,109,0.0032437579977978156,0.3212594985961914,89.24123978614807 +448,896,34,cx_heavy,33599,33519,80,0.002381023244739427,0.30533576011657715,85.98663449287415 +448,896,32,cx_heavy,33455,33372,83,0.002480944552383799,0.32465052604675293,98.13922262191772 +448,896,30,cx_heavy,33524,33441,83,0.0024758382054647417,0.3288235664367676,103.43727350234985 +448,896,35,cx_heavy,33594,33440,154,0.0045841519318926,0.3391704559326172,82.60706043243408 +448,896,36,cx_heavy,34105,33999,106,0.003108048673215071,0.33175158500671387,98.18552374839783 +448,896,37,cx_heavy,33530,33426,104,0.003101699970175962,0.3124232292175293,97.96255135536194 +448,896,38,cx_heavy,33801,33673,128,0.0037868702109405046,0.3128378391265869,93.43299269676208 +448,896,39,cx_heavy,33788,33700,88,0.002604474961524802,0.32021141052246094,85.23735666275024 +448,896,43,cx_heavy,33761,33650,111,0.003287817303989811,0.3095378875732422,80.3199200630188 +448,896,40,cx_heavy,33613,33483,130,0.003867551245053997,0.30977416038513184,87.17063403129578 +448,896,41,cx_heavy,33575,33470,105,0.003127326880119136,0.3165583610534668,92.17931723594666 +448,896,42,cx_heavy,33622,33531,91,0.0027065611801796443,0.31503868103027344,94.00511646270752 +448,896,44,cx_heavy,33627,33536,91,0.0027061587414874953,0.30908656120300293,86.24603271484375 +448,896,46,cx_heavy,33276,33153,123,0.003696357735304724,0.3092629909515381,90.2004885673523 +448,896,45,cx_heavy,33835,33744,91,0.002689522683611645,0.3308134078979492,93.8833839893341 +448,896,47,cx_heavy,33460,33376,84,0.002510460251046025,0.31447625160217285,86.57068037986755 +448,896,49,cx_heavy,33737,33636,101,0.002993745739099505,0.3150510787963867,81.89066433906555 +448,896,48,cx_heavy,33347,33263,84,0.00251896722343839,0.314345121383667,91.05299234390259 +448,896,50,cx_heavy,33543,33452,91,0.002712935634856751,0.31231069564819336,93.2547812461853 +448,896,52,cx_heavy,33668,33585,83,0.0024652489010336225,0.32091522216796875,92.01228976249695 +448,896,51,cx_heavy,33392,33279,113,0.0033840440824149495,0.32196736335754395,96.28140997886658 +448,896,53,cx_heavy,33593,33495,98,0.0029172744321733697,0.3318965435028076,85.9763810634613 +448,896,55,cx_heavy,33670,33589,81,0.0024057024057024057,0.31255602836608887,88.11309123039246 +448,896,54,cx_heavy,33398,33307,91,0.0027247140547338165,0.33945393562316895,96.15877532958984 +448,896,56,cx_heavy,33789,33664,125,0.0036994288081920153,0.3114278316497803,86.0994918346405 +448,896,57,cx_heavy,33582,33477,105,0.0031266750044666785,0.31163573265075684,85.64772772789001 +448,896,58,cx_heavy,33680,33593,87,0.0025831353919239905,0.360471248626709,91.86365795135498 +448,896,59,cx_heavy,33766,33678,88,0.0026061718888823076,0.32174253463745117,92.15677070617676 +448,896,60,cx_heavy,33267,33148,119,0.0035771184657468363,0.3861582279205322,83.70738434791565 +448,896,61,cx_heavy,33866,33728,138,0.004074883363845745,0.2982654571533203,89.42578053474426 +448,896,62,cx_heavy,33634,33555,79,0.002348813700422192,0.3155026435852051,97.72228622436523 +448,896,63,cx_heavy,33610,33497,113,0.0033620946146980064,0.41877055168151855,80.14900040626526 +448,896,64,cx_heavy,33711,33591,120,0.003559668950787577,0.3108692169189453,92.92180681228638 +448,896,66,cx_heavy,33512,33411,101,0.0030138457865839102,0.31118226051330566,91.71427249908447 +448,896,65,cx_heavy,33505,33399,106,0.003163706909416505,0.31360483169555664,98.37874364852905 +448,896,68,cx_heavy,33778,33642,136,0.004026289300728285,0.31755852699279785,81.08557224273682 +448,896,67,cx_heavy,33912,33814,98,0.0028898325076669026,0.3144698143005371,91.24570441246033 +448,896,69,cx_heavy,33486,33400,86,0.0025682374723765156,0.30797886848449707,96.64487266540527 +448,896,70,cx_heavy,33850,33711,139,0.004106351550960118,0.3121054172515869,91.79870438575745 +448,896,71,cx_heavy,34017,33875,142,0.004174383396537026,0.3164229393005371,89.63385033607483 +448,896,72,cx_heavy,33248,33099,149,0.004481472569778633,0.3124415874481201,93.66265153884888 +448,896,73,cx_heavy,33755,33662,93,0.002755147385572508,0.33193087577819824,96.4166533946991 +448,896,75,cx_heavy,33841,33741,100,0.0029549954197570995,0.3448483943939209,82.34935426712036 +448,896,77,cx_heavy,33728,33613,115,0.003409629981024668,0.3240838050842285,80.12537240982056 +448,896,74,cx_heavy,33640,33558,82,0.002437574316290131,0.31241703033447266,91.93869543075562 +448,896,76,cx_heavy,33504,33400,104,0.0031041069723018147,0.3211832046508789,91.41358542442322 +448,896,78,cx_heavy,33612,33515,97,0.002885874092585981,0.3312256336212158,92.45966458320618 +448,896,79,cx_heavy,33489,33363,126,0.0037624294544477293,0.30167722702026367,94.2098662853241 +448,896,80,cx_heavy,33260,33179,81,0.0024353577871316897,0.3181421756744385,91.3232250213623 +448,896,81,cx_heavy,33740,33631,109,0.0032305868405453466,0.43686580657958984,85.72898173332214 +448,896,84,cx_heavy,33770,33661,109,0.0032277169084986676,0.33376574516296387,84.46810412406921 +448,896,85,cx_heavy,33694,33584,110,0.003264676203478364,0.30973172187805176,85.36983633041382 +448,896,82,cx_heavy,33552,33458,94,0.0028016213638531236,0.48219895362854004,92.14504933357239 +448,896,83,cx_heavy,33412,33285,127,0.0038010295702142942,0.3120148181915283,93.09026503562927 +448,896,86,cx_heavy,33456,33369,87,0.0026004304160688664,0.3147006034851074,85.0884599685669 +448,896,88,cx_heavy,33816,33742,74,0.0021883132245091082,0.3103749752044678,85.00261497497559 +448,896,87,cx_heavy,33320,33229,91,0.0027310924369747898,0.3160991668701172,102.73357462882996 +448,896,89,cx_heavy,33907,33808,99,0.002919751083846993,0.3194563388824463,89.79739451408386 +448,896,90,cx_heavy,33637,33533,104,0.0030918333977465293,0.3117210865020752,88.71137714385986 +448,896,91,cx_heavy,33803,33682,121,0.0035795639440286365,0.30939292907714844,83.90220379829407 +448,896,93,cx_heavy,33952,33853,99,0.0029158812441093308,0.31677699089050293,86.08816599845886 +448,896,92,cx_heavy,33636,33533,103,0.003062195266975859,0.4022178649902344,86.74782371520996 +448,896,95,cx_heavy,33793,33688,105,0.0031071523688337823,0.32614612579345703,87.4510326385498 +448,896,94,cx_heavy,33464,33320,144,0.004303131723643318,0.33347368240356445,93.635906457901 +448,896,97,cx_heavy,33952,33810,142,0.0041823751178133835,0.31246113777160645,93.13698196411133 +448,896,96,cx_heavy,33669,33575,94,0.0027918857108913246,0.2942333221435547,101.00485682487488 +448,896,98,cx_heavy,33708,33577,131,0.0038863177880621813,0.30976176261901855,94.4091408252716 +448,896,99,cx_heavy,33244,33118,126,0.0037901576224281075,0.3120872974395752,110.51953625679016 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_512.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_512.csv new file mode 100644 index 000000000..35d227c35 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_512.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +512,1024,0,cx_heavy,43895,43787,108,0.002460416903975396,0.36316823959350586,127.77705907821655 +512,1024,1,cx_heavy,43708,43559,149,0.0034089869131509105,0.3686056137084961,134.91038060188293 +512,1024,2,cx_heavy,43727,43601,126,0.002881514853522995,0.37487316131591797,134.98793816566467 +512,1024,3,cx_heavy,44034,43923,111,0.0025207793977381114,0.36842966079711914,141.5897297859192 +512,1024,4,cx_heavy,43719,43599,120,0.002744802031153503,0.3798556327819824,141.56275415420532 +512,1024,5,cx_heavy,44169,44049,120,0.0027168376010323985,0.3457682132720947,131.18939423561096 +512,1024,6,cx_heavy,44045,43915,130,0.0029515268475422862,0.3591008186340332,133.7021462917328 +512,1024,8,cx_heavy,43566,43448,118,0.002708534178028738,0.34319639205932617,129.06690454483032 +512,1024,7,cx_heavy,44228,44136,92,0.0020801302342407526,0.3499414920806885,142.3434283733368 +512,1024,9,cx_heavy,44103,44002,101,0.0022900936444232817,0.3441736698150635,151.18704056739807 +512,1024,10,cx_heavy,43519,43415,104,0.0023897607941358945,0.3382136821746826,138.70489525794983 +512,1024,11,cx_heavy,44071,43957,114,0.0025867350411835446,0.3603360652923584,133.80816555023193 +512,1024,12,cx_heavy,43810,43668,142,0.0032412691166400364,0.33808016777038574,128.02845335006714 +512,1024,13,cx_heavy,43521,43372,149,0.003423634567220422,0.36048007011413574,142.48012900352478 +512,1024,14,cx_heavy,44095,43985,110,0.0024946139018029254,0.3611178398132324,136.6418821811676 +512,1024,15,cx_heavy,44048,43910,138,0.0031329458772248455,0.3459930419921875,141.80505299568176 +512,1024,16,cx_heavy,43552,43432,120,0.002755326965466569,0.3467276096343994,134.36376762390137 +512,1024,17,cx_heavy,44236,44131,105,0.0023736323356542185,0.35872578620910645,134.80241894721985 +512,1024,18,cx_heavy,44039,43905,134,0.003042757555802811,0.36432480812072754,139.34315633773804 +512,1024,19,cx_heavy,44218,44112,106,0.002397213804333077,0.34578776359558105,142.33864068984985 +512,1024,20,cx_heavy,43423,43301,122,0.002809570964696129,0.352435827255249,134.90810990333557 +512,1024,21,cx_heavy,44077,43990,87,0.0019738185448192934,0.3396108150482178,132.9060342311859 +512,1024,22,cx_heavy,43875,43722,153,0.0034871794871794873,0.35874128341674805,131.8111207485199 +512,1024,23,cx_heavy,43811,43682,129,0.0029444660016890735,0.33670616149902344,133.93825030326843 +512,1024,24,cx_heavy,44036,43907,129,0.002929421382505223,0.3574948310852051,135.66618609428406 +512,1024,25,cx_heavy,43775,43691,84,0.0019189034837235866,0.34777307510375977,134.86692714691162 +512,1024,26,cx_heavy,43900,43802,98,0.002232346241457859,0.3559272289276123,133.27873182296753 +512,1024,27,cx_heavy,43994,43884,110,0.0025003409555848523,0.35079431533813477,136.69808888435364 +512,1024,28,cx_heavy,44234,44096,138,0.0031197721209929013,0.3710939884185791,136.0358920097351 +512,1024,29,cx_heavy,43808,43715,93,0.002122899926953981,0.34623122215270996,142.08446598052979 +512,1024,30,cx_heavy,43395,43287,108,0.0024887659868648463,0.36168932914733887,135.19077324867249 +512,1024,31,cx_heavy,43759,43634,125,0.0028565552229255697,0.3444383144378662,135.82492971420288 +512,1024,32,cx_heavy,43827,43727,100,0.002281698496360691,0.3458678722381592,150.4929826259613 +512,1024,33,cx_heavy,43816,43708,108,0.002464853021727223,0.35813021659851074,134.11264061927795 +512,1024,34,cx_heavy,43856,43720,136,0.003101058008026268,0.3700404167175293,142.77851915359497 +512,1024,36,cx_heavy,44417,44307,110,0.002476529256816084,0.3710494041442871,130.7194709777832 +512,1024,35,cx_heavy,43799,43684,115,0.0026256307221626065,0.34503722190856934,151.2663938999176 +512,1024,37,cx_heavy,43736,43597,139,0.0031781598683007133,0.3501124382019043,130.37854051589966 +512,1024,38,cx_heavy,44059,43950,109,0.0024739553780158425,0.3405940532684326,131.67780900001526 +512,1024,39,cx_heavy,44342,44225,117,0.0026385819313517658,0.34491968154907227,157.41773414611816 +512,1024,40,cx_heavy,44029,43882,147,0.003338708578436939,0.3490111827850342,129.98034262657166 +512,1024,41,cx_heavy,43804,43694,110,0.0025111861930417314,0.37304043769836426,139.90965628623962 +512,1024,42,cx_heavy,43829,43701,128,0.002920440804033859,0.3608365058898926,128.62583136558533 +512,1024,43,cx_heavy,44036,43931,105,0.0023844127532019256,0.3521394729614258,136.15767002105713 +512,1024,44,cx_heavy,43680,43567,113,0.002586996336996337,0.3383772373199463,128.9250705242157 +512,1024,45,cx_heavy,43902,43799,103,0.0023461345724568356,0.3304753303527832,141.98398995399475 +512,1024,46,cx_heavy,43988,43885,103,0.0023415476948258616,0.3514566421508789,140.54017281532288 +512,1024,47,cx_heavy,43637,43526,111,0.002543712904186814,0.352916955947876,142.10120820999146 +512,1024,48,cx_heavy,43628,43499,129,0.002956816723205281,0.3434879779815674,143.34511041641235 +512,1024,49,cx_heavy,44065,43946,119,0.0027005559968228754,0.3344309329986572,136.08029341697693 +512,1024,50,cx_heavy,43814,43692,122,0.002784498105628338,0.3431065082550049,129.55389404296875 +512,1024,51,cx_heavy,43813,43680,133,0.0030356286946796613,0.348407506942749,131.32868671417236 +512,1024,52,cx_heavy,43592,43487,105,0.002408698843824555,0.37763094902038574,141.70181846618652 +512,1024,53,cx_heavy,43997,43888,109,0.0024774416437484373,0.35950517654418945,144.00797843933105 +512,1024,54,cx_heavy,43526,43416,110,0.0025272251068326978,0.34315967559814453,139.6751744747162 +512,1024,55,cx_heavy,43986,43852,134,0.003046423862137953,0.3392293453216553,136.02552604675293 +512,1024,56,cx_heavy,43849,43752,97,0.0022121371068895526,0.3458597660064697,133.87684774398804 +512,1024,57,cx_heavy,44126,44013,113,0.0025608484793545757,0.3631458282470703,142.76476526260376 +512,1024,58,cx_heavy,43972,43860,112,0.0025470754116255797,0.3386576175689697,134.9578468799591 +512,1024,59,cx_heavy,43896,43782,114,0.00259704756697649,0.33867955207824707,137.47001123428345 +512,1024,61,cx_heavy,43953,43830,123,0.0027984437922326123,0.3458878993988037,129.3762662410736 +512,1024,60,cx_heavy,43651,43543,108,0.0024741701221048774,0.36160969734191895,150.25493836402893 +512,1024,62,cx_heavy,43925,43825,100,0.0022766078542970974,0.34013986587524414,141.6908781528473 +512,1024,63,cx_heavy,43998,43834,164,0.0037274421564616575,0.3617417812347412,135.74835324287415 +512,1024,64,cx_heavy,44297,44204,93,0.002099464975054744,0.35708069801330566,153.71458745002747 +512,1024,66,cx_heavy,44117,43982,135,0.0030600448806582495,0.36185717582702637,143.08688187599182 +512,1024,65,cx_heavy,43737,43634,103,0.0023549854814001875,0.39203763008117676,149.88254117965698 +512,1024,67,cx_heavy,44318,44193,125,0.002820524391894941,0.3567805290222168,142.34185099601746 +512,1024,68,cx_heavy,44152,44032,120,0.002717883674578728,0.34766626358032227,138.91675543785095 +512,1024,69,cx_heavy,43808,43705,103,0.0023511687363038714,0.3758406639099121,133.80594110488892 +512,1024,70,cx_heavy,44030,43914,116,0.0026345673404496936,0.3391542434692383,135.25056886672974 +512,1024,71,cx_heavy,44350,44206,144,0.0032468996617812853,0.36308741569519043,134.41971135139465 +512,1024,72,cx_heavy,43600,43481,119,0.0027293577981651377,0.34262967109680176,133.6271195411682 +512,1024,73,cx_heavy,43971,43863,108,0.0024561642901002934,0.34429264068603516,141.92487907409668 +512,1024,74,cx_heavy,43597,43514,83,0.0019038007202330435,0.36693787574768066,152.23570275306702 +512,1024,75,cx_heavy,44567,44470,97,0.0021764983059214217,0.3571484088897705,137.723703622818 +512,1024,76,cx_heavy,44070,43983,87,0.001974132062627638,0.3695979118347168,142.99829077720642 +512,1024,77,cx_heavy,44154,43994,160,0.003623680753725597,0.34256768226623535,130.0090630054474 +512,1024,78,cx_heavy,43746,43640,106,0.0024230786814794496,0.3612682819366455,144.25766825675964 +512,1024,79,cx_heavy,43797,43688,109,0.0024887549375528003,0.34629344940185547,143.99343967437744 +512,1024,80,cx_heavy,43867,43735,132,0.0030090956755647754,0.359236478805542,121.84797239303589 +512,1024,81,cx_heavy,43898,43788,110,0.0025058089206797577,0.407092809677124,134.5930540561676 +512,1024,82,cx_heavy,44011,43902,109,0.002476653563881757,0.3694324493408203,134.80171942710876 +512,1024,83,cx_heavy,43816,43683,133,0.0030354208508307466,0.3622117042541504,142.4076156616211 +512,1024,84,cx_heavy,43900,43785,115,0.002619589977220957,0.36365842819213867,139.99429750442505 +512,1024,85,cx_heavy,44023,43931,92,0.0020898166867319356,0.3502645492553711,140.53595447540283 +512,1024,86,cx_heavy,43716,43602,114,0.002607740872906945,0.3314797878265381,131.93120098114014 +512,1024,87,cx_heavy,44000,43855,145,0.0032954545454545454,0.3560197353363037,134.30657577514648 +512,1024,88,cx_heavy,44095,43971,124,0.0028121102165778434,0.362107515335083,140.98407697677612 +512,1024,89,cx_heavy,44157,44050,107,0.002423171864030618,0.3386504650115967,134.59486937522888 +512,1024,90,cx_heavy,43782,43668,114,0.0026038097848430863,0.34543919563293457,132.79945969581604 +512,1024,91,cx_heavy,43979,43888,91,0.002069169376293231,0.35138678550720215,132.88460993766785 +512,1024,92,cx_heavy,43824,43676,148,0.0033771449434100037,0.339749813079834,116.60207605361938 +512,1024,93,cx_heavy,44121,44017,104,0.0023571541896149225,0.3636767864227295,128.7625994682312 +512,1024,94,cx_heavy,43618,43510,108,0.0024760420010087577,0.3498833179473877,142.0837585926056 +512,1024,95,cx_heavy,43915,43798,117,0.0026642377319822386,0.35860586166381836,141.2248649597168 +512,1024,97,cx_heavy,44028,43909,119,0.0027028254746979197,0.35541629791259766,128.8426012992859 +512,1024,96,cx_heavy,43927,43814,113,0.002572449746169782,0.34702301025390625,140.74609971046448 +512,1024,98,cx_heavy,43763,43652,111,0.0025363891872129426,0.3515646457672119,154.7303981781006 +512,1024,99,cx_heavy,43725,43603,122,0.0027901658090337335,0.36806154251098633,155.5748417377472 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_576.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_576.csv new file mode 100644 index 000000000..38f0d0960 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_576.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +576,1152,2,cx_heavy,55275,55092,183,0.003310719131614654,0.5211942195892334,170.63817048072815 +576,1152,1,cx_heavy,55158,55037,121,0.0021936981036295732,0.527536153793335,179.8587565422058 +576,1152,0,cx_heavy,55645,55514,131,0.0023542097223470215,0.5216262340545654,196.2041516304016 +576,1152,3,cx_heavy,55350,55197,153,0.0027642276422764228,0.5170812606811523,185.75067019462585 +576,1152,4,cx_heavy,55323,55192,131,0.002367912079966741,0.5556738376617432,193.0308108329773 +576,1152,6,cx_heavy,55677,55543,134,0.0024067388688327317,0.4664011001586914,182.99079823493958 +576,1152,5,cx_heavy,55856,55734,122,0.0021841879117731307,0.5236403942108154,192.67205452919006 +576,1152,7,cx_heavy,55386,55271,115,0.0020763369804643775,0.5182244777679443,203.54729461669922 +576,1152,8,cx_heavy,55188,55068,120,0.0021743857360295715,0.5378689765930176,181.52844309806824 +576,1152,9,cx_heavy,55816,55624,192,0.003439873871291386,0.5283982753753662,164.2787311077118 +576,1152,10,cx_heavy,55679,55537,142,0.002550333159719104,0.5273056030273438,170.3003168106079 +576,1152,11,cx_heavy,55627,55486,141,0.0025347403239434087,0.56034255027771,181.20649313926697 +576,1152,12,cx_heavy,55381,55260,121,0.002184864845344071,0.5471611022949219,178.5196499824524 +576,1152,14,cx_heavy,55343,55213,130,0.0023489872251233218,0.5238614082336426,179.00254440307617 +576,1152,15,cx_heavy,55805,55633,172,0.003082161096675925,0.44239258766174316,174.89106726646423 +576,1152,13,cx_heavy,55330,55218,112,0.0020242183264052053,0.5069503784179688,191.91776585578918 +576,1152,16,cx_heavy,55284,55131,153,0.0027675276752767526,0.4926142692565918,167.7357053756714 +576,1152,17,cx_heavy,55636,55498,138,0.002480408368682148,0.521873950958252,181.90615391731262 +576,1152,18,cx_heavy,55463,55274,189,0.0034076771901988714,0.5081276893615723,190.25668382644653 +576,1152,20,cx_heavy,55241,55077,164,0.0029688093988160967,0.5323543548583984,173.68390011787415 +576,1152,21,cx_heavy,55748,55619,129,0.0023139843581832533,0.4733552932739258,177.96017837524414 +576,1152,19,cx_heavy,55793,55681,112,0.0020074202856989226,0.5350654125213623,200.86482882499695 +576,1152,23,cx_heavy,55818,55652,166,0.0029739510552151635,0.5228664875030518,165.85714721679688 +576,1152,24,cx_heavy,55500,55382,118,0.002126126126126126,0.5172343254089355,194.07863116264343 +576,1152,22,cx_heavy,55417,55303,114,0.0020571304834256635,0.5521965026855469,202.05729794502258 +576,1152,25,cx_heavy,55552,55424,128,0.002304147465437788,0.513831377029419,185.75199103355408 +576,1152,26,cx_heavy,55609,55464,145,0.00260749159308745,0.29541015625,183.1867036819458 +576,1152,27,cx_heavy,55634,55484,150,0.002696192975518568,0.5491080284118652,165.90008568763733 +576,1152,28,cx_heavy,55651,55519,132,0.0023719250327936606,0.527778148651123,183.13651847839355 +576,1152,31,cx_heavy,55508,55373,135,0.0024320818620739352,0.5104167461395264,183.59213638305664 +576,1152,30,cx_heavy,55171,55052,119,0.0021569302713382033,0.5203444957733154,192.17718029022217 +576,1152,29,cx_heavy,55572,55443,129,0.0023213128913841504,0.5119788646697998,201.0161635875702 +576,1152,33,cx_heavy,55676,55519,157,0.0028198864860981394,0.528949499130249,183.9686496257782 +576,1152,32,cx_heavy,55545,55397,148,0.002664506256188676,0.530339241027832,196.3621861934662 +576,1152,34,cx_heavy,55597,55487,110,0.001978524021080274,0.5290563106536865,184.10026168823242 +576,1152,35,cx_heavy,55197,55049,148,0.0026813051433954745,0.5851552486419678,178.10849261283875 +576,1152,37,cx_heavy,55647,55449,198,0.0035581432961345623,0.5206422805786133,176.26753950119019 +576,1152,38,cx_heavy,55217,55029,188,0.0034047485375880617,0.5205140113830566,170.05192494392395 +576,1152,36,cx_heavy,55915,55782,133,0.002378610390771707,0.5305352210998535,193.56295442581177 +576,1152,40,cx_heavy,55444,55305,139,0.0025070341245220402,0.5206468105316162,194.3091926574707 +576,1152,39,cx_heavy,55915,55788,127,0.002271304658857194,0.5528755187988281,206.62570452690125 +576,1152,41,cx_heavy,55604,55491,113,0.0020322278972735777,0.5351183414459229,178.44318795204163 +576,1152,42,cx_heavy,55288,55158,130,0.002351323976269715,0.5261797904968262,194.63934755325317 +576,1152,43,cx_heavy,55787,55644,143,0.0025633212038646998,0.5150775909423828,177.24100828170776 +576,1152,44,cx_heavy,55384,55253,131,0.0023653040589339883,0.5458371639251709,178.00749135017395 +576,1152,46,cx_heavy,55197,55069,128,0.002318966610504194,0.6254847049713135,172.19368410110474 +576,1152,47,cx_heavy,55392,55266,126,0.002274696707105719,0.5195341110229492,187.33385014533997 +576,1152,45,cx_heavy,55655,55503,152,0.002731111310753751,0.5896549224853516,189.17816472053528 +576,1152,48,cx_heavy,55342,55237,105,0.0018972931950417406,0.5411183834075928,185.98653531074524 +576,1152,49,cx_heavy,55837,55700,137,0.002453570213299425,0.5227146148681641,183.8205111026764 +576,1152,50,cx_heavy,55571,55450,121,0.0021773946842777708,0.5280492305755615,185.4824378490448 +576,1152,52,cx_heavy,55460,55322,138,0.0024882798413270826,0.5053863525390625,175.17198491096497 +576,1152,51,cx_heavy,55320,55183,137,0.0024765003615328995,0.5177762508392334,182.31832027435303 +576,1152,53,cx_heavy,55359,55215,144,0.002601203056413591,0.5198099613189697,187.03477597236633 +576,1152,54,cx_heavy,55545,55422,123,0.0022144207399405888,0.5575926303863525,172.06379318237305 +576,1152,56,cx_heavy,55486,55360,126,0.0022708430955556357,0.5436108112335205,184.9352650642395 +576,1152,55,cx_heavy,55688,55580,108,0.001939376526361155,0.5233142375946045,197.5782985687256 +576,1152,57,cx_heavy,55851,55731,120,0.002148573884084439,0.5267395973205566,190.49185633659363 +576,1152,59,cx_heavy,55751,55574,177,0.003174830944736417,0.5250723361968994,181.0761821269989 +576,1152,58,cx_heavy,55651,55531,120,0.002156295484357873,0.5472609996795654,194.6266736984253 +576,1152,61,cx_heavy,55911,55744,167,0.0029868898785569923,0.5255992412567139,174.86983013153076 +576,1152,60,cx_heavy,55207,55086,121,0.0021917510460629994,0.45970606803894043,200.9286494255066 +576,1152,62,cx_heavy,55833,55720,113,0.002023892679956298,0.5261733531951904,187.91286873817444 +576,1152,63,cx_heavy,55540,55412,128,0.0023046453006841917,0.517730712890625,191.94172263145447 +576,1152,64,cx_heavy,55638,55514,124,0.0022286926201516948,0.5361051559448242,185.6753008365631 +576,1152,66,cx_heavy,55434,55283,151,0.00272396002453368,0.5202035903930664,178.36173343658447 +576,1152,65,cx_heavy,55567,55441,126,0.0022675328882250257,0.5343892574310303,201.315420627594 +576,1152,68,cx_heavy,56106,55972,134,0.0023883363633123017,0.523831844329834,185.3699345588684 +576,1152,67,cx_heavy,55628,55505,123,0.002211116703818221,0.5279772281646729,204.15340733528137 +576,1152,69,cx_heavy,55341,55217,124,0.002240653403444101,0.5401086807250977,194.63925504684448 +576,1152,70,cx_heavy,55862,55730,132,0.0023629658802047904,0.5269160270690918,180.16759753227234 +576,1152,71,cx_heavy,55969,55784,185,0.0033054012042380604,0.530775785446167,182.69290614128113 +576,1152,73,cx_heavy,55840,55692,148,0.002650429799426934,0.5230591297149658,173.6132528781891 +576,1152,72,cx_heavy,55162,55014,148,0.002683006417461296,0.5492265224456787,180.88468885421753 +576,1152,76,cx_heavy,55602,55448,154,0.002769684543721449,0.5237090587615967,165.2538115978241 +576,1152,74,cx_heavy,55568,55450,118,0.0021235243305499567,0.5210494995117188,187.6005096435547 +576,1152,75,cx_heavy,56096,56001,95,0.0016935253850541927,0.5272541046142578,195.06738138198853 +576,1152,77,cx_heavy,55599,55455,144,0.0025899746398316517,0.29048824310302734,183.36748147010803 +576,1152,80,cx_heavy,55425,55271,154,0.002778529544429409,0.5260727405548096,168.84080481529236 +576,1152,78,cx_heavy,55607,55470,137,0.002463718596579567,0.5211489200592041,197.01269149780273 +576,1152,79,cx_heavy,55415,55277,138,0.0024903004601642153,0.5236825942993164,192.3122639656067 +576,1152,81,cx_heavy,55456,55298,158,0.0028491055972302364,0.6212303638458252,175.6680462360382 +576,1152,82,cx_heavy,55646,55500,146,0.0026237285698882218,0.5421292781829834,192.04901766777039 +576,1152,84,cx_heavy,55494,55402,92,0.0016578368832666595,0.5620725154876709,168.95674800872803 +576,1152,85,cx_heavy,55574,55454,120,0.002159283118004822,0.4915046691894531,172.58994889259338 +576,1152,83,cx_heavy,55144,55002,142,0.0025750761642245757,0.45526862144470215,190.3190381526947 +576,1152,86,cx_heavy,55498,55317,181,0.003261378788424808,0.2792026996612549,171.83775782585144 +576,1152,88,cx_heavy,55646,55538,108,0.0019408403119721095,0.5212879180908203,192.93874406814575 +576,1152,87,cx_heavy,55307,55204,103,0.0018623320736977237,0.5120973587036133,204.42839431762695 +576,1152,89,cx_heavy,55628,55509,119,0.0021392104695477096,0.48772668838500977,194.36351108551025 +576,1152,90,cx_heavy,55225,55109,116,0.002100497962879131,0.5141961574554443,192.83611226081848 +576,1152,91,cx_heavy,55858,55709,149,0.0026674782484156253,0.5261039733886719,179.5154938697815 +576,1152,95,cx_heavy,55825,55699,126,0.0022570532915360503,0.5385606288909912,167.01222586631775 +576,1152,93,cx_heavy,55976,55856,120,0.0021437759039588393,0.5158398151397705,180.3442735671997 +576,1152,92,cx_heavy,55515,55401,114,0.002053499054309646,0.5288407802581787,192.36066508293152 +576,1152,94,cx_heavy,55061,54924,137,0.0024881495069105173,0.5173559188842773,192.9959692955017 +576,1152,96,cx_heavy,55747,55589,158,0.002834233232281558,0.5199925899505615,172.18753480911255 +576,1152,98,cx_heavy,55526,55394,132,0.0023772647048229656,0.5279905796051025,175.3249912261963 +576,1152,97,cx_heavy,55549,55426,123,0.002214261282831374,0.5445079803466797,178.10784196853638 +576,1152,99,cx_heavy,55542,55405,137,0.0024666018508516076,0.5199558734893799,186.27729272842407 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_64.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_64.csv new file mode 100644 index 000000000..fcde04120 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_64.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +64,128,0,cx_heavy,718,697,21,0.02924791086350975,0.005136251449584961,0.6305351257324219 +64,128,2,cx_heavy,690,670,20,0.028985507246376812,0.005389690399169922,0.49971771240234375 +64,128,1,cx_heavy,720,708,12,0.016666666666666666,0.0050542354583740234,0.5329878330230713 +64,128,4,cx_heavy,768,750,18,0.0234375,0.008667707443237305,0.5267465114593506 +64,128,3,cx_heavy,740,722,18,0.024324324324324326,0.005353689193725586,0.6352782249450684 +64,128,6,cx_heavy,700,682,18,0.025714285714285714,0.004999637603759766,0.37989068031311035 +64,128,5,cx_heavy,758,739,19,0.025065963060686015,0.005095243453979492,0.4684324264526367 +64,128,7,cx_heavy,711,700,11,0.015471167369901548,0.005104780197143555,0.558819055557251 +64,128,9,cx_heavy,710,692,18,0.02535211267605634,0.008261919021606445,0.41462087631225586 +64,128,8,cx_heavy,640,630,10,0.015625,0.004990816116333008,0.640709400177002 +64,128,10,cx_heavy,669,649,20,0.029895366218236172,0.032447099685668945,0.512031078338623 +64,128,11,cx_heavy,725,705,20,0.027586206896551724,0.008899450302124023,0.5023996829986572 +64,128,12,cx_heavy,716,701,15,0.02094972067039106,0.005383968353271484,0.5399558544158936 +64,128,14,cx_heavy,730,695,35,0.04794520547945205,0.005511760711669922,0.448192834854126 +64,128,13,cx_heavy,703,686,17,0.02418207681365576,0.0077266693115234375,0.6494040489196777 +64,128,15,cx_heavy,710,686,24,0.03380281690140845,0.02435135841369629,0.40962767601013184 +64,128,16,cx_heavy,709,697,12,0.01692524682651622,0.008733749389648438,0.5013446807861328 +64,128,17,cx_heavy,734,718,16,0.021798365122615803,0.005234479904174805,0.6729288101196289 +64,128,19,cx_heavy,706,670,36,0.05099150141643059,0.008305549621582031,0.35490989685058594 +64,128,18,cx_heavy,744,732,12,0.016129032258064516,0.009668350219726562,0.4379711151123047 +64,128,20,cx_heavy,713,692,21,0.029453015427769985,0.005209684371948242,0.5217792987823486 +64,128,21,cx_heavy,658,650,8,0.0121580547112462,0.009235858917236328,0.6866912841796875 +64,128,23,cx_heavy,723,714,9,0.012448132780082987,0.0049860477447509766,0.44420361518859863 +64,128,22,cx_heavy,746,727,19,0.02546916890080429,0.005069255828857422,0.5305783748626709 +64,128,24,cx_heavy,717,705,12,0.016736401673640166,0.009904146194458008,0.6317203044891357 +64,128,25,cx_heavy,688,679,9,0.01308139534883721,0.00917196273803711,0.6234304904937744 +64,128,27,cx_heavy,752,733,19,0.02526595744680851,0.008670568466186523,0.4651331901550293 +64,128,26,cx_heavy,689,676,13,0.018867924528301886,0.007203102111816406,0.5530118942260742 +64,128,28,cx_heavy,711,694,17,0.02390998593530239,0.00966954231262207,0.5015664100646973 +64,128,29,cx_heavy,701,687,14,0.019971469329529243,0.0053539276123046875,0.4943268299102783 +64,128,30,cx_heavy,669,654,15,0.02242152466367713,0.005012989044189453,0.613229513168335 +64,128,31,cx_heavy,716,691,25,0.034916201117318434,0.005038261413574219,0.35785460472106934 +64,128,32,cx_heavy,734,725,9,0.01226158038147139,0.023447275161743164,0.4891185760498047 +64,128,34,cx_heavy,730,716,14,0.019178082191780823,0.005381107330322266,0.3453099727630615 +64,128,33,cx_heavy,740,721,19,0.025675675675675677,0.004977703094482422,0.5687596797943115 +64,128,35,cx_heavy,703,677,26,0.03698435277382646,0.02460455894470215,0.4247324466705322 +64,128,37,cx_heavy,671,654,17,0.02533532041728763,0.008369922637939453,0.44605278968811035 +64,128,36,cx_heavy,702,688,14,0.019943019943019943,0.007853031158447266,0.5326483249664307 +64,128,38,cx_heavy,732,720,12,0.01639344262295082,0.007593631744384766,0.4759645462036133 +64,128,39,cx_heavy,761,744,17,0.022339027595269383,0.005827426910400391,0.48372912406921387 +64,128,40,cx_heavy,757,733,24,0.031704095112285335,0.00861501693725586,0.5130550861358643 +64,128,41,cx_heavy,718,697,21,0.02924791086350975,0.007745265960693359,0.4773733615875244 +64,128,43,cx_heavy,699,688,11,0.015736766809728183,0.007989645004272461,0.4833519458770752 +64,128,42,cx_heavy,741,724,17,0.022941970310391364,0.008551359176635742,0.5544760227203369 +64,128,44,cx_heavy,764,743,21,0.0274869109947644,0.0057675838470458984,0.5454807281494141 +64,128,46,cx_heavy,778,759,19,0.02442159383033419,0.00868535041809082,0.3566164970397949 +64,128,48,cx_heavy,686,665,21,0.030612244897959183,0.008667469024658203,0.35994410514831543 +64,128,45,cx_heavy,759,742,17,0.022397891963109356,0.0053730010986328125,0.6838407516479492 +64,128,47,cx_heavy,674,664,10,0.01483679525222552,0.005648374557495117,0.5429964065551758 +64,128,49,cx_heavy,702,687,15,0.021367521367521368,0.005076169967651367,0.4554860591888428 +64,128,51,cx_heavy,744,725,19,0.025537634408602152,0.009779930114746094,0.43039894104003906 +64,128,50,cx_heavy,744,721,23,0.030913978494623656,0.009437322616577148,0.5103738307952881 +64,128,52,cx_heavy,675,665,10,0.014814814814814815,0.005174398422241211,0.5746316909790039 +64,128,53,cx_heavy,702,688,14,0.019943019943019943,0.005453586578369141,0.5340194702148438 +64,128,54,cx_heavy,722,708,14,0.019390581717451522,0.005365133285522461,0.6634969711303711 +64,128,56,cx_heavy,691,672,19,0.027496382054992764,0.005197286605834961,0.5828099250793457 +64,128,55,cx_heavy,674,659,15,0.02225519287833828,0.00565791130065918,0.6172096729278564 +64,128,57,cx_heavy,659,641,18,0.027314112291350532,0.009521007537841797,0.6534624099731445 +64,128,58,cx_heavy,735,715,20,0.027210884353741496,0.005269527435302734,0.6480104923248291 +64,128,59,cx_heavy,684,665,19,0.027777777777777776,0.005201578140258789,0.5923569202423096 +64,128,61,cx_heavy,698,678,20,0.02865329512893983,0.005429983139038086,0.3998985290527344 +64,128,60,cx_heavy,738,727,11,0.014905149051490514,0.005751132965087891,0.5920853614807129 +64,128,62,cx_heavy,699,678,21,0.030042918454935622,0.005211830139160156,0.6742136478424072 +64,128,63,cx_heavy,729,713,16,0.02194787379972565,0.012167930603027344,0.6495966911315918 +64,128,64,cx_heavy,747,732,15,0.020080321285140562,0.008939981460571289,0.6645753383636475 +64,128,65,cx_heavy,676,667,9,0.013313609467455622,0.0054035186767578125,0.720020055770874 +64,128,66,cx_heavy,681,671,10,0.014684287812041116,0.005145072937011719,0.6247260570526123 +64,128,67,cx_heavy,736,715,21,0.028532608695652172,0.005577564239501953,0.6105453968048096 +64,128,68,cx_heavy,696,680,16,0.022988505747126436,0.0052280426025390625,0.5275590419769287 +64,128,69,cx_heavy,725,710,15,0.020689655172413793,0.005271434783935547,0.7176206111907959 +64,128,71,cx_heavy,737,717,20,0.027137042062415198,0.006120204925537109,0.44098448753356934 +64,128,70,cx_heavy,692,680,12,0.017341040462427744,0.00868082046508789,0.7240157127380371 +64,128,72,cx_heavy,721,698,23,0.0319001386962552,0.008606910705566406,0.43709254264831543 +64,128,73,cx_heavy,682,666,16,0.02346041055718475,0.008183956146240234,0.5214142799377441 +64,128,74,cx_heavy,698,690,8,0.011461318051575931,0.009167671203613281,0.6540582180023193 +64,128,75,cx_heavy,702,692,10,0.014245014245014245,0.0052073001861572266,0.6142349243164062 +64,128,77,cx_heavy,724,699,25,0.034530386740331494,0.00531458854675293,0.26306915283203125 +64,128,76,cx_heavy,722,710,12,0.01662049861495845,0.005479097366333008,0.6034286022186279 +64,128,78,cx_heavy,731,714,17,0.023255813953488372,0.0056133270263671875,0.35457873344421387 +64,128,79,cx_heavy,746,732,14,0.01876675603217158,0.007086515426635742,0.5371062755584717 +64,128,80,cx_heavy,716,701,15,0.02094972067039106,0.008924722671508789,0.47816038131713867 +64,128,82,cx_heavy,715,690,25,0.03496503496503497,0.005929231643676758,0.38271546363830566 +64,128,81,cx_heavy,681,670,11,0.016152716593245228,0.0051457881927490234,0.5635225772857666 +64,128,83,cx_heavy,660,644,16,0.024242424242424242,0.005380153656005859,0.5537261962890625 +64,128,84,cx_heavy,708,696,12,0.01694915254237288,0.008690834045410156,0.6313192844390869 +64,128,85,cx_heavy,709,686,23,0.03244005641748942,0.0066623687744140625,0.4174020290374756 +64,128,87,cx_heavy,669,653,16,0.02391629297458894,0.005465269088745117,0.5619199275970459 +64,128,86,cx_heavy,707,699,8,0.011315417256011316,0.0051229000091552734,0.5729477405548096 +64,128,88,cx_heavy,713,701,12,0.016830294530154277,0.0056095123291015625,0.47530150413513184 +64,128,90,cx_heavy,716,698,18,0.025139664804469275,0.005074262619018555,0.47336792945861816 +64,128,89,cx_heavy,709,695,14,0.019746121297602257,0.0051763057708740234,0.6855666637420654 +64,128,92,cx_heavy,740,720,20,0.02702702702702703,0.005923271179199219,0.34714770317077637 +64,128,93,cx_heavy,705,690,15,0.02127659574468085,0.005271434783935547,0.4691352844238281 +64,128,91,cx_heavy,693,680,13,0.01875901875901876,0.025737762451171875,0.6640872955322266 +64,128,94,cx_heavy,709,693,16,0.022566995768688293,0.024518251419067383,0.491091251373291 +64,128,95,cx_heavy,693,669,24,0.03463203463203463,0.009573221206665039,0.42356443405151367 +64,128,96,cx_heavy,719,704,15,0.02086230876216968,0.005260467529296875,0.591510534286499 +64,128,97,cx_heavy,687,677,10,0.01455604075691412,0.005217790603637695,0.5983920097351074 +64,128,98,cx_heavy,690,676,14,0.020289855072463767,0.0050814151763916016,0.3910696506500244 +64,128,99,cx_heavy,738,723,15,0.02032520325203252,0.009305238723754883,0.5588474273681641 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_640.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_640.csv new file mode 100644 index 000000000..b19b20bd5 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_640.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +640,1280,0,cx_heavy,68465,68323,142,0.0020740524355510113,0.6816163063049316,221.9538974761963 +640,1280,4,cx_heavy,68213,68056,157,0.0023016140618357206,0.6008682250976562,221.39009523391724 +640,1280,1,cx_heavy,68171,67995,176,0.002581742969884555,0.3562045097351074,226.29008555412292 +640,1280,2,cx_heavy,68267,68137,130,0.0019042875767208169,0.4497668743133545,229.1154329776764 +640,1280,3,cx_heavy,68398,68260,138,0.0020176028538846165,0.35850954055786133,256.7570321559906 +640,1280,6,cx_heavy,68396,68240,156,0.0022808351365576933,0.6656179428100586,232.68827748298645 +640,1280,5,cx_heavy,68768,68614,154,0.002239413680781759,0.6630408763885498,239.26836919784546 +640,1280,7,cx_heavy,68612,68460,152,0.002215355914417303,0.6851832866668701,253.68505334854126 +640,1280,9,cx_heavy,68714,68554,160,0.0023284920103617893,0.69049072265625,221.66589260101318 +640,1280,8,cx_heavy,68040,67907,133,0.001954732510288066,0.6962635517120361,256.2770941257477 +640,1280,10,cx_heavy,68401,68257,144,0.0021052323796435725,0.35285449028015137,174.23840236663818 +640,1280,11,cx_heavy,68649,68508,141,0.002053926495651794,0.6530406475067139,183.50185346603394 +640,1280,12,cx_heavy,68222,68106,116,0.0017003312714373663,0.3546407222747803,170.547621011734 +640,1280,14,cx_heavy,68761,68589,172,0.0025014179549453907,0.34580469131469727,170.31064295768738 +640,1280,13,cx_heavy,68097,67980,117,0.001718137362879422,0.34946346282958984,188.17537546157837 +640,1280,16,cx_heavy,67957,67797,160,0.0023544300072104417,0.32700228691101074,206.09555220603943 +640,1280,15,cx_heavy,68755,68592,163,0.0023707366736964585,0.3269929885864258,221.96461486816406 +640,1280,18,cx_heavy,69024,68866,158,0.0022890588780713956,0.33396148681640625,216.45036149024963 +640,1280,17,cx_heavy,68781,68649,132,0.0019191346447420073,0.32845306396484375,254.16058468818665 +640,1280,19,cx_heavy,68885,68728,157,0.002279160920374537,0.3273639678955078,239.0416898727417 +640,1280,22,cx_heavy,68562,68400,162,0.0023628248884221582,0.6831233501434326,173.79475688934326 +640,1280,20,cx_heavy,68539,68404,135,0.0019696814952071084,0.6514084339141846,182.87656140327454 +640,1280,21,cx_heavy,68712,68571,141,0.0020520433112120153,0.6211779117584229,190.52867794036865 +640,1280,23,cx_heavy,68577,68416,161,0.0023477259139361596,0.7578909397125244,178.62141275405884 +640,1280,24,cx_heavy,68417,68283,134,0.001958577546516217,0.689955472946167,187.73515915870667 +640,1280,25,cx_heavy,68786,68624,162,0.0023551304044427644,0.33454275131225586,235.9310085773468 +640,1280,26,cx_heavy,68476,68325,151,0.0022051521701033938,0.32295823097229004,245.65612840652466 +640,1280,27,cx_heavy,68512,68363,149,0.0021748014946286784,0.33185791969299316,271.7491009235382 +640,1280,28,cx_heavy,68784,68647,137,0.0019917422656431727,0.3294539451599121,285.99602484703064 +640,1280,29,cx_heavy,68526,68358,168,0.0024516242010331844,0.6696145534515381,270.093674659729 +640,1280,31,cx_heavy,68055,67914,141,0.00207185364778488,0.6861729621887207,191.65763020515442 +640,1280,30,cx_heavy,68289,68140,149,0.0021819033812180587,0.6975891590118408,195.84619903564453 +640,1280,32,cx_heavy,68177,68050,127,0.001862798304413512,0.6102797985076904,195.13842821121216 +640,1280,33,cx_heavy,68248,68127,121,0.0017729457273473216,0.6728463172912598,185.32671809196472 +640,1280,34,cx_heavy,68547,68411,136,0.0019840401476359285,0.6749489307403564,199.71882152557373 +640,1280,35,cx_heavy,68404,68243,161,0.002353663528448629,0.3305320739746094,255.25702166557312 +640,1280,36,cx_heavy,69225,69058,167,0.00241242325749368,0.3370511531829834,266.41091656684875 +640,1280,37,cx_heavy,68265,68138,127,0.0018603969823482018,0.32737064361572266,264.2169394493103 +640,1280,39,cx_heavy,68871,68695,176,0.002555502315923974,0.6732351779937744,257.71484327316284 +640,1280,38,cx_heavy,68853,68690,163,0.0023673623516767607,0.5461924076080322,283.4693202972412 +640,1280,40,cx_heavy,68605,68449,156,0.0022738867429487647,0.6660244464874268,246.0351758003235 +640,1280,41,cx_heavy,68605,68438,167,0.002434224910720793,0.6687405109405518,270.2352862358093 +640,1280,42,cx_heavy,68225,68094,131,0.0019201172590692561,0.6692938804626465,264.48479080200195 +640,1280,43,cx_heavy,68687,68560,127,0.001848967053445339,0.681025505065918,259.68177461624146 +640,1280,44,cx_heavy,68380,68230,150,0.002193623866627669,0.682450532913208,257.1842577457428 +640,1280,45,cx_heavy,68732,68605,127,0.0018477565035209219,0.6784980297088623,279.42258954048157 +640,1280,46,cx_heavy,68475,68335,140,0.002044541803577948,0.6783673763275146,265.42014384269714 +640,1280,47,cx_heavy,68417,68265,152,0.0022216700527646635,0.6636419296264648,252.544855594635 +640,1280,49,cx_heavy,68935,68772,163,0.002364546311742946,0.6034023761749268,254.45391750335693 +640,1280,48,cx_heavy,68412,68260,152,0.0022218324270595804,0.6602435111999512,260.2868130207062 +640,1280,52,cx_heavy,68618,68495,123,0.0017925325716284357,0.6591081619262695,269.1292839050293 +640,1280,50,cx_heavy,68826,68635,191,0.0027751140557347514,0.6792788505554199,272.15970039367676 +640,1280,51,cx_heavy,68407,68245,162,0.0023681786951627757,0.6789522171020508,278.53204894065857 +640,1280,54,cx_heavy,68322,68177,145,0.002122303211264307,0.6766548156738281,267.4336905479431 +640,1280,53,cx_heavy,68468,68324,144,0.0021031722848630016,0.6894981861114502,272.73216128349304 +640,1280,56,cx_heavy,68602,68480,122,0.0017783738083437801,0.6639204025268555,256.5002348423004 +640,1280,57,cx_heavy,68590,68420,170,0.0024784954074938037,0.6769857406616211,255.01810359954834 +640,1280,55,cx_heavy,68615,68464,151,0.002200684981418057,0.6546494960784912,259.09759521484375 +640,1280,59,cx_heavy,68934,68828,106,0.0015377027301476775,0.6780829429626465,281.1608545780182 +640,1280,58,cx_heavy,68802,68658,144,0.0020929624138833172,0.6803328990936279,284.0502438545227 +640,1280,61,cx_heavy,68511,68343,168,0.002452160966852038,0.6591055393218994,245.12373805046082 +640,1280,62,cx_heavy,68904,68755,149,0.0021624288865668174,0.6715922355651855,270.2452311515808 +640,1280,60,cx_heavy,68095,67953,142,0.002085321976650268,0.677020788192749,278.146363735199 +640,1280,63,cx_heavy,68288,68127,161,0.0023576616682286786,0.6606764793395996,266.02451610565186 +640,1280,64,cx_heavy,68482,68358,124,0.0018106947811103648,0.6728770732879639,278.8596177101135 +640,1280,65,cx_heavy,68651,68521,130,0.0018936359266434576,0.6786220073699951,280.3467981815338 +640,1280,66,cx_heavy,68502,68387,115,0.001678783101223322,0.6793117523193359,269.14072132110596 +640,1280,67,cx_heavy,68286,68161,125,0.0018305362739068037,0.662834644317627,290.1980674266815 +640,1280,68,cx_heavy,68417,68243,174,0.0025432275604016547,0.6249833106994629,246.64545392990112 +640,1280,69,cx_heavy,68518,68381,137,0.0019994745906185235,0.6743009090423584,278.84002161026 +640,1280,71,cx_heavy,69159,68997,162,0.002342428317355659,0.673346996307373,251.5860505104065 +640,1280,72,cx_heavy,68270,68119,151,0.0022118060641570236,0.6622889041900635,244.90357422828674 +640,1280,70,cx_heavy,68632,68481,151,0.0022001398764424757,0.6855776309967041,272.1214280128479 +640,1280,73,cx_heavy,68813,68645,168,0.0024413991542295787,0.6858692169189453,272.7158718109131 +640,1280,74,cx_heavy,68420,68301,119,0.0017392575270388775,0.6031928062438965,273.6216118335724 +640,1280,77,cx_heavy,68555,68424,131,0.001910874480344249,0.6678423881530762,257.68909907341003 +640,1280,75,cx_heavy,69213,69114,99,0.001430367127562741,0.6803746223449707,282.3294973373413 +640,1280,76,cx_heavy,68666,68509,157,0.0022864299653394694,0.6859655380249023,280.0446181297302 +640,1280,78,cx_heavy,68542,68369,173,0.0025239998832832424,0.6755595207214355,262.4033257961273 +640,1280,79,cx_heavy,68312,68172,140,0.002049420306827497,0.6931166648864746,269.92787051200867 +640,1280,82,cx_heavy,68450,68325,125,0.0018261504747991235,0.6626694202423096,245.69488406181335 +640,1280,80,cx_heavy,68260,68110,150,0.0021974802226779958,0.7092666625976562,268.22647356987 +640,1280,81,cx_heavy,68606,68463,143,0.0020843657989097165,0.6716251373291016,271.04263496398926 +640,1280,83,cx_heavy,68427,68292,135,0.0019729054320662895,0.6903746128082275,281.8387906551361 +640,1280,84,cx_heavy,68192,68050,142,0.002082355701548569,0.6887221336364746,267.79431080818176 +640,1280,85,cx_heavy,68406,68275,131,0.001915036692687776,0.6857469081878662,259.60340309143066 +640,1280,87,cx_heavy,68848,68723,125,0.0018155937717871252,0.6819319725036621,259.9751420021057 +640,1280,86,cx_heavy,68299,68171,128,0.0018741123588925167,0.6656394004821777,265.8981864452362 +640,1280,89,cx_heavy,69221,69068,153,0.0022103118995680502,0.6706376075744629,254.38076543807983 +640,1280,88,cx_heavy,68939,68832,107,0.0015520967812123762,0.6826291084289551,260.71603178977966 +640,1280,91,cx_heavy,68735,68568,167,0.0024296210082199753,0.7335946559906006,243.9000425338745 +640,1280,92,cx_heavy,68743,68610,133,0.001934742446503644,0.6807975769042969,247.54502272605896 +640,1280,90,cx_heavy,68247,68099,148,0.002168593491288994,0.6934370994567871,267.75674510002136 +640,1280,93,cx_heavy,69038,68886,152,0.002201686027984588,0.6694152355194092,265.2797725200653 +640,1280,94,cx_heavy,68455,68309,146,0.0021327879628953326,0.6721062660217285,270.6627321243286 +640,1280,95,cx_heavy,68996,68854,142,0.002058090324076758,0.6710970401763916,204.2422957420349 +640,1280,96,cx_heavy,68713,68593,120,0.0017463944231804753,0.6611049175262451,208.5782129764557 +640,1280,97,cx_heavy,68316,68124,192,0.002810468997013877,0.6720418930053711,195.36864638328552 +640,1280,98,cx_heavy,68327,68179,148,0.0021660544147994202,0.36260342597961426,180.2818248271942 +640,1280,99,cx_heavy,68522,68387,135,0.0019701701643267855,0.659003734588623,201.35700798034668 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_704.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_704.csv new file mode 100644 index 000000000..f1e21d705 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_704.csv @@ -0,0 +1,77 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +704,1408,0,cx_heavy,82772,82639,133,0.0016068235635238969,0.7864494323730469,263.5913915634155 +704,1408,1,cx_heavy,82585,82425,160,0.0019373978325361748,0.7913711071014404,250.3898687362671 +704,1408,2,cx_heavy,82172,82005,167,0.0020323224456019083,0.790996789932251,247.08700561523438 +704,1408,4,cx_heavy,82876,82709,167,0.002015058641826343,0.8037850856781006,222.00723600387573 +704,1408,3,cx_heavy,83193,83066,127,0.001526570745134807,0.8165364265441895,228.09782433509827 +704,1408,5,cx_heavy,82939,82763,176,0.0021220415003797974,0.4132354259490967,205.0473916530609 +704,1408,7,cx_heavy,83310,83158,152,0.0018245108630416517,0.3995242118835449,212.6583812236786 +704,1408,6,cx_heavy,82866,82721,145,0.0017498129510293728,0.4056389331817627,222.15522813796997 +704,1408,8,cx_heavy,82425,82222,203,0.0024628450106157114,0.3879861831665039,215.21536111831665 +704,1408,9,cx_heavy,82882,82720,162,0.001954586037981709,0.3948054313659668,221.1217246055603 +704,1408,10,cx_heavy,83186,83032,154,0.0018512730507537327,0.40236806869506836,199.08397769927979 +704,1408,11,cx_heavy,82919,82744,175,0.0021104933730508087,0.3978579044342041,204.18030643463135 +704,1408,12,cx_heavy,82419,82264,155,0.001880634319756367,0.4013481140136719,203.85981440544128 +704,1408,13,cx_heavy,82576,82434,142,0.001719627979073823,0.3961188793182373,222.34233951568604 +704,1408,14,cx_heavy,83154,82991,163,0.0019602183899752267,0.39325451850891113,228.90449810028076 +704,1408,15,cx_heavy,83008,82839,169,0.0020359483423284504,0.4073822498321533,254.46820878982544 +704,1408,16,cx_heavy,82513,82315,198,0.0023996218777647157,0.38701939582824707,285.0667517185211 +704,1408,17,cx_heavy,83095,82951,144,0.0017329562548889824,0.39199328422546387,318.9164936542511 +704,1408,18,cx_heavy,82850,82692,158,0.0019070609535304767,0.8085646629333496,302.8341381549835 +704,1408,19,cx_heavy,83091,82964,127,0.0015284447172377272,0.8394649028778076,323.55390310287476 +704,1408,20,cx_heavy,82873,82715,158,0.0019065316810058764,0.8154830932617188,306.402587890625 +704,1408,21,cx_heavy,82697,82547,150,0.0018138505628982914,0.8029937744140625,315.64449405670166 +704,1408,22,cx_heavy,82510,82377,133,0.001611925827172464,0.8246278762817383,313.0581030845642 +704,1408,24,cx_heavy,83053,82864,189,0.00227565530444415,0.807898998260498,252.59559226036072 +704,1408,23,cx_heavy,82861,82714,147,0.0017740553456994242,0.8140707015991211,287.9063444137573 +704,1408,25,cx_heavy,83078,82942,136,0.0016370158164616384,0.8324053287506104,252.0430371761322 +704,1408,26,cx_heavy,82991,82838,153,0.0018435733995252497,0.7144477367401123,218.83004212379456 +704,1408,27,cx_heavy,83140,82986,154,0.001852297329805148,0.41205668449401855,226.850891828537 +704,1408,29,cx_heavy,82718,82557,161,0.0019463720109286974,0.4111013412475586,213.0539002418518 +704,1408,28,cx_heavy,83254,83094,160,0.0019218295817618372,0.4527461528778076,232.8765344619751 +704,1408,30,cx_heavy,82729,82585,144,0.0017406229979813608,0.38944435119628906,221.04945158958435 +704,1408,31,cx_heavy,82415,82261,154,0.001868591882545653,0.39412975311279297,275.70770931243896 +704,1408,32,cx_heavy,82716,82530,186,0.0022486580589003336,0.404238224029541,283.8330509662628 +704,1408,33,cx_heavy,82606,82429,177,0.002142701498680483,0.3994567394256592,310.053231716156 +704,1408,34,cx_heavy,82948,82797,151,0.0018204176110334185,0.3923184871673584,318.04763627052307 +704,1408,35,cx_heavy,83140,82968,172,0.0020687996151070483,0.8057520389556885,319.29330563545227 +704,1408,36,cx_heavy,83690,83494,196,0.0023419763412594096,0.8176350593566895,323.0307471752167 +704,1408,37,cx_heavy,83106,82944,162,0.001949317738791423,0.7387220859527588,334.43816471099854 +704,1408,39,cx_heavy,83095,82949,146,0.0017570250917624405,0.8124880790710449,323.96215891838074 +704,1408,38,cx_heavy,82812,82623,189,0.002282277930734676,0.8403463363647461,336.6860270500183 +704,1408,40,cx_heavy,82549,82392,157,0.0019019006892875747,0.7965753078460693,322.7185790538788 +704,1408,41,cx_heavy,83093,82900,193,0.0023226986629439304,0.814579963684082,323.4805407524109 +704,1408,42,cx_heavy,82383,82201,182,0.002209193644319823,0.8036658763885498,323.5943338871002 +704,1408,44,cx_heavy,82960,82809,151,0.0018201542912246866,0.7967627048492432,324.50396728515625 +704,1408,43,cx_heavy,82592,82448,144,0.001743510267338241,0.8295395374298096,338.05132961273193 +704,1408,45,cx_heavy,82748,82585,163,0.0019698361289698847,0.8248326778411865,332.89976358413696 +704,1408,47,cx_heavy,82556,82357,199,0.0024104850041184165,0.8232898712158203,248.03710794448853 +704,1408,46,cx_heavy,83002,82856,146,0.0017589937591865256,0.8247222900390625,275.3863995075226 +704,1408,49,cx_heavy,83225,83041,184,0.0022108741363772904,0.8024001121520996,223.69175720214844 +704,1408,48,cx_heavy,82779,82544,235,0.00283888425808478,0.8048157691955566,234.98638033866882 +704,1408,50,cx_heavy,82701,82524,177,0.002140240142199006,0.42055583000183105,227.81153917312622 +704,1408,51,cx_heavy,82705,82537,168,0.002031316123571731,0.3968069553375244,214.1659185886383 +704,1408,52,cx_heavy,83179,83019,160,0.0019235624376344991,0.40602588653564453,223.42095923423767 +704,1408,53,cx_heavy,82855,82684,171,0.0020638464787882446,0.3968780040740967,224.84852933883667 +704,1408,54,cx_heavy,82750,82604,146,0.0017643504531722055,0.4001295566558838,219.24227333068848 +704,1408,55,cx_heavy,82455,82302,153,0.0018555575768601056,0.3933415412902832,233.245037317276 +704,1408,56,cx_heavy,82759,82610,149,0.0018004084147947655,0.39632081985473633,207.51936650276184 +704,1408,57,cx_heavy,82598,82447,151,0.0018281314317537955,0.3998103141784668,230.1149742603302 +704,1408,58,cx_heavy,83044,82863,181,0.002179567458214922,0.4081759452819824,214.52330422401428 +704,1408,59,cx_heavy,83230,83083,147,0.0017661900756938604,0.41002321243286133,213.4879081249237 +704,1408,60,cx_heavy,82522,82380,142,0.001720753253677807,0.3889462947845459,288.246289730072 +704,1408,61,cx_heavy,82979,82773,206,0.002482555827378011,0.39346861839294434,267.99833703041077 +704,1408,62,cx_heavy,82923,82787,136,0.0016400757329088432,0.39695143699645996,308.4497854709625 +704,1408,63,cx_heavy,82904,82718,186,0.002243558815014957,0.38329601287841797,321.1556944847107 +704,1408,64,cx_heavy,83174,83033,141,0.001695241301368216,0.3917546272277832,326.96352529525757 +704,1408,65,cx_heavy,82651,82519,132,0.0015970768653736796,0.8102877140045166,320.86845541000366 +704,1408,66,cx_heavy,82856,82709,147,0.001774162402240031,0.8074619770050049,335.888064622879 +704,1408,67,cx_heavy,82991,82842,149,0.0017953754021520405,0.806342601776123,298.1375229358673 +704,1408,68,cx_heavy,82866,82682,184,0.0022204522964786523,0.824049711227417,264.29399967193604 +704,1408,69,cx_heavy,83031,82840,191,0.002300345654032831,0.8152124881744385,277.5148150920868 +704,1408,70,cx_heavy,83211,83038,173,0.0020790520484070614,0.6888508796691895,274.8909149169922 +704,1408,71,cx_heavy,83624,83398,226,0.0027025734238974456,0.80533766746521,257.30449199676514 +704,1408,72,cx_heavy,82360,82153,207,0.002513355998057309,0.39588260650634766,277.8281104564667 +704,1408,73,cx_heavy,83068,82913,155,0.0018659411566427505,0.39329028129577637,291.27780175209045 +704,1408,74,cx_heavy,83105,82926,179,0.0021539016906323327,0.38187623023986816,279.13833928108215 +704,1408,76,cx_heavy,82867,82700,167,0.0020152774928499885,0.8156208992004395,250.26658606529236 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_1024.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_1024.csv new file mode 100644 index 000000000..6da7c8938 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_1024.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +1024,2048,0,even,314673,314341,332,0.0010550635103742615,1.1335804462432861,910.1107678413391 +1024,2048,1,even,314564,314219,345,0.0010967561450134155,1.129164218902588,909.8270053863525 +1024,2048,51,even,314069,313708,361,0.0011494289471421885,0.7632944583892822,461.4417109489441 +1024,2048,50,even,314382,314032,350,0.0011132952904428371,0.70979905128479,485.71895456314087 +1024,2048,2,even,314958,314589,369,0.0011715847827329358,1.1497085094451904,928.8804559707642 +1024,2048,52,even,315195,314840,355,0.0011262869017592285,0.7229394912719727,461.6206557750702 +1024,2048,53,even,315259,314880,379,0.0012021861390158568,0.7156739234924316,476.8599281311035 +1024,2048,54,even,314711,314359,352,0.0011184864844253934,0.7249965667724609,481.02641224861145 +1024,2048,55,even,314591,314245,346,0.001099840745603021,0.7112154960632324,491.65756821632385 +1024,2048,3,even,314529,314174,355,0.0011286717599966935,1.128246545791626,933.6293833255768 +1024,2048,56,even,315664,315299,365,0.0011562927669927518,0.7230734825134277,459.42598128318787 +1024,2048,57,even,314498,314141,357,0.0011351423538464474,0.7469525337219238,479.64584589004517 +1024,2048,58,even,315419,315059,360,0.0011413389808476978,0.7417247295379639,506.58346462249756 +1024,2048,59,even,314765,314432,333,0.0010579321080806316,0.7302780151367188,468.59292221069336 +1024,2048,4,even,315019,314696,323,0.0010253349797948695,1.1225833892822266,907.8337082862854 +1024,2048,61,even,313838,313507,331,0.0010546842638558746,0.7320547103881836,430.7002890110016 +1024,2048,60,even,314570,314221,349,0.0011094509965985312,0.7301490306854248,491.2285747528076 +1024,2048,62,even,314901,314514,387,0.0012289576724113292,0.7244441509246826,460.4609615802765 +1024,2048,63,even,315187,314799,388,0.0012310152385726569,0.7149379253387451,461.21171736717224 +1024,2048,5,even,314483,314142,341,0.0010843193431759428,1.2007596492767334,924.2691524028778 +1024,2048,64,even,314465,314145,320,0.0010176013228817198,0.724083423614502,491.15579104423523 +1024,2048,65,even,314213,313822,391,0.0012443788130981214,0.7145717144012451,462.3489890098572 +1024,2048,67,even,314684,314363,321,0.0010200709282963227,0.7192227840423584,477.6952805519104 +1024,2048,6,even,314111,313746,365,0.0011620096080684854,1.2160530090332031,932.7627530097961 +1024,2048,66,even,314318,313965,353,0.001123066448628459,0.7175564765930176,517.2950022220612 +1024,2048,68,even,314694,314367,327,0.0010391046540448817,0.714665412902832,477.1763801574707 +1024,2048,69,even,314827,314461,366,0.0011625432380323161,0.717545747756958,490.8561451435089 +1024,2048,7,even,315184,314834,350,0.0011104624600233514,1.1453843116760254,907.5966773033142 +1024,2048,70,even,314111,313775,336,0.0010696855570164687,0.7129392623901367,476.70006561279297 +1024,2048,71,even,315280,314956,324,0.0010276579548337986,0.7242860794067383,488.82944917678833 +1024,2048,72,even,314446,314116,330,0.0010494647729657875,0.7150568962097168,462.97166657447815 +1024,2048,73,even,314602,314233,369,0.0011729105345801996,0.7256772518157959,472.0653097629547 +1024,2048,8,even,313724,313393,331,0.00105506751157068,1.1478891372680664,846.1671504974365 +1024,2048,74,even,315435,315086,349,0.001106408610331764,0.7365703582763672,477.04323840141296 +1024,2048,75,even,315014,314640,374,0.0011872488206873346,0.7259232997894287,479.74396204948425 +1024,2048,76,even,315419,315041,378,0.0011984059298900827,0.7141220569610596,469.2127857208252 +1024,2048,77,even,314726,314346,380,0.0012073994522219327,0.7115027904510498,486.8631365299225 +1024,2048,9,even,314532,314180,352,0.0011191230145104472,1.1274268627166748,894.2403936386108 +1024,2048,78,even,314722,314383,339,0.0010771410959513476,0.714540958404541,490.49752163887024 +1024,2048,79,even,315310,314965,345,0.0010941613015762266,0.7207701206207275,490.78009390830994 +1024,2048,80,even,313594,313221,373,0.001189436022372877,0.7203435897827148,437.43380641937256 +1024,2048,81,even,314851,314498,353,0.0011211652495942525,0.7227137088775635,500.31034111976624 +1024,2048,10,even,314959,314634,325,0.0010318803399807595,1.235748529434204,928.158970117569 +1024,2048,82,even,314548,314180,368,0.00116993272886809,0.7198348045349121,471.06810235977173 +1024,2048,83,even,314556,314205,351,0.001115858543470797,0.7155699729919434,487.2784278392792 +1024,2048,84,even,313940,313556,384,0.0012231636618462126,0.723670244216919,467.7762622833252 +1024,2048,11,even,314583,314251,332,0.0010553653566785237,1.1604702472686768,888.2621343135834 +1024,2048,85,even,314238,313908,330,0.0010501594332957822,0.7136352062225342,489.9303376674652 +1024,2048,86,even,314539,314148,391,0.0012430890922906221,0.7210729122161865,519.0670375823975 +1024,2048,87,even,314389,314044,345,0.0010973666381457366,0.7114605903625488,648.6297454833984 +1024,2048,12,even,314661,314294,367,0.0011663345632283632,1.14626145362854,952.9008429050446 +1024,2048,88,even,314749,314364,385,0.0012231968965747309,1.3923983573913574,653.9751658439636 +1024,2048,89,even,315342,314959,383,0.0012145543568569997,1.4124279022216797,618.1844062805176 +1024,2048,90,even,314095,313760,335,0.001066556296661838,1.503920555114746,626.8352131843567 +1024,2048,13,even,314813,314436,377,0.0011975363152093466,1.1589469909667969,932.0220184326172 +1024,2048,91,even,314530,314142,388,0.0012335866213079834,1.4001474380493164,629.3980615139008 +1024,2048,92,even,314660,314282,378,0.001201296637640628,1.4061181545257568,664.5422356128693 +1024,2048,93,even,314857,314518,339,0.0010766792543916762,1.2269995212554932,585.1395561695099 +1024,2048,14,even,315156,314785,371,0.0011771947860741983,1.1471922397613525,912.5086061954498 +1024,2048,94,even,314025,313701,324,0.0010317649868641031,1.4365899562835693,531.8410770893097 +1024,2048,95,even,315538,315158,380,0.001204292351475892,0.7236428260803223,594.3903346061707 +1024,2048,96,even,315382,315065,317,0.0010051302864462779,1.3261311054229736,556.4994671344757 +1024,2048,15,even,314826,314451,375,0.0011911341502925425,1.1955268383026123,921.0680475234985 +1024,2048,97,even,314171,313815,356,0.0011331408691445104,1.5065429210662842,656.7051901817322 +1024,2048,98,even,314516,314177,339,0.001077846596039629,0.7224881649017334,653.7926423549652 +1024,2048,99,even,314111,313734,377,0.0012002126636762164,1.43257737159729,598.6131744384766 +1024,2048,16,even,314790,314458,332,0.0010546713682137298,1.144263505935669,952.569046497345 +1024,2048,17,even,315551,315203,348,0.0011028328225865232,1.1443209648132324,887.0183193683624 +1024,2048,18,even,314791,314444,347,0.0011023186812837724,1.1467738151550293,941.1712870597839 +1024,2048,19,even,314559,314229,330,0.0010490877704977444,1.1973042488098145,961.4528687000275 +1024,2048,20,even,313790,313381,409,0.0013034194843685267,1.1350152492523193,833.6528985500336 +1024,2048,21,even,313334,312917,417,0.0013308482322378038,1.1383030414581299,852.8143837451935 +1024,2048,22,even,314314,313987,327,0.001040360912972378,1.211808443069458,931.2049813270569 +1024,2048,23,even,314406,314054,352,0.0011195715094495652,1.1454970836639404,917.114254951477 +1024,2048,24,even,314307,313971,336,0.001069018507382909,1.2029876708984375,932.2485816478729 +1024,2048,25,even,314887,314567,320,0.001016237570938146,1.2120635509490967,887.7076342105865 +1024,2048,26,even,314666,314329,337,0.0010709768452899266,1.1406333446502686,935.4027252197266 +1024,2048,27,even,314620,314264,356,0.0011315237429279767,1.13606595993042,995.3577210903168 +1024,2048,28,even,313959,313620,339,0.0010797588220117914,1.153620958328247,872.373765707016 +1024,2048,29,even,313995,313604,391,0.0012452427586426536,1.15193772315979,833.87966132164 +1024,2048,30,even,314134,313798,336,0.0010696072376756415,1.1587116718292236,852.4220676422119 +1024,2048,31,even,315280,314925,355,0.0011259832529814768,1.13002610206604,907.4271364212036 +1024,2048,32,even,314865,314510,355,0.0011274673272672416,1.1229469776153564,953.7132999897003 +1024,2048,33,even,315161,314811,350,0.0011105434999888945,1.1771972179412842,891.3286862373352 +1024,2048,34,even,314902,314568,334,0.0010606474395208668,1.1829955577850342,949.8080251216888 +1024,2048,35,even,314966,314614,352,0.0011175809452448836,1.2273547649383545,906.462681055069 +1024,2048,36,even,315674,315346,328,0.0010390466113775604,1.176527738571167,927.319153547287 +1024,2048,37,even,314471,314097,374,0.001189298854266371,1.1380245685577393,886.3599882125854 +1024,2048,38,even,314819,314486,333,0.00105775064402085,1.1309685707092285,929.2458095550537 +1024,2048,39,even,314692,314326,366,0.001163041958486393,1.1439671516418457,936.90545129776 +1024,2048,40,even,315199,314839,360,0.0011421356032220915,1.262869119644165,934.6325051784515 +1024,2048,41,even,315335,314996,339,0.001075047172055116,1.1945219039916992,874.4267210960388 +1024,2048,42,even,315229,314898,331,0.0010500302954360163,1.1334044933319092,908.4453399181366 +1024,2048,43,even,314867,314529,338,0.0010734691155313196,1.1397161483764648,910.6304302215576 +1024,2048,44,even,314179,313844,335,0.001066271138427457,1.1613600254058838,925.2221353054047 +1024,2048,45,even,315029,314711,318,0.0010094308777922033,1.1236233711242676,933.9643642902374 +1024,2048,46,even,314774,314443,331,0.0010515480948235878,1.199042797088623,931.9194922447205 +1024,2048,47,even,313964,313565,399,0.0012708463390707215,1.1421914100646973,839.3867285251617 +1024,2048,48,even,314625,314281,344,0.0010933651172030194,1.2051045894622803,910.6697828769684 +1024,2048,49,even,314960,314591,369,0.0011715773431546863,1.1254210472106934,910.5967090129852 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_128.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_128.csv new file mode 100644 index 000000000..2b9b9ecaf --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_128.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +128,256,0,even,4787,4738,49,0.010236055984959264,0.01766037940979004,1.304201364517212 +128,256,2,even,4865,4817,48,0.00986639260020555,0.017646074295043945,1.250685453414917 +128,256,3,even,4860,4816,44,0.00905349794238683,0.030127525329589844,1.5610215663909912 +128,256,1,even,4990,4942,48,0.009619238476953907,0.018967628479003906,1.497009038925171 +128,256,4,even,5037,4986,51,0.01012507444907683,0.018828153610229492,1.3913772106170654 +128,256,5,even,4980,4940,40,0.008032128514056224,0.018399953842163086,1.3248884677886963 +128,256,6,even,4983,4928,55,0.011037527593818985,0.01909327507019043,1.1844439506530762 +128,256,7,even,4889,4838,51,0.010431581100429535,0.018282651901245117,1.218031883239746 +128,256,8,even,4936,4887,49,0.00992706645056726,0.01907825469970703,1.3806042671203613 +128,256,9,even,4991,4947,44,0.008815868563414146,0.01956629753112793,1.3451459407806396 +128,256,10,even,4875,4840,35,0.0071794871794871795,0.029390335083007812,1.5105483531951904 +128,256,11,even,4974,4923,51,0.010253317249698432,0.01807379722595215,1.2380225658416748 +128,256,12,even,4863,4820,43,0.008842278428953321,0.029592275619506836,1.335494041442871 +128,256,13,even,4881,4843,38,0.007785289899610736,0.0182955265045166,1.5076014995574951 +128,256,14,even,4906,4860,46,0.009376273950264982,0.020328283309936523,1.6411683559417725 +128,256,16,even,4870,4829,41,0.008418891170431212,0.017415761947631836,1.2784667015075684 +128,256,15,even,4859,4806,53,0.010907594155175962,0.017896413803100586,1.5053164958953857 +128,256,17,even,4944,4896,48,0.009708737864077669,0.018749237060546875,1.3213694095611572 +128,256,18,even,4967,4917,50,0.010066438494060801,0.02152562141418457,1.225644588470459 +128,256,19,even,4974,4909,65,0.013067953357458785,0.02000284194946289,1.3422317504882812 +128,256,20,even,5069,5027,42,0.008285657920694417,0.01824665069580078,1.2202644348144531 +128,256,22,even,4954,4907,47,0.009487283003633428,0.018136978149414062,1.2152423858642578 +128,256,21,even,4854,4807,47,0.009682735887927483,0.029234647750854492,1.5019032955169678 +128,256,23,even,5085,5039,46,0.00904621435594887,0.019767045974731445,1.432363748550415 +128,256,24,even,4885,4836,49,0.010030706243602866,0.018518924713134766,1.4018800258636475 +128,256,25,even,5091,5036,55,0.010803378511098017,0.04356837272644043,1.4217150211334229 +128,256,26,even,4888,4835,53,0.010842880523731587,0.01789069175720215,1.45027494430542 +128,256,27,even,4924,4872,52,0.010560519902518278,0.018513917922973633,1.539693832397461 +128,256,28,even,4915,4867,48,0.009766022380467955,0.02072906494140625,1.4307539463043213 +128,256,29,even,4981,4931,50,0.01003814495081309,0.01844334602355957,1.4510085582733154 +128,256,30,even,4933,4880,53,0.010743969187107237,0.032717227935791016,1.2484545707702637 +128,256,31,even,4860,4805,55,0.01131687242798354,0.018046140670776367,1.3734638690948486 +128,256,32,even,4843,4799,44,0.009085277720421227,0.020578622817993164,1.3739664554595947 +128,256,33,even,4958,4909,49,0.009883017345703913,0.01885676383972168,1.474445104598999 +128,256,34,even,4956,4903,53,0.010694108151735271,0.01958632469177246,1.4368722438812256 +128,256,35,even,4818,4786,32,0.006641760066417601,0.01825571060180664,1.3845322132110596 +128,256,36,even,5058,5009,49,0.009687623566627125,0.018706083297729492,1.4341537952423096 +128,256,37,even,4851,4809,42,0.008658008658008658,0.029592037200927734,1.3424208164215088 +128,256,38,even,5036,4991,45,0.008935663224781574,0.018585205078125,1.4939651489257812 +128,256,39,even,4987,4949,38,0.007619811509925807,0.019049406051635742,1.6819367408752441 +128,256,40,even,4924,4889,35,0.00710804224207961,0.031235456466674805,1.4093906879425049 +128,256,42,even,4983,4952,31,0.006221151916516155,0.019409894943237305,1.2931835651397705 +128,256,43,even,5007,4957,50,0.009986019572598362,0.01812601089477539,1.2339725494384766 +128,256,41,even,4882,4823,59,0.012085210979106923,0.032271385192871094,1.5954618453979492 +128,256,44,even,4880,4810,70,0.014344262295081968,0.018147706985473633,1.3446860313415527 +128,256,45,even,4934,4893,41,0.008309687880016214,0.018495559692382812,1.2752013206481934 +128,256,47,even,4827,4780,47,0.009736896623161384,0.017897367477416992,1.3869585990905762 +128,256,46,even,4987,4956,31,0.006216162021255264,0.0188138484954834,1.5072426795959473 +128,256,48,even,4920,4867,53,0.010772357723577236,0.01957559585571289,1.4393079280853271 +128,256,49,even,4996,4924,72,0.014411529223378704,0.018491029739379883,1.2478375434875488 +128,256,50,even,4801,4746,55,0.011455946677775464,0.019634485244750977,1.3213081359863281 +128,256,51,even,4948,4902,46,0.009296685529506871,0.01891613006591797,1.218146562576294 +128,256,52,even,4929,4888,41,0.008318117265165348,0.029861927032470703,1.3601434230804443 +128,256,53,even,4896,4855,41,0.008374183006535947,0.018130064010620117,1.5662896633148193 +128,256,54,even,4990,4933,57,0.011422845691382766,0.018668413162231445,1.4254834651947021 +128,256,55,even,4945,4888,57,0.011526794742163803,0.018378019332885742,1.263188362121582 +128,256,56,even,4918,4859,59,0.011996746644977633,0.019338607788085938,1.3696422576904297 +128,256,57,even,4945,4905,40,0.008088978766430738,0.0201261043548584,1.32859206199646 +128,256,58,even,4972,4932,40,0.008045052292839904,0.018475055694580078,1.3318748474121094 +128,256,59,even,4875,4818,57,0.011692307692307693,0.019212722778320312,1.3762831687927246 +128,256,60,even,4867,4807,60,0.012327922745017464,0.018085956573486328,1.468505620956421 +128,256,61,even,4903,4856,47,0.009585967774831736,0.018347978591918945,1.2438247203826904 +128,256,62,even,4947,4900,47,0.009500707499494642,0.03359794616699219,1.3651654720306396 +128,256,63,even,5020,4976,44,0.008764940239043825,0.019728660583496094,1.5250723361968994 +128,256,64,even,4920,4872,48,0.00975609756097561,0.01902318000793457,1.673837423324585 +128,256,65,even,4983,4948,35,0.0070238811960666265,0.019330978393554688,1.2669792175292969 +128,256,66,even,4934,4895,39,0.00790433725172274,0.019208192825317383,1.603478193283081 +128,256,67,even,4907,4863,44,0.008966782147951905,0.018318891525268555,1.4369335174560547 +128,256,68,even,5017,4953,64,0.012756627466613515,0.029712200164794922,1.235569953918457 +128,256,69,even,4886,4840,46,0.009414654113794515,0.01812434196472168,1.2417387962341309 +128,256,70,even,4945,4898,47,0.009504550050556117,0.018736839294433594,1.2550268173217773 +128,256,71,even,4944,4896,48,0.009708737864077669,0.018135786056518555,1.2705950736999512 +128,256,72,even,4936,4875,61,0.012358184764991896,0.019379138946533203,1.386734962463379 +128,256,73,even,5002,4963,39,0.007796881247501,0.04488658905029297,1.517845630645752 +128,256,74,even,4931,4882,49,0.009937132427499494,0.018582582473754883,1.2184298038482666 +128,256,75,even,5009,4963,46,0.009183469754442005,0.020267486572265625,1.5081760883331299 +128,256,76,even,4844,4796,48,0.00990916597853014,0.031162500381469727,1.3297531604766846 +128,256,77,even,4992,4964,28,0.005608974358974359,0.019063472747802734,1.4492881298065186 +128,256,78,even,4964,4913,51,0.010273972602739725,0.025072813034057617,1.3235437870025635 +128,256,79,even,4906,4855,51,0.010395434162250305,0.01779937744140625,1.5286364555358887 +128,256,80,even,4715,4679,36,0.007635206786850477,0.018584251403808594,1.6110756397247314 +128,256,81,even,4911,4869,42,0.00855222968845449,0.018330812454223633,1.6543102264404297 +128,256,82,even,4930,4879,51,0.010344827586206896,0.02099299430847168,1.4328699111938477 +128,256,83,even,4849,4797,52,0.010723860589812333,0.018075227737426758,1.2234127521514893 +128,256,84,even,5041,4994,47,0.009323546915294585,0.018555641174316406,1.2968776226043701 +128,256,85,even,4912,4861,51,0.010382736156351791,0.019129276275634766,1.483614444732666 +128,256,86,even,4969,4904,65,0.013081102837593077,0.0316615104675293,1.39202880859375 +128,256,87,even,4843,4789,54,0.011150113565971505,0.06156420707702637,1.240691900253296 +128,256,88,even,4931,4891,40,0.008111944838775096,0.019414424896240234,1.334301471710205 +128,256,89,even,4960,4921,39,0.007862903225806451,0.01782965660095215,1.4123313426971436 +128,256,90,even,4886,4831,55,0.01125665165779779,0.019468069076538086,1.5057861804962158 +128,256,91,even,4819,4766,53,0.010998132392612575,0.018076658248901367,1.5037572383880615 +128,256,92,even,4992,4937,55,0.011017628205128206,0.019271373748779297,1.2158379554748535 +128,256,93,even,4946,4895,51,0.010311362717347351,0.018569231033325195,1.2846944332122803 +128,256,94,even,4911,4868,43,0.008755854204846264,0.0247499942779541,1.5264501571655273 +128,256,95,even,4859,4802,57,0.01173080880839679,0.017760276794433594,1.3292632102966309 +128,256,97,even,4925,4882,43,0.008730964467005076,0.038697004318237305,1.1958069801330566 +128,256,98,even,5065,5021,44,0.008687068114511353,0.02138209342956543,1.2564287185668945 +128,256,96,even,4975,4939,36,0.007236180904522613,0.01819634437561035,1.545858383178711 +128,256,99,even,4958,4911,47,0.009479628882613958,0.01811504364013672,1.4473788738250732 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_192.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_192.csv new file mode 100644 index 000000000..4a7e8e8ca --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_192.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +192,384,1,even,11146,11060,86,0.0077157724744302885,0.047307491302490234,2.568192720413208 +192,384,0,even,11012,10939,73,0.00662913185615692,0.05780148506164551,2.5726025104522705 +192,384,3,even,11121,11037,84,0.007553277582951173,0.03803372383117676,2.5573277473449707 +192,384,5,even,10940,10865,75,0.006855575868372943,0.04262542724609375,2.704829216003418 +192,384,7,even,11170,11096,74,0.006624888093106535,0.02619767189025879,2.8550937175750732 +192,384,6,even,11062,10994,68,0.006147170493581631,0.04631829261779785,2.722604274749756 +192,384,4,even,11048,10990,58,0.0052498189717595945,0.02614426612854004,3.0031075477600098 +192,384,2,even,11006,10949,57,0.005178993276394693,0.07066130638122559,2.967210054397583 +192,384,8,even,11007,10938,69,0.006268738075769964,0.026679039001464844,2.8438165187835693 +192,384,9,even,11234,11153,81,0.007210254584297668,0.10558104515075684,2.4220805168151855 +192,384,10,even,10984,10917,67,0.006099781500364166,0.039786577224731445,2.6784441471099854 +192,384,11,even,11247,11171,76,0.006757357517560238,0.0471343994140625,2.428485870361328 +192,384,12,even,11054,10985,69,0.006242084313370725,0.031088590621948242,2.509521961212158 +192,384,15,even,11092,11005,87,0.007843490804183196,0.032903432846069336,2.4630260467529297 +192,384,14,even,11100,11027,73,0.006576576576576576,0.026172637939453125,2.633816719055176 +192,384,16,even,11047,10973,74,0.00669865121752512,0.025324344635009766,2.525066614151001 +192,384,13,even,11035,10982,53,0.004802899864068871,0.025861740112304688,2.7899811267852783 +192,384,17,even,10948,10865,83,0.007581293386919985,0.02553248405456543,2.895921468734741 +192,384,20,even,11120,11043,77,0.006924460431654676,0.032003164291381836,2.4071288108825684 +192,384,19,even,11068,11007,61,0.005511384170581858,0.09103679656982422,2.6960301399230957 +192,384,21,even,10917,10850,67,0.006137217184208116,0.032062530517578125,2.7826523780822754 +192,384,18,even,11152,11096,56,0.005021520803443328,0.04408454895019531,3.1689319610595703 +192,384,25,even,11112,11057,55,0.004949604031677466,0.025882482528686523,2.4725372791290283 +192,384,23,even,11156,11070,86,0.007708856220867695,0.04420185089111328,2.650768756866455 +192,384,22,even,11126,11065,61,0.005482653244652166,0.02849864959716797,2.665296792984009 +192,384,24,even,10983,10908,75,0.0068287353182190655,0.03755021095275879,2.8052072525024414 +192,384,26,even,11065,10994,71,0.006416629010393132,0.025714874267578125,3.324890375137329 +192,384,27,even,11026,10969,57,0.005169599129330673,0.09183120727539062,2.921828031539917 +192,384,28,even,11053,10979,74,0.006695014928073826,0.04245257377624512,2.475306510925293 +192,384,30,even,10895,10838,57,0.005231757687012391,0.046010732650756836,2.6200132369995117 +192,384,33,even,11100,11034,66,0.005945945945945946,0.025278091430664062,2.631903648376465 +192,384,31,even,11110,11039,71,0.006390639063906391,0.04211091995239258,2.4808826446533203 +192,384,34,even,11078,11016,62,0.005596678100740206,0.03128337860107422,2.4843926429748535 +192,384,29,even,11064,11000,64,0.005784526391901663,0.046837568283081055,2.7904534339904785 +192,384,32,even,10978,10902,76,0.006922936782656221,0.027878761291503906,2.9105021953582764 +192,384,35,even,10968,10891,77,0.0070204230488694385,0.02547430992126465,2.796248197555542 +192,384,38,even,11020,10940,80,0.007259528130671506,0.02482318878173828,2.3240199089050293 +192,384,36,even,11331,11269,62,0.005471714764804518,0.05138683319091797,2.610229730606079 +192,384,40,even,11150,11081,69,0.006188340807174888,0.025050878524780273,2.4727530479431152 +192,384,39,even,10905,10843,62,0.005685465382851903,0.02607893943786621,2.4902148246765137 +192,384,42,even,11096,11024,72,0.006488824801730353,0.025257110595703125,2.4076802730560303 +192,384,43,even,10947,10878,69,0.006303096738832557,0.025355100631713867,2.408700466156006 +192,384,41,even,11057,10978,79,0.00714479515239215,0.025336265563964844,2.5310118198394775 +192,384,37,even,11079,11011,68,0.006137738063002076,0.04468894004821777,2.9068169593811035 +192,384,44,even,11062,10996,66,0.005966371361417465,0.025741100311279297,3.0000264644622803 +192,384,47,even,10799,10737,62,0.005741272340031484,0.048514604568481445,2.4076883792877197 +192,384,45,even,10907,10840,67,0.006142844045108646,0.025197505950927734,2.6436190605163574 +192,384,48,even,11066,10997,69,0.0062353153804446055,0.026118755340576172,2.535414457321167 +192,384,46,even,10987,10923,64,0.005825065987075635,0.03831744194030762,2.7258684635162354 +192,384,51,even,11123,11045,78,0.00701249662860739,0.038187265396118164,2.43708872795105 +192,384,49,even,11050,10963,87,0.007873303167420815,0.05377507209777832,2.6321094036102295 +192,384,50,even,10891,10816,75,0.0068864199797998345,0.03928852081298828,2.5976860523223877 +192,384,52,even,11084,11027,57,0.005142547816672682,0.026451587677001953,3.298379898071289 +192,384,53,even,11119,11049,70,0.00629553017357676,0.02561211585998535,2.757108688354492 +192,384,57,even,10948,10871,77,0.007033248081841432,0.046489715576171875,2.406550884246826 +192,384,55,even,11028,10956,72,0.006528835690968444,0.07574200630187988,2.5830395221710205 +192,384,58,even,11163,11086,77,0.00689778733315417,0.05983877182006836,2.387251377105713 +192,384,56,even,11110,11019,91,0.00819081908190819,0.0478060245513916,2.627990961074829 +192,384,54,even,11202,11138,64,0.005713265488305659,0.038663387298583984,2.7973415851593018 +192,384,60,even,11085,11013,72,0.006495263870094722,0.025322675704956055,2.555666446685791 +192,384,59,even,10917,10864,53,0.004854813593478061,0.02493882179260254,2.894690752029419 +192,384,61,even,11100,11021,79,0.007117117117117117,0.045674800872802734,2.3181779384613037 +192,384,62,even,11102,11015,87,0.007836425869212755,0.025136232376098633,2.6141815185546875 +192,384,63,even,11140,11079,61,0.005475763016157989,0.05603456497192383,2.498675584793091 +192,384,64,even,11053,10972,81,0.007328327150999728,0.025448322296142578,2.4301366806030273 +192,384,65,even,11051,10950,101,0.009139444394172472,0.025083541870117188,2.472801685333252 +192,384,67,even,11133,11050,83,0.007455313033324351,0.03748154640197754,2.3581414222717285 +192,384,69,even,11072,10995,77,0.006954479768786127,0.07395076751708984,2.353102445602417 +192,384,66,even,11145,11079,66,0.0059219380888290716,0.059393882751464844,2.8042616844177246 +192,384,68,even,11041,10976,65,0.0058871479032696315,0.0291593074798584,2.689467668533325 +192,384,70,even,11097,11026,71,0.006398125619536812,0.0252530574798584,2.5454537868499756 +192,384,71,even,11344,11257,87,0.007669252468265162,0.0251920223236084,2.5100605487823486 +192,384,73,even,11040,10975,65,0.00588768115942029,0.04088568687438965,2.9118189811706543 +192,384,72,even,10977,10916,61,0.005557073881752756,0.04674124717712402,3.103134870529175 +192,384,78,even,11056,10983,73,0.0066027496382054995,0.02702784538269043,3.3831045627593994 +192,384,75,even,11123,11064,59,0.0053043243729209745,0.025382518768310547,3.8367395401000977 +192,384,77,even,11142,11047,95,0.00852629689463292,0.06771469116210938,3.660121202468872 +192,384,74,even,11070,11001,69,0.006233062330623307,0.04564857482910156,4.31794548034668 +192,384,76,even,11146,11070,76,0.006818589628566302,0.05744481086730957,3.8163230419158936 +192,384,79,even,11160,11096,64,0.005734767025089606,0.026002883911132812,3.7843410968780518 +192,384,80,even,10910,10851,59,0.0054078826764436295,0.024657011032104492,4.090895175933838 +192,384,81,even,10915,10852,63,0.005771873568483738,0.07237887382507324,4.066087007522583 +192,384,82,even,11167,11092,75,0.006716217426345482,0.10759758949279785,4.0635881423950195 +192,384,88,even,11066,10997,69,0.0062353153804446055,0.04760384559631348,3.5063817501068115 +192,384,83,even,11033,10958,75,0.006797788452823348,0.050150394439697266,4.102469205856323 +192,384,85,even,11108,11048,60,0.005401512423478574,0.08782815933227539,3.5224108695983887 +192,384,84,even,11098,11040,58,0.0052261668769147595,0.05081486701965332,4.2928972244262695 +192,384,87,even,11123,11053,70,0.0062932662051604785,0.06919670104980469,3.545943260192871 +192,384,86,even,10972,10902,70,0.0063798760481224934,0.07431292533874512,4.29385781288147 +192,384,89,even,10912,10856,56,0.005131964809384164,0.06145620346069336,4.2738425731658936 +192,384,91,even,11111,11071,40,0.0036000360003600037,0.09960269927978516,4.1288275718688965 +192,384,90,even,11034,10951,83,0.007522204096429219,0.04565095901489258,4.575017213821411 +192,384,95,even,11143,11074,69,0.006192228304765323,0.0988316535949707,3.664576530456543 +192,384,92,even,11035,10943,92,0.008337109198006343,0.07056593894958496,3.8915910720825195 +192,384,93,even,10931,10873,58,0.0053060104290549815,0.08988022804260254,4.335405588150024 +192,384,97,even,11252,11200,52,0.004621400639886242,0.11409378051757812,3.92327880859375 +192,384,94,even,10887,10822,65,0.0059704234408009555,0.04892611503601074,3.835655450820923 +192,384,96,even,11111,11028,83,0.0074700747007470075,0.09254908561706543,4.2300124168396 +192,384,98,even,11251,11174,77,0.006843836103457471,0.0682530403137207,3.9347984790802 +192,384,99,even,10992,10912,80,0.00727802037845706,0.08452534675598145,4.1051185131073 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_256.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_256.csv new file mode 100644 index 000000000..8a9f97321 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_256.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +256,512,0,even,19780,19701,79,0.003993933265925177,0.07332754135131836,8.774906158447266 +256,512,1,even,19722,19626,96,0.004867660480681472,0.07513666152954102,8.212276697158813 +256,512,2,even,19620,19546,74,0.0037716615698267075,0.07410168647766113,8.763195991516113 +256,512,4,even,19694,19617,77,0.0039098202498222805,0.07707357406616211,8.778756856918335 +256,512,3,even,19624,19538,86,0.004382388911536894,0.0762641429901123,10.109301567077637 +256,512,5,even,19598,19505,93,0.0047453821818552915,0.07175874710083008,8.514094352722168 +256,512,6,even,19819,19729,90,0.00454109692719108,0.07324767112731934,8.786444902420044 +256,512,7,even,19725,19626,99,0.0050190114068441065,0.07315587997436523,8.902799129486084 +256,512,9,even,19759,19668,91,0.004605496229566274,0.0723118782043457,8.11315655708313 +256,512,8,even,19793,19683,110,0.005557520335472137,0.10837888717651367,9.099198341369629 +256,512,10,even,19829,19733,96,0.004841393917998891,0.07752490043640137,8.93801736831665 +256,512,11,even,19745,19639,106,0.005368447708280578,0.07577800750732422,8.606537818908691 +256,512,13,even,19556,19471,85,0.0043464921251789735,0.1095278263092041,8.938661813735962 +256,512,12,even,19522,19416,106,0.00542977153980125,0.08034062385559082,10.159528255462646 +256,512,14,even,19526,19444,82,0.004199528833350404,0.07289624214172363,8.887916564941406 +256,512,15,even,19817,19711,106,0.005348942826865822,0.07582259178161621,8.253523588180542 +256,512,16,even,19741,19671,70,0.0035459196595917127,0.07158589363098145,10.452524900436401 +256,512,19,even,19612,19526,86,0.004385070365082603,0.07579326629638672,8.801421165466309 +256,512,17,even,19824,19725,99,0.004993946731234867,0.13032913208007812,10.271847248077393 +256,512,18,even,19726,19629,97,0.004917367940788807,0.1483922004699707,10.199046850204468 +256,512,20,even,19746,19646,100,0.005064316823660488,0.06952881813049316,8.014323472976685 +256,512,21,even,19674,19583,91,0.004625393920910847,0.07209610939025879,8.102063655853271 +256,512,22,even,19835,19730,105,0.005293672800604991,0.0743873119354248,9.105777740478516 +256,512,23,even,19751,19660,91,0.004607361652574553,0.0756676197052002,8.423725366592407 +256,512,24,even,19554,19451,103,0.00526746445740002,0.0726320743560791,8.541728734970093 +256,512,25,even,19546,19464,82,0.0041952317609741125,0.07499003410339355,9.156917333602905 +256,512,26,even,19592,19495,97,0.00495100040832993,0.0737600326538086,9.455599069595337 +256,512,27,even,19530,19448,82,0.004198668714797747,0.08182644844055176,8.51689338684082 +256,512,28,even,19666,19571,95,0.004830672226177159,0.10264778137207031,10.377200603485107 +256,512,29,even,19613,19528,85,0.004333860194768776,0.07336831092834473,10.297366857528687 +256,512,30,even,19404,19317,87,0.004483611626468769,0.07205724716186523,9.451220989227295 +256,512,31,even,19458,19355,103,0.005293452564497893,0.07179760932922363,9.147411823272705 +256,512,32,even,19427,19339,88,0.004529778143820456,0.07081174850463867,8.941199779510498 +256,512,33,even,19802,19699,103,0.005201494798505201,0.0762643814086914,8.959768295288086 +256,512,34,even,19505,19419,86,0.004409125865162779,0.07627725601196289,9.038321733474731 +256,512,35,even,19506,19425,81,0.004152568440479852,0.07077169418334961,9.071453094482422 +256,512,36,even,19992,19891,101,0.005052020808323329,0.07880067825317383,8.492259979248047 +256,512,37,even,19582,19476,106,0.005413134511285875,0.07250428199768066,9.193634986877441 +256,512,38,even,19797,19684,113,0.005707935545789766,0.0951840877532959,7.861550569534302 +256,512,39,even,19682,19597,85,0.004318666802154252,0.07812857627868652,9.219159364700317 +256,512,40,even,19740,19654,86,0.0043566362715298885,0.07033705711364746,8.671674489974976 +256,512,41,even,19721,19625,96,0.004867907306931697,0.07126951217651367,10.307224988937378 +256,512,42,even,19732,19651,81,0.004105007095073991,0.07420468330383301,7.9343743324279785 +256,512,43,even,19831,19735,96,0.004840905652765871,0.07830667495727539,8.435976505279541 +256,512,44,even,19833,19740,93,0.004689154439570413,0.08107566833496094,9.044258832931519 +256,512,45,even,19540,19456,84,0.004298874104401228,0.07198190689086914,8.987844467163086 +256,512,46,even,19652,19551,101,0.005139426012619581,0.07741761207580566,8.385510206222534 +256,512,47,even,19621,19528,93,0.004739819581061108,0.07207965850830078,8.96164870262146 +256,512,48,even,19712,19609,103,0.005225243506493506,0.07551002502441406,8.694995164871216 +256,512,49,even,19835,19753,82,0.004134106377615326,0.0779581069946289,8.860580682754517 +256,512,50,even,19595,19494,101,0.005154376116356213,0.07604622840881348,8.11277461051941 +256,512,51,even,19707,19604,103,0.005226569239356574,0.0746617317199707,8.241237163543701 +256,512,52,even,19683,19607,76,0.0038612000203221055,0.07483434677124023,8.63780403137207 +256,512,53,even,19709,19616,93,0.004718656451367396,0.07837080955505371,8.969764947891235 +256,512,54,even,19754,19674,80,0.004049812696162803,0.07587671279907227,8.208492040634155 +256,512,55,even,19777,19705,72,0.0036405926075744554,0.08095812797546387,9.542949199676514 +256,512,56,even,19762,19677,85,0.004301184090679081,0.07674598693847656,8.467037439346313 +256,512,57,even,19550,19443,107,0.005473145780051151,0.07483720779418945,10.127380132675171 +256,512,58,even,19672,19576,96,0.004880032533550223,0.0779721736907959,10.083190202713013 +256,512,59,even,19544,19454,90,0.004604993860008187,0.07748579978942871,8.744688510894775 +256,512,60,even,19920,19825,95,0.004769076305220884,0.0767664909362793,9.00144338607788 +256,512,61,even,19764,19660,104,0.005262092693786683,0.0722658634185791,8.50933051109314 +256,512,62,even,19672,19587,85,0.004320862139080927,0.0718679428100586,8.812368392944336 +256,512,64,even,19773,19670,103,0.005209123552318819,0.07650923728942871,8.598253965377808 +256,512,63,even,19746,19659,87,0.004405955636584625,0.0704352855682373,9.298535346984863 +256,512,65,even,19779,19688,91,0.004600839273977451,0.0701594352722168,8.53043532371521 +256,512,66,even,19587,19496,91,0.004645938632766631,0.07169032096862793,8.855998277664185 +256,512,67,even,19528,19437,91,0.004659975419909873,0.07555437088012695,9.15243148803711 +256,512,68,even,19882,19797,85,0.004275223820541193,0.0722508430480957,8.040820360183716 +256,512,69,even,19650,19561,89,0.004529262086513995,0.07280468940734863,8.893288373947144 +256,512,70,even,19703,19596,107,0.0054306450794295285,0.07724142074584961,7.912598371505737 +256,512,71,even,19739,19639,100,0.005066112771670297,0.07442522048950195,8.388463735580444 +256,512,73,even,19710,19627,83,0.004211060375443937,0.07606172561645508,8.011042356491089 +256,512,72,even,19478,19400,78,0.004004517917650683,0.07686471939086914,10.081991195678711 +256,512,74,even,19720,19642,78,0.003955375253549696,0.07627677917480469,8.631529569625854 +256,512,75,even,20026,19939,87,0.004344352341955458,0.07191324234008789,8.842134237289429 +256,512,76,even,19518,19434,84,0.004303719643406086,0.07383465766906738,8.950009107589722 +256,512,77,even,19554,19450,104,0.005318604889025263,0.07434391975402832,8.540579080581665 +256,512,78,even,19638,19542,96,0.00488848151542927,0.07091093063354492,7.918055295944214 +256,512,79,even,19762,19685,77,0.0038963667644975205,0.07679510116577148,8.930895805358887 +256,512,80,even,19604,19515,89,0.004539889818404408,0.07634353637695312,8.95839262008667 +256,512,81,even,19725,19641,84,0.004258555133079848,0.07473587989807129,8.983614206314087 +256,512,83,even,19674,19583,91,0.004625393920910847,0.07548356056213379,7.806763172149658 +256,512,82,even,20069,19979,90,0.004484528377099008,0.07171797752380371,9.129850387573242 +256,512,84,even,19808,19688,120,0.006058158319870759,0.07284164428710938,10.326082229614258 +256,512,85,even,19590,19506,84,0.004287901990811639,0.0717463493347168,8.96701455116272 +256,512,86,even,19779,19683,96,0.004853632640679509,0.07304573059082031,8.144886255264282 +256,512,87,even,19661,19564,97,0.004933624942780123,0.07515239715576172,9.037027359008789 +256,512,88,even,19680,19580,100,0.00508130081300813,0.07174825668334961,8.721602439880371 +256,512,89,even,19933,19814,119,0.00596999949831937,0.07110214233398438,7.895640134811401 +256,512,90,even,19490,19427,63,0.00323242688558235,0.07102513313293457,9.22670316696167 +256,512,91,even,19789,19699,90,0.0045479812016777,0.07460379600524902,8.294875383377075 +256,512,93,even,19754,19657,97,0.004910397894097398,0.07311272621154785,8.819411754608154 +256,512,94,even,19383,19277,106,0.005468709694061807,0.07215428352355957,7.924182891845703 +256,512,92,even,19743,19654,89,0.004507926860152966,0.07938909530639648,11.836632013320923 +256,512,95,even,19676,19568,108,0.005488920512299248,0.0714423656463623,8.033650159835815 +256,512,96,even,19803,19716,87,0.0043932737464020604,0.07492733001708984,8.990072011947632 +256,512,97,even,19941,19847,94,0.0047139060227671635,0.07202744483947754,7.86609673500061 +256,512,98,even,19835,19747,88,0.004436601966221326,0.07480239868164062,8.352844476699829 +256,512,99,even,19552,19475,77,0.003938216039279869,0.0753488540649414,8.22961711883545 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_320.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_320.csv new file mode 100644 index 000000000..ea7619386 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_320.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +320,640,2,even,30934,30809,125,0.004040861188336458,0.1196587085723877,10.674824476242065 +320,640,1,even,31073,30950,123,0.003958420493676182,0.18842458724975586,10.729465246200562 +320,640,3,even,30568,30484,84,0.002747971735147867,0.08835983276367188,11.151677370071411 +320,640,4,even,30569,30469,100,0.0032712879060486115,0.09623217582702637,11.191675662994385 +320,640,5,even,30545,30421,124,0.004059584220003274,0.08742523193359375,11.254238367080688 +320,640,7,even,30618,30505,113,0.003690639493108629,0.07340383529663086,12.08835506439209 +320,640,6,even,30765,30638,127,0.004128067609296278,0.09068918228149414,12.581279993057251 +320,640,8,even,30876,30763,113,0.0036598004922917477,0.07186746597290039,12.657500505447388 +320,640,0,even,30659,30543,116,0.0037835545842982484,0.13829636573791504,14.959959030151367 +320,640,10,even,30728,30607,121,0.0039377766206717,0.08084988594055176,11.171495914459229 +320,640,9,even,30795,30684,111,0.0036044812469556748,0.07542634010314941,11.150168895721436 +320,640,11,even,30676,30565,111,0.0036184639457556397,0.1037595272064209,11.120697498321533 +320,640,13,even,30740,30609,131,0.004261548471047495,0.07050037384033203,10.978219747543335 +320,640,12,even,30563,30448,115,0.003762719628308739,0.07242512702941895,11.1297025680542 +320,640,15,even,30932,30821,111,0.0035885167464114833,0.08218550682067871,10.031893968582153 +320,640,16,even,30692,30575,117,0.0038120682914114428,0.07138252258300781,9.953921794891357 +320,640,14,even,30628,30492,136,0.004440381350398329,0.08782815933227539,14.432943105697632 +320,640,17,even,31061,30936,125,0.004024339203502785,0.07115983963012695,12.264689207077026 +320,640,18,even,30971,30850,121,0.003906880630267024,0.1531696319580078,15.288753271102905 +320,640,19,even,30660,30538,122,0.003979125896934116,0.17324185371398926,16.500858783721924 +320,640,20,even,30920,30804,116,0.0037516170763260024,0.16646599769592285,15.566561937332153 +320,640,24,even,30742,30630,112,0.003643224253464316,0.14197063446044922,15.447338104248047 +320,640,21,even,30686,30572,114,0.003715049208107932,0.13709235191345215,16.687125205993652 +320,640,22,even,30770,30664,106,0.003444913877153071,0.19144463539123535,16.964285612106323 +320,640,23,even,30953,30840,113,0.0036506962168448938,0.14019775390625,17.907235383987427 +320,640,26,even,30784,30656,128,0.004158004158004158,0.14243698120117188,16.576027393341064 +320,640,25,even,30708,30595,113,0.0036798228474664582,0.1387772560119629,19.037472009658813 +320,640,27,even,30571,30457,114,0.0037290242386575512,0.2017817497253418,16.194595336914062 +320,640,31,even,30718,30598,120,0.003906504329708966,0.13917922973632812,16.325557231903076 +320,640,29,even,30825,30722,103,0.0033414436334144363,0.23489642143249512,17.597662210464478 +320,640,32,even,30526,30428,98,0.0032103780383935005,0.16383004188537598,17.76538324356079 +320,640,28,even,30911,30787,124,0.004011516935718676,0.19508099555969238,18.620819330215454 +320,640,30,even,30296,30185,111,0.003663850013203063,0.18668484687805176,19.12638545036316 +320,640,34,even,30597,30479,118,0.00385658724711573,0.15569591522216797,14.966388702392578 +320,640,33,even,30946,30807,139,0.004491695211012732,0.24500799179077148,16.54019021987915 +320,640,35,even,30474,30365,109,0.0035768195839075935,0.16890525817871094,16.89355206489563 +320,640,36,even,31183,31063,120,0.003848250649392297,0.2336132526397705,16.897051334381104 +320,640,37,even,30656,30541,115,0.003751304801670146,0.1423349380493164,16.932764768600464 +320,640,41,even,30773,30660,113,0.0036720501738537028,0.15581631660461426,15.50043511390686 +320,640,40,even,30603,30494,109,0.0035617423128451457,0.25818896293640137,16.215422868728638 +320,640,38,even,31020,30899,121,0.003900709219858156,0.16102814674377441,17.55115795135498 +320,640,42,even,30920,30819,101,0.0032664941785252263,0.1399097442626953,16.28926181793213 +320,640,39,even,30701,30598,103,0.003354939578515358,0.13673973083496094,19.072253942489624 +320,640,43,even,30858,30760,98,0.003175837708211809,0.16974949836730957,19.402916193008423 +320,640,44,even,30822,30716,106,0.003439101940172604,0.1600027084350586,17.348172664642334 +320,640,45,even,30578,30469,109,0.003564654326640068,0.12905216217041016,16.67869997024536 +320,640,46,even,30631,30526,105,0.003427899840031341,0.17815113067626953,16.728688955307007 +320,640,47,even,30553,30423,130,0.004254901319019409,0.18956232070922852,16.7278995513916 +320,640,49,even,30892,30778,114,0.0036902757995597568,0.2124772071838379,16.75514054298401 +320,640,50,even,30620,30514,106,0.0034617896799477464,0.1367795467376709,16.130273818969727 +320,640,48,even,30758,30636,122,0.003966447753430002,0.24771547317504883,17.559101343154907 +320,640,51,even,30854,30737,117,0.0037920528942762687,0.14092397689819336,19.114898443222046 +320,640,52,even,30787,30674,113,0.0036703803553447883,0.13159894943237305,16.533380270004272 +320,640,53,even,30817,30701,116,0.0037641561475808805,0.1437525749206543,16.908032655715942 +320,640,55,even,30749,30645,104,0.003382223812156493,0.22501707077026367,15.936238050460815 +320,640,57,even,30556,30440,116,0.0037963084173321116,0.1413884162902832,16.308329820632935 +320,640,54,even,30667,30588,79,0.0025760589558809143,0.1804041862487793,17.82092833518982 +320,640,58,even,30579,30442,137,0.004480198829261912,0.12492632865905762,15.95948052406311 +320,640,56,even,30610,30483,127,0.004148970924534466,0.15896821022033691,19.19828963279724 +320,640,60,even,30503,30380,123,0.004032390256696062,0.223419189453125,14.526575088500977 +320,640,59,even,30778,30657,121,0.003931379556826304,0.17009186744689941,17.874232053756714 +320,640,61,even,30726,30608,118,0.0038403957560372323,0.14557313919067383,16.237533807754517 +320,640,62,even,30877,30767,110,0.003562522265764161,0.1393733024597168,15.805821418762207 +320,640,63,even,30470,30355,115,0.0037742041352149657,0.17603731155395508,15.219116687774658 +320,640,65,even,30903,30775,128,0.004141992686794162,0.19977164268493652,15.216411113739014 +320,640,66,even,30640,30541,99,0.003231070496083551,0.1469557285308838,19.105478763580322 +320,640,69,even,30623,30513,110,0.003592071318943278,0.14936065673828125,16.3993923664093 +320,640,68,even,30812,30699,113,0.003667402310788005,0.19603490829467773,16.586562871932983 +320,640,67,even,30938,30820,118,0.003814079772448122,0.16141462326049805,18.49740719795227 +320,640,70,even,30845,30731,114,0.0036958988490841302,0.13951563835144043,16.600884437561035 +320,640,64,even,30743,30652,91,0.0029600234199655207,0.16819143295288086,20.96910047531128 +320,640,71,even,31132,31033,99,0.0031800077091095977,0.17844152450561523,16.228888988494873 +320,640,72,even,30714,30598,116,0.003776779318877385,0.14198946952819824,12.780401945114136 +320,640,75,even,31075,30951,124,0.003990345937248592,0.11540341377258301,10.742785215377808 +320,640,73,even,30677,30547,130,0.004237702513283568,0.1423182487487793,14.361780643463135 +320,640,74,even,30881,30777,104,0.0033677665878695637,0.1419980525970459,11.00420594215393 +320,640,76,even,30618,30498,120,0.003919263178522437,0.13825201988220215,11.572901487350464 +320,640,80,even,30447,30316,131,0.004302558544355766,0.11767053604125977,10.533258438110352 +320,640,77,even,30795,30696,99,0.003214807598636142,0.13593268394470215,12.497363567352295 +320,640,79,even,30916,30790,126,0.004075559580799586,0.08313965797424316,13.012418985366821 +320,640,78,even,30930,30820,110,0.003556417717426447,0.14242339134216309,13.569730520248413 +320,640,81,even,30674,30578,96,0.00312968637934407,0.07566261291503906,11.562374114990234 +320,640,84,even,30816,30695,121,0.003926531671858775,0.09937453269958496,11.031506776809692 +320,640,82,even,31070,30952,118,0.003797875764402961,0.07660126686096191,11.363186597824097 +320,640,83,even,30721,30610,111,0.003613163633996289,0.07397031784057617,11.225996017456055 +320,640,85,even,30913,30790,123,0.003978908549801054,0.07372498512268066,11.282597064971924 +320,640,86,even,30765,30629,136,0.004420607833577117,0.13557195663452148,10.486232280731201 +320,640,87,even,30731,30619,112,0.0036445283264456086,0.07329750061035156,10.790029287338257 +320,640,88,even,30765,30638,127,0.004128067609296278,0.09031343460083008,10.237789154052734 +320,640,89,even,30894,30785,109,0.0035281931766686088,0.0725557804107666,11.21349310874939 +320,640,90,even,30569,30450,119,0.0038928326081978477,0.07147860527038574,13.605032444000244 +320,640,93,even,30923,30807,116,0.0037512531125699316,0.07193946838378906,12.274933099746704 +320,640,92,even,30715,30625,90,0.002930164414781052,0.09237360954284668,12.664015769958496 +320,640,91,even,30908,30796,112,0.0036236573055519606,0.07169818878173828,13.56247591972351 +320,640,96,even,30985,30859,126,0.004066483782475391,0.14105534553527832,13.235751628875732 +320,640,95,even,30806,30669,137,0.004447185613192235,0.1392660140991211,13.270384550094604 +320,640,97,even,30668,30563,105,0.0034237641841659058,0.0781559944152832,13.008013010025024 +320,640,98,even,30647,30533,114,0.0037197768133911966,0.1420745849609375,11.34474515914917 +320,640,94,even,30705,30592,113,0.0036801823807197523,0.1389627456665039,15.33940315246582 +320,640,99,even,30566,30453,113,0.003696918144343388,0.130828857421875,11.770718574523926 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_384.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_384.csv new file mode 100644 index 000000000..14e83b112 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_384.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +384,768,0,even,44135,44005,130,0.0029455081001472753,0.10135197639465332,18.802589893341064 +384,768,1,even,44573,44462,111,0.0024902968164583943,0.10086464881896973,19.93380069732666 +384,768,2,even,44560,44407,153,0.003433572710951526,0.0997459888458252,17.829906463623047 +384,768,3,even,44075,43945,130,0.002949517867271696,0.10070919990539551,19.221399068832397 +384,768,5,even,44042,43879,163,0.003701012669724354,0.10111594200134277,18.252781867980957 +384,768,6,even,44276,44176,100,0.0022585599421808653,0.10429024696350098,17.731058597564697 +384,768,4,even,44328,44225,103,0.0023235878000360945,0.10109448432922363,22.764951705932617 +384,768,7,even,44479,44329,150,0.003372377976123564,0.10482192039489746,19.67781710624695 +384,768,9,even,44230,44088,142,0.0032104906172281257,0.10016536712646484,16.7515230178833 +384,768,8,even,44373,44240,133,0.0029973181889887996,0.10034775733947754,19.180917739868164 +384,768,10,even,43984,43849,135,0.003069297926518734,0.10395145416259766,19.59206247329712 +384,768,13,even,44297,44168,129,0.002912161094430774,0.10111594200134277,19.085848569869995 +384,768,14,even,44337,44221,116,0.0026163249656043484,0.10107231140136719,18.448315143585205 +384,768,11,even,44017,43890,127,0.002885248881114115,0.10259389877319336,23.335925340652466 +384,768,12,even,44051,43927,124,0.0028149190710767065,0.10641980171203613,21.293250560760498 +384,768,16,even,44227,44095,132,0.002984602166097633,0.10088729858398438,18.688853979110718 +384,768,15,even,44695,44527,168,0.003758809710258418,0.09935617446899414,19.323307514190674 +384,768,17,even,44523,44386,137,0.003077061294162568,0.11117148399353027,18.414686679840088 +384,768,18,even,44279,44152,127,0.002868176788093679,0.10273504257202148,20.01281452178955 +384,768,19,even,44321,44194,127,0.0028654588118499132,0.10364699363708496,19.61712145805359 +384,768,21,even,44378,44238,140,0.0031547163008698005,0.10116362571716309,17.442646503448486 +384,768,20,even,44139,44006,133,0.0030132082738621173,0.10558915138244629,18.394781827926636 +384,768,25,even,44714,44562,152,0.003399382743659704,0.10015511512756348,17.83229112625122 +384,768,22,even,44350,44217,133,0.0029988726042841037,0.12275552749633789,20.314740896224976 +384,768,23,even,44599,44481,118,0.002645799233166663,0.1414623260498047,21.446320056915283 +384,768,24,even,44235,44110,125,0.002825816661015033,0.10077333450317383,21.71264410018921 +384,768,26,even,44355,44221,134,0.0030210799233457335,0.09872579574584961,18.745517015457153 +384,768,27,even,43883,43759,124,0.0028256955996627396,0.09927511215209961,19.48081946372986 +384,768,28,even,44277,44161,116,0.00261987036158728,0.10135293006896973,20.031928300857544 +384,768,30,even,43960,43830,130,0.002957233848953594,0.11932563781738281,17.737399101257324 +384,768,29,even,44155,44030,125,0.002830936473785528,0.11037158966064453,20.252411603927612 +384,768,33,even,44376,44247,129,0.0029069767441860465,0.10247063636779785,16.862528800964355 +384,768,32,even,43863,43759,104,0.002371018854159542,0.10169053077697754,21.58971071243286 +384,768,31,even,44303,44155,148,0.0033406315599395077,0.10088062286376953,23.251624822616577 +384,768,34,even,44312,44188,124,0.002798339050370103,0.1011345386505127,19.943662881851196 +384,768,35,even,44388,44245,143,0.003221591421104803,0.10274124145507812,19.205458641052246 +384,768,36,even,44983,44860,123,0.002734366316163884,0.10060644149780273,20.44693398475647 +384,768,38,even,44324,44190,134,0.003023192852630629,0.10307121276855469,20.272923707962036 +384,768,39,even,44334,44188,146,0.003293183561149456,0.10161781311035156,20.09837508201599 +384,768,37,even,44303,44159,144,0.003250344220481683,0.10141468048095703,23.83192753791809 +384,768,40,even,44502,44352,150,0.003370635027639207,0.10149264335632324,23.73584270477295 +384,768,42,even,44678,44537,141,0.003155915663189937,0.10267925262451172,24.35201120376587 +384,768,41,even,44650,44534,116,0.0025979843225083987,0.10480499267578125,26.292567014694214 +384,768,43,even,44441,44297,144,0.003240251119461758,0.10005354881286621,27.293004035949707 +384,768,44,even,44204,44069,135,0.0030540222604289206,0.10012960433959961,30.677671909332275 +384,768,45,even,44268,44113,155,0.0035014005602240898,0.16677308082580566,24.816383361816406 +384,768,47,even,44012,43858,154,0.0034990457148050534,0.20490026473999023,22.768019676208496 +384,768,46,even,44110,43944,166,0.00376331897528905,0.2331852912902832,25.36747694015503 +384,768,48,even,44178,44029,149,0.0033727194531214632,0.2061624526977539,30.095190286636353 +384,768,49,even,44424,44301,123,0.0027687736358725013,0.19287633895874023,25.370508432388306 +384,768,51,even,44086,43941,145,0.003289025994646827,0.19535160064697266,25.641582250595093 +384,768,50,even,44057,43935,122,0.0027691399777560887,0.25287461280822754,30.436605215072632 +384,768,52,even,44204,44069,135,0.0030540222604289206,0.17656326293945312,28.408287525177002 +384,768,53,even,44083,43948,135,0.0030624050087335254,0.18157529830932617,29.81861400604248 +384,768,55,even,44085,43953,132,0.002994215719632528,0.2469160556793213,27.80243229866028 +384,768,54,even,44156,44024,132,0.0029894012138780685,0.1847982406616211,31.900442838668823 +384,768,56,even,44234,44112,122,0.002758059411312565,0.20055556297302246,31.048574447631836 +384,768,57,even,44007,43847,160,0.0036357852159883655,0.20129704475402832,26.75472402572632 +384,768,58,even,44178,44043,135,0.0030558196387342118,0.1861259937286377,27.400672912597656 +384,768,59,even,43919,43795,124,0.002823379402991871,0.20096397399902344,27.646958589553833 +384,768,60,even,44200,44040,160,0.0036199095022624436,0.20856761932373047,25.68509006500244 +384,768,61,even,44264,44142,122,0.002756190131935659,0.19408464431762695,26.676389932632446 +384,768,63,even,44128,43987,141,0.0031952501812907903,0.19504213333129883,27.69844341278076 +384,768,62,even,44609,44492,117,0.0026227891232710886,0.19463586807250977,29.61451745033264 +384,768,64,even,44166,44023,143,0.003237784721278812,0.21010255813598633,27.811986207962036 +384,768,65,even,44314,44161,153,0.003452633479261633,0.2065436840057373,28.581298351287842 +384,768,67,even,44527,44399,128,0.0028746603184584634,0.20351624488830566,26.50662064552307 +384,768,66,even,44074,43954,120,0.002722693651585969,0.20510411262512207,30.829243421554565 +384,768,68,even,44083,43944,139,0.0031531429349182225,0.20272088050842285,31.59119939804077 +384,768,69,even,44117,44003,114,0.002584037899222522,0.235245943069458,29.440292596817017 +384,768,70,even,44182,44043,139,0.0031460775881580736,0.21869754791259766,28.036017179489136 +384,768,71,even,44494,44377,117,0.002629568031644716,0.24471449851989746,27.133978128433228 +384,768,73,even,44294,44185,109,0.002460829909242787,0.19678139686584473,29.21970820426941 +384,768,72,even,44113,43971,142,0.003219005735270782,0.2603328227996826,31.140339374542236 +384,768,75,even,44707,44578,129,0.0028854541794349877,0.27966880798339844,25.480807781219482 +384,768,74,even,44493,44330,163,0.0036634976288404918,0.27230024337768555,29.622486114501953 +384,768,76,even,44016,43884,132,0.0029989094874591058,0.19385814666748047,30.206977605819702 +384,768,78,even,44323,44197,126,0.002842767863186156,0.2555086612701416,26.013043880462646 +384,768,77,even,44027,43861,166,0.0037704136098303314,0.19010400772094727,30.299991846084595 +384,768,79,even,44351,44202,149,0.0033595634822213703,0.23624086380004883,26.451820135116577 +384,768,80,even,44192,44045,147,0.0033263939174511224,0.216965913772583,30.166735410690308 +384,768,83,even,44150,44008,142,0.003216308040770102,0.2794311046600342,27.218489408493042 +384,768,82,even,44687,44547,140,0.0031329021863181687,0.3135077953338623,27.404772996902466 +384,768,81,even,44356,44224,132,0.0029759220849490484,0.23686909675598145,29.502690076828003 +384,768,84,even,44102,43926,176,0.003990748718878962,0.21820354461669922,27.71340584754944 +384,768,86,even,44069,43933,136,0.003086069572715514,0.2226564884185791,26.372435092926025 +384,768,85,even,44250,44131,119,0.002689265536723164,0.193925142288208,36.18115162849426 +384,768,88,even,44514,44387,127,0.0028530350002246483,0.21745753288269043,27.207640409469604 +384,768,87,even,44252,44112,140,0.003163698815872729,0.1883392333984375,27.075669527053833 +384,768,89,even,44118,43970,148,0.00335463982954803,0.19263267517089844,30.84587001800537 +384,768,91,even,44300,44131,169,0.00381489841986456,0.19414544105529785,29.74528193473816 +384,768,93,even,44369,44237,132,0.0029750501476255944,0.21494221687316895,28.271493434906006 +384,768,90,even,44174,44028,146,0.0033051116041110155,0.30077433586120605,29.802738904953003 +384,768,92,even,44226,44095,131,0.002962058517614073,0.19951152801513672,30.56457781791687 +384,768,94,even,44031,43878,153,0.003474824555426858,0.29283714294433594,27.010952472686768 +384,768,97,even,44167,44011,156,0.003532048814725927,0.2018418312072754,26.38448190689087 +384,768,95,even,44289,44157,132,0.002980424033055612,0.19578814506530762,28.759655237197876 +384,768,96,even,44814,44677,137,0.0030570803766680056,0.2682018280029297,30.03657603263855 +384,768,99,even,44124,43992,132,0.002991569214033179,0.20206618309020996,25.43299889564514 +384,768,98,even,44222,44089,133,0.003007552801772873,0.2255394458770752,30.01130437850952 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_448.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_448.csv new file mode 100644 index 000000000..aee113369 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_448.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +448,896,0,even,60331,60185,146,0.0024199830932688004,0.28557848930358887,46.24008870124817 +448,896,2,even,60472,60296,176,0.0029104378886096044,0.26615381240844727,41.58626937866211 +448,896,1,even,60276,60128,148,0.002455371955670582,0.25181150436401367,50.043879985809326 +448,896,3,even,60085,59950,135,0.0022468170092369145,0.25064992904663086,42.21801424026489 +448,896,4,even,60398,60252,146,0.0024172985860458954,0.2663748264312744,45.7607057094574 +448,896,5,even,60123,59964,159,0.0026445786138416245,0.26631593704223633,41.415709018707275 +448,896,6,even,60621,60446,175,0.002886788406657759,0.28955507278442383,41.96250534057617 +448,896,7,even,60128,59972,156,0.002594465141032464,0.2678794860839844,45.79421806335449 +448,896,8,even,60289,60131,158,0.002620710245650119,0.274442195892334,45.674620389938354 +448,896,9,even,60877,60721,156,0.002562544146393548,0.2754991054534912,47.277628660202026 +448,896,11,even,60313,60151,162,0.0026859880954354784,0.27005958557128906,45.812877893447876 +448,896,10,even,59975,59808,167,0.0027844935389745727,0.26346588134765625,47.742236852645874 +448,896,12,even,59930,59788,142,0.0023694310028366428,0.2653188705444336,50.32005739212036 +448,896,13,even,60534,60337,197,0.0032543694452704264,0.2704026699066162,46.59091114997864 +448,896,14,even,60439,60263,176,0.0029120270024322044,0.2666194438934326,43.61987924575806 +448,896,15,even,60220,60063,157,0.002607107273331119,0.267561674118042,43.49715709686279 +448,896,18,even,60574,60428,146,0.0024102750354937762,0.2646803855895996,41.51128554344177 +448,896,16,even,60218,60072,146,0.002424524228635956,0.3035011291503906,46.37915539741516 +448,896,20,even,59669,59515,154,0.002580904657359768,0.2648632526397705,40.87191390991211 +448,896,19,even,60300,60148,152,0.002520729684908789,0.2691028118133545,44.994747161865234 +448,896,17,even,60235,60110,125,0.0020752054453390886,0.26707029342651367,50.850868701934814 +448,896,22,even,60603,60434,169,0.0027886408263617314,0.2665708065032959,40.20732879638672 +448,896,21,even,60513,60340,173,0.0028588898253267894,0.25163769721984863,45.91434693336487 +448,896,23,even,60395,60241,154,0.0025498799569500788,0.28579020500183105,46.63118124008179 +448,896,24,even,60014,59843,171,0.0028493351551304694,0.26639389991760254,49.995505809783936 +448,896,25,even,60566,60412,154,0.0025426807119505995,0.29125404357910156,45.824828147888184 +448,896,28,even,60592,60434,158,0.0026076049643517295,0.2641713619232178,42.246652603149414 +448,896,26,even,60278,60116,162,0.002687547695676698,0.2680661678314209,46.4005401134491 +448,896,27,even,60018,59857,161,0.002682528574760905,0.3898472785949707,45.31731581687927 +448,896,29,even,60083,59933,150,0.0024965464440856815,0.26961302757263184,42.131325006484985 +448,896,30,even,59932,59743,189,0.0031535740505906694,0.25528621673583984,42.485607385635376 +448,896,31,even,60528,60390,138,0.002279936558287074,0.2655332088470459,42.04866313934326 +448,896,32,even,60290,60154,136,0.002255763808260076,0.2721126079559326,47.159672021865845 +448,896,34,even,60618,60445,173,0.002853937774258471,0.2687859535217285,39.975653409957886 +448,896,35,even,60251,60103,148,0.0024563907652985014,0.2905550003051758,41.68750715255737 +448,896,37,even,59823,59658,165,0.0027581365026829144,0.27344679832458496,41.385178089141846 +448,896,36,even,60682,60533,149,0.0024554233545367654,0.29569554328918457,46.77360939979553 +448,896,33,even,60512,60350,162,0.0026771549444738235,0.30730581283569336,51.26889896392822 +448,896,40,even,60301,60129,172,0.002852357340674284,0.2662999629974365,42.629157304763794 +448,896,38,even,60475,60318,157,0.0025961140967341876,0.31496500968933105,51.77674198150635 +448,896,39,even,60279,60127,152,0.002521607856799217,0.3601350784301758,46.74969530105591 +448,896,41,even,60367,60219,148,0.0024516706147398415,0.2967336177825928,42.925050258636475 +448,896,44,even,60223,60047,176,0.002922471480995633,0.3013167381286621,40.03989219665527 +448,896,43,even,60505,60339,166,0.0027435749111643665,0.2654714584350586,44.00393724441528 +448,896,42,even,60166,59993,173,0.0028753781205331915,0.27424097061157227,50.73400950431824 +448,896,45,even,60213,60077,136,0.0022586484646172755,0.30219292640686035,46.36733150482178 +448,896,47,even,60139,59986,153,0.0025441061540763896,0.3246753215789795,46.47801661491394 +448,896,46,even,60111,59957,154,0.002561927101528838,0.29711389541625977,55.99434185028076 +448,896,48,even,60090,59932,158,0.0026293892494591445,0.2660520076751709,49.15348982810974 +448,896,49,even,60057,59909,148,0.002464325557387149,0.2801382541656494,52.63739800453186 +448,896,50,even,60063,59907,156,0.002597272863493332,0.2941601276397705,45.81230330467224 +448,896,52,even,60444,60283,161,0.002663622526636225,0.2632770538330078,41.247220516204834 +448,896,51,even,60057,59896,161,0.0026807865860765607,0.2691516876220703,42.49224519729614 +448,896,53,even,60104,59944,160,0.002662052442433116,0.26798272132873535,41.484047651290894 +448,896,54,even,59909,59762,147,0.002453721477574321,0.26940417289733887,40.43972373008728 +448,896,55,even,60184,60058,126,0.0020935796889538748,0.26802802085876465,43.22485423088074 +448,896,57,even,59926,59777,149,0.0024863998932016153,0.28910040855407715,43.462719202041626 +448,896,58,even,60151,59981,170,0.0028262206779604664,0.23114418983459473,44.86052870750427 +448,896,59,even,60088,59966,122,0.002030355478631341,0.1938626766204834,43.04508972167969 +448,896,56,even,60534,60371,163,0.00269270162222883,0.2638835906982422,51.18067812919617 +448,896,60,even,59984,59795,189,0.0031508402240597493,0.2869377136230469,42.221298694610596 +448,896,61,even,60431,60278,153,0.002531813142261422,0.26644039154052734,42.99336361885071 +448,896,62,even,60724,60554,170,0.002799552071668533,0.23539352416992188,42.26978826522827 +448,896,63,even,60367,60182,185,0.0030645882684248015,0.26836347579956055,43.68459868431091 +448,896,65,even,60420,60255,165,0.002730883813306852,0.2663860321044922,42.526349782943726 +448,896,64,even,60488,60342,146,0.0024137018912842216,0.27035951614379883,49.813445806503296 +448,896,68,even,60172,60024,148,0.0024596157681313568,0.27077746391296387,45.65946936607361 +448,896,67,even,60728,60539,189,0.003112238176788302,0.27123355865478516,45.897390365600586 +448,896,66,even,60313,60161,152,0.0025201863611493376,0.26345014572143555,51.281818151474 +448,896,70,even,60378,60209,169,0.002799032760276922,0.2695577144622803,42.342660665512085 +448,896,69,even,60152,59996,156,0.0025934299773906102,0.28884434700012207,45.91848587989807 +448,896,71,even,60789,60614,175,0.0028788103110760173,0.28020143508911133,45.898518562316895 +448,896,72,even,60330,60175,155,0.002569202718382231,0.2899901866912842,51.821730852127075 +448,896,73,even,60478,60300,178,0.0029432190217930487,0.2673323154449463,39.85402727127075 +448,896,74,even,60299,60136,163,0.002703195741222906,0.263289213180542,42.01216530799866 +448,896,75,even,60728,60557,171,0.0028158345409037017,0.27826738357543945,45.740999698638916 +448,896,76,even,60056,59913,143,0.0023811109631011055,0.25668978691101074,50.385831117630005 +448,896,77,even,60121,59956,165,0.002744465328254686,0.2589266300201416,50.433494329452515 +448,896,79,even,60264,60091,173,0.0028707022434621,0.2690746784210205,40.827335596084595 +448,896,80,even,60264,60089,175,0.0029038895526350725,0.26840996742248535,40.83694529533386 +448,896,78,even,60388,60226,162,0.002682652182552825,0.26605916023254395,50.33012056350708 +448,896,81,even,60287,60130,157,0.0026042098628228307,0.2667992115020752,41.75554871559143 +448,896,82,even,60446,60304,142,0.0023492042484200776,0.2673521041870117,44.03895115852356 +448,896,83,even,60131,59960,171,0.0028437910561939766,0.29018115997314453,46.94401264190674 +448,896,84,even,60183,60007,176,0.002924413871026702,0.26601147651672363,50.94476771354675 +448,896,85,even,60329,60179,150,0.002486366424107809,0.27710485458374023,47.14770269393921 +448,896,86,even,60354,60184,170,0.0028167147165059484,0.30083632469177246,42.13414168357849 +448,896,87,even,60458,60302,156,0.002580303681894869,0.2508678436279297,43.68947243690491 +448,896,89,even,60333,60195,138,0.002287305454726269,0.26642560958862305,42.128933906555176 +448,896,88,even,60564,60420,144,0.0023776500891618782,0.27833032608032227,46.055691719055176 +448,896,90,even,60012,59829,183,0.003049390121975605,0.2509148120880127,46.94697880744934 +448,896,91,even,60213,60066,147,0.002441333266902496,0.22398662567138672,43.98695158958435 +448,896,92,even,59991,59833,158,0.0026337283925922223,0.27864933013916016,41.545307874679565 +448,896,93,even,60278,60084,194,0.003218421314575799,0.26461005210876465,46.20287609100342 +448,896,94,even,60081,59928,153,0.002546562141109502,0.265408992767334,44.209113359451294 +448,896,96,even,60653,60493,160,0.0026379569023791075,0.26605892181396484,46.07539892196655 +448,896,95,even,60415,60264,151,0.002499379293221882,0.33087778091430664,51.29615640640259 +448,896,97,even,60056,59873,183,0.0030471559877447716,0.28008222579956055,46.15189814567566 +448,896,99,even,60238,60070,168,0.002788937215711013,0.2746913433074951,41.938215017318726 +448,896,98,even,60616,60468,148,0.0024415995776692623,0.26338672637939453,56.50556445121765 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_512.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_512.csv new file mode 100644 index 000000000..149d5d183 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_512.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +512,1024,0,even,78853,78672,181,0.0022954104472879917,0.30708742141723633,81.09349060058594 +512,1024,1,even,78923,78747,176,0.0022300216666877844,0.29135608673095703,86.7285225391388 +512,1024,2,even,78994,78795,199,0.002519178671797858,0.2922172546386719,86.18655490875244 +512,1024,3,even,78559,78401,158,0.0020112272304891863,0.3022270202636719,93.29463696479797 +512,1024,4,even,78653,78498,155,0.0019706813471831973,0.2910187244415283,85.66894698143005 +512,1024,5,even,78564,78394,170,0.0021638409449620693,0.29335689544677734,86.15731072425842 +512,1024,6,even,79076,78860,216,0.0027315493955182356,0.2927820682525635,81.5620858669281 +512,1024,7,even,78689,78515,174,0.002211236640445297,0.31101369857788086,87.1949405670166 +512,1024,8,even,78965,78756,209,0.0026467422275691763,0.3099813461303711,78.97045588493347 +512,1024,9,even,78634,78446,188,0.0023908233079838236,0.31073617935180664,88.85936403274536 +512,1024,10,even,78744,78536,208,0.002641471096210505,0.3318657875061035,85.76210522651672 +512,1024,11,even,78335,78158,177,0.002259526393055467,0.28945183753967285,86.6188530921936 +512,1024,12,even,78232,78054,178,0.0022752837713467633,0.30446815490722656,86.9066514968872 +512,1024,13,even,78644,78457,187,0.0023778037739687705,0.30197882652282715,88.37863898277283 +512,1024,14,even,78688,78510,178,0.0022620984139894267,0.2968428134918213,86.87962603569031 +512,1024,15,even,78678,78512,166,0.002109865527847683,0.32056260108947754,81.24312281608582 +512,1024,16,even,78725,78537,188,0.0023880597014925373,0.30702662467956543,86.25402212142944 +512,1024,18,even,78931,78761,170,0.002153779883695886,0.29370927810668945,83.14308190345764 +512,1024,17,even,78856,78694,162,0.0020543775996753576,0.30253100395202637,95.28130865097046 +512,1024,19,even,78738,78551,187,0.002374965074043029,0.30411314964294434,86.75967741012573 +512,1024,20,even,78385,78207,178,0.0022708426357083626,0.297321081161499,81.46586036682129 +512,1024,21,even,78667,78479,188,0.002389820382117025,0.305957555770874,84.30661201477051 +512,1024,22,even,78563,78393,170,0.0021638684877105,0.3206191062927246,86.6017439365387 +512,1024,23,even,78503,78344,159,0.0020254003031731273,0.30066490173339844,86.54163789749146 +512,1024,24,even,78519,78336,183,0.0023306460856607953,0.29851579666137695,86.86175799369812 +512,1024,25,even,79029,78835,194,0.0024547950752255502,0.2992279529571533,81.93379211425781 +512,1024,26,even,78464,78312,152,0.001937194127243067,0.2966017723083496,92.05478119850159 +512,1024,27,even,78274,78095,179,0.0022868385415335873,0.28840088844299316,82.82852745056152 +512,1024,28,even,79040,78867,173,0.002188765182186235,0.3023262023925781,87.25792455673218 +512,1024,29,even,78829,78652,177,0.002245366552918342,0.3226280212402344,84.88068628311157 +512,1024,30,even,78714,78552,162,0.002058083695403613,0.3090672492980957,85.73517298698425 +512,1024,32,even,78415,78254,161,0.0020531786010329657,0.2946014404296875,85.97565031051636 +512,1024,31,even,79104,78913,191,0.0024145428802588996,0.3115811347961426,93.12050318717957 +512,1024,34,even,79171,79002,169,0.0021346199997473825,0.31490278244018555,82.08245086669922 +512,1024,33,even,79123,78933,190,0.0024013245200510598,0.33785033226013184,92.78305840492249 +512,1024,35,even,78412,78203,209,0.0026654083558638984,0.29880452156066895,79.08612847328186 +512,1024,36,even,79109,78913,196,0.0024775942054633482,0.32492709159851074,83.30835890769958 +512,1024,37,even,78425,78239,186,0.0023716927000318774,0.2903776168823242,89.89177346229553 +512,1024,38,even,78924,78741,183,0.0023186863311540217,0.29840636253356934,84.10462927818298 +512,1024,39,even,78804,78630,174,0.002208009745698188,0.3094635009765625,81.27169966697693 +512,1024,40,even,78612,78438,174,0.00221340253396428,0.29654407501220703,86.49488043785095 +512,1024,41,even,78944,78741,203,0.0025714430482367246,0.29427242279052734,82.1436038017273 +512,1024,42,even,78565,78349,216,0.002749315853115255,0.30203962326049805,90.24598574638367 +512,1024,43,even,78974,78810,164,0.0020766328158634485,0.3017904758453369,87.0226457118988 +512,1024,44,even,78971,78807,164,0.002076711704296514,0.313948392868042,81.41566395759583 +512,1024,45,even,78568,78380,188,0.0023928316872008962,0.29631614685058594,92.05931568145752 +512,1024,46,even,78603,78415,188,0.002391766217574393,0.3132495880126953,79.34579086303711 +512,1024,49,even,78753,78570,183,0.00232372100110472,0.32398366928100586,81.93088245391846 +512,1024,47,even,78536,78366,170,0.0021646124070489967,0.31589794158935547,86.48255181312561 +512,1024,48,even,78574,78426,148,0.0018835747193728205,0.33070993423461914,89.2946515083313 +512,1024,50,even,78731,78585,146,0.0018544156685422514,0.31301450729370117,87.414386510849 +512,1024,51,even,78692,78492,200,0.0025415544146800183,0.3096468448638916,85.71439290046692 +512,1024,52,even,78593,78436,157,0.0019976333770183093,0.35329627990722656,86.42568492889404 +512,1024,53,even,78698,78505,193,0.0024524130219319424,0.2990531921386719,86.68070912361145 +512,1024,54,even,78684,78502,182,0.0023130496670225203,0.29796338081359863,86.33496117591858 +512,1024,55,even,78598,78436,162,0.0020611211481208172,0.30792665481567383,85.9445219039917 +512,1024,56,even,79067,78871,196,0.002478910291271959,0.29195237159729004,80.88776206970215 +512,1024,59,even,78505,78335,170,0.002165467167696325,0.30168819427490234,80.7627420425415 +512,1024,58,even,78552,78359,193,0.002456971178327732,0.29801273345947266,86.82593107223511 +512,1024,57,even,78613,78411,202,0.002569549565593477,0.30507707595825195,88.62204837799072 +512,1024,60,even,78550,78371,179,0.0022788033099936347,0.3119640350341797,85.94486570358276 +512,1024,61,even,79053,78871,182,0.002302252918927808,0.3172597885131836,94.21437335014343 +512,1024,64,even,78751,78570,181,0.0022983835125903163,0.3027627468109131,81.7500102519989 +512,1024,62,even,79002,78802,200,0.0025315814789499,0.32589054107666016,86.74396848678589 +512,1024,63,even,78659,78515,144,0.001830686888976468,0.30963587760925293,86.58724117279053 +512,1024,65,even,78776,78575,201,0.0025515385396567484,0.3141317367553711,91.22865629196167 +512,1024,66,even,78463,78270,193,0.002459758102545149,0.2854604721069336,86.55896806716919 +512,1024,67,even,78953,78775,178,0.0022545058452497057,0.31438612937927246,82.70379638671875 +512,1024,69,even,78715,78512,203,0.002578923966207203,0.30504488945007324,81.05349588394165 +512,1024,68,even,78509,78334,175,0.002229043803895095,0.33644986152648926,92.92602133750916 +512,1024,70,even,78482,78302,180,0.0022935195331413574,0.3016684055328369,85.36268424987793 +512,1024,71,even,79306,79136,170,0.0021435956926335966,0.30625462532043457,87.82043290138245 +512,1024,73,even,78490,78288,202,0.0025735762517518153,0.30868983268737793,86.49578309059143 +512,1024,72,even,78352,78170,182,0.0023228507249336327,0.29501938819885254,99.08650135993958 +512,1024,74,even,78815,78659,156,0.001979318657615936,0.3212153911590576,86.3957724571228 +512,1024,75,even,79123,78946,177,0.0022370233686791452,0.31491661071777344,85.71239852905273 +512,1024,76,even,79019,78848,171,0.002164036497551222,0.28756093978881836,84.64965581893921 +512,1024,79,even,78578,78418,160,0.0020361933365573063,0.31414270401000977,80.30468702316284 +512,1024,77,even,78960,78757,203,0.0025709219858156026,0.2945880889892578,93.27611589431763 +512,1024,78,even,78851,78671,180,0.002282786521413806,0.3221409320831299,86.93760776519775 +512,1024,80,even,79014,78846,168,0.0021262054825727087,0.3068218231201172,80.95283961296082 +512,1024,81,even,78466,78288,178,0.0022684984579308233,0.2968907356262207,86.48293709754944 +512,1024,83,even,78217,78015,202,0.002582558778782106,0.2969338893890381,82.27213335037231 +512,1024,84,even,78437,78252,185,0.0023585807718296214,0.31154465675354004,80.45373725891113 +512,1024,82,even,79342,79167,175,0.002205641400519271,0.3089783191680908,93.8441755771637 +512,1024,85,even,78927,78771,156,0.0019765099395644076,0.30968809127807617,84.50499701499939 +512,1024,86,even,78769,78560,209,0.0026533280859221266,0.30785703659057617,81.48602843284607 +512,1024,87,even,79123,78961,162,0.0020474451170961667,0.3191816806793213,82.65202641487122 +512,1024,88,even,78969,78786,183,0.002317365041978498,0.2989072799682617,86.83330655097961 +512,1024,89,even,78710,78543,167,0.002121712615931902,0.3124735355377197,80.81605100631714 +512,1024,90,even,78338,78178,160,0.0020424315147182723,0.31436610221862793,86.71695804595947 +512,1024,91,even,78947,78772,175,0.0022166770111593853,0.2962040901184082,90.90313458442688 +512,1024,92,even,78608,78449,159,0.002022694891105231,0.3068859577178955,85.50406384468079 +512,1024,94,even,78268,78061,207,0.0026447590330658764,0.30473780632019043,78.07396054267883 +512,1024,93,even,78764,78561,203,0.002577319587628866,0.3262486457824707,93.89652824401855 +512,1024,95,even,78573,78380,193,0.0024563145100734347,0.32309794425964355,86.40608644485474 +512,1024,96,even,79070,78878,192,0.0024282281522701402,0.3075597286224365,81.97762274742126 +512,1024,97,even,78692,78498,194,0.0024653077822396176,0.38045215606689453,82.76599621772766 +512,1024,98,even,79189,78970,219,0.0027655356173205874,0.30039501190185547,82.33488512039185 +512,1024,99,even,78401,78191,210,0.0026785372635553116,0.3182103633880615,84.37508702278137 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_576.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_576.csv new file mode 100644 index 000000000..84f31bfc5 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_576.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +576,1152,2,even,99701,99520,181,0.001815428130109026,0.4414703845977783,87.19512391090393 +576,1152,6,even,99521,99306,215,0.00216034806724209,0.44506025314331055,85.7950792312622 +576,1152,8,even,99356,99132,224,0.0022545191030234712,0.44325995445251465,87.57530474662781 +576,1152,1,even,99705,99511,194,0.0019457399328017652,0.49985384941101074,93.49721312522888 +576,1152,4,even,99423,99253,170,0.0017098659263953008,0.44267988204956055,92.50583004951477 +576,1152,5,even,99256,99075,181,0.0018235673410171677,0.5996372699737549,94.19186210632324 +576,1152,7,even,99891,99683,208,0.0020822696739445997,0.435133695602417,94.24455642700195 +576,1152,0,even,99806,99624,182,0.0018235376630663486,0.44056200981140137,96.83792185783386 +576,1152,3,even,99536,99335,201,0.002019369876225687,0.46468234062194824,101.69062876701355 +576,1152,15,even,99928,99697,231,0.002311664398366824,0.44892120361328125,80.48989534378052 +576,1152,10,even,99720,99505,215,0.002156036903329322,0.4365355968475342,86.98731327056885 +576,1152,9,even,99667,99468,199,0.001996648840639329,0.4962289333343506,87.36215281486511 +576,1152,13,even,99621,99414,207,0.0020778751468063963,0.4686882495880127,85.83660411834717 +576,1152,12,even,98966,98790,176,0.0017783885374775175,0.4595508575439453,87.68114280700684 +576,1152,16,even,99932,99703,229,0.002291558259616539,0.4443812370300293,83.84998393058777 +576,1152,14,even,99440,99229,211,0.0021218825422365246,0.4468710422515869,101.55595564842224 +576,1152,17,even,99963,99769,194,0.0019407180656843032,0.4426441192626953,92.5447564125061 +576,1152,11,even,99309,99113,196,0.001973637837456827,0.4832158088684082,108.51538252830505 +576,1152,18,even,99665,99466,199,0.0019966889078412682,0.6330127716064453,79.02064037322998 +576,1152,19,even,99791,99597,194,0.0019440630918619915,0.6024022102355957,83.99667620658875 +576,1152,20,even,99416,99204,212,0.002132453528607065,0.5497419834136963,86.8387279510498 +576,1152,22,even,99894,99706,188,0.0018819949146094861,0.44379591941833496,87.10364103317261 +576,1152,23,even,99816,99597,219,0.0021940370281317624,0.4761083126068115,86.51360845565796 +576,1152,21,even,99323,99117,206,0.0020740412593256347,0.44122314453125,89.57120490074158 +576,1152,24,even,99295,99095,200,0.002014200110781006,0.4612550735473633,78.26770448684692 +576,1152,25,even,99936,99748,188,0.0018812039705411463,0.44172120094299316,85.75554251670837 +576,1152,26,even,99731,99513,218,0.002185880017246393,0.4396662712097168,94.84335732460022 +576,1152,27,even,99265,99062,203,0.002045030977685992,0.4857356548309326,81.77573251724243 +576,1152,29,even,99217,99013,204,0.0020560992571837487,0.43967199325561523,78.6007661819458 +576,1152,28,even,99397,99194,203,0.0020423151604173164,0.49051642417907715,85.11104965209961 +576,1152,31,even,99831,99641,190,0.0019032164357764621,0.4398012161254883,79.75599765777588 +576,1152,33,even,99802,99566,236,0.002364682070499589,0.47037363052368164,84.47884321212769 +576,1152,34,even,99836,99656,180,0.0018029568492327417,0.44312310218811035,78.21059465408325 +576,1152,32,even,99589,99376,213,0.0021387904286618,0.4391608238220215,94.15654182434082 +576,1152,30,even,99209,99039,170,0.0017135542138314065,0.44542622566223145,102.70735955238342 +576,1152,35,even,99481,99263,218,0.002191373227048381,0.4408454895019531,85.61398935317993 +576,1152,37,even,99421,99217,204,0.0020518803874432965,0.436509370803833,78.88126730918884 +576,1152,36,even,100123,99886,237,0.0023670884811681633,0.4403066635131836,80.04650521278381 +576,1152,38,even,99862,99681,181,0.0018125012517273837,0.43765711784362793,79.53849291801453 +576,1152,41,even,100077,99888,189,0.0018885458197188164,0.4443337917327881,88.32334423065186 +576,1152,40,even,99738,99551,187,0.0018749122701477872,0.543501615524292,92.99030113220215 +576,1152,39,even,100139,99977,162,0.0016177513256573363,0.4496345520019531,109.10911297798157 +576,1152,42,even,99635,99438,197,0.0019772168414713704,0.47319841384887695,94.31363654136658 +576,1152,43,even,99798,99619,179,0.0017936231186997736,0.3718299865722656,93.94826769828796 +576,1152,44,even,99620,99427,193,0.0019373619755069264,0.4188258647918701,82.85571146011353 +576,1152,46,even,99644,99449,195,0.0019569668018144595,0.4701659679412842,80.2984983921051 +576,1152,47,even,98985,98771,214,0.0021619437288478054,0.4044167995452881,90.06755089759827 +576,1152,45,even,100148,99957,191,0.0019071773774813276,0.498809814453125,93.337229013443 +576,1152,48,even,99552,99348,204,0.0020491803278688526,0.44349241256713867,79.31754779815674 +576,1152,49,even,99960,99735,225,0.0022509003601440575,0.4437217712402344,78.8968505859375 +576,1152,50,even,99332,99125,207,0.0020839205895381145,0.45346689224243164,76.38899970054626 +576,1152,51,even,99758,99544,214,0.002145191363098699,0.43813419342041016,85.35307908058167 +576,1152,52,even,99564,99348,216,0.0021694588405447753,0.4435451030731201,87.37913942337036 +576,1152,53,even,99419,99240,179,0.001800460676530643,0.411405086517334,94.91368246078491 +576,1152,54,even,99680,99525,155,0.001554975922953451,0.4396839141845703,86.6589286327362 +576,1152,55,even,99572,99371,201,0.002018639778250914,0.48214292526245117,79.04873275756836 +576,1152,56,even,99727,99515,212,0.0021258034434004833,0.44319581985473633,84.77896761894226 +576,1152,58,even,99401,99176,225,0.0022635587167131118,0.51385498046875,78.63833117485046 +576,1152,57,even,99609,99394,215,0.002158439498438896,0.4660933017730713,86.68384552001953 +576,1152,59,even,99626,99427,199,0.001997470539818923,0.44265103340148926,95.67098355293274 +576,1152,60,even,99503,99270,233,0.002341637940564606,0.44595956802368164,87.5669252872467 +576,1152,62,even,99941,99734,207,0.0020712220209923855,0.4173574447631836,86.43687272071838 +576,1152,61,even,99638,99427,211,0.002117665950741685,0.4228029251098633,93.75320506095886 +576,1152,64,even,99639,99411,228,0.002288260620841237,0.44938063621520996,78.94202375411987 +576,1152,63,even,99120,98909,211,0.0021287328490718323,0.43621182441711426,80.80139636993408 +576,1152,65,even,99296,99101,195,0.0019638253303254916,0.4438307285308838,82.37422299385071 +576,1152,66,even,99483,99272,211,0.0021209653910718414,0.4404284954071045,79.05326890945435 +576,1152,67,even,100106,99874,232,0.002317543403991769,0.47017979621887207,84.66107368469238 +576,1152,69,even,99572,99353,219,0.0021994134897360706,0.4452533721923828,78.54718828201294 +576,1152,68,even,99820,99652,168,0.0016830294530154279,0.44352126121520996,85.99777889251709 +576,1152,71,even,100423,100220,203,0.002021449269589636,0.44079065322875977,77.97346258163452 +576,1152,70,even,99481,99288,193,0.0019400689578914566,0.4403555393218994,102.66443538665771 +576,1152,72,even,99067,98841,226,0.0022812843832961532,0.44246935844421387,93.43437576293945 +576,1152,75,even,99950,99745,205,0.0020510255127563783,0.390688419342041,79.76899909973145 +576,1152,73,even,99495,99290,205,0.0020604050454796725,0.44338274002075195,94.53540635108948 +576,1152,74,even,100141,99928,213,0.0021270009286905463,0.4515683650970459,88.81808161735535 +576,1152,77,even,99776,99556,220,0.002204939063502245,0.4441213607788086,79.57397699356079 +576,1152,76,even,100050,99851,199,0.0019890054972513745,0.40050554275512695,94.08189177513123 +576,1152,78,even,99674,99460,214,0.0021469992174488832,0.44644856452941895,81.15671515464783 +576,1152,79,even,99278,99067,211,0.0021253449908338203,0.45491909980773926,79.17695045471191 +576,1152,80,even,99902,99704,198,0.001981942303457388,0.43363380432128906,89.4559805393219 +576,1152,82,even,99910,99688,222,0.0022219997998198376,0.4768080711364746,88.04736542701721 +576,1152,83,even,99215,99015,200,0.0020158242201280046,0.5361437797546387,94.2561821937561 +576,1152,81,even,99839,99643,196,0.001963160688708821,0.44715094566345215,96.68729853630066 +576,1152,84,even,99123,98890,233,0.0023506148926081736,0.4621877670288086,96.11140275001526 +576,1152,86,even,99258,99039,219,0.002206371274859457,0.4561448097229004,78.48891544342041 +576,1152,85,even,99739,99562,177,0.0017746317889692097,0.4660515785217285,85.73067784309387 +576,1152,87,even,99855,99666,189,0.0018927444794952682,0.4059908390045166,94.37156319618225 +576,1152,88,even,99881,99687,194,0.0019423113505071035,0.4433014392852783,94.82755899429321 +576,1152,89,even,99627,99455,172,0.001726439619781786,0.42291808128356934,81.13394165039062 +576,1152,91,even,99944,99732,212,0.0021211878652045144,0.505141019821167,77.83458709716797 +576,1152,90,even,99581,99388,193,0.0019381207258412749,0.404632568359375,85.6914963722229 +576,1152,93,even,99504,99298,206,0.002070268531918315,0.4545624256134033,80.39128923416138 +576,1152,94,even,99099,98891,208,0.0020989111898202808,0.4480102062225342,80.09402751922607 +576,1152,92,even,99291,99091,200,0.002014281254091509,0.5479443073272705,93.10614585876465 +576,1152,95,even,99518,99318,200,0.002009686689845053,0.44377660751342773,84.55338144302368 +576,1152,97,even,99270,99063,207,0.002085222121486854,0.44052886962890625,79.47326278686523 +576,1152,96,even,100608,100394,214,0.0021270674300254452,0.46033501625061035,93.82765436172485 +576,1152,98,even,99347,99118,229,0.002305051989491379,0.4746685028076172,77.33456587791443 +576,1152,99,even,99650,99436,214,0.002147516307074762,0.45241451263427734,84.96546459197998 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_64.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_64.csv new file mode 100644 index 000000000..0246b8216 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_64.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +64,128,4,even,1286,1264,22,0.017107309486780714,0.004285573959350586,0.2195284366607666 +64,128,1,even,1254,1235,19,0.015151515151515152,0.007921695709228516,0.19858551025390625 +64,128,3,even,1296,1275,21,0.016203703703703703,0.008450031280517578,0.20427227020263672 +64,128,0,even,1260,1227,33,0.02619047619047619,0.008586645126342773,0.20006155967712402 +64,128,2,even,1222,1204,18,0.014729950900163666,0.004280567169189453,0.2596619129180908 +64,128,5,even,1291,1258,33,0.025561580170410533,0.007285594940185547,0.2039182186126709 +64,128,6,even,1259,1232,27,0.021445591739475776,0.007346391677856445,0.18892288208007812 +64,128,8,even,1205,1167,38,0.03153526970954357,0.007337093353271484,0.21410584449768066 +64,128,9,even,1202,1178,24,0.019966722129783693,0.008018016815185547,0.20485162734985352 +64,128,7,even,1298,1274,24,0.01848998459167951,0.00469970703125,0.21927285194396973 +64,128,11,even,1281,1259,22,0.01717408274785324,0.00472712516784668,0.2558925151824951 +64,128,13,even,1228,1209,19,0.015472312703583062,0.007513761520385742,0.2381455898284912 +64,128,10,even,1203,1175,28,0.023275145469659187,0.023404836654663086,0.2450270652770996 +64,128,12,even,1236,1213,23,0.0186084142394822,0.008365154266357422,0.38123035430908203 +64,128,14,even,1194,1168,26,0.021775544388609715,0.007944107055664062,0.4728846549987793 +64,128,16,even,1261,1221,40,0.0317208564631245,0.007236003875732422,0.269195556640625 +64,128,15,even,1226,1199,27,0.02202283849918434,0.006959676742553711,0.25455427169799805 +64,128,17,even,1246,1227,19,0.015248796147672551,0.0046198368072509766,0.24801182746887207 +64,128,18,even,1248,1220,28,0.022435897435897436,0.004570722579956055,0.21655941009521484 +64,128,19,even,1217,1190,27,0.02218570254724733,0.00448155403137207,0.21644949913024902 +64,128,20,even,1287,1261,26,0.020202020202020204,0.007310152053833008,0.3245244026184082 +64,128,21,even,1224,1200,24,0.0196078431372549,0.007901191711425781,0.2627413272857666 +64,128,22,even,1245,1219,26,0.020883534136546186,0.004730701446533203,0.32392239570617676 +64,128,24,even,1240,1222,18,0.014516129032258065,0.0045816898345947266,0.20705914497375488 +64,128,23,even,1178,1154,24,0.02037351443123939,0.008108139038085938,0.22411227226257324 +64,128,25,even,1277,1260,17,0.01331245105716523,0.004456520080566406,0.27444958686828613 +64,128,26,even,1207,1182,25,0.020712510356255178,0.0073320865631103516,0.32901644706726074 +64,128,27,even,1286,1254,32,0.024883359253499222,0.004442691802978516,0.22503948211669922 +64,128,28,even,1256,1238,18,0.014331210191082803,0.004743099212646484,0.24612855911254883 +64,128,29,even,1214,1184,30,0.02471169686985173,0.007920980453491211,0.32226061820983887 +64,128,31,even,1201,1179,22,0.018318068276436304,0.007258415222167969,0.2947678565979004 +64,128,30,even,1198,1169,29,0.024207011686143573,0.004592418670654297,0.22347784042358398 +64,128,32,even,1232,1207,25,0.020292207792207792,0.007508516311645508,0.19940662384033203 +64,128,33,even,1278,1251,27,0.02112676056338028,0.00500178337097168,0.24211621284484863 +64,128,34,even,1251,1234,17,0.013589128697042365,0.0046617984771728516,0.3428921699523926 +64,128,36,even,1272,1240,32,0.025157232704402517,0.007525920867919922,0.22102689743041992 +64,128,35,even,1253,1222,31,0.024740622505985636,0.007548093795776367,0.20170021057128906 +64,128,38,even,1259,1241,18,0.014297061159650517,0.005155801773071289,0.19246888160705566 +64,128,37,even,1260,1237,23,0.018253968253968255,0.02347707748413086,0.2761833667755127 +64,128,39,even,1232,1210,22,0.017857142857142856,0.004918336868286133,0.34865760803222656 +64,128,41,even,1261,1240,21,0.016653449643140365,0.007367372512817383,0.22209596633911133 +64,128,40,even,1270,1240,30,0.023622047244094488,0.007572650909423828,0.24712896347045898 +64,128,42,even,1290,1268,22,0.017054263565891473,0.0047130584716796875,0.22239375114440918 +64,128,43,even,1207,1184,23,0.019055509527754765,0.004549264907836914,0.20597624778747559 +64,128,44,even,1250,1232,18,0.0144,0.007556438446044922,0.2813150882720947 +64,128,45,even,1237,1214,23,0.018593371059013743,0.019466638565063477,0.24029302597045898 +64,128,48,even,1240,1217,23,0.018548387096774192,0.008348703384399414,0.19772672653198242 +64,128,47,even,1160,1134,26,0.022413793103448276,0.008419036865234375,0.20029544830322266 +64,128,46,even,1273,1250,23,0.018067556952081697,0.0048809051513671875,0.18547391891479492 +64,128,49,even,1231,1208,23,0.01868399675060926,0.005013227462768555,0.30017995834350586 +64,128,52,even,1255,1228,27,0.02151394422310757,0.004933357238769531,0.19947481155395508 +64,128,51,even,1239,1220,19,0.01533494753833737,0.004630565643310547,0.19425559043884277 +64,128,50,even,1270,1244,26,0.02047244094488189,0.004730939865112305,0.21518611907958984 +64,128,53,even,1277,1244,33,0.025841816758026624,0.004632711410522461,0.2190697193145752 +64,128,54,even,1243,1220,23,0.01850362027353178,0.004969120025634766,0.2821974754333496 +64,128,57,even,1262,1222,40,0.03169572107765452,0.004796028137207031,0.194594144821167 +64,128,58,even,1273,1257,16,0.012568735271013355,0.007689476013183594,0.20081138610839844 +64,128,55,even,1228,1198,30,0.024429967426710098,0.0077762603759765625,0.19756150245666504 +64,128,56,even,1191,1171,20,0.016792611251049538,0.008056402206420898,0.29677438735961914 +64,128,59,even,1208,1182,26,0.02152317880794702,0.004908084869384766,0.3978922367095947 +64,128,60,even,1261,1232,29,0.022997620935765267,0.026337862014770508,0.23824787139892578 +64,128,61,even,1193,1171,22,0.018440905280804692,0.023988723754882812,0.25901365280151367 +64,128,62,even,1263,1237,26,0.02058590657165479,0.004410505294799805,0.23140764236450195 +64,128,63,even,1220,1199,21,0.01721311475409836,0.004484891891479492,0.2424793243408203 +64,128,64,even,1256,1231,25,0.019904458598726114,0.004805326461791992,0.22836589813232422 +64,128,67,even,1228,1206,22,0.017915309446254073,0.007750749588012695,0.2529144287109375 +64,128,65,even,1228,1205,23,0.018729641693811076,0.007916927337646484,0.27809977531433105 +64,128,66,even,1188,1166,22,0.018518518518518517,0.011220455169677734,0.23627066612243652 +64,128,68,even,1266,1243,23,0.018167456556082148,0.0048329830169677734,0.23731374740600586 +64,128,69,even,1245,1228,17,0.013654618473895583,0.005224466323852539,0.2836000919342041 +64,128,72,even,1224,1195,29,0.02369281045751634,0.004506111145019531,0.22829937934875488 +64,128,71,even,1252,1231,21,0.016773162939297124,0.004438638687133789,0.23737239837646484 +64,128,70,even,1229,1205,24,0.01952807160292921,0.008497476577758789,0.23168635368347168 +64,128,73,even,1267,1235,32,0.025256511444356748,0.005087137222290039,0.22846722602844238 +64,128,74,even,1209,1188,21,0.017369727047146403,0.004929065704345703,0.28978943824768066 +64,128,77,even,1253,1234,19,0.015163607342378291,0.005347251892089844,0.23686909675598145 +64,128,75,even,1210,1189,21,0.017355371900826446,0.004776716232299805,0.29251623153686523 +64,128,76,even,1253,1234,19,0.015163607342378291,0.004713773727416992,0.2768585681915283 +64,128,78,even,1244,1228,16,0.012861736334405145,0.004548311233520508,0.23886585235595703 +64,128,79,even,1223,1199,24,0.019623875715453803,0.004660844802856445,0.30077290534973145 +64,128,80,even,1234,1213,21,0.017017828200972446,0.015105485916137695,0.1967465877532959 +64,128,81,even,1216,1193,23,0.018914473684210526,0.004560947418212891,0.19093942642211914 +64,128,82,even,1201,1178,23,0.019150707743547043,0.005462646484375,0.19695043563842773 +64,128,83,even,1202,1176,26,0.021630615640599003,0.004820823669433594,0.3315119743347168 +64,128,84,even,1280,1253,27,0.02109375,0.007562160491943359,0.23861455917358398 +64,128,86,even,1159,1138,21,0.0181190681622088,0.007597446441650391,0.21752572059631348 +64,128,85,even,1263,1247,16,0.012668250197941409,0.03147101402282715,0.21575498580932617 +64,128,87,even,1248,1221,27,0.021634615384615384,0.008075714111328125,0.19658493995666504 +64,128,88,even,1218,1193,25,0.020525451559934318,0.004894256591796875,0.29839396476745605 +64,128,89,even,1239,1207,32,0.0258272800645682,0.004591941833496094,0.2787621021270752 +64,128,90,even,1254,1231,23,0.018341307814992026,0.008124351501464844,0.22206902503967285 +64,128,92,even,1269,1250,19,0.014972419227738377,0.008233070373535156,0.33421826362609863 +64,128,91,even,1258,1231,27,0.021462639109697933,0.009650945663452148,0.2760434150695801 +64,128,94,even,1175,1155,20,0.01702127659574468,0.008334875106811523,0.29343605041503906 +64,128,93,even,1174,1140,34,0.028960817717206135,0.005184173583984375,0.3376600742340088 +64,128,95,even,1206,1181,25,0.020729684908789386,0.008202791213989258,0.19187569618225098 +64,128,96,even,1255,1238,17,0.013545816733067729,0.008316993713378906,0.19533586502075195 +64,128,97,even,1236,1219,17,0.013754045307443365,0.004545927047729492,0.2036726474761963 +64,128,98,even,1211,1182,29,0.023947151114781174,0.007494926452636719,0.2916281223297119 +64,128,99,even,1241,1215,26,0.020950846091861403,0.005291938781738281,0.27841973304748535 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_640.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_640.csv new file mode 100644 index 000000000..d185ece8c --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_640.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +640,1280,0,even,123258,123051,207,0.0016794041766051697,0.5565817356109619,146.3233985900879 +640,1280,1,even,122865,122651,214,0.001741749074187116,0.5669522285461426,129.81203937530518 +640,1280,2,even,122969,122743,226,0.0018378615748684628,0.5419504642486572,129.61090326309204 +640,1280,4,even,122977,122785,192,0.0015612675540954812,0.5528106689453125,137.10803151130676 +640,1280,3,even,122726,122491,235,0.0019148346723595652,0.5500617027282715,156.65480494499207 +640,1280,7,even,123332,123121,211,0.0017108293062627704,0.545011043548584,134.63220810890198 +640,1280,5,even,122977,122757,220,0.0017889524057344056,0.6386768817901611,141.0471601486206 +640,1280,6,even,122251,122017,234,0.001914094772230902,0.563915491104126,150.0624828338623 +640,1280,10,even,123385,123150,235,0.0019046075292782753,0.5384385585784912,134.36279344558716 +640,1280,8,even,123066,122830,236,0.001917670193229649,0.5573301315307617,140.25209164619446 +640,1280,9,even,122963,122742,221,0.0017972886152745134,0.551938533782959,146.99401235580444 +640,1280,12,even,122589,122381,208,0.0016967264599597027,0.5477945804595947,131.61732816696167 +640,1280,11,even,122419,122189,230,0.0018787933245656312,0.5618557929992676,139.25087761878967 +640,1280,13,even,123112,122892,220,0.0017869907076483202,0.5445535182952881,150.76441550254822 +640,1280,15,even,123110,122871,239,0.0019413532613110226,0.5546350479125977,135.03182172775269 +640,1280,16,even,122764,122507,257,0.0020934475904988434,0.5581715106964111,132.09705448150635 +640,1280,14,even,122684,122449,235,0.0019154902024713899,0.5136542320251465,139.94022035598755 +640,1280,18,even,123227,122980,247,0.0020044308471357736,0.598628044128418,124.33688926696777 +640,1280,19,even,122925,122697,228,0.0018547895057962171,0.5492589473724365,131.09562706947327 +640,1280,17,even,123368,123109,259,0.0020994098955969135,0.606065034866333,137.92195987701416 +640,1280,20,even,122778,122575,203,0.0016533906725960676,0.5498113632202148,130.75641083717346 +640,1280,21,even,122931,122698,233,0.001895372200665414,0.4655764102935791,140.38134002685547 +640,1280,23,even,123238,122997,241,0.001955565653451046,0.2880241870880127,128.40171909332275 +640,1280,22,even,123243,123051,192,0.0015578978116404178,0.5492238998413086,143.1858651638031 +640,1280,25,even,123414,123200,214,0.0017340010047482458,0.2843818664550781,137.67966604232788 +640,1280,24,even,122399,122200,199,0.001625830276391147,0.32112550735473633,140.2659080028534 +640,1280,26,even,123087,122919,168,0.0013648882497745496,0.5465633869171143,138.00680327415466 +640,1280,27,even,122411,122184,227,0.0018544085090392204,0.5655944347381592,131.42205905914307 +640,1280,29,even,123079,122851,228,0.0018524687395900193,0.2869832515716553,127.01329302787781 +640,1280,28,even,123495,123253,242,0.001959593505809952,0.5352482795715332,140.38338422775269 +640,1280,30,even,122414,122186,228,0.00186253206332609,0.554663896560669,140.37289023399353 +640,1280,31,even,123182,122996,186,0.0015099608709064636,0.5401029586791992,132.62163591384888 +640,1280,33,even,123120,122911,209,0.0016975308641975309,0.43216872215270996,134.92304468154907 +640,1280,34,even,122953,122712,241,0.0019600985742519498,0.3006138801574707,142.5870213508606 +640,1280,32,even,122928,122724,204,0.0016595080046856697,0.5481536388397217,155.87712121009827 +640,1280,36,even,123367,123154,213,0.0017265557239780492,0.5725154876708984,148.04761743545532 +640,1280,35,even,123259,123040,219,0.0017767465256086777,0.5942678451538086,148.9184925556183 +640,1280,38,even,123280,123060,220,0.0017845554834523037,0.551692008972168,144.6931073665619 +640,1280,37,even,122595,122365,230,0.001876096088747502,0.6130259037017822,148.20564556121826 +640,1280,39,even,122952,122742,210,0.0017079836033574078,0.5552573204040527,131.32519793510437 +640,1280,40,even,123200,122975,225,0.0018262987012987013,0.5291604995727539,147.06255102157593 +640,1280,42,even,123123,122853,270,0.002192929022197315,0.5863516330718994,128.78160691261292 +640,1280,41,even,123608,123392,216,0.001747459711345544,0.5451467037200928,139.47121238708496 +640,1280,43,even,122740,122520,220,0.0017924067133778718,0.5533785820007324,147.02873873710632 +640,1280,44,even,123233,122992,241,0.0019556449976873076,0.5390117168426514,129.7054841518402 +640,1280,48,even,122859,122635,224,0.0018232282535264003,0.568415641784668,128.13662552833557 +640,1280,47,even,122700,122462,238,0.0019396903015484923,0.5530266761779785,144.8702676296234 +640,1280,46,even,122885,122686,199,0.001619400252268381,0.5820200443267822,145.8236129283905 +640,1280,45,even,123089,122866,223,0.00181169722720958,0.5723013877868652,155.78413248062134 +640,1280,49,even,123056,122863,193,0.001568391626576518,0.6491641998291016,133.23056435585022 +640,1280,50,even,122866,122665,201,0.0016359285725912782,0.5639636516571045,134.7863063812256 +640,1280,51,even,122605,122377,228,0.0018596305207781085,0.5408282279968262,161.50175046920776 +640,1280,52,even,122955,122724,231,0.001878736122971819,0.5548250675201416,145.3425235748291 +640,1280,53,even,122798,122572,226,0.0018404208537598332,0.5589113235473633,132.21969413757324 +640,1280,54,even,122844,122653,191,0.0015548174921038065,0.5234270095825195,134.28272986412048 +640,1280,57,even,123050,122789,261,0.0021210889882161722,0.5531363487243652,122.52679419517517 +640,1280,56,even,123539,123311,228,0.0018455710342482941,0.5343759059906006,131.37748551368713 +640,1280,55,even,122353,122146,207,0.0016918261096989858,0.5646722316741943,132.12252974510193 +640,1280,58,even,123159,122919,240,0.0019487004603804838,0.39122533798217773,132.49676537513733 +640,1280,59,even,122838,122585,253,0.0020596232436216806,0.5431106090545654,133.65960717201233 +640,1280,60,even,123234,123002,232,0.0018825973351510135,0.30399298667907715,127.5896246433258 +640,1280,61,even,122622,122445,177,0.0014434603904682683,0.28719282150268555,140.17742109298706 +640,1280,63,even,122871,122639,232,0.0018881591262380872,0.8836019039154053,139.8589208126068 +640,1280,64,even,122813,122607,206,0.0016773468606743585,0.6046760082244873,140.61800575256348 +640,1280,66,even,122827,122582,245,0.0019946754378109047,0.5483376979827881,138.99693083763123 +640,1280,62,even,123115,122878,237,0.0019250294440157577,0.7019853591918945,147.31075429916382 +640,1280,65,even,122976,122768,208,0.0016913869372885766,0.5584685802459717,155.85752987861633 +640,1280,67,even,123009,122788,221,0.0017966165077352063,0.5441832542419434,146.21823930740356 +640,1280,68,even,123002,122755,247,0.0020080974293100926,0.5514354705810547,145.4525876045227 +640,1280,69,even,123493,123247,246,0.001992015741782935,0.4235076904296875,138.7851185798645 +640,1280,70,even,123285,123057,228,0.0018493734030904003,0.5575153827667236,139.34000039100647 +640,1280,74,even,123630,123398,232,0.001876567176251719,0.5414447784423828,133.82352113723755 +640,1280,73,even,123165,122937,228,0.0018511752527097796,0.41124510765075684,140.6028769016266 +640,1280,72,even,122768,122551,217,0.0017675615795647074,0.3129258155822754,144.2406449317932 +640,1280,71,even,123992,123767,225,0.0018146332021420737,0.3507211208343506,148.7943091392517 +640,1280,75,even,123658,123440,218,0.0017629267819308091,0.5436997413635254,156.48383784294128 +640,1280,76,even,122935,122722,213,0.0017326229308170984,0.5546395778656006,148.20121932029724 +640,1280,77,even,122853,122618,235,0.0019128552009311942,0.5551061630249023,144.09043717384338 +640,1280,78,even,122860,122653,207,0.0016848445384991047,0.5538899898529053,147.73331117630005 +640,1280,79,even,122364,122099,265,0.0021656696413977967,0.5483260154724121,146.91979479789734 +640,1280,81,even,123114,122893,221,0.0017950842308754487,0.533660888671875,140.00115060806274 +640,1280,82,even,123170,122921,249,0.002021596167898027,0.5440423488616943,148.10570168495178 +640,1280,83,even,122478,122283,195,0.001592122666927938,0.5509324073791504,147.61770915985107 +640,1280,80,even,122759,122554,205,0.0016699386603018923,0.5951166152954102,158.87242150306702 +640,1280,85,even,122780,122580,200,0.0016289297931259162,0.47137904167175293,138.39202427864075 +640,1280,86,even,123216,122978,238,0.0019315673289183224,0.5660853385925293,139.5009160041809 +640,1280,84,even,122937,122701,236,0.0019196824389728071,0.557929515838623,155.25267267227173 +640,1280,88,even,122863,122656,207,0.0016848033989077264,0.551628589630127,140.34661173820496 +640,1280,87,even,123519,123286,233,0.0018863494685028214,0.574303150177002,151.27663564682007 +640,1280,92,even,122882,122681,201,0.001635715564525317,0.565035343170166,133.52422666549683 +640,1280,89,even,123064,122825,239,0.00194207891828642,0.5669951438903809,148.34692406654358 +640,1280,90,even,122324,122111,213,0.0017412772636604427,0.5475785732269287,145.82584762573242 +640,1280,91,even,123483,123244,239,0.0019354890956649903,0.5207631587982178,143.68549060821533 +640,1280,93,even,123073,122856,217,0.0017631812014007946,0.577927827835083,139.88288259506226 +640,1280,94,even,122270,122037,233,0.0019056187126850414,0.5484282970428467,140.28514313697815 +640,1280,95,even,123234,123045,189,0.0015336676566531963,0.547497034072876,138.46826839447021 +640,1280,96,even,123529,123326,203,0.0016433388111293705,0.5111465454101562,130.26530265808105 +640,1280,97,even,122234,122026,208,0.0017016542042312286,0.5510532855987549,134.13500428199768 +640,1280,98,even,123111,122843,268,0.0021768972715679345,0.5508060455322266,149.9804093837738 +640,1280,99,even,122980,122762,218,0.0017726459586924702,0.5412936210632324,166.16447949409485 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_704.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_704.csv new file mode 100644 index 000000000..34c9b5aaa --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_704.csv @@ -0,0 +1,101 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +704,1408,4,even,148985,148746,239,0.0016041883411081652,0.6080803871154785,189.70047044754028 +704,1408,5,even,148341,148118,223,0.0015032930882224065,0.7159938812255859,219.09705662727356 +704,1408,6,even,148579,148312,267,0.0017970238055176034,0.35742688179016113,233.85786628723145 +704,1408,14,even,148851,148623,228,0.0015317330753572365,0.672860860824585,187.40121173858643 +704,1408,13,even,148891,148635,256,0.0017193786058257382,0.643700361251831,216.27305483818054 +704,1408,19,even,148905,148662,243,0.0016319129646418858,0.6665647029876709,178.30927062034607 +704,1408,20,even,148702,148483,219,0.001472744146010141,0.6891293525695801,199.65163588523865 +704,1408,22,even,148605,148354,251,0.0016890414185256216,0.6844055652618408,170.1369423866272 +704,1408,26,even,148334,148082,252,0.0016988687691291274,0.7067158222198486,178.15605092048645 +704,1408,27,even,148571,148352,219,0.0014740427135847508,0.6533827781677246,207.2621042728424 +704,1408,28,even,148879,148634,245,0.0016456316874777503,0.6387903690338135,194.18057584762573 +704,1408,34,even,149124,148906,218,0.0014618706579759126,0.6482841968536377,181.6458785533905 +704,1408,35,even,149458,149230,228,0.0015255121840249434,0.644310474395752,186.60231256484985 +704,1408,37,even,148370,148096,274,0.001846734515063692,0.6561877727508545,183.41714024543762 +704,1408,43,even,148353,148143,210,0.0014155426583891124,0.6685760021209717,187.8163514137268 +704,1408,46,even,148690,148439,251,0.0016880758625327863,0.6653192043304443,174.35086011886597 +704,1408,47,even,148329,148088,241,0.001624766566214294,0.6631002426147461,197.09980487823486 +704,1408,52,even,148678,148404,274,0.001842908836546093,0.613621711730957,194.9024395942688 +704,1408,55,even,148084,147800,284,0.0019178304205721077,0.349642276763916,206.31111645698547 +704,1408,60,even,148159,147922,237,0.0015996328268954299,0.6707961559295654,189.32119011878967 +704,1408,65,even,148505,148275,230,0.0015487694017036464,0.5439717769622803,178.0822823047638 +704,1408,66,even,148947,148715,232,0.0015576010258682618,0.5898435115814209,202.172345161438 +704,1408,69,even,148775,148511,264,0.0017744916820702404,0.6666440963745117,179.54023146629333 +704,1408,77,even,148602,148347,255,0.0017159930552751645,0.6795797348022461,193.80703330039978 +704,1408,78,even,149028,148783,245,0.0016439863649783933,0.6711034774780273,182.59823155403137 +704,1408,85,even,148490,148252,238,0.0016028015354569332,0.6653413772583008,183.07726669311523 +704,1408,88,even,148992,148751,241,0.0016175365120274915,0.7004399299621582,177.9993073940277 +704,1408,93,even,149336,149097,239,0.0016004178496812557,0.6787467002868652,170.17053389549255 +704,1408,92,even,149050,148794,256,0.0017175444481717544,0.659904956817627,189.17542338371277 +704,1408,95,even,149412,149154,258,0.0017267689342221509,0.6703705787658691,197.1382451057434 +704,1408,96,even,148941,148685,256,0.0017188014045830227,0.34760546684265137,198.62298130989075 +704,1408,98,even,148651,148419,232,0.001560702585250015,0.654548168182373,184.30727314949036 +704,1408,99,even,149067,148804,263,0.001764307324894175,0.3411519527435303,180.79831671714783 +704,1408,0,even,148794,148570,224,0.0015054370471927632,0.3515491485595703,120.40672516822815 +704,1408,1,even,148546,148317,229,0.0015416100063280062,0.3528141975402832,127.34526991844177 +704,1408,2,even,148243,148036,207,0.0013963559830818318,0.3789248466491699,134.81544733047485 +704,1408,3,even,149490,149256,234,0.0015653220951234196,0.3465094566345215,125.54555082321167 +704,1408,7,even,149082,148873,209,0.0014019130411451416,0.34209728240966797,125.11370182037354 +704,1408,8,even,148513,148251,262,0.0017641553264697366,0.3417928218841553,122.43381881713867 +704,1408,9,even,148608,148327,281,0.001890880706287683,0.33635401725769043,131.4535186290741 +704,1408,10,even,148944,148685,259,0.0017389085830916318,0.33837437629699707,128.63325119018555 +704,1408,11,even,148514,148269,245,0.0016496761248097822,0.33425045013427734,131.38714623451233 +704,1408,12,even,147930,147679,251,0.0016967484621104576,0.3480234146118164,119.2111599445343 +704,1408,15,even,149439,149192,247,0.0016528483193811521,0.34941887855529785,117.50865483283997 +704,1408,16,even,148577,148340,237,0.0015951324902239244,0.3552520275115967,121.62717390060425 +704,1408,17,even,149192,148935,257,0.0017226124725186337,0.3387289047241211,132.74093174934387 +704,1408,18,even,148766,148530,236,0.0015863839855881049,0.33679842948913574,147.93799138069153 +704,1408,21,even,148763,148490,273,0.001835133736211289,0.3375566005706787,152.59412574768066 +704,1408,23,even,148722,148470,252,0.0016944365998305564,0.3385474681854248,156.85236120224 +704,1408,24,even,148262,148020,242,0.001632245619241613,0.3381822109222412,190.57228803634644 +704,1408,25,even,148961,148673,288,0.0019333919616543929,0.3287467956542969,207.27872347831726 +704,1408,29,even,148488,148258,230,0.0015489467162329617,0.6913294792175293,185.1958065032959 +704,1408,30,even,148302,148062,240,0.001618319375328721,0.6982212066650391,185.51593947410583 +704,1408,31,even,148992,148758,234,0.0015705541237113403,0.7044949531555176,214.65442776679993 +704,1408,32,even,148402,148154,248,0.0016711365075942372,0.6958498954772949,188.84703469276428 +704,1408,33,even,149363,149125,238,0.001593433447373178,0.708698034286499,172.16014218330383 +704,1408,36,even,149261,149038,223,0.0014940272408733694,0.7651686668395996,186.51199293136597 +704,1408,38,even,149013,148734,279,0.0018723198647097904,0.6874406337738037,187.4119884967804 +704,1408,39,even,148710,148457,253,0.001701297827987358,0.6848912239074707,180.537837266922 +704,1408,40,even,149173,148941,232,0.001555241229981297,0.7610795497894287,174.9746630191803 +704,1408,41,even,149446,149235,211,0.0014118812146193273,0.7044079303741455,179.28420090675354 +704,1408,42,even,148876,148651,225,0.0015113248609581128,0.6790692806243896,132.25811052322388 +704,1408,44,even,148729,148488,241,0.00162039682913218,0.6862139701843262,135.06358647346497 +704,1408,45,even,149104,148865,239,0.0016029080373430626,0.6769299507141113,133.45972347259521 +704,1408,49,even,148792,148557,235,0.001579385988494005,0.36344003677368164,129.51585936546326 +704,1408,48,even,148412,148189,223,0.0015025739158558607,0.6443862915039062,142.15561723709106 +704,1408,50,even,148826,148616,210,0.0014110437692338705,0.3472328186035156,132.65657019615173 +704,1408,51,even,148206,147943,263,0.001774557035477646,0.35004591941833496,123.65072464942932 +704,1408,53,even,148937,148689,248,0.0016651335799700545,0.34568238258361816,137.98017001152039 +704,1408,54,even,148698,148453,245,0.0016476348034270803,0.35442376136779785,133.3312804698944 +704,1408,56,even,149558,149323,235,0.001571296754436406,0.3529551029205322,143.773113489151 +704,1408,58,even,148929,148681,248,0.0016652230257370962,0.3399341106414795,117.80251717567444 +704,1408,57,even,148612,148330,282,0.0018975587435738702,0.36695098876953125,123.50832939147949 +704,1408,59,even,148718,148441,277,0.0018625855646256673,0.336489200592041,124.22306609153748 +704,1408,61,even,148345,148123,222,0.0014965115103306482,0.33821678161621094,162.83108353614807 +704,1408,62,even,149259,148985,274,0.0018357351985474912,0.3324556350708008,155.6950125694275 +704,1408,63,even,148637,148381,256,0.0017223167851880756,0.33239126205444336,158.13261699676514 +704,1408,64,even,149318,149081,237,0.0015872165445559143,0.3385791778564453,204.54611349105835 +704,1408,67,even,148340,148107,233,0.0015707159228798705,0.6813249588012695,187.051127910614 +704,1408,68,even,148646,148385,261,0.0017558494678632456,0.6776576042175293,165.53354907035828 +704,1408,70,even,148853,148590,263,0.0017668437989157087,0.7265093326568604,176.54488945007324 +704,1408,71,even,149503,149293,210,0.0014046540872089523,0.68845534324646,177.06000804901123 +704,1408,72,even,148315,148094,221,0.0014900718066277855,0.7020931243896484,177.4799840450287 +704,1408,73,even,148802,148575,227,0.0015255171301461002,0.6889975070953369,176.36670637130737 +704,1408,74,even,149627,149375,252,0.0016841880141952989,0.6821272373199463,180.72390055656433 +704,1408,75,even,149527,149292,235,0.0015716225163348425,0.7066969871520996,187.59681963920593 +704,1408,76,even,148946,148722,224,0.0015039007425509917,0.6844174861907959,187.97057580947876 +704,1408,79,even,148617,148373,244,0.001641804100473028,0.6913344860076904,195.86941027641296 +704,1408,80,even,149024,148744,280,0.0018788919905518575,0.6944818496704102,197.71208095550537 +704,1408,81,even,148164,147931,233,0.0015725817337544884,0.6918690204620361,168.8517563343048 +704,1408,82,even,148838,148571,267,0.0017938967199236755,0.682337760925293,171.6317436695099 +704,1408,83,even,148489,148254,235,0.00158260881277401,0.6986098289489746,187.72056531906128 +704,1408,84,even,148751,148494,257,0.0017277194775161175,0.6810224056243896,169.3490469455719 +704,1408,86,even,148488,148260,228,0.001535477614352675,0.6967170238494873,185.10401487350464 +704,1408,89,even,148936,148704,232,0.0015577160659612183,0.6790375709533691,176.70713233947754 +704,1408,87,even,148761,148557,204,0.0013713271623611027,0.7019264698028564,197.83631658554077 +704,1408,90,even,148527,148264,263,0.001770721821621658,0.6995542049407959,184.5017592906952 +704,1408,91,even,149113,148856,257,0.0017235251118279426,0.6883578300476074,182.19509863853455 +704,1408,97,even,148108,147859,249,0.0016812056067194209,0.7404181957244873,156.09191370010376 +704,1408,94,even,148024,147782,242,0.0016348700210776631,0.6975212097167969,182.31448078155518 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_768.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_768.csv new file mode 100644 index 000000000..2218bd974 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_768.csv @@ -0,0 +1,5 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +768,1536,93,even,177395,177139,256,0.0014431071901688322,0.992978572845459,269.49257159233093 +768,1536,96,even,177619,177341,278,0.0015651478726937996,0.8821120262145996,257.2942419052124 +768,1536,99,even,176395,176154,241,0.0013662518778876952,0.8444037437438965,270.72307443618774 +768,1536,98,even,177085,176823,262,0.0014795154869130644,0.7631571292877197,288.57820200920105 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_832.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_832.csv new file mode 100644 index 000000000..82ebdf0ed --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_832.csv @@ -0,0 +1,3 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +832,1664,96,even,208361,208080,281,0.0013486209031440624,0.9291436672210693,262.1466553211212 +832,1664,99,even,207443,207136,307,0.001479924605795327,0.9588613510131836,354.8854260444641 From a82e97d0c72c4767d5b8f5906feb239496631b37 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 18 Nov 2025 06:55:45 +0100 Subject: [PATCH 37/90] add new results --- .../cx_heavy/results_1024.csv | 2 + .../cx_heavy/results_512.csv | 200 +++++++++--------- .../cx_heavy/results_704.csv | 24 +++ .../cx_heavy/results_768.csv | 9 + .../even/results_512.csv | 200 +++++++++--------- .../even/results_768.csv | 96 +++++++++ .../even/results_832.csv | 98 +++++++++ .../even/results_896.csv | 13 ++ .../even/results_960.csv | 3 + 9 files changed, 445 insertions(+), 200 deletions(-) create mode 100644 scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_768.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_896.csv create mode 100644 scripts/cs_compiler/results_performance_benchmarking/even/results_960.csv diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_1024.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_1024.csv index 3d6f127f5..44d38ece3 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_1024.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_1024.csv @@ -86,3 +86,5 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving 1024,2048,80,cx_heavy,174452,174222,230,0.0013184142342879417,1.3437654972076416,902.9114961624146 1024,2048,80,cx_heavy,174452,174222,230,0.0013184142342879417,1.715003252029419,654.3674418926239 1024,2048,95,cx_heavy,175293,175045,248,0.0014147741210430536,1.7313716411590576,860.3346655368805 +1024,2048,94,cx_heavy,174920,174662,258,0.0014749599817059228,0.8660018444061279,577.7873377799988 +1024,2048,93,cx_heavy,175053,174876,177,0.0010111223458038423,1.768813133239746,684.5808539390564 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_512.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_512.csv index 35d227c35..bfd843765 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_512.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_512.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -512,1024,0,cx_heavy,43895,43787,108,0.002460416903975396,0.36316823959350586,127.77705907821655 -512,1024,1,cx_heavy,43708,43559,149,0.0034089869131509105,0.3686056137084961,134.91038060188293 -512,1024,2,cx_heavy,43727,43601,126,0.002881514853522995,0.37487316131591797,134.98793816566467 -512,1024,3,cx_heavy,44034,43923,111,0.0025207793977381114,0.36842966079711914,141.5897297859192 -512,1024,4,cx_heavy,43719,43599,120,0.002744802031153503,0.3798556327819824,141.56275415420532 -512,1024,5,cx_heavy,44169,44049,120,0.0027168376010323985,0.3457682132720947,131.18939423561096 -512,1024,6,cx_heavy,44045,43915,130,0.0029515268475422862,0.3591008186340332,133.7021462917328 -512,1024,8,cx_heavy,43566,43448,118,0.002708534178028738,0.34319639205932617,129.06690454483032 -512,1024,7,cx_heavy,44228,44136,92,0.0020801302342407526,0.3499414920806885,142.3434283733368 -512,1024,9,cx_heavy,44103,44002,101,0.0022900936444232817,0.3441736698150635,151.18704056739807 -512,1024,10,cx_heavy,43519,43415,104,0.0023897607941358945,0.3382136821746826,138.70489525794983 -512,1024,11,cx_heavy,44071,43957,114,0.0025867350411835446,0.3603360652923584,133.80816555023193 -512,1024,12,cx_heavy,43810,43668,142,0.0032412691166400364,0.33808016777038574,128.02845335006714 -512,1024,13,cx_heavy,43521,43372,149,0.003423634567220422,0.36048007011413574,142.48012900352478 -512,1024,14,cx_heavy,44095,43985,110,0.0024946139018029254,0.3611178398132324,136.6418821811676 -512,1024,15,cx_heavy,44048,43910,138,0.0031329458772248455,0.3459930419921875,141.80505299568176 -512,1024,16,cx_heavy,43552,43432,120,0.002755326965466569,0.3467276096343994,134.36376762390137 -512,1024,17,cx_heavy,44236,44131,105,0.0023736323356542185,0.35872578620910645,134.80241894721985 -512,1024,18,cx_heavy,44039,43905,134,0.003042757555802811,0.36432480812072754,139.34315633773804 -512,1024,19,cx_heavy,44218,44112,106,0.002397213804333077,0.34578776359558105,142.33864068984985 -512,1024,20,cx_heavy,43423,43301,122,0.002809570964696129,0.352435827255249,134.90810990333557 -512,1024,21,cx_heavy,44077,43990,87,0.0019738185448192934,0.3396108150482178,132.9060342311859 -512,1024,22,cx_heavy,43875,43722,153,0.0034871794871794873,0.35874128341674805,131.8111207485199 -512,1024,23,cx_heavy,43811,43682,129,0.0029444660016890735,0.33670616149902344,133.93825030326843 -512,1024,24,cx_heavy,44036,43907,129,0.002929421382505223,0.3574948310852051,135.66618609428406 -512,1024,25,cx_heavy,43775,43691,84,0.0019189034837235866,0.34777307510375977,134.86692714691162 -512,1024,26,cx_heavy,43900,43802,98,0.002232346241457859,0.3559272289276123,133.27873182296753 -512,1024,27,cx_heavy,43994,43884,110,0.0025003409555848523,0.35079431533813477,136.69808888435364 -512,1024,28,cx_heavy,44234,44096,138,0.0031197721209929013,0.3710939884185791,136.0358920097351 -512,1024,29,cx_heavy,43808,43715,93,0.002122899926953981,0.34623122215270996,142.08446598052979 -512,1024,30,cx_heavy,43395,43287,108,0.0024887659868648463,0.36168932914733887,135.19077324867249 -512,1024,31,cx_heavy,43759,43634,125,0.0028565552229255697,0.3444383144378662,135.82492971420288 -512,1024,32,cx_heavy,43827,43727,100,0.002281698496360691,0.3458678722381592,150.4929826259613 -512,1024,33,cx_heavy,43816,43708,108,0.002464853021727223,0.35813021659851074,134.11264061927795 -512,1024,34,cx_heavy,43856,43720,136,0.003101058008026268,0.3700404167175293,142.77851915359497 -512,1024,36,cx_heavy,44417,44307,110,0.002476529256816084,0.3710494041442871,130.7194709777832 -512,1024,35,cx_heavy,43799,43684,115,0.0026256307221626065,0.34503722190856934,151.2663938999176 -512,1024,37,cx_heavy,43736,43597,139,0.0031781598683007133,0.3501124382019043,130.37854051589966 -512,1024,38,cx_heavy,44059,43950,109,0.0024739553780158425,0.3405940532684326,131.67780900001526 -512,1024,39,cx_heavy,44342,44225,117,0.0026385819313517658,0.34491968154907227,157.41773414611816 -512,1024,40,cx_heavy,44029,43882,147,0.003338708578436939,0.3490111827850342,129.98034262657166 -512,1024,41,cx_heavy,43804,43694,110,0.0025111861930417314,0.37304043769836426,139.90965628623962 -512,1024,42,cx_heavy,43829,43701,128,0.002920440804033859,0.3608365058898926,128.62583136558533 -512,1024,43,cx_heavy,44036,43931,105,0.0023844127532019256,0.3521394729614258,136.15767002105713 -512,1024,44,cx_heavy,43680,43567,113,0.002586996336996337,0.3383772373199463,128.9250705242157 -512,1024,45,cx_heavy,43902,43799,103,0.0023461345724568356,0.3304753303527832,141.98398995399475 -512,1024,46,cx_heavy,43988,43885,103,0.0023415476948258616,0.3514566421508789,140.54017281532288 -512,1024,47,cx_heavy,43637,43526,111,0.002543712904186814,0.352916955947876,142.10120820999146 -512,1024,48,cx_heavy,43628,43499,129,0.002956816723205281,0.3434879779815674,143.34511041641235 -512,1024,49,cx_heavy,44065,43946,119,0.0027005559968228754,0.3344309329986572,136.08029341697693 -512,1024,50,cx_heavy,43814,43692,122,0.002784498105628338,0.3431065082550049,129.55389404296875 -512,1024,51,cx_heavy,43813,43680,133,0.0030356286946796613,0.348407506942749,131.32868671417236 -512,1024,52,cx_heavy,43592,43487,105,0.002408698843824555,0.37763094902038574,141.70181846618652 -512,1024,53,cx_heavy,43997,43888,109,0.0024774416437484373,0.35950517654418945,144.00797843933105 -512,1024,54,cx_heavy,43526,43416,110,0.0025272251068326978,0.34315967559814453,139.6751744747162 -512,1024,55,cx_heavy,43986,43852,134,0.003046423862137953,0.3392293453216553,136.02552604675293 -512,1024,56,cx_heavy,43849,43752,97,0.0022121371068895526,0.3458597660064697,133.87684774398804 -512,1024,57,cx_heavy,44126,44013,113,0.0025608484793545757,0.3631458282470703,142.76476526260376 -512,1024,58,cx_heavy,43972,43860,112,0.0025470754116255797,0.3386576175689697,134.9578468799591 -512,1024,59,cx_heavy,43896,43782,114,0.00259704756697649,0.33867955207824707,137.47001123428345 -512,1024,61,cx_heavy,43953,43830,123,0.0027984437922326123,0.3458878993988037,129.3762662410736 -512,1024,60,cx_heavy,43651,43543,108,0.0024741701221048774,0.36160969734191895,150.25493836402893 -512,1024,62,cx_heavy,43925,43825,100,0.0022766078542970974,0.34013986587524414,141.6908781528473 -512,1024,63,cx_heavy,43998,43834,164,0.0037274421564616575,0.3617417812347412,135.74835324287415 -512,1024,64,cx_heavy,44297,44204,93,0.002099464975054744,0.35708069801330566,153.71458745002747 -512,1024,66,cx_heavy,44117,43982,135,0.0030600448806582495,0.36185717582702637,143.08688187599182 -512,1024,65,cx_heavy,43737,43634,103,0.0023549854814001875,0.39203763008117676,149.88254117965698 -512,1024,67,cx_heavy,44318,44193,125,0.002820524391894941,0.3567805290222168,142.34185099601746 -512,1024,68,cx_heavy,44152,44032,120,0.002717883674578728,0.34766626358032227,138.91675543785095 -512,1024,69,cx_heavy,43808,43705,103,0.0023511687363038714,0.3758406639099121,133.80594110488892 -512,1024,70,cx_heavy,44030,43914,116,0.0026345673404496936,0.3391542434692383,135.25056886672974 -512,1024,71,cx_heavy,44350,44206,144,0.0032468996617812853,0.36308741569519043,134.41971135139465 -512,1024,72,cx_heavy,43600,43481,119,0.0027293577981651377,0.34262967109680176,133.6271195411682 -512,1024,73,cx_heavy,43971,43863,108,0.0024561642901002934,0.34429264068603516,141.92487907409668 -512,1024,74,cx_heavy,43597,43514,83,0.0019038007202330435,0.36693787574768066,152.23570275306702 -512,1024,75,cx_heavy,44567,44470,97,0.0021764983059214217,0.3571484088897705,137.723703622818 -512,1024,76,cx_heavy,44070,43983,87,0.001974132062627638,0.3695979118347168,142.99829077720642 -512,1024,77,cx_heavy,44154,43994,160,0.003623680753725597,0.34256768226623535,130.0090630054474 -512,1024,78,cx_heavy,43746,43640,106,0.0024230786814794496,0.3612682819366455,144.25766825675964 -512,1024,79,cx_heavy,43797,43688,109,0.0024887549375528003,0.34629344940185547,143.99343967437744 -512,1024,80,cx_heavy,43867,43735,132,0.0030090956755647754,0.359236478805542,121.84797239303589 -512,1024,81,cx_heavy,43898,43788,110,0.0025058089206797577,0.407092809677124,134.5930540561676 -512,1024,82,cx_heavy,44011,43902,109,0.002476653563881757,0.3694324493408203,134.80171942710876 -512,1024,83,cx_heavy,43816,43683,133,0.0030354208508307466,0.3622117042541504,142.4076156616211 -512,1024,84,cx_heavy,43900,43785,115,0.002619589977220957,0.36365842819213867,139.99429750442505 -512,1024,85,cx_heavy,44023,43931,92,0.0020898166867319356,0.3502645492553711,140.53595447540283 -512,1024,86,cx_heavy,43716,43602,114,0.002607740872906945,0.3314797878265381,131.93120098114014 -512,1024,87,cx_heavy,44000,43855,145,0.0032954545454545454,0.3560197353363037,134.30657577514648 -512,1024,88,cx_heavy,44095,43971,124,0.0028121102165778434,0.362107515335083,140.98407697677612 -512,1024,89,cx_heavy,44157,44050,107,0.002423171864030618,0.3386504650115967,134.59486937522888 -512,1024,90,cx_heavy,43782,43668,114,0.0026038097848430863,0.34543919563293457,132.79945969581604 -512,1024,91,cx_heavy,43979,43888,91,0.002069169376293231,0.35138678550720215,132.88460993766785 -512,1024,92,cx_heavy,43824,43676,148,0.0033771449434100037,0.339749813079834,116.60207605361938 -512,1024,93,cx_heavy,44121,44017,104,0.0023571541896149225,0.3636767864227295,128.7625994682312 -512,1024,94,cx_heavy,43618,43510,108,0.0024760420010087577,0.3498833179473877,142.0837585926056 -512,1024,95,cx_heavy,43915,43798,117,0.0026642377319822386,0.35860586166381836,141.2248649597168 -512,1024,97,cx_heavy,44028,43909,119,0.0027028254746979197,0.35541629791259766,128.8426012992859 -512,1024,96,cx_heavy,43927,43814,113,0.002572449746169782,0.34702301025390625,140.74609971046448 -512,1024,98,cx_heavy,43763,43652,111,0.0025363891872129426,0.3515646457672119,154.7303981781006 -512,1024,99,cx_heavy,43725,43603,122,0.0027901658090337335,0.36806154251098633,155.5748417377472 +512,1024,0,cx_heavy,43895,43787,108,0.002460416903975396,0.20736956596374512,77.76057434082031 +512,1024,1,cx_heavy,43708,43559,149,0.0034089869131509105,0.2109847068786621,78.60088849067688 +512,1024,2,cx_heavy,43727,43601,126,0.002881514853522995,0.2090897560119629,79.00068426132202 +512,1024,4,cx_heavy,43719,43599,120,0.002744802031153503,0.21578431129455566,83.26548147201538 +512,1024,3,cx_heavy,44034,43923,111,0.0025207793977381114,0.2112715244293213,92.3940372467041 +512,1024,5,cx_heavy,44169,44049,120,0.0027168376010323985,0.2106790542602539,85.029714345932 +512,1024,6,cx_heavy,44045,43915,130,0.0029515268475422862,0.21275949478149414,83.35798692703247 +512,1024,7,cx_heavy,44228,44136,92,0.0020801302342407526,0.20681428909301758,86.89640045166016 +512,1024,8,cx_heavy,43566,43448,118,0.002708534178028738,0.2114543914794922,82.35914540290833 +512,1024,9,cx_heavy,44103,44002,101,0.0022900936444232817,0.21076011657714844,93.59288811683655 +512,1024,10,cx_heavy,43519,43415,104,0.0023897607941358945,0.2097783088684082,81.36624836921692 +512,1024,11,cx_heavy,44071,43957,114,0.0025867350411835446,0.20732426643371582,87.16435241699219 +512,1024,12,cx_heavy,43810,43668,142,0.0032412691166400364,0.20884490013122559,84.21047043800354 +512,1024,13,cx_heavy,43521,43372,149,0.003423634567220422,0.20737624168395996,89.16139245033264 +512,1024,14,cx_heavy,44095,43985,110,0.0024946139018029254,0.20814847946166992,80.11491203308105 +512,1024,15,cx_heavy,44048,43910,138,0.0031329458772248455,0.20780014991760254,81.42771220207214 +512,1024,16,cx_heavy,43552,43432,120,0.002755326965466569,0.20659899711608887,82.85796689987183 +512,1024,17,cx_heavy,44236,44131,105,0.0023736323356542185,0.2181856632232666,85.74100375175476 +512,1024,18,cx_heavy,44039,43905,134,0.003042757555802811,0.20870590209960938,86.36572766304016 +512,1024,19,cx_heavy,44218,44112,106,0.002397213804333077,0.21030259132385254,83.92039823532104 +512,1024,20,cx_heavy,43423,43301,122,0.002809570964696129,0.21114683151245117,81.21051025390625 +512,1024,21,cx_heavy,44077,43990,87,0.0019738185448192934,0.21113348007202148,89.62004971504211 +512,1024,22,cx_heavy,43875,43722,153,0.0034871794871794873,0.20697665214538574,78.57863354682922 +512,1024,24,cx_heavy,44036,43907,129,0.002929421382505223,0.2112140655517578,81.37026357650757 +512,1024,23,cx_heavy,43811,43682,129,0.0029444660016890735,0.21225237846374512,89.94457936286926 +512,1024,25,cx_heavy,43775,43691,84,0.0019189034837235866,0.21273159980773926,84.30494928359985 +512,1024,26,cx_heavy,43900,43802,98,0.002232346241457859,0.20957112312316895,85.05950927734375 +512,1024,27,cx_heavy,43994,43884,110,0.0025003409555848523,0.20618081092834473,78.78894925117493 +512,1024,28,cx_heavy,44234,44096,138,0.0031197721209929013,0.20865511894226074,84.6637315750122 +512,1024,29,cx_heavy,43808,43715,93,0.002122899926953981,0.2109050750732422,94.94561862945557 +512,1024,30,cx_heavy,43395,43287,108,0.0024887659868648463,0.2128586769104004,86.52409029006958 +512,1024,31,cx_heavy,43759,43634,125,0.0028565552229255697,0.2092444896697998,84.77424502372742 +512,1024,32,cx_heavy,43827,43727,100,0.002281698496360691,0.2105112075805664,95.42750358581543 +512,1024,33,cx_heavy,43816,43708,108,0.002464853021727223,0.20426630973815918,85.45061659812927 +512,1024,34,cx_heavy,43856,43720,136,0.003101058008026268,0.2110762596130371,84.00533413887024 +512,1024,35,cx_heavy,43799,43684,115,0.0026256307221626065,0.2113950252532959,95.25970983505249 +512,1024,36,cx_heavy,44417,44307,110,0.002476529256816084,0.21187853813171387,81.22562074661255 +512,1024,38,cx_heavy,44059,43950,109,0.0024739553780158425,0.21397805213928223,76.88578486442566 +512,1024,37,cx_heavy,43736,43597,139,0.0031781598683007133,0.20897459983825684,89.51141452789307 +512,1024,39,cx_heavy,44342,44225,117,0.0026385819313517658,0.2051403522491455,92.4759693145752 +512,1024,40,cx_heavy,44029,43882,147,0.003338708578436939,0.2047898769378662,78.97539210319519 +512,1024,41,cx_heavy,43804,43694,110,0.0025111861930417314,0.21100687980651855,89.50318646430969 +512,1024,42,cx_heavy,43829,43701,128,0.002920440804033859,0.20775413513183594,73.74903225898743 +512,1024,43,cx_heavy,44036,43931,105,0.0023844127532019256,0.2055988311767578,85.64846205711365 +512,1024,44,cx_heavy,43680,43567,113,0.002586996336996337,0.20475554466247559,82.97306823730469 +512,1024,45,cx_heavy,43902,43799,103,0.0023461345724568356,0.20870256423950195,85.23754215240479 +512,1024,46,cx_heavy,43988,43885,103,0.0023415476948258616,0.2091217041015625,86.49187183380127 +512,1024,47,cx_heavy,43637,43526,111,0.002543712904186814,0.21437621116638184,85.86130094528198 +512,1024,48,cx_heavy,43628,43499,129,0.002956816723205281,0.21024823188781738,90.12622332572937 +512,1024,49,cx_heavy,44065,43946,119,0.0027005559968228754,0.20860075950622559,84.4046220779419 +512,1024,50,cx_heavy,43814,43692,122,0.002784498105628338,0.21037602424621582,79.82125687599182 +512,1024,51,cx_heavy,43813,43680,133,0.0030356286946796613,0.20937442779541016,82.00653123855591 +512,1024,52,cx_heavy,43592,43487,105,0.002408698843824555,0.21027874946594238,87.80465245246887 +512,1024,53,cx_heavy,43997,43888,109,0.0024774416437484373,0.21062588691711426,87.1579236984253 +512,1024,54,cx_heavy,43526,43416,110,0.0025272251068326978,0.20590806007385254,87.09322500228882 +512,1024,55,cx_heavy,43986,43852,134,0.003046423862137953,0.2065896987915039,84.24107146263123 +512,1024,56,cx_heavy,43849,43752,97,0.0022121371068895526,0.20947742462158203,86.82321739196777 +512,1024,57,cx_heavy,44126,44013,113,0.0025608484793545757,0.2099907398223877,86.7639217376709 +512,1024,58,cx_heavy,43972,43860,112,0.0025470754116255797,0.21486663818359375,79.24808263778687 +512,1024,59,cx_heavy,43896,43782,114,0.00259704756697649,0.21112895011901855,99.8322229385376 +512,1024,60,cx_heavy,43651,43543,108,0.0024741701221048774,0.2090458869934082,131.26354146003723 +512,1024,61,cx_heavy,43953,43830,123,0.0027984437922326123,0.2072463035583496,113.934823513031 +512,1024,62,cx_heavy,43925,43825,100,0.0022766078542970974,0.2091689109802246,136.17914032936096 +512,1024,63,cx_heavy,43998,43834,164,0.0037274421564616575,0.4272491931915283,130.20777249336243 +512,1024,64,cx_heavy,44297,44204,93,0.002099464975054744,0.42684078216552734,141.34485173225403 +512,1024,66,cx_heavy,44117,43982,135,0.0030600448806582495,0.4310593605041504,137.74624276161194 +512,1024,65,cx_heavy,43737,43634,103,0.0023549854814001875,0.4309968948364258,147.93239831924438 +512,1024,67,cx_heavy,44318,44193,125,0.002820524391894941,0.4279606342315674,129.53231859207153 +512,1024,68,cx_heavy,44152,44032,120,0.002717883674578728,0.4322638511657715,131.19362330436707 +512,1024,69,cx_heavy,43808,43705,103,0.0023511687363038714,0.4284389019012451,126.27178597450256 +512,1024,70,cx_heavy,44030,43914,116,0.0026345673404496936,0.4312906265258789,124.61031079292297 +512,1024,71,cx_heavy,44350,44206,144,0.0032468996617812853,0.42441701889038086,119.58060145378113 +512,1024,72,cx_heavy,43600,43481,119,0.0027293577981651377,0.39931416511535645,127.23901319503784 +512,1024,73,cx_heavy,43971,43863,108,0.0024561642901002934,0.40778589248657227,128.71491765975952 +512,1024,74,cx_heavy,43597,43514,83,0.0019038007202330435,0.4160892963409424,138.04354643821716 +512,1024,75,cx_heavy,44567,44470,97,0.0021764983059214217,0.4071366786956787,126.73879623413086 +512,1024,76,cx_heavy,44070,43983,87,0.001974132062627638,0.3989906311035156,130.52481842041016 +512,1024,77,cx_heavy,44154,43994,160,0.003623680753725597,0.399402379989624,125.09319305419922 +512,1024,78,cx_heavy,43746,43640,106,0.0024230786814794496,0.4112977981567383,139.4958837032318 +512,1024,79,cx_heavy,43797,43688,109,0.0024887549375528003,0.40683531761169434,137.4251914024353 +512,1024,80,cx_heavy,43867,43735,132,0.0030090956755647754,0.4044160842895508,108.97780966758728 +512,1024,81,cx_heavy,43898,43788,110,0.0025058089206797577,0.41138768196105957,124.29191589355469 +512,1024,83,cx_heavy,43816,43683,133,0.0030354208508307466,0.40122103691101074,117.12402415275574 +512,1024,82,cx_heavy,44011,43902,109,0.002476653563881757,0.38362908363342285,134.70729613304138 +512,1024,84,cx_heavy,43900,43785,115,0.002619589977220957,0.41101503372192383,136.73972463607788 +512,1024,85,cx_heavy,44023,43931,92,0.0020898166867319356,0.43447232246398926,133.4975688457489 +512,1024,86,cx_heavy,43716,43602,114,0.002607740872906945,0.3256368637084961,120.76391792297363 +512,1024,87,cx_heavy,44000,43855,145,0.0032954545454545454,0.4105854034423828,121.13674473762512 +512,1024,88,cx_heavy,44095,43971,124,0.0028121102165778434,0.3848140239715576,130.41046452522278 +512,1024,90,cx_heavy,43782,43668,114,0.0026038097848430863,0.4143550395965576,128.5522587299347 +512,1024,91,cx_heavy,43979,43888,91,0.002069169376293231,0.4098975658416748,127.2018768787384 +512,1024,89,cx_heavy,44157,44050,107,0.002423171864030618,0.42834973335266113,136.7038016319275 +512,1024,92,cx_heavy,43824,43676,148,0.0033771449434100037,0.40865087509155273,120.14050126075745 +512,1024,93,cx_heavy,44121,44017,104,0.0023571541896149225,0.415132999420166,127.42787957191467 +512,1024,96,cx_heavy,43927,43814,113,0.002572449746169782,0.4098246097564697,128.54263544082642 +512,1024,95,cx_heavy,43915,43798,117,0.0026642377319822386,0.4107663631439209,136.6919469833374 +512,1024,94,cx_heavy,43618,43510,108,0.0024760420010087577,0.4184684753417969,137.5416247844696 +512,1024,97,cx_heavy,44028,43909,119,0.0027028254746979197,0.41133713722229004,128.05703330039978 +512,1024,98,cx_heavy,43763,43652,111,0.0025363891872129426,0.4096221923828125,143.39046454429626 +512,1024,99,cx_heavy,43725,43603,122,0.0027901658090337335,0.40991950035095215,133.40935850143433 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_704.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_704.csv index f1e21d705..3852dad3b 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_704.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_704.csv @@ -75,3 +75,27 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving 704,1408,73,cx_heavy,83068,82913,155,0.0018659411566427505,0.39329028129577637,291.27780175209045 704,1408,74,cx_heavy,83105,82926,179,0.0021539016906323327,0.38187623023986816,279.13833928108215 704,1408,76,cx_heavy,82867,82700,167,0.0020152774928499885,0.8156208992004395,250.26658606529236 +704,1408,75,cx_heavy,83584,83448,136,0.0016271056661562022,0.8136143684387207,267.78215503692627 +704,1408,77,cx_heavy,82839,82649,190,0.0022936056688274845,0.4248514175415039,265.6228837966919 +704,1408,78,cx_heavy,83105,82963,142,0.0017086817880993923,0.4200325012207031,303.7935333251953 +704,1408,79,cx_heavy,82878,82738,140,0.0016892299524602428,0.393186092376709,309.3109345436096 +704,1408,81,cx_heavy,83434,83289,145,0.0017379006160558046,0.8268826007843018,259.01439905166626 +704,1408,80,cx_heavy,82787,82629,158,0.0019085122060226848,0.7985773086547852,267.9979748725891 +704,1408,82,cx_heavy,82934,82772,162,0.0019533605035329297,0.815204381942749,229.86137914657593 +704,1408,84,cx_heavy,83189,83047,142,0.0017069564485689213,0.4263477325439453,238.29805421829224 +704,1408,83,cx_heavy,82530,82356,174,0.0021083242457288257,0.4325528144836426,261.5889422893524 +704,1408,86,cx_heavy,82904,82745,159,0.0019178809225127858,0.4063105583190918,247.86338067054749 +704,1408,85,cx_heavy,83024,82853,171,0.002059645403738678,0.38999485969543457,254.27200889587402 +704,1408,87,cx_heavy,82949,82801,148,0.0017842288635185476,0.7732465267181396,250.88322973251343 +704,1408,89,cx_heavy,83291,83139,152,0.0018249270629479776,0.5970747470855713,208.52572011947632 +704,1408,88,cx_heavy,83132,82970,162,0.0019487080787181832,0.6755194664001465,232.33778047561646 +704,1408,90,cx_heavy,83054,82893,161,0.0019384978447756882,0.3991053104400635,217.4746322631836 +704,1408,91,cx_heavy,83062,82890,172,0.002070742337049433,0.3983941078186035,214.25367426872253 +704,1408,92,cx_heavy,82805,82637,168,0.0020288629913652557,0.3930532932281494,254.09980487823486 +704,1408,93,cx_heavy,83369,83204,165,0.001979152922549149,0.3894689083099365,251.8549461364746 +704,1408,94,cx_heavy,82716,82593,123,0.001487015813143769,0.38355135917663574,239.14437222480774 +704,1408,95,cx_heavy,83464,83268,196,0.002348317837630595,0.4050908088684082,240.05556631088257 +704,1408,96,cx_heavy,83361,83219,142,0.00170343445975936,0.4206874370574951,261.2580728530884 +704,1408,98,cx_heavy,82756,82582,174,0.002102566581275074,0.7833089828491211,252.7969355583191 +704,1408,97,cx_heavy,82849,82673,176,0.002124346703038057,0.7998592853546143,265.5828297138214 +704,1408,99,cx_heavy,82574,82411,163,0.001973986969263933,0.8159561157226562,264.7128300666809 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_768.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_768.csv new file mode 100644 index 000000000..70f297dd7 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_768.csv @@ -0,0 +1,9 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +768,1536,97,cx_heavy,98109,97898,211,0.002150669153696399,0.46895456314086914,255.1984462738037 +768,1536,99,cx_heavy,98344,98167,177,0.0017998047669405353,0.4795043468475342,261.5599205493927 +768,1536,93,cx_heavy,99068,98914,154,0.0015544878265433843,0.482708215713501,282.0519435405731 +768,1536,96,cx_heavy,98610,98443,167,0.0016935402089037622,0.4718155860900879,258.1918168067932 +768,1536,98,cx_heavy,98060,97887,173,0.0017642259840913725,0.47690415382385254,280.66868782043457 +768,1536,91,cx_heavy,98884,98717,167,0.0016888475385299947,0.4889099597930908,335.6027207374573 +768,1536,90,cx_heavy,98747,98563,184,0.0018633477472733348,0.9924616813659668,369.2593653202057 +768,1536,94,cx_heavy,98205,98050,155,0.0015783310422076268,0.9385771751403809,396.12156915664673 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_512.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_512.csv index 149d5d183..ddbdb6485 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/even/results_512.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_512.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -512,1024,0,even,78853,78672,181,0.0022954104472879917,0.30708742141723633,81.09349060058594 -512,1024,1,even,78923,78747,176,0.0022300216666877844,0.29135608673095703,86.7285225391388 -512,1024,2,even,78994,78795,199,0.002519178671797858,0.2922172546386719,86.18655490875244 -512,1024,3,even,78559,78401,158,0.0020112272304891863,0.3022270202636719,93.29463696479797 -512,1024,4,even,78653,78498,155,0.0019706813471831973,0.2910187244415283,85.66894698143005 -512,1024,5,even,78564,78394,170,0.0021638409449620693,0.29335689544677734,86.15731072425842 -512,1024,6,even,79076,78860,216,0.0027315493955182356,0.2927820682525635,81.5620858669281 -512,1024,7,even,78689,78515,174,0.002211236640445297,0.31101369857788086,87.1949405670166 -512,1024,8,even,78965,78756,209,0.0026467422275691763,0.3099813461303711,78.97045588493347 -512,1024,9,even,78634,78446,188,0.0023908233079838236,0.31073617935180664,88.85936403274536 -512,1024,10,even,78744,78536,208,0.002641471096210505,0.3318657875061035,85.76210522651672 -512,1024,11,even,78335,78158,177,0.002259526393055467,0.28945183753967285,86.6188530921936 -512,1024,12,even,78232,78054,178,0.0022752837713467633,0.30446815490722656,86.9066514968872 -512,1024,13,even,78644,78457,187,0.0023778037739687705,0.30197882652282715,88.37863898277283 -512,1024,14,even,78688,78510,178,0.0022620984139894267,0.2968428134918213,86.87962603569031 -512,1024,15,even,78678,78512,166,0.002109865527847683,0.32056260108947754,81.24312281608582 -512,1024,16,even,78725,78537,188,0.0023880597014925373,0.30702662467956543,86.25402212142944 -512,1024,18,even,78931,78761,170,0.002153779883695886,0.29370927810668945,83.14308190345764 -512,1024,17,even,78856,78694,162,0.0020543775996753576,0.30253100395202637,95.28130865097046 -512,1024,19,even,78738,78551,187,0.002374965074043029,0.30411314964294434,86.75967741012573 -512,1024,20,even,78385,78207,178,0.0022708426357083626,0.297321081161499,81.46586036682129 -512,1024,21,even,78667,78479,188,0.002389820382117025,0.305957555770874,84.30661201477051 -512,1024,22,even,78563,78393,170,0.0021638684877105,0.3206191062927246,86.6017439365387 -512,1024,23,even,78503,78344,159,0.0020254003031731273,0.30066490173339844,86.54163789749146 -512,1024,24,even,78519,78336,183,0.0023306460856607953,0.29851579666137695,86.86175799369812 -512,1024,25,even,79029,78835,194,0.0024547950752255502,0.2992279529571533,81.93379211425781 -512,1024,26,even,78464,78312,152,0.001937194127243067,0.2966017723083496,92.05478119850159 -512,1024,27,even,78274,78095,179,0.0022868385415335873,0.28840088844299316,82.82852745056152 -512,1024,28,even,79040,78867,173,0.002188765182186235,0.3023262023925781,87.25792455673218 -512,1024,29,even,78829,78652,177,0.002245366552918342,0.3226280212402344,84.88068628311157 -512,1024,30,even,78714,78552,162,0.002058083695403613,0.3090672492980957,85.73517298698425 -512,1024,32,even,78415,78254,161,0.0020531786010329657,0.2946014404296875,85.97565031051636 -512,1024,31,even,79104,78913,191,0.0024145428802588996,0.3115811347961426,93.12050318717957 -512,1024,34,even,79171,79002,169,0.0021346199997473825,0.31490278244018555,82.08245086669922 -512,1024,33,even,79123,78933,190,0.0024013245200510598,0.33785033226013184,92.78305840492249 -512,1024,35,even,78412,78203,209,0.0026654083558638984,0.29880452156066895,79.08612847328186 -512,1024,36,even,79109,78913,196,0.0024775942054633482,0.32492709159851074,83.30835890769958 -512,1024,37,even,78425,78239,186,0.0023716927000318774,0.2903776168823242,89.89177346229553 -512,1024,38,even,78924,78741,183,0.0023186863311540217,0.29840636253356934,84.10462927818298 -512,1024,39,even,78804,78630,174,0.002208009745698188,0.3094635009765625,81.27169966697693 -512,1024,40,even,78612,78438,174,0.00221340253396428,0.29654407501220703,86.49488043785095 -512,1024,41,even,78944,78741,203,0.0025714430482367246,0.29427242279052734,82.1436038017273 -512,1024,42,even,78565,78349,216,0.002749315853115255,0.30203962326049805,90.24598574638367 -512,1024,43,even,78974,78810,164,0.0020766328158634485,0.3017904758453369,87.0226457118988 -512,1024,44,even,78971,78807,164,0.002076711704296514,0.313948392868042,81.41566395759583 -512,1024,45,even,78568,78380,188,0.0023928316872008962,0.29631614685058594,92.05931568145752 -512,1024,46,even,78603,78415,188,0.002391766217574393,0.3132495880126953,79.34579086303711 -512,1024,49,even,78753,78570,183,0.00232372100110472,0.32398366928100586,81.93088245391846 -512,1024,47,even,78536,78366,170,0.0021646124070489967,0.31589794158935547,86.48255181312561 -512,1024,48,even,78574,78426,148,0.0018835747193728205,0.33070993423461914,89.2946515083313 -512,1024,50,even,78731,78585,146,0.0018544156685422514,0.31301450729370117,87.414386510849 -512,1024,51,even,78692,78492,200,0.0025415544146800183,0.3096468448638916,85.71439290046692 -512,1024,52,even,78593,78436,157,0.0019976333770183093,0.35329627990722656,86.42568492889404 -512,1024,53,even,78698,78505,193,0.0024524130219319424,0.2990531921386719,86.68070912361145 -512,1024,54,even,78684,78502,182,0.0023130496670225203,0.29796338081359863,86.33496117591858 -512,1024,55,even,78598,78436,162,0.0020611211481208172,0.30792665481567383,85.9445219039917 -512,1024,56,even,79067,78871,196,0.002478910291271959,0.29195237159729004,80.88776206970215 -512,1024,59,even,78505,78335,170,0.002165467167696325,0.30168819427490234,80.7627420425415 -512,1024,58,even,78552,78359,193,0.002456971178327732,0.29801273345947266,86.82593107223511 -512,1024,57,even,78613,78411,202,0.002569549565593477,0.30507707595825195,88.62204837799072 -512,1024,60,even,78550,78371,179,0.0022788033099936347,0.3119640350341797,85.94486570358276 -512,1024,61,even,79053,78871,182,0.002302252918927808,0.3172597885131836,94.21437335014343 -512,1024,64,even,78751,78570,181,0.0022983835125903163,0.3027627468109131,81.7500102519989 -512,1024,62,even,79002,78802,200,0.0025315814789499,0.32589054107666016,86.74396848678589 -512,1024,63,even,78659,78515,144,0.001830686888976468,0.30963587760925293,86.58724117279053 -512,1024,65,even,78776,78575,201,0.0025515385396567484,0.3141317367553711,91.22865629196167 -512,1024,66,even,78463,78270,193,0.002459758102545149,0.2854604721069336,86.55896806716919 -512,1024,67,even,78953,78775,178,0.0022545058452497057,0.31438612937927246,82.70379638671875 -512,1024,69,even,78715,78512,203,0.002578923966207203,0.30504488945007324,81.05349588394165 -512,1024,68,even,78509,78334,175,0.002229043803895095,0.33644986152648926,92.92602133750916 -512,1024,70,even,78482,78302,180,0.0022935195331413574,0.3016684055328369,85.36268424987793 -512,1024,71,even,79306,79136,170,0.0021435956926335966,0.30625462532043457,87.82043290138245 -512,1024,73,even,78490,78288,202,0.0025735762517518153,0.30868983268737793,86.49578309059143 -512,1024,72,even,78352,78170,182,0.0023228507249336327,0.29501938819885254,99.08650135993958 -512,1024,74,even,78815,78659,156,0.001979318657615936,0.3212153911590576,86.3957724571228 -512,1024,75,even,79123,78946,177,0.0022370233686791452,0.31491661071777344,85.71239852905273 -512,1024,76,even,79019,78848,171,0.002164036497551222,0.28756093978881836,84.64965581893921 -512,1024,79,even,78578,78418,160,0.0020361933365573063,0.31414270401000977,80.30468702316284 -512,1024,77,even,78960,78757,203,0.0025709219858156026,0.2945880889892578,93.27611589431763 -512,1024,78,even,78851,78671,180,0.002282786521413806,0.3221409320831299,86.93760776519775 -512,1024,80,even,79014,78846,168,0.0021262054825727087,0.3068218231201172,80.95283961296082 -512,1024,81,even,78466,78288,178,0.0022684984579308233,0.2968907356262207,86.48293709754944 -512,1024,83,even,78217,78015,202,0.002582558778782106,0.2969338893890381,82.27213335037231 -512,1024,84,even,78437,78252,185,0.0023585807718296214,0.31154465675354004,80.45373725891113 -512,1024,82,even,79342,79167,175,0.002205641400519271,0.3089783191680908,93.8441755771637 -512,1024,85,even,78927,78771,156,0.0019765099395644076,0.30968809127807617,84.50499701499939 -512,1024,86,even,78769,78560,209,0.0026533280859221266,0.30785703659057617,81.48602843284607 -512,1024,87,even,79123,78961,162,0.0020474451170961667,0.3191816806793213,82.65202641487122 -512,1024,88,even,78969,78786,183,0.002317365041978498,0.2989072799682617,86.83330655097961 -512,1024,89,even,78710,78543,167,0.002121712615931902,0.3124735355377197,80.81605100631714 -512,1024,90,even,78338,78178,160,0.0020424315147182723,0.31436610221862793,86.71695804595947 -512,1024,91,even,78947,78772,175,0.0022166770111593853,0.2962040901184082,90.90313458442688 -512,1024,92,even,78608,78449,159,0.002022694891105231,0.3068859577178955,85.50406384468079 -512,1024,94,even,78268,78061,207,0.0026447590330658764,0.30473780632019043,78.07396054267883 -512,1024,93,even,78764,78561,203,0.002577319587628866,0.3262486457824707,93.89652824401855 -512,1024,95,even,78573,78380,193,0.0024563145100734347,0.32309794425964355,86.40608644485474 -512,1024,96,even,79070,78878,192,0.0024282281522701402,0.3075597286224365,81.97762274742126 -512,1024,97,even,78692,78498,194,0.0024653077822396176,0.38045215606689453,82.76599621772766 -512,1024,98,even,79189,78970,219,0.0027655356173205874,0.30039501190185547,82.33488512039185 -512,1024,99,even,78401,78191,210,0.0026785372635553116,0.3182103633880615,84.37508702278137 +512,1024,0,even,78853,78672,181,0.0022954104472879917,0.18005013465881348,44.647215366363525 +512,1024,1,even,78923,78747,176,0.0022300216666877844,0.17933940887451172,47.89645552635193 +512,1024,4,even,78653,78498,155,0.0019706813471831973,0.1802966594696045,48.5327250957489 +512,1024,2,even,78994,78795,199,0.002519178671797858,0.18091130256652832,48.64027261734009 +512,1024,3,even,78559,78401,158,0.0020112272304891863,0.1825273036956787,48.7237663269043 +512,1024,5,even,78564,78394,170,0.0021638409449620693,0.1782362461090088,46.42292237281799 +512,1024,8,even,78965,78756,209,0.0026467422275691763,0.1813197135925293,43.42808222770691 +512,1024,6,even,79076,78860,216,0.0027315493955182356,0.20256614685058594,45.11579942703247 +512,1024,7,even,78689,78515,174,0.002211236640445297,0.18064570426940918,48.176061153411865 +512,1024,9,even,78634,78446,188,0.0023908233079838236,0.18464970588684082,51.28221535682678 +512,1024,10,even,78744,78536,208,0.002641471096210505,0.23091363906860352,47.05443000793457 +512,1024,11,even,78335,78158,177,0.002259526393055467,0.20314860343933105,47.43480205535889 +512,1024,12,even,78232,78054,178,0.0022752837713467633,0.18225407600402832,49.53121829032898 +512,1024,13,even,78644,78457,187,0.0023778037739687705,0.18188881874084473,48.23249578475952 +512,1024,14,even,78688,78510,178,0.0022620984139894267,0.18294000625610352,47.87457537651062 +512,1024,15,even,78678,78512,166,0.002109865527847683,0.17836594581604004,45.0679407119751 +512,1024,16,even,78725,78537,188,0.0023880597014925373,0.19195222854614258,47.60632658004761 +512,1024,18,even,78931,78761,170,0.002153779883695886,0.18148350715637207,45.15045404434204 +512,1024,19,even,78738,78551,187,0.002374965074043029,0.1813962459564209,44.35630989074707 +512,1024,17,even,78856,78694,162,0.0020543775996753576,0.1835789680480957,53.27168536186218 +512,1024,20,even,78385,78207,178,0.0022708426357083626,0.17904162406921387,47.952781677246094 +512,1024,21,even,78667,78479,188,0.002389820382117025,0.1789836883544922,47.083081007003784 +512,1024,22,even,78563,78393,170,0.0021638684877105,0.1789391040802002,47.9069128036499 +512,1024,23,even,78503,78344,159,0.0020254003031731273,0.1815798282623291,47.122809171676636 +512,1024,24,even,78519,78336,183,0.0023306460856607953,0.18088293075561523,47.75687050819397 +512,1024,25,even,79029,78835,194,0.0024547950752255502,0.1794910430908203,45.15201544761658 +512,1024,27,even,78274,78095,179,0.0022868385415335873,0.17930173873901367,46.124380111694336 +512,1024,29,even,78829,78652,177,0.002245366552918342,0.18148517608642578,44.605122566223145 +512,1024,28,even,79040,78867,173,0.002188765182186235,0.18009543418884277,48.18277049064636 +512,1024,26,even,78464,78312,152,0.001937194127243067,0.18141484260559082,55.076507568359375 +512,1024,30,even,78714,78552,162,0.002058083695403613,0.17912530899047852,47.652179479599 +512,1024,34,even,79171,79002,169,0.0021346199997473825,0.18152332305908203,44.82173776626587 +512,1024,31,even,79104,78913,191,0.0024145428802588996,0.1835925579071045,48.961708545684814 +512,1024,33,even,79123,78933,190,0.0024013245200510598,0.179703950881958,47.614046812057495 +512,1024,32,even,78415,78254,161,0.0020531786010329657,0.18158268928527832,50.923168897628784 +512,1024,35,even,78412,78203,209,0.0026654083558638984,0.19873404502868652,43.5401816368103 +512,1024,36,even,79109,78913,196,0.0024775942054633482,0.19086360931396484,47.503058433532715 +512,1024,39,even,78804,78630,174,0.002208009745698188,0.18012690544128418,43.78121519088745 +512,1024,38,even,78924,78741,183,0.0023186863311540217,0.17943787574768066,46.16610550880432 +512,1024,37,even,78425,78239,186,0.0023716927000318774,0.17976903915405273,50.05968117713928 +512,1024,40,even,78612,78438,174,0.00221340253396428,0.18218421936035156,46.64388346672058 +512,1024,41,even,78944,78741,203,0.0025714430482367246,0.19178414344787598,44.237305879592896 +512,1024,44,even,78971,78807,164,0.002076711704296514,0.17760443687438965,44.64850378036499 +512,1024,43,even,78974,78810,164,0.0020766328158634485,0.18319487571716309,47.66231393814087 +512,1024,42,even,78565,78349,216,0.002749315853115255,0.1798110008239746,48.330119609832764 +512,1024,45,even,78568,78380,188,0.0023928316872008962,0.17968273162841797,48.92819380760193 +512,1024,46,even,78603,78415,188,0.002391766217574393,0.1824643611907959,43.27254772186279 +512,1024,49,even,78753,78570,183,0.00232372100110472,0.17879962921142578,45.04753065109253 +512,1024,47,even,78536,78366,170,0.0021646124070489967,0.17848730087280273,48.36015748977661 +512,1024,48,even,78574,78426,148,0.0018835747193728205,0.18105721473693848,48.072197914123535 +512,1024,50,even,78731,78585,146,0.0018544156685422514,0.17758870124816895,47.4252724647522 +512,1024,51,even,78692,78492,200,0.0025415544146800183,0.17812418937683105,47.25195622444153 +512,1024,52,even,78593,78436,157,0.0019976333770183093,0.1797189712524414,47.83294987678528 +512,1024,53,even,78698,78505,193,0.0024524130219319424,0.1851820945739746,48.152331590652466 +512,1024,54,even,78684,78502,182,0.0023130496670225203,0.17943501472473145,48.95103979110718 +512,1024,55,even,78598,78436,162,0.0020611211481208172,0.18150091171264648,47.589282512664795 +512,1024,56,even,79067,78871,196,0.002478910291271959,0.1783435344696045,45.000164270401 +512,1024,58,even,78552,78359,193,0.002456971178327732,0.18167638778686523,46.982123374938965 +512,1024,57,even,78613,78411,202,0.002569549565593477,0.18574047088623047,51.58178448677063 +512,1024,59,even,78505,78335,170,0.002165467167696325,0.18074417114257812,49.7281768321991 +512,1024,60,even,78550,78371,179,0.0022788033099936347,0.17997431755065918,45.08229684829712 +512,1024,61,even,79053,78871,182,0.002302252918927808,0.18121027946472168,47.725720167160034 +512,1024,62,even,79002,78802,200,0.0025315814789499,0.18179011344909668,47.943472385406494 +512,1024,64,even,78751,78570,181,0.0022983835125903163,0.17753314971923828,45.26653289794922 +512,1024,63,even,78659,78515,144,0.001830686888976468,0.18338370323181152,50.456223249435425 +512,1024,65,even,78776,78575,201,0.0025515385396567484,0.17792487144470215,47.531787633895874 +512,1024,66,even,78463,78270,193,0.002459758102545149,0.1797928810119629,50.55022192001343 +512,1024,67,even,78953,78775,178,0.0022545058452497057,0.20522737503051758,48.67424154281616 +512,1024,69,even,78715,78512,203,0.002578923966207203,0.18222522735595703,45.691941261291504 +512,1024,68,even,78509,78334,175,0.002229043803895095,0.18050026893615723,56.077502965927124 +512,1024,70,even,78482,78302,180,0.0022935195331413574,0.18065738677978516,45.17407178878784 +512,1024,71,even,79306,79136,170,0.0021435956926335966,0.1865549087524414,50.121514081954956 +512,1024,73,even,78490,78288,202,0.0025735762517518153,0.17917609214782715,51.121119022369385 +512,1024,72,even,78352,78170,182,0.0023228507249336327,0.17907071113586426,55.44601655006409 +512,1024,74,even,78815,78659,156,0.001979318657615936,0.1830883026123047,48.433014154434204 +512,1024,75,even,79123,78946,177,0.0022370233686791452,0.17702317237854004,47.514319896698 +512,1024,76,even,79019,78848,171,0.002164036497551222,0.1807565689086914,44.45985722541809 +512,1024,79,even,78578,78418,160,0.0020361933365573063,0.17966198921203613,45.193591833114624 +512,1024,78,even,78851,78671,180,0.002282786521413806,0.18140888214111328,48.64423370361328 +512,1024,77,even,78960,78757,203,0.0025709219858156026,0.1809678077697754,51.04450082778931 +512,1024,80,even,79014,78846,168,0.0021262054825727087,0.1865067481994629,44.67086100578308 +512,1024,81,even,78466,78288,178,0.0022684984579308233,0.18008685111999512,46.80212354660034 +512,1024,83,even,78217,78015,202,0.002582558778782106,0.179443359375,44.6433482170105 +512,1024,84,even,78437,78252,185,0.0023585807718296214,0.17917561531066895,44.11830711364746 +512,1024,82,even,79342,79167,175,0.002205641400519271,0.17881369590759277,52.699039697647095 +512,1024,85,even,78927,78771,156,0.0019765099395644076,0.17787718772888184,48.96607685089111 +512,1024,86,even,78769,78560,209,0.0026533280859221266,0.18291258811950684,44.53351616859436 +512,1024,87,even,79123,78961,162,0.0020474451170961667,0.18628644943237305,46.527657985687256 +512,1024,88,even,78969,78786,183,0.002317365041978498,0.17989349365234375,48.08458590507507 +512,1024,89,even,78710,78543,167,0.002121712615931902,0.18100452423095703,44.457754373550415 +512,1024,90,even,78338,78178,160,0.0020424315147182723,0.18003344535827637,48.742812395095825 +512,1024,91,even,78947,78772,175,0.0022166770111593853,0.18537187576293945,51.68566823005676 +512,1024,94,even,78268,78061,207,0.0026447590330658764,0.1775953769683838,43.47416591644287 +512,1024,92,even,78608,78449,159,0.002022694891105231,0.17821192741394043,48.701430559158325 +512,1024,93,even,78764,78561,203,0.002577319587628866,0.18256068229675293,48.28329634666443 +512,1024,95,even,78573,78380,193,0.0024563145100734347,0.18121862411499023,47.83332824707031 +512,1024,96,even,79070,78878,192,0.0024282281522701402,0.18670988082885742,43.840988636016846 +512,1024,97,even,78692,78498,194,0.0024653077822396176,0.1786046028137207,44.96346473693848 +512,1024,98,even,79189,78970,219,0.0027655356173205874,0.1791067123413086,44.51180815696716 +512,1024,99,even,78401,78191,210,0.0026785372635553116,0.18016266822814941,46.01094937324524 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_768.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_768.csv index 2218bd974..e5c0d6e34 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/even/results_768.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_768.csv @@ -3,3 +3,99 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving 768,1536,96,even,177619,177341,278,0.0015651478726937996,0.8821120262145996,257.2942419052124 768,1536,99,even,176395,176154,241,0.0013662518778876952,0.8444037437438965,270.72307443618774 768,1536,98,even,177085,176823,262,0.0014795154869130644,0.7631571292877197,288.57820200920105 +768,1536,0,even,176974,176738,236,0.0013335292189813194,0.40439844131469727,220.84010338783264 +768,1536,1,even,177063,176782,281,0.001587005755013752,0.8368163108825684,222.7726821899414 +768,1536,4,even,176745,176476,269,0.0015219666751534696,0.8300864696502686,208.44897603988647 +768,1536,2,even,176627,176389,238,0.0013474723570009114,0.8405246734619141,237.62853288650513 +768,1536,3,even,176722,176468,254,0.001437285680334084,0.8274552822113037,241.9157109260559 +768,1536,5,even,177092,176838,254,0.001434282745691505,0.8369605541229248,210.53873944282532 +768,1536,6,even,176998,176746,252,0.0014237449010723285,0.8314290046691895,222.60798478126526 +768,1536,7,even,176724,176425,299,0.0016919037595346416,0.7837934494018555,196.46135830879211 +768,1536,8,even,176897,176611,286,0.0016167600355008846,0.9679982662200928,209.9877724647522 +768,1536,9,even,177237,176954,283,0.0015967320593329834,0.8382196426391602,223.99804615974426 +768,1536,10,even,177442,177147,295,0.0016625150753485647,0.784311056137085,223.77694082260132 +768,1536,11,even,176780,176513,267,0.0015103518497567598,0.8257248401641846,235.7526307106018 +768,1536,14,even,177094,176864,230,0.001298745299106689,0.7984762191772461,201.24181365966797 +768,1536,12,even,176394,176120,274,0.0015533408165810628,0.8258981704711914,232.3275215625763 +768,1536,13,even,176884,176647,237,0.0013398611519413854,0.7944777011871338,222.82560229301453 +768,1536,16,even,176923,176620,303,0.0017126094402649741,0.7482738494873047,196.02211117744446 +768,1536,15,even,177408,177170,238,0.001341540404040404,0.8350622653961182,238.4653046131134 +768,1536,19,even,177353,177100,253,0.0014265335235378032,0.8582150936126709,200.0464653968811 +768,1536,18,even,177018,176787,231,0.0013049520387757177,0.8427777290344238,227.0332968235016 +768,1536,17,even,177710,177471,239,0.0013448877384502841,0.8345284461975098,234.0416078567505 +768,1536,20,even,176257,175988,269,0.0015261805204899663,0.8246185779571533,214.20467591285706 +768,1536,21,even,176094,175824,270,0.0015332720024532351,0.8324213027954102,200.2909231185913 +768,1536,22,even,177237,176946,291,0.001641869361363598,0.827211856842041,211.568834066391 +768,1536,24,even,176405,176151,254,0.0014398684844533886,0.8119258880615234,203.92057275772095 +768,1536,23,even,176688,176428,260,0.0014715204201756768,0.8303968906402588,232.1515235900879 +768,1536,26,even,176888,176602,286,0.0016168422956899281,0.7986671924591064,218.10362243652344 +768,1536,25,even,176862,176610,252,0.0014248397055331276,0.7707293033599854,265.4256782531738 +768,1536,27,even,176885,176612,273,0.001543375639539814,0.8246619701385498,225.97240781784058 +768,1536,28,even,176881,176595,286,0.001616906281624369,0.8482420444488525,237.08838200569153 +768,1536,29,even,176780,176539,241,0.001363276388731757,0.8444764614105225,248.048583984375 +768,1536,30,even,177157,176911,246,0.0013885988134818268,0.8153636455535889,234.99891662597656 +768,1536,31,even,177317,177078,239,0.0013478685066857662,0.8456456661224365,210.64761352539062 +768,1536,33,even,177675,177394,281,0.0015815393274236668,0.8272771835327148,213.07176041603088 +768,1536,32,even,176840,176590,250,0.0014137073060393576,0.8353056907653809,220.74227380752563 +768,1536,34,even,177344,177054,290,0.0016352399855647781,0.7502963542938232,195.5299928188324 +768,1536,36,even,177939,177663,276,0.001551093352216209,0.8046820163726807,188.3660762310028 +768,1536,35,even,177521,177271,250,0.0014082840903329747,0.9920139312744141,196.70099902153015 +768,1536,38,even,177252,177020,232,0.0013088709859409202,0.8305931091308594,167.85099577903748 +768,1536,39,even,177111,176845,266,0.0015018829999265998,0.837679386138916,174.14228010177612 +768,1536,37,even,176701,176409,292,0.0016525090406958648,0.8363692760467529,186.0576605796814 +768,1536,41,even,178185,177912,273,0.0015321154979375368,0.7701656818389893,163.57115173339844 +768,1536,40,even,176907,176624,283,0.0015997105823964003,0.8153939247131348,179.76144003868103 +768,1536,43,even,177197,176914,283,0.0015970925015660537,0.42219972610473633,154.39839482307434 +768,1536,42,even,177183,176933,250,0.0014109705784414984,0.4311554431915283,169.2796504497528 +768,1536,44,even,176984,176740,244,0.0013786556976901868,0.42363905906677246,163.53755927085876 +768,1536,46,even,176715,176457,258,0.001459977930566166,0.4096951484680176,148.9219491481781 +768,1536,45,even,176566,176350,216,0.001223338581606878,0.4055159091949463,171.62578630447388 +768,1536,48,even,177251,176926,325,0.0018335580617316687,0.41162681579589844,149.8864026069641 +768,1536,49,even,177423,177168,255,0.0014372431984579226,0.403606653213501,147.54885840415955 +768,1536,47,even,176409,176159,250,0.0014171612559449914,0.41616034507751465,163.372088432312 +768,1536,50,even,176958,176705,253,0.0014297177861413444,0.3991355895996094,195.54456543922424 +768,1536,51,even,176843,176600,243,0.001374100190564512,0.4081242084503174,213.58988118171692 +768,1536,52,even,176778,176490,288,0.0016291619997963547,0.40276360511779785,218.2385597229004 +768,1536,54,even,177129,176870,259,0.0014622111568404947,0.40380430221557617,208.08181858062744 +768,1536,53,even,177178,176939,239,0.0013489259388863178,0.41052913665771484,243.25839638710022 +768,1536,56,even,177475,177178,297,0.0016734751373432878,0.8167686462402344,169.71575570106506 +768,1536,55,even,176189,175925,264,0.0014983909324645694,0.8365724086761475,186.72657227516174 +768,1536,58,even,176909,176658,251,0.0014188085399838334,0.8267128467559814,159.27935695648193 +768,1536,57,even,177167,176908,259,0.0014618975317073721,0.45357227325439453,163.28193140029907 +768,1536,59,even,177427,177190,237,0.0013357606226786227,0.43032288551330566,168.0624840259552 +768,1536,61,even,176815,176555,260,0.001470463478777253,0.41042447090148926,144.89079928398132 +768,1536,60,even,176315,176038,277,0.0015710518106797494,0.41343045234680176,165.92238664627075 +768,1536,63,even,177107,176821,286,0.001614843004511397,0.40340423583984375,151.4380555152893 +768,1536,62,even,177512,177243,269,0.001515390508810672,0.401644229888916,161.2844009399414 +768,1536,64,even,177622,177321,301,0.001694609901926563,0.3995208740234375,149.00716423988342 +768,1536,65,even,177010,176737,273,0.0015422857465679906,0.3983609676361084,138.9238440990448 +768,1536,66,even,177070,176793,277,0.001564353080702547,0.39975857734680176,165.6057801246643 +768,1536,68,even,177294,177011,283,0.0015962187101650365,0.4039185047149658,165.8417899608612 +768,1536,67,even,177499,177251,248,0.0013971909700899723,0.4094545841217041,177.60364818572998 +768,1536,69,even,177290,177000,290,0.001635738056291951,0.40195703506469727,181.47668027877808 +768,1536,70,even,176861,176625,236,0.0013343812372428065,0.40112805366516113,207.19728684425354 +768,1536,71,even,177676,177408,268,0.0015083635381255768,0.40663909912109375,195.57786583900452 +768,1536,73,even,177537,177261,276,0.001554605518849592,0.8265819549560547,168.75559735298157 +768,1536,72,even,177533,177233,300,0.0016898266801101767,0.8332064151763916,179.63461661338806 +768,1536,74,even,178076,177789,287,0.0016116714211909522,0.8204309940338135,173.01566076278687 +768,1536,75,even,177467,177187,280,0.0015777581184107468,0.43564867973327637,165.0300269126892 +768,1536,76,even,177369,177075,294,0.0016575613551409773,0.4202916622161865,141.77162718772888 +768,1536,78,even,177166,176863,303,0.0017102604337175305,0.41930103302001953,151.92827200889587 +768,1536,77,even,177177,176897,280,0.001580340563391411,0.40987515449523926,165.92539715766907 +768,1536,79,even,177464,177206,258,0.0014538159852139024,0.40821146965026855,164.2419970035553 +768,1536,80,even,176791,176521,270,0.0015272270647261456,0.4093763828277588,172.6316909790039 +768,1536,81,even,176813,176557,256,0.0014478573408063886,0.409168004989624,162.59491777420044 +768,1536,83,even,176749,176462,287,0.001623771563064006,0.39859867095947266,156.73032665252686 +768,1536,82,even,176828,176553,275,0.001555183568213179,0.40679144859313965,195.00854086875916 +768,1536,84,even,176985,176690,295,0.0016668079215752748,0.3968658447265625,192.61848163604736 +768,1536,86,even,176883,176582,301,0.001701689817563022,0.3965911865234375,210.7182755470276 +768,1536,85,even,176888,176616,272,0.001537696169327484,0.3994026184082031,221.71124839782715 +768,1536,87,even,177794,177520,274,0.0015411093737696434,0.8374412059783936,212.5979106426239 +768,1536,88,even,177047,176796,251,0.0014177026439307077,0.7995121479034424,223.63873434066772 +768,1536,89,even,177457,177194,263,0.0014820491724755857,0.8352789878845215,220.67244935035706 +768,1536,91,even,177187,176935,252,0.001422226235559042,0.7344942092895508,207.47962856292725 +768,1536,90,even,177131,176859,272,0.0015355866562036008,0.815056562423706,234.32000923156738 +768,1536,92,even,177213,176952,261,0.0014728039139340794,0.834334135055542,214.12803196907043 +768,1536,94,even,176587,176318,269,0.0015233284443362195,0.8334188461303711,198.52888441085815 +768,1536,95,even,177722,177455,267,0.0015023463611708173,0.7642359733581543,236.2781481742859 +768,1536,97,even,176399,176151,248,0.001405903661585383,0.8376080989837646,234.69859862327576 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_832.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_832.csv index 82ebdf0ed..0e9ae8899 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/even/results_832.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_832.csv @@ -1,3 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut 832,1664,96,even,208361,208080,281,0.0013486209031440624,0.9291436672210693,262.1466553211212 832,1664,99,even,207443,207136,307,0.001479924605795327,0.9588613510131836,354.8854260444641 +832,1664,0,even,208137,207860,277,0.0013308541969952483,0.48753881454467773,158.41527605056763 +832,1664,1,even,207684,207382,302,0.0014541322393636486,0.49913644790649414,174.7763638496399 +832,1664,2,even,207471,207184,287,0.0013833258624096861,0.4868497848510742,190.7568428516388 +832,1664,3,even,207968,207661,307,0.0014761886444068317,0.47841453552246094,161.51943278312683 +832,1664,4,even,208108,207807,301,0.0014463643877217598,0.4810645580291748,162.50063347816467 +832,1664,5,even,207804,207508,296,0.0014244191642124309,0.4727001190185547,171.0191729068756 +832,1664,6,even,207151,206899,252,0.001216503902950022,0.4760243892669678,174.21618008613586 +832,1664,7,even,208218,207950,268,0.0012871125455051918,0.47815394401550293,161.49809312820435 +832,1664,8,even,207791,207433,358,0.0017228850142691455,0.4740290641784668,194.6559977531433 +832,1664,9,even,207902,207616,286,0.0013756481419130166,0.4761230945587158,174.25471305847168 +832,1664,10,even,208019,207696,323,0.001552742778303905,0.4742875099182129,183.89760971069336 +832,1664,11,even,207383,207074,309,0.0014899967692626685,0.47677183151245117,243.59263730049133 +832,1664,12,even,207009,206703,306,0.0014781966001478197,0.47423481941223145,245.75176095962524 +832,1664,14,even,207798,207532,266,0.0012800893175102745,0.9763309955596924,218.89330768585205 +832,1664,13,even,208523,208240,283,0.0013571644374961035,0.9650611877441406,228.6411485671997 +832,1664,15,even,207822,207549,273,0.0013136241591361838,0.9930813312530518,202.23149585723877 +832,1664,16,even,207600,207330,270,0.001300578034682081,0.9773998260498047,175.3516879081726 +832,1664,17,even,208380,208079,301,0.0014444764372780498,0.9729690551757812,190.52526998519897 +832,1664,18,even,207384,207105,279,0.0013453304015738918,0.5293693542480469,171.433358669281 +832,1664,19,even,208878,208589,289,0.0013835827612290429,0.5118653774261475,172.2340371608734 +832,1664,20,even,207085,206814,271,0.0013086413791438298,0.49481916427612305,182.55164432525635 +832,1664,21,even,207118,206810,308,0.0014870750007242247,0.4777507781982422,208.55016136169434 +832,1664,22,even,207282,207037,245,0.0011819646664929903,0.4829409122467041,212.93308663368225 +832,1664,23,even,208031,207690,341,0.0016391787762400796,0.9921762943267822,183.92728900909424 +832,1664,24,even,207358,207074,284,0.0013696119754241457,0.9793932437896729,186.52137446403503 +832,1664,25,even,207809,207517,292,0.0014051364474108436,0.9583268165588379,193.03968834877014 +832,1664,26,even,207313,207015,298,0.001437440006174239,0.5383665561676025,159.11211800575256 +832,1664,27,even,207400,207096,304,0.0014657666345226615,0.832439661026001,203.93475341796875 +832,1664,29,even,207444,207178,266,0.0012822737702705307,0.48383593559265137,167.43523120880127 +832,1664,28,even,207758,207474,284,0.0013669750382656746,0.5121278762817383,174.69244575500488 +832,1664,30,even,207169,206910,259,0.001250187045359103,0.47338414192199707,163.67144179344177 +832,1664,31,even,208299,208006,293,0.0014066318129227697,0.5196311473846436,198.48152995109558 +832,1664,32,even,207619,207321,298,0.001435321430119594,0.4922196865081787,212.62755799293518 +832,1664,33,even,208006,207740,266,0.0012788092651173524,0.4751763343811035,225.71075010299683 +832,1664,35,even,208501,208215,286,0.0013716960590117074,0.4853696823120117,220.000723361969 +832,1664,34,even,207942,207649,293,0.0014090467534216271,0.47457242012023926,233.09963035583496 +832,1664,36,even,208278,207994,284,0.0013635621621102564,0.9734807014465332,207.46652483940125 +832,1664,37,even,207599,207318,281,0.001353571067298012,0.9635787010192871,191.21260523796082 +832,1664,39,even,207703,207406,297,0.0014299263852712767,0.5236029624938965,184.2885022163391 +832,1664,40,even,208596,208278,318,0.001524477938215498,0.514960765838623,182.01809406280518 +832,1664,38,even,208413,208141,272,0.0013051009294045956,0.5102541446685791,213.9641079902649 +832,1664,41,even,208603,208322,281,0.0013470563702343687,0.9520299434661865,179.31238389015198 +832,1664,42,even,207311,206978,333,0.0016062823487417454,0.5184869766235352,163.02409648895264 +832,1664,44,even,207784,207471,313,0.001506372001694067,0.812983512878418,153.21424078941345 +832,1664,43,even,207426,207154,272,0.0013113110217619778,0.5623629093170166,189.48398733139038 +832,1664,45,even,208478,208223,255,0.0012231506441926726,0.49720191955566406,192.02498388290405 +832,1664,47,even,207015,206716,299,0.0014443397821413907,0.473283052444458,233.12382245063782 +832,1664,46,even,208417,208151,266,0.001276287442962906,0.49661850929260254,264.12705659866333 +832,1664,48,even,207814,207507,307,0.0014772825699904723,0.9653716087341309,249.67237210273743 +832,1664,49,even,207884,207608,276,0.0013276635046468224,0.9613842964172363,284.06594038009644 +832,1664,50,even,207187,206905,282,0.0013610892575306366,0.9922769069671631,271.5184106826782 +832,1664,51,even,207530,207223,307,0.0014793041969835686,1.0065793991088867,221.12672305107117 +832,1664,52,even,207701,207453,248,0.0011940241019542516,0.9609928131103516,234.43853664398193 +832,1664,53,even,208125,207849,276,0.0013261261261261262,1.0163047313690186,268.4437470436096 +832,1664,55,even,207322,207056,266,0.0012830283327384456,0.917604923248291,233.936861038208 +832,1664,54,even,207445,207162,283,0.0013642170213791608,0.9887776374816895,249.5116035938263 +832,1664,57,even,207450,207141,309,0.0014895155459146783,0.9936246871948242,265.99685287475586 +832,1664,56,even,208050,207747,303,0.0014563806777217014,1.0100548267364502,274.70950841903687 +832,1664,58,even,207639,207297,342,0.001647089419617702,0.9542398452758789,250.86652326583862 +832,1664,59,even,207857,207551,306,0.001472165960251519,0.9913508892059326,232.28244972229004 +832,1664,60,even,207678,207388,290,0.0013963924922235384,0.9604294300079346,264.8052227497101 +832,1664,62,even,207711,207401,310,0.0014924582713481713,0.9460756778717041,264.50269079208374 +832,1664,61,even,207315,207041,274,0.0013216602754262837,0.9863035678863525,277.3960304260254 +832,1664,63,even,207579,207279,300,0.0014452328992817193,0.9969644546508789,239.7995822429657 +832,1664,64,even,208311,208056,255,0.0012241312268675203,0.9711041450500488,263.9748694896698 +832,1664,65,even,207496,207219,277,0.0013349654933107143,0.966651439666748,226.80237674713135 +832,1664,67,even,207854,207553,301,0.001448131861787601,0.5210766792297363,153.13644886016846 +832,1664,66,even,207577,207308,269,0.0012959046522495266,0.9519307613372803,174.3383228778839 +832,1664,68,even,207839,207542,297,0.0014289907091546822,0.5073742866516113,182.3154354095459 +832,1664,70,even,207750,207466,284,0.0013670276774969915,0.48219799995422363,171.11760091781616 +832,1664,69,even,207672,207396,276,0.0013290188373974343,0.48886895179748535,177.48036313056946 +832,1664,71,even,209062,208772,290,0.0013871483100706967,0.47930049896240234,180.07504987716675 +832,1664,72,even,207535,207267,268,0.0012913484472498614,0.48155951499938965,179.32679176330566 +832,1664,73,even,208211,207902,309,0.0014840714467535337,0.47695207595825195,234.82721209526062 +832,1664,75,even,208199,207904,295,0.0014169136259059843,0.4691283702850342,217.76776909828186 +832,1664,74,even,208858,208543,315,0.0015082017447260818,0.47161173820495605,248.398291349411 +832,1664,77,even,207312,207025,287,0.0013843868179362507,0.9775295257568359,225.44684076309204 +832,1664,76,even,208351,208041,310,0.00148787382829936,0.9779748916625977,237.67083501815796 +832,1664,79,even,207507,207202,305,0.0014698299334480283,0.9937379360198975,249.24844527244568 +832,1664,78,even,207874,207608,266,0.0012796213090622204,0.9845523834228516,266.3704047203064 +832,1664,80,even,207499,207175,324,0.0015614533082087142,0.9717886447906494,264.9943935871124 +832,1664,82,even,207979,207663,316,0.0015193841685939445,0.9730257987976074,261.01652359962463 +832,1664,81,even,207297,207017,280,0.0013507190166765558,0.9680554866790771,299.56281065940857 +832,1664,83,even,207725,207454,271,0.0013046094596220964,0.9539070129394531,223.85188722610474 +832,1664,85,even,207818,207544,274,0.0013184613459854295,0.9744870662689209,197.87382245063782 +832,1664,84,even,207324,207009,315,0.0015193610001736412,0.9628632068634033,232.20278930664062 +832,1664,86,even,207031,206740,291,0.0014055866029725017,0.7726914882659912,191.03007006645203 +832,1664,87,even,207852,207580,272,0.001308623443604103,0.7943222522735596,166.524760723114 +832,1664,88,even,207601,207304,297,0.0014306289468740516,0.5045239925384521,165.50279879570007 +832,1664,89,even,208086,207827,259,0.0012446776813432908,0.5103554725646973,163.62477684020996 +832,1664,90,even,207546,207255,291,0.0014020988118296667,0.5179851055145264,178.06107306480408 +832,1664,92,even,208089,207759,330,0.0015858598964865996,0.4839186668395996,162.27313613891602 +832,1664,91,even,208274,208012,262,0.0012579582665143032,0.5097362995147705,179.53924584388733 +832,1664,93,even,207840,207583,257,0.0012365280985373365,0.4947330951690674,177.12052989006042 +832,1664,94,even,207086,206795,291,0.0014052132930280174,0.47440433502197266,192.8551263809204 +832,1664,95,even,208443,208142,301,0.0014440398574190546,0.48670434951782227,176.90026879310608 +832,1664,98,even,207533,207206,327,0.0015756530286749578,0.4840199947357178,222.45613765716553 +832,1664,97,even,206701,206426,275,0.001330424139215582,0.4884803295135498,254.9502716064453 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_896.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_896.csv new file mode 100644 index 000000000..8a5c589c9 --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_896.csv @@ -0,0 +1,13 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +896,1792,25,even,241306,240990,316,0.0013095405833257357,0.9345996379852295,400.6377363204956 +896,1792,92,even,241616,241299,317,0.001311999205350639,0.5726897716522217,504.52931356430054 +896,1792,96,even,241464,241139,325,0.0013459563330351523,1.1207067966461182,461.1439962387085 +896,1792,99,even,240970,240675,295,0.0012242187824210483,1.1694691181182861,460.6775062084198 +896,1792,94,even,240637,240291,346,0.0014378503721372857,0.5630717277526855,337.0968084335327 +896,1792,98,even,240249,239935,314,0.0013069773443385821,0.5899207592010498,357.51097297668457 +896,1792,97,even,240137,239827,310,0.0012909297609281368,0.5608222484588623,386.3939301967621 +896,1792,12,even,240500,240185,315,0.0013097713097713097,1.0585401058197021,444.0638692378998 +896,1792,67,even,240699,240402,297,0.001233906248052547,1.0608575344085693,472.0359351634979 +896,1792,87,even,240637,240366,271,0.0011261776036104174,0.9811372756958008,501.0615494251251 +896,1792,93,even,241050,240763,287,0.0011906243517942337,0.6302666664123535,426.1918432712555 +896,1792,95,even,241208,240889,319,0.001322510032834732,0.805732250213623,455.5366942882538 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_960.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_960.csv new file mode 100644 index 000000000..b049294ad --- /dev/null +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_960.csv @@ -0,0 +1,3 @@ +n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut +960,1920,98,even,276146,275813,333,0.001205883844053508,0.6870801448822021,487.24829602241516 +960,1920,99,even,276946,276623,323,0.0011662923458002643,0.6492354869842529,586.7885210514069 From c0c39ca50b910680ac823ccfe393033d0ddf4795 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 18 Nov 2025 10:12:35 +0100 Subject: [PATCH 38/90] update simulations --- .../cx_heavy/results_128.csv | 200 +++++++++--------- .../cx_heavy/results_192.csv | 200 +++++++++--------- .../cx_heavy/results_256.csv | 200 +++++++++--------- .../cx_heavy/results_320.csv | 200 +++++++++--------- .../cx_heavy/results_384.csv | 200 +++++++++--------- .../cx_heavy/results_448.csv | 200 +++++++++--------- .../cx_heavy/results_64.csv | 200 +++++++++--------- .../even/results_128.csv | 200 +++++++++--------- .../even/results_192.csv | 200 +++++++++--------- .../even/results_256.csv | 200 +++++++++--------- .../even/results_320.csv | 200 +++++++++--------- .../even/results_384.csv | 200 +++++++++--------- .../even/results_448.csv | 200 +++++++++--------- .../even/results_64.csv | 200 +++++++++--------- 14 files changed, 1400 insertions(+), 1400 deletions(-) diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_128.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_128.csv index cbac323a5..10eafdde3 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_128.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_128.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -128,256,0,cx_heavy,2754,2733,21,0.007625272331154684,0.020255565643310547,3.625842571258545 -128,256,1,cx_heavy,2815,2787,28,0.00994671403197158,0.021774768829345703,3.0684757232666016 -128,256,2,cx_heavy,2787,2754,33,0.011840688912809472,0.020180225372314453,3.2316746711730957 -128,256,3,cx_heavy,2758,2732,26,0.009427121102248005,0.034291982650756836,3.4478394985198975 -128,256,4,cx_heavy,2809,2781,28,0.009967960128159488,0.02203536033630371,3.450812578201294 -128,256,5,cx_heavy,2812,2788,24,0.008534850640113799,0.021461963653564453,3.4673879146575928 -128,256,6,cx_heavy,2831,2804,27,0.009537265983751325,0.035573720932006836,3.122034788131714 -128,256,8,cx_heavy,2794,2742,52,0.018611309949892626,0.0352625846862793,2.8785758018493652 -128,256,7,cx_heavy,2788,2762,26,0.009325681492109038,0.021001338958740234,3.9433658123016357 -128,256,9,cx_heavy,2858,2829,29,0.010146955913226032,0.02165532112121582,3.6688194274902344 -128,256,11,cx_heavy,2805,2770,35,0.012477718360071301,0.021867990493774414,3.070176601409912 -128,256,10,cx_heavy,2763,2730,33,0.011943539630836048,0.021749496459960938,3.9087398052215576 -128,256,12,cx_heavy,2801,2781,20,0.007140307033202428,0.022971153259277344,3.454773187637329 -128,256,14,cx_heavy,2825,2773,52,0.018407079646017697,0.02115488052368164,2.8612377643585205 -128,256,13,cx_heavy,2764,2736,28,0.010130246020260492,0.022070646286010742,3.584190607070923 -128,256,16,cx_heavy,2817,2758,59,0.020944266950656727,0.02354717254638672,2.237983465194702 -128,256,15,cx_heavy,2789,2761,28,0.010039440659734672,0.037123680114746094,3.562718391418457 -128,256,17,cx_heavy,2851,2813,38,0.013328656611715188,0.021786928176879883,3.211442470550537 -128,256,18,cx_heavy,2792,2761,31,0.011103151862464184,0.0225069522857666,3.101576566696167 -128,256,19,cx_heavy,2742,2708,34,0.012399708242159009,0.02120804786682129,3.7828738689422607 -128,256,20,cx_heavy,2790,2748,42,0.015053763440860216,0.022254467010498047,3.218095064163208 -128,256,21,cx_heavy,2735,2710,25,0.009140767824497258,0.02114105224609375,3.0800185203552246 -128,256,23,cx_heavy,2869,2823,46,0.01603346113628442,0.021440505981445312,2.672879934310913 -128,256,22,cx_heavy,2847,2814,33,0.011591148577449948,0.02205801010131836,3.525148630142212 -128,256,24,cx_heavy,2690,2662,28,0.010408921933085501,0.02186870574951172,3.6600136756896973 -128,256,25,cx_heavy,2801,2767,34,0.012138521956444126,0.020855188369750977,3.226390838623047 -128,256,27,cx_heavy,2809,2764,45,0.016019935920256318,0.02147984504699707,2.409485101699829 -128,256,26,cx_heavy,2859,2824,35,0.01224204267226303,0.02482748031616211,3.2891225814819336 -128,256,28,cx_heavy,2819,2783,36,0.012770485987938986,0.020962953567504883,3.276585340499878 -128,256,29,cx_heavy,2846,2798,48,0.016865776528460996,0.021009206771850586,2.870060443878174 -128,256,31,cx_heavy,2699,2670,29,0.010744720266765468,0.020639419555664062,3.4474997520446777 -128,256,30,cx_heavy,2704,2672,32,0.011834319526627219,0.04100227355957031,3.968838930130005 -128,256,32,cx_heavy,2763,2734,29,0.010495837857401375,0.021111249923706055,3.4912807941436768 -128,256,33,cx_heavy,2878,2854,24,0.008339124391938846,0.020531177520751953,3.0171995162963867 -128,256,34,cx_heavy,2710,2659,51,0.018819188191881917,0.022235631942749023,2.790003776550293 -128,256,36,cx_heavy,2860,2831,29,0.01013986013986014,0.02164483070373535,2.968365430831909 -128,256,38,cx_heavy,2840,2799,41,0.014436619718309859,0.021019935607910156,2.623379945755005 -128,256,35,cx_heavy,2711,2684,27,0.009959424566580598,0.022940397262573242,3.5849997997283936 -128,256,37,cx_heavy,2773,2734,39,0.014064190407500902,0.02160501480102539,3.4703927040100098 -128,256,39,cx_heavy,2878,2849,29,0.010076441973592773,0.021074295043945312,4.063452482223511 -128,256,41,cx_heavy,2776,2722,54,0.019452449567723344,0.03453493118286133,2.965043544769287 -128,256,40,cx_heavy,2800,2765,35,0.0125,0.020701885223388672,3.4400293827056885 -128,256,42,cx_heavy,2808,2780,28,0.009971509971509971,0.020416259765625,3.4444098472595215 -128,256,43,cx_heavy,2789,2767,22,0.007888131946934385,0.020732879638671875,3.0337040424346924 -128,256,44,cx_heavy,2770,2744,26,0.009386281588447653,0.02159571647644043,3.5747227668762207 -128,256,45,cx_heavy,2819,2775,44,0.015608371763036538,0.021157026290893555,2.698711633682251 -128,256,46,cx_heavy,2823,2785,38,0.013460857244066596,0.02121901512145996,3.4150118827819824 -128,256,47,cx_heavy,2739,2710,29,0.01058780576852866,0.020303726196289062,3.3615145683288574 -128,256,48,cx_heavy,2774,2745,29,0.010454217736121124,0.024180889129638672,3.568118095397949 -128,256,49,cx_heavy,2787,2761,26,0.009329027628274129,0.020928621292114258,3.511409282684326 -128,256,50,cx_heavy,2761,2731,30,0.010865628395508874,0.02126169204711914,3.1559791564941406 -128,256,51,cx_heavy,2700,2671,29,0.01074074074074074,0.03319239616394043,2.846956491470337 -128,256,52,cx_heavy,2719,2684,35,0.012872379551305628,0.02018284797668457,3.135645627975464 -128,256,53,cx_heavy,2715,2691,24,0.008839779005524863,0.03598380088806152,3.0893473625183105 -128,256,54,cx_heavy,2794,2766,28,0.010021474588403722,0.0206453800201416,4.0137715339660645 -128,256,56,cx_heavy,2798,2759,39,0.013938527519656898,0.022258758544921875,2.7566540241241455 -128,256,55,cx_heavy,2730,2692,38,0.01391941391941392,0.021494388580322266,3.9193129539489746 -128,256,57,cx_heavy,2770,2750,20,0.007220216606498195,0.028626680374145508,2.9643702507019043 -128,256,58,cx_heavy,2885,2873,12,0.004159445407279029,0.020169734954833984,3.471113443374634 -128,256,59,cx_heavy,2890,2864,26,0.008996539792387544,0.02066326141357422,3.175518274307251 -128,256,60,cx_heavy,2747,2709,38,0.01383327266108482,0.02207803726196289,3.0655975341796875 -128,256,62,cx_heavy,2771,2732,39,0.014074341392998917,0.029953956604003906,3.059986114501953 -128,256,63,cx_heavy,2855,2811,44,0.015411558669001752,0.021682262420654297,2.8797709941864014 -128,256,61,cx_heavy,2690,2663,27,0.010037174721189592,0.02199244499206543,4.080195426940918 -128,256,64,cx_heavy,2839,2813,26,0.009158154279675942,0.02102828025817871,3.5976955890655518 -128,256,65,cx_heavy,2784,2761,23,0.008261494252873564,0.020238876342773438,3.5648348331451416 -128,256,66,cx_heavy,2789,2758,31,0.011115095016134816,0.021728992462158203,3.019083261489868 -128,256,67,cx_heavy,2810,2782,28,0.0099644128113879,0.021278858184814453,3.131861448287964 -128,256,68,cx_heavy,2859,2811,48,0.016789087093389297,0.02088451385498047,2.726921319961548 -128,256,69,cx_heavy,2763,2741,22,0.007962359753890699,0.021939516067504883,3.575449228286743 -128,256,70,cx_heavy,2755,2707,48,0.017422867513611617,0.020600080490112305,2.6670737266540527 -128,256,72,cx_heavy,2765,2731,34,0.012296564195298372,0.03434133529663086,2.2627148628234863 -128,256,71,cx_heavy,2766,2745,21,0.007592190889370932,0.021137714385986328,3.5181596279144287 -128,256,73,cx_heavy,2770,2744,26,0.009386281588447653,0.020606279373168945,3.171358346939087 -128,256,76,cx_heavy,2835,2802,33,0.01164021164021164,0.02254509925842285,2.692591428756714 -128,256,74,cx_heavy,2779,2749,30,0.010795250089960417,0.021547317504882812,3.1072726249694824 -128,256,75,cx_heavy,2751,2725,26,0.009451108687749909,0.022040843963623047,3.457435369491577 -128,256,78,cx_heavy,2791,2754,37,0.013256897169473307,0.020138025283813477,3.3922171592712402 -128,256,77,cx_heavy,2820,2784,36,0.01276595744680851,0.03794407844543457,3.5475525856018066 -128,256,79,cx_heavy,2801,2762,39,0.013923598714744734,0.02087092399597168,2.7557687759399414 -128,256,80,cx_heavy,2824,2783,41,0.01451841359773371,0.020394325256347656,2.9571900367736816 -128,256,83,cx_heavy,2690,2640,50,0.01858736059479554,0.022724628448486328,2.780282497406006 -128,256,81,cx_heavy,2782,2758,24,0.008626887131560028,0.021367311477661133,3.7124733924865723 -128,256,82,cx_heavy,2715,2693,22,0.008103130755064457,0.020769834518432617,3.9680004119873047 -128,256,84,cx_heavy,2753,2715,38,0.013803123864874683,0.021218299865722656,3.2273921966552734 -128,256,85,cx_heavy,2681,2664,17,0.006340917568071615,0.020545482635498047,3.2644169330596924 -128,256,87,cx_heavy,2753,2732,21,0.007628042135851798,0.02047586441040039,3.640448808670044 -128,256,86,cx_heavy,2802,2783,19,0.006780870806566738,0.03800487518310547,3.915653944015503 -128,256,88,cx_heavy,2761,2735,26,0.009416877942774357,0.021791934967041016,3.328836679458618 -128,256,89,cx_heavy,2817,2782,35,0.012424565140220093,0.021182537078857422,3.262587308883667 -128,256,90,cx_heavy,2842,2815,27,0.009500351864883884,0.020561933517456055,3.473818063735962 -128,256,91,cx_heavy,2823,2798,25,0.008855827134254339,0.021605253219604492,3.194540500640869 -128,256,92,cx_heavy,2740,2710,30,0.010948905109489052,0.020176410675048828,3.5610837936401367 -128,256,93,cx_heavy,2846,2813,33,0.011595221363316937,0.02078866958618164,3.0832197666168213 -128,256,94,cx_heavy,2774,2746,28,0.010093727469358327,0.020899057388305664,3.5035252571105957 -128,256,95,cx_heavy,2713,2684,29,0.010689273866568375,0.02109813690185547,3.6508588790893555 -128,256,96,cx_heavy,2897,2862,35,0.012081463583016915,0.02710437774658203,3.5311083793640137 -128,256,98,cx_heavy,2791,2759,32,0.01146542457900394,0.024513959884643555,3.211653232574463 -128,256,97,cx_heavy,2851,2821,30,0.01052262364082778,0.02263331413269043,3.5105364322662354 -128,256,99,cx_heavy,2793,2733,60,0.021482277121374866,0.020229101181030273,3.1453728675842285 +128,256,2,cx_heavy,2787,2754,33,0.011840688912809472,0.027964115142822266,2.2657577991485596 +128,256,0,cx_heavy,2754,2733,21,0.007625272331154684,0.019436359405517578,2.2220022678375244 +128,256,1,cx_heavy,2815,2787,28,0.00994671403197158,0.019323110580444336,2.291642427444458 +128,256,4,cx_heavy,2809,2781,28,0.009967960128159488,0.013116121292114258,2.4353811740875244 +128,256,3,cx_heavy,2758,2732,26,0.009427121102248005,0.022759437561035156,2.8274099826812744 +128,256,5,cx_heavy,2812,2788,24,0.008534850640113799,0.013004064559936523,2.5612215995788574 +128,256,8,cx_heavy,2794,2742,52,0.018611309949892626,0.013051509857177734,2.0867934226989746 +128,256,6,cx_heavy,2831,2804,27,0.009537265983751325,0.013145208358764648,2.719085454940796 +128,256,7,cx_heavy,2788,2762,26,0.009325681492109038,0.01978015899658203,2.9931328296661377 +128,256,11,cx_heavy,2805,2770,35,0.012477718360071301,0.021988868713378906,2.1608810424804688 +128,256,12,cx_heavy,2801,2781,20,0.007140307033202428,0.019521713256835938,2.2928099632263184 +128,256,9,cx_heavy,2858,2829,29,0.010146955913226032,0.019624710083007812,2.860797643661499 +128,256,10,cx_heavy,2763,2730,33,0.011943539630836048,0.0131683349609375,2.85932993888855 +128,256,14,cx_heavy,2825,2773,52,0.018407079646017697,0.013176202774047852,2.2088587284088135 +128,256,13,cx_heavy,2764,2736,28,0.010130246020260492,0.03178286552429199,2.4018936157226562 +128,256,16,cx_heavy,2817,2758,59,0.020944266950656727,0.013338565826416016,1.714113712310791 +128,256,15,cx_heavy,2789,2761,28,0.010039440659734672,0.012879371643066406,2.210543155670166 +128,256,17,cx_heavy,2851,2813,38,0.013328656611715188,0.013416290283203125,2.685701847076416 +128,256,18,cx_heavy,2792,2761,31,0.011103151862464184,0.019559144973754883,2.3977861404418945 +128,256,20,cx_heavy,2790,2748,42,0.015053763440860216,0.024155378341674805,2.1714372634887695 +128,256,23,cx_heavy,2869,2823,46,0.01603346113628442,0.03146052360534668,1.9491496086120605 +128,256,21,cx_heavy,2735,2710,25,0.009140767824497258,0.02663707733154297,2.344330310821533 +128,256,19,cx_heavy,2742,2708,34,0.012399708242159009,0.013017892837524414,2.485163927078247 +128,256,22,cx_heavy,2847,2814,33,0.011591148577449948,0.023899555206298828,2.739677667617798 +128,256,25,cx_heavy,2801,2767,34,0.012138521956444126,0.013091325759887695,2.198413133621216 +128,256,24,cx_heavy,2690,2662,28,0.010408921933085501,0.012904167175292969,2.4016077518463135 +128,256,26,cx_heavy,2859,2824,35,0.01224204267226303,0.012947320938110352,2.4323463439941406 +128,256,27,cx_heavy,2809,2764,45,0.016019935920256318,0.0356602668762207,2.104593515396118 +128,256,29,cx_heavy,2846,2798,48,0.016865776528460996,0.02729320526123047,2.036888599395752 +128,256,28,cx_heavy,2819,2783,36,0.012770485987938986,0.02204275131225586,2.2565345764160156 +128,256,34,cx_heavy,2710,2659,51,0.018819188191881917,0.023576974868774414,1.742936611175537 +128,256,30,cx_heavy,2704,2672,32,0.011834319526627219,0.013294458389282227,2.6358773708343506 +128,256,31,cx_heavy,2699,2670,29,0.010744720266765468,0.01300668716430664,2.5569636821746826 +128,256,33,cx_heavy,2878,2854,24,0.008339124391938846,0.01319432258605957,2.124281644821167 +128,256,32,cx_heavy,2763,2734,29,0.010495837857401375,0.012871980667114258,2.7611050605773926 +128,256,35,cx_heavy,2711,2684,27,0.009959424566580598,0.013076066970825195,2.818737030029297 +128,256,36,cx_heavy,2860,2831,29,0.01013986013986014,0.0166323184967041,2.483652114868164 +128,256,38,cx_heavy,2840,2799,41,0.014436619718309859,0.020635366439819336,1.6014046669006348 +128,256,41,cx_heavy,2776,2722,54,0.019452449567723344,0.012840509414672852,2.048220157623291 +128,256,42,cx_heavy,2808,2780,28,0.009971509971509971,0.015446186065673828,1.848586082458496 +128,256,40,cx_heavy,2800,2765,35,0.0125,0.03729081153869629,2.23602294921875 +128,256,37,cx_heavy,2773,2734,39,0.014064190407500902,0.02578139305114746,2.8182356357574463 +128,256,39,cx_heavy,2878,2849,29,0.010076441973592773,0.01958942413330078,2.486351490020752 +128,256,43,cx_heavy,2789,2767,22,0.007888131946934385,0.012970209121704102,2.64337158203125 +128,256,45,cx_heavy,2819,2775,44,0.015608371763036538,0.013091564178466797,2.155402660369873 +128,256,44,cx_heavy,2770,2744,26,0.009386281588447653,0.01310276985168457,2.6790518760681152 +128,256,46,cx_heavy,2823,2785,38,0.013460857244066596,0.012756824493408203,2.5855660438537598 +128,256,48,cx_heavy,2774,2745,29,0.010454217736121124,0.03631401062011719,1.9508042335510254 +128,256,47,cx_heavy,2739,2710,29,0.01058780576852866,0.013120889663696289,2.1347732543945312 +128,256,50,cx_heavy,2761,2731,30,0.010865628395508874,0.024179935455322266,2.3500618934631348 +128,256,51,cx_heavy,2700,2671,29,0.01074074074074074,0.017612457275390625,2.290255546569824 +128,256,49,cx_heavy,2787,2761,26,0.009329027628274129,0.021984100341796875,2.537781238555908 +128,256,52,cx_heavy,2719,2684,35,0.012872379551305628,0.013186216354370117,2.5919487476348877 +128,256,53,cx_heavy,2715,2691,24,0.008839779005524863,0.01325225830078125,2.700472354888916 +128,256,56,cx_heavy,2798,2759,39,0.013938527519656898,0.019004344940185547,2.026611566543579 +128,256,54,cx_heavy,2794,2766,28,0.010021474588403722,0.023137331008911133,2.888495445251465 +128,256,55,cx_heavy,2730,2692,38,0.01391941391941392,0.02347254753112793,2.7551801204681396 +128,256,57,cx_heavy,2770,2750,20,0.007220216606498195,0.01930403709411621,2.4798073768615723 +128,256,59,cx_heavy,2890,2864,26,0.008996539792387544,0.027408123016357422,2.1567752361297607 +128,256,58,cx_heavy,2885,2873,12,0.004159445407279029,0.035912513732910156,2.382044792175293 +128,256,60,cx_heavy,2747,2709,38,0.01383327266108482,0.01310110092163086,2.2109086513519287 +128,256,61,cx_heavy,2690,2663,27,0.010037174721189592,0.01318979263305664,2.6792285442352295 +128,256,62,cx_heavy,2771,2732,39,0.014074341392998917,0.01897907257080078,2.3255066871643066 +128,256,63,cx_heavy,2855,2811,44,0.015411558669001752,0.034119606018066406,1.9107191562652588 +128,256,64,cx_heavy,2839,2813,26,0.009158154279675942,0.020061492919921875,2.191758632659912 +128,256,68,cx_heavy,2859,2811,48,0.016789087093389297,0.014801740646362305,1.8454763889312744 +128,256,66,cx_heavy,2789,2758,31,0.011115095016134816,0.013103485107421875,2.262113571166992 +128,256,65,cx_heavy,2784,2761,23,0.008261494252873564,0.02733325958251953,2.399686336517334 +128,256,67,cx_heavy,2810,2782,28,0.0099644128113879,0.013205528259277344,2.4495863914489746 +128,256,69,cx_heavy,2763,2741,22,0.007962359753890699,0.013763904571533203,2.4887897968292236 +128,256,70,cx_heavy,2755,2707,48,0.017422867513611617,0.01322317123413086,2.300482749938965 +128,256,72,cx_heavy,2765,2731,34,0.012296564195298372,0.031102895736694336,1.7214875221252441 +128,256,71,cx_heavy,2766,2745,21,0.007592190889370932,0.022815465927124023,2.603801727294922 +128,256,74,cx_heavy,2779,2749,30,0.010795250089960417,0.018950223922729492,2.0910542011260986 +128,256,76,cx_heavy,2835,2802,33,0.01164021164021164,0.023196935653686523,2.168818473815918 +128,256,73,cx_heavy,2770,2744,26,0.009386281588447653,0.013176918029785156,2.651461362838745 +128,256,75,cx_heavy,2751,2725,26,0.009451108687749909,0.02382659912109375,2.5075550079345703 +128,256,77,cx_heavy,2820,2784,36,0.01276595744680851,0.012899637222290039,2.489292860031128 +128,256,78,cx_heavy,2791,2754,37,0.013256897169473307,0.013063907623291016,2.629167079925537 +128,256,79,cx_heavy,2801,2762,39,0.013923598714744734,0.023622512817382812,2.1686489582061768 +128,256,80,cx_heavy,2824,2783,41,0.01451841359773371,0.022507429122924805,2.3455443382263184 +128,256,81,cx_heavy,2782,2758,24,0.008626887131560028,0.02456068992614746,2.557833671569824 +128,256,83,cx_heavy,2690,2640,50,0.01858736059479554,0.02332758903503418,2.162156820297241 +128,256,84,cx_heavy,2753,2715,38,0.013803123864874683,0.013217926025390625,2.240708589553833 +128,256,82,cx_heavy,2715,2693,22,0.008103130755064457,0.03114008903503418,2.646287441253662 +128,256,85,cx_heavy,2681,2664,17,0.006340917568071615,0.01308751106262207,2.491438865661621 +128,256,86,cx_heavy,2802,2783,19,0.006780870806566738,0.012963294982910156,2.438265323638916 +128,256,87,cx_heavy,2753,2732,21,0.007628042135851798,0.013006925582885742,2.689377546310425 +128,256,88,cx_heavy,2761,2735,26,0.009416877942774357,0.012786149978637695,2.473497152328491 +128,256,89,cx_heavy,2817,2782,35,0.012424565140220093,0.013046741485595703,2.3596019744873047 +128,256,93,cx_heavy,2846,2813,33,0.011595221363316937,0.019669055938720703,2.0705277919769287 +128,256,90,cx_heavy,2842,2815,27,0.009500351864883884,0.012744903564453125,2.6690821647644043 +128,256,92,cx_heavy,2740,2710,30,0.010948905109489052,0.019604206085205078,2.4894986152648926 +128,256,91,cx_heavy,2823,2798,25,0.008855827134254339,0.018323898315429688,2.6557765007019043 +128,256,94,cx_heavy,2774,2746,28,0.010093727469358327,0.024853229522705078,2.3794872760772705 +128,256,95,cx_heavy,2713,2684,29,0.010689273866568375,0.013366460800170898,2.9401590824127197 +128,256,96,cx_heavy,2897,2862,35,0.012081463583016915,0.01825428009033203,2.4291064739227295 +128,256,97,cx_heavy,2851,2821,30,0.01052262364082778,0.024834871292114258,2.556549310684204 +128,256,98,cx_heavy,2791,2759,32,0.01146542457900394,0.01310586929321289,2.5429461002349854 +128,256,99,cx_heavy,2793,2733,60,0.021482277121374866,0.012991666793823242,2.171438455581665 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_192.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_192.csv index 73927d04a..09204e879 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_192.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_192.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -192,384,1,cx_heavy,6208,6153,55,0.008859536082474227,0.05915665626525879,9.336485147476196 -192,384,0,cx_heavy,6277,6222,55,0.008762147522701928,0.11342263221740723,10.486837148666382 -192,384,6,cx_heavy,6271,6226,45,0.0071758890129166005,0.056664466857910156,8.778360605239868 -192,384,2,cx_heavy,6049,5983,66,0.010910894362704579,0.059356689453125,10.217912435531616 -192,384,4,cx_heavy,6195,6147,48,0.00774818401937046,0.05951237678527832,10.132739305496216 -192,384,5,cx_heavy,6294,6239,55,0.008738481093104544,0.05948019027709961,11.009731769561768 -192,384,7,cx_heavy,6257,6192,65,0.010388365031165095,0.0680696964263916,10.571857690811157 -192,384,3,cx_heavy,6288,6249,39,0.006202290076335878,0.10115170478820801,12.440218925476074 -192,384,8,cx_heavy,6093,6035,58,0.009519120301985885,0.055873870849609375,9.548831701278687 -192,384,10,cx_heavy,6200,6132,68,0.01096774193548387,0.11209940910339355,8.822561740875244 -192,384,13,cx_heavy,6124,6069,55,0.008981058131939909,0.05791211128234863,8.832369327545166 -192,384,11,cx_heavy,6142,6100,42,0.006838163464669489,0.10965132713317871,10.271458148956299 -192,384,9,cx_heavy,6287,6248,39,0.0062032766025131225,0.08400559425354004,11.712997436523438 -192,384,15,cx_heavy,6288,6197,91,0.014472010178117048,0.06624674797058105,7.250017404556274 -192,384,12,cx_heavy,6375,6335,40,0.006274509803921568,0.125,11.71639895439148 -192,384,14,cx_heavy,6220,6176,44,0.00707395498392283,0.07578897476196289,10.22253131866455 -192,384,16,cx_heavy,6267,6217,50,0.007978299026647519,0.05999469757080078,11.41335415840149 -192,384,17,cx_heavy,6211,6175,36,0.005796168088874577,0.07063651084899902,11.735298871994019 -192,384,18,cx_heavy,6363,6303,60,0.00942951438000943,0.07351469993591309,10.461268186569214 -192,384,20,cx_heavy,6025,5974,51,0.008464730290456432,0.05576658248901367,9.692607879638672 -192,384,21,cx_heavy,6196,6152,44,0.0071013557133634605,0.09179449081420898,10.044300079345703 -192,384,22,cx_heavy,6281,6214,67,0.010667091227511543,0.0605015754699707,9.8000807762146 -192,384,19,cx_heavy,6306,6270,36,0.005708848715509039,0.06778740882873535,11.529431104660034 -192,384,23,cx_heavy,6274,6223,51,0.008128785463818936,0.06512641906738281,11.576297521591187 -192,384,24,cx_heavy,6237,6193,44,0.007054673721340388,0.11172795295715332,11.155819177627563 -192,384,25,cx_heavy,6210,6166,44,0.007085346215780998,0.05943918228149414,10.975572109222412 -192,384,26,cx_heavy,6320,6270,50,0.007911392405063292,0.07486176490783691,11.866185665130615 -192,384,28,cx_heavy,6226,6169,57,0.00915515579826534,0.0856633186340332,9.158692598342896 -192,384,27,cx_heavy,6326,6286,40,0.006323110970597534,0.06360507011413574,11.5674467086792 -192,384,31,cx_heavy,6186,6136,50,0.008082767539605561,0.06859779357910156,9.141381978988647 -192,384,30,cx_heavy,6077,6028,49,0.008063189073556031,0.06244063377380371,9.555087089538574 -192,384,29,cx_heavy,6199,6167,32,0.005162122923052105,0.05866599082946777,11.704736471176147 -192,384,34,cx_heavy,6249,6187,62,0.00992158745399264,0.06022930145263672,8.47720718383789 -192,384,32,cx_heavy,6155,6129,26,0.004224207961007311,0.08517885208129883,11.40017580986023 -192,384,33,cx_heavy,6264,6209,55,0.008780332056194126,0.0765843391418457,9.770399808883667 -192,384,38,cx_heavy,6307,6256,51,0.008086253369272238,0.057195425033569336,9.023969888687134 -192,384,36,cx_heavy,6355,6308,47,0.007395751376868607,0.07856297492980957,10.295918464660645 -192,384,35,cx_heavy,6076,6024,52,0.008558262014483212,0.062148332595825195,10.415210723876953 -192,384,37,cx_heavy,6184,6126,58,0.009379042690815007,0.05751919746398926,9.94965410232544 -192,384,39,cx_heavy,6342,6286,56,0.008830022075055188,0.07544350624084473,10.616153478622437 -192,384,40,cx_heavy,6201,6156,45,0.00725689404934688,0.10265016555786133,9.629728317260742 -192,384,41,cx_heavy,6126,6080,46,0.0075089781260202415,0.06009960174560547,10.496615171432495 -192,384,43,cx_heavy,6262,6186,76,0.012136697540721815,0.07535409927368164,10.34505295753479 -192,384,42,cx_heavy,6145,6107,38,0.006183889340927584,0.06669831275939941,11.488541841506958 -192,384,46,cx_heavy,6245,6193,52,0.008326661329063251,0.05739235877990723,9.029820680618286 -192,384,44,cx_heavy,6251,6204,47,0.007518796992481203,0.06884527206420898,9.853914499282837 -192,384,47,cx_heavy,6201,6156,45,0.00725689404934688,0.0823514461517334,9.224544763565063 -192,384,45,cx_heavy,6133,6089,44,0.0071743029512473504,0.12288641929626465,9.989641189575195 -192,384,48,cx_heavy,6113,6050,63,0.010305905447407166,0.05490469932556152,10.180066585540771 -192,384,49,cx_heavy,6218,6166,52,0.008362817626246381,0.049214839935302734,10.576935529708862 -192,384,50,cx_heavy,6108,6056,52,0.008513425016371971,0.10515356063842773,9.155334234237671 -192,384,52,cx_heavy,6197,6129,68,0.010973051476520897,0.05111265182495117,10.242212057113647 -192,384,51,cx_heavy,6181,6119,62,0.010030739362562692,0.07405567169189453,11.800076246261597 -192,384,55,cx_heavy,6171,6108,63,0.010209042294603793,0.07508397102355957,8.68112325668335 -192,384,54,cx_heavy,6301,6259,42,0.0066656086335502305,0.11484336853027344,10.848526000976562 -192,384,53,cx_heavy,6082,6051,31,0.005097007563301546,0.05762457847595215,11.901136875152588 -192,384,57,cx_heavy,6192,6153,39,0.006298449612403101,0.11696267127990723,9.5728280544281 -192,384,56,cx_heavy,6283,6230,53,0.00843546076714945,0.0668635368347168,11.412594079971313 -192,384,58,cx_heavy,6301,6266,35,0.005554673861291859,0.1148672103881836,11.667515754699707 -192,384,59,cx_heavy,6288,6245,43,0.006838422391857507,0.05930638313293457,10.66615891456604 -192,384,61,cx_heavy,6174,6120,54,0.008746355685131196,0.07477402687072754,9.56137752532959 -192,384,60,cx_heavy,6313,6258,55,0.008712181213369238,0.05611991882324219,11.819213628768921 -192,384,62,cx_heavy,6152,6114,38,0.006176853055916775,0.05847668647766113,12.12900424003601 -192,384,65,cx_heavy,6197,6155,42,0.006777472970792319,0.06879115104675293,10.532219648361206 -192,384,63,cx_heavy,6228,6180,48,0.007707129094412331,0.05662035942077637,11.715073585510254 -192,384,64,cx_heavy,6123,6085,38,0.006206108116936142,0.11821413040161133,12.501721858978271 -192,384,66,cx_heavy,6164,6110,54,0.008760545100584036,0.0753786563873291,11.552880764007568 -192,384,68,cx_heavy,6290,6241,49,0.0077901430842607314,0.07131099700927734,10.481255769729614 -192,384,67,cx_heavy,6372,6324,48,0.007532956685499058,0.059448957443237305,11.44066596031189 -192,384,69,cx_heavy,6202,6161,41,0.006610770719122864,0.07238268852233887,10.903240203857422 -192,384,70,cx_heavy,6194,6147,47,0.007587988375847595,0.06189250946044922,10.163739204406738 -192,384,73,cx_heavy,6100,6050,50,0.00819672131147541,0.07432866096496582,10.245641231536865 -192,384,71,cx_heavy,6238,6211,27,0.004328310355883296,0.07916808128356934,11.037895679473877 -192,384,77,cx_heavy,6302,6250,52,0.008251348778165662,0.0593256950378418,8.340699672698975 -192,384,72,cx_heavy,6143,6102,41,0.0066742633892235064,0.08817267417907715,11.567254781723022 -192,384,75,cx_heavy,6299,6251,48,0.007620257183679949,0.07545685768127441,11.015212297439575 -192,384,74,cx_heavy,6199,6154,45,0.007259235360542023,0.05727434158325195,11.766112804412842 -192,384,76,cx_heavy,6119,6075,44,0.007190717437489786,0.08055567741394043,10.645101070404053 -192,384,78,cx_heavy,6185,6141,44,0.0071139854486661274,0.05254840850830078,10.941181421279907 -192,384,79,cx_heavy,6185,6146,39,0.006305578011317704,0.08493256568908691,11.050558805465698 -192,384,80,cx_heavy,6093,6039,54,0.008862629246676515,0.09888482093811035,9.882275581359863 -192,384,81,cx_heavy,6247,6177,70,0.011205378581719225,0.06403231620788574,10.029029130935669 -192,384,82,cx_heavy,6063,6015,48,0.007916872835230085,0.11599183082580566,10.502073764801025 -192,384,84,cx_heavy,6208,6164,44,0.007087628865979381,0.10004591941833496,10.378608465194702 -192,384,83,cx_heavy,6329,6281,48,0.007584136514457261,0.05870366096496582,10.536473989486694 -192,384,85,cx_heavy,6046,5999,47,0.007773734700628514,0.06507110595703125,11.621386766433716 -192,384,86,cx_heavy,6303,6270,33,0.005235602094240838,0.07303953170776367,9.925051212310791 -192,384,87,cx_heavy,6129,6097,32,0.0052210801109479526,0.06732559204101562,10.63979983329773 -192,384,88,cx_heavy,6272,6236,36,0.005739795918367347,0.06852459907531738,10.42997670173645 -192,384,90,cx_heavy,6160,6118,42,0.006818181818181818,0.05985736846923828,9.0446457862854 -192,384,89,cx_heavy,6273,6234,39,0.006217120994739359,0.062284231185913086,10.282379388809204 -192,384,91,cx_heavy,6339,6286,53,0.00836094021138981,0.05014181137084961,10.178744792938232 -192,384,94,cx_heavy,6239,6199,40,0.006411283859592883,0.059372901916503906,9.111717224121094 -192,384,92,cx_heavy,6288,6254,34,0.005407124681933842,0.13669514656066895,12.41325831413269 -192,384,93,cx_heavy,6273,6243,30,0.004782400765184123,0.07659149169921875,10.914571285247803 -192,384,95,cx_heavy,6146,6119,27,0.004393101204035145,0.06275057792663574,10.134480714797974 -192,384,96,cx_heavy,6295,6223,72,0.011437648927720413,0.06422901153564453,9.641643047332764 -192,384,97,cx_heavy,6325,6282,43,0.006798418972332016,0.0697317123413086,9.743156909942627 -192,384,98,cx_heavy,6310,6285,25,0.003961965134706815,0.06608438491821289,10.754282712936401 -192,384,99,cx_heavy,6255,6202,53,0.00847322142286171,0.058844804763793945,11.181523323059082 +192,384,1,cx_heavy,6208,6153,55,0.008859536082474227,0.07335996627807617,5.979369878768921 +192,384,2,cx_heavy,6049,5983,66,0.010910894362704579,0.05444931983947754,6.536307096481323 +192,384,3,cx_heavy,6288,6249,39,0.006202290076335878,0.04948782920837402,7.0928404331207275 +192,384,4,cx_heavy,6195,6147,48,0.00774818401937046,0.028354644775390625,7.298751354217529 +192,384,6,cx_heavy,6271,6226,45,0.0071758890129166005,0.029354095458984375,5.75676703453064 +192,384,0,cx_heavy,6277,6222,55,0.008762147522701928,0.04332113265991211,7.883454084396362 +192,384,5,cx_heavy,6294,6239,55,0.008738481093104544,0.03587222099304199,6.329941749572754 +192,384,8,cx_heavy,6093,6035,58,0.009519120301985885,0.028973102569580078,5.5788679122924805 +192,384,7,cx_heavy,6257,6192,65,0.010388365031165095,0.02893352508544922,6.847882986068726 +192,384,15,cx_heavy,6288,6197,91,0.014472010178117048,0.029134511947631836,4.601816654205322 +192,384,9,cx_heavy,6287,6248,39,0.0062032766025131225,0.029224872589111328,7.2945287227630615 +192,384,10,cx_heavy,6200,6132,68,0.01096774193548387,0.04799342155456543,5.9915385246276855 +192,384,13,cx_heavy,6124,6069,55,0.008981058131939909,0.029302120208740234,5.881585359573364 +192,384,11,cx_heavy,6142,6100,42,0.006838163464669489,0.03031182289123535,6.310705184936523 +192,384,14,cx_heavy,6220,6176,44,0.00707395498392283,0.03513813018798828,6.8181140422821045 +192,384,12,cx_heavy,6375,6335,40,0.006274509803921568,0.029491424560546875,7.408443450927734 +192,384,16,cx_heavy,6267,6217,50,0.007978299026647519,0.02910447120666504,7.172218322753906 +192,384,17,cx_heavy,6211,6175,36,0.005796168088874577,0.03018975257873535,6.778728723526001 +192,384,18,cx_heavy,6363,6303,60,0.00942951438000943,0.04628896713256836,6.692896127700806 +192,384,21,cx_heavy,6196,6152,44,0.0071013557133634605,0.028519630432128906,6.06237530708313 +192,384,22,cx_heavy,6281,6214,67,0.010667091227511543,0.028936147689819336,5.7867271900177 +192,384,20,cx_heavy,6025,5974,51,0.008464730290456432,0.029253482818603516,6.716487407684326 +192,384,19,cx_heavy,6306,6270,36,0.005708848715509039,0.04668903350830078,7.806119441986084 +192,384,23,cx_heavy,6274,6223,51,0.008128785463818936,0.029589176177978516,6.963320255279541 +192,384,24,cx_heavy,6237,6193,44,0.007054673721340388,0.028655529022216797,6.697374582290649 +192,384,25,cx_heavy,6210,6166,44,0.007085346215780998,0.029204130172729492,6.711404323577881 +192,384,26,cx_heavy,6320,6270,50,0.007911392405063292,0.029293060302734375,7.981188535690308 +192,384,30,cx_heavy,6077,6028,49,0.008063189073556031,0.029473304748535156,5.714721918106079 +192,384,28,cx_heavy,6226,6169,57,0.00915515579826534,0.028513193130493164,6.436821460723877 +192,384,27,cx_heavy,6326,6286,40,0.006323110970597534,0.04529881477355957,7.064655303955078 +192,384,29,cx_heavy,6199,6167,32,0.005162122923052105,0.0348973274230957,7.0023722648620605 +192,384,31,cx_heavy,6186,6136,50,0.008082767539605561,0.03006720542907715,5.49924373626709 +192,384,33,cx_heavy,6264,6209,55,0.008780332056194126,0.029640913009643555,6.350413084030151 +192,384,32,cx_heavy,6155,6129,26,0.004224207961007311,0.028916120529174805,7.176995277404785 +192,384,34,cx_heavy,6249,6187,62,0.00992158745399264,0.0303497314453125,6.045671463012695 +192,384,35,cx_heavy,6076,6024,52,0.008558262014483212,0.028423786163330078,6.640001058578491 +192,384,38,cx_heavy,6307,6256,51,0.008086253369272238,0.029601097106933594,5.219265460968018 +192,384,37,cx_heavy,6184,6126,58,0.009379042690815007,0.06359720230102539,6.048160791397095 +192,384,36,cx_heavy,6355,6308,47,0.007395751376868607,0.034476280212402344,6.652999401092529 +192,384,39,cx_heavy,6342,6286,56,0.008830022075055188,0.0695810317993164,6.197066068649292 +192,384,40,cx_heavy,6201,6156,45,0.00725689404934688,0.029482126235961914,6.443885087966919 +192,384,41,cx_heavy,6126,6080,46,0.0075089781260202415,0.030836820602416992,6.516081094741821 +192,384,43,cx_heavy,6262,6186,76,0.012136697540721815,0.029152870178222656,6.318343162536621 +192,384,42,cx_heavy,6145,6107,38,0.006183889340927584,0.028985023498535156,6.991977691650391 +192,384,44,cx_heavy,6251,6204,47,0.007518796992481203,0.028753995895385742,6.314923524856567 +192,384,47,cx_heavy,6201,6156,45,0.00725689404934688,0.029185056686401367,5.049447536468506 +192,384,45,cx_heavy,6133,6089,44,0.0071743029512473504,0.06021547317504883,6.477177619934082 +192,384,46,cx_heavy,6245,6193,52,0.008326661329063251,0.053797006607055664,6.438626527786255 +192,384,49,cx_heavy,6218,6166,52,0.008362817626246381,0.029345273971557617,5.814494371414185 +192,384,48,cx_heavy,6113,6050,63,0.010305905447407166,0.028528213500976562,6.565443515777588 +192,384,50,cx_heavy,6108,6056,52,0.008513425016371971,0.02907705307006836,5.99520206451416 +192,384,52,cx_heavy,6197,6129,68,0.010973051476520897,0.028564453125,5.56975245475769 +192,384,51,cx_heavy,6181,6119,62,0.010030739362562692,0.028357982635498047,7.391639232635498 +192,384,53,cx_heavy,6082,6051,31,0.005097007563301546,0.028982877731323242,6.55931830406189 +192,384,54,cx_heavy,6301,6259,42,0.0066656086335502305,0.06120491027832031,6.106350421905518 +192,384,55,cx_heavy,6171,6108,63,0.010209042294603793,0.028949975967407227,5.531554460525513 +192,384,57,cx_heavy,6192,6153,39,0.006298449612403101,0.028630971908569336,6.470236301422119 +192,384,56,cx_heavy,6283,6230,53,0.00843546076714945,0.04601597785949707,6.9761364459991455 +192,384,58,cx_heavy,6301,6266,35,0.005554673861291859,0.030506134033203125,6.553766489028931 +192,384,59,cx_heavy,6288,6245,43,0.006838422391857507,0.028791427612304688,6.175645589828491 +192,384,60,cx_heavy,6313,6258,55,0.008712181213369238,0.028813600540161133,7.110718488693237 +192,384,61,cx_heavy,6174,6120,54,0.008746355685131196,0.029012441635131836,6.956409931182861 +192,384,62,cx_heavy,6152,6114,38,0.006176853055916775,0.02943587303161621,7.157736301422119 +192,384,63,cx_heavy,6228,6180,48,0.007707129094412331,0.029247522354125977,6.629197835922241 +192,384,64,cx_heavy,6123,6085,38,0.006206108116936142,0.02923274040222168,7.28372597694397 +192,384,65,cx_heavy,6197,6155,42,0.006777472970792319,0.03135967254638672,6.813155889511108 +192,384,66,cx_heavy,6164,6110,54,0.008760545100584036,0.030499696731567383,6.968799114227295 +192,384,67,cx_heavy,6372,6324,48,0.007532956685499058,0.02953505516052246,7.201398134231567 +192,384,68,cx_heavy,6290,6241,49,0.0077901430842607314,0.030174970626831055,6.543354272842407 +192,384,69,cx_heavy,6202,6161,41,0.006610770719122864,0.028479337692260742,6.219624996185303 +192,384,70,cx_heavy,6194,6147,47,0.007587988375847595,0.029306411743164062,5.933002233505249 +192,384,71,cx_heavy,6238,6211,27,0.004328310355883296,0.053863525390625,6.825966835021973 +192,384,72,cx_heavy,6143,6102,41,0.0066742633892235064,0.02971339225769043,7.2253663539886475 +192,384,73,cx_heavy,6100,6050,50,0.00819672131147541,0.03052687644958496,7.168824672698975 +192,384,75,cx_heavy,6299,6251,48,0.007620257183679949,0.029694318771362305,6.4273786544799805 +192,384,77,cx_heavy,6302,6250,52,0.008251348778165662,0.036066532135009766,6.053596496582031 +192,384,76,cx_heavy,6119,6075,44,0.007190717437489786,0.028425931930541992,6.879285573959351 +192,384,78,cx_heavy,6185,6141,44,0.0071139854486661274,0.030002117156982422,5.921821117401123 +192,384,74,cx_heavy,6199,6154,45,0.007259235360542023,0.029112815856933594,7.808125019073486 +192,384,79,cx_heavy,6185,6146,39,0.006305578011317704,0.028545856475830078,7.223214149475098 +192,384,80,cx_heavy,6093,6039,54,0.008862629246676515,0.028328895568847656,6.271997451782227 +192,384,81,cx_heavy,6247,6177,70,0.011205378581719225,0.029480457305908203,6.231247425079346 +192,384,82,cx_heavy,6063,6015,48,0.007916872835230085,0.02901482582092285,6.550274610519409 +192,384,83,cx_heavy,6329,6281,48,0.007584136514457261,0.02858734130859375,6.356244802474976 +192,384,86,cx_heavy,6303,6270,33,0.005235602094240838,0.02898406982421875,5.827563762664795 +192,384,84,cx_heavy,6208,6164,44,0.007087628865979381,0.0523228645324707,6.453206539154053 +192,384,87,cx_heavy,6129,6097,32,0.0052210801109479526,0.028753042221069336,5.905828237533569 +192,384,85,cx_heavy,6046,5999,47,0.007773734700628514,0.02991175651550293,7.3663389682769775 +192,384,88,cx_heavy,6272,6236,36,0.005739795918367347,0.028877735137939453,6.625796556472778 +192,384,89,cx_heavy,6273,6234,39,0.006217120994739359,0.02867436408996582,6.607897520065308 +192,384,90,cx_heavy,6160,6118,42,0.006818181818181818,0.02993607521057129,6.569769859313965 +192,384,91,cx_heavy,6339,6286,53,0.00836094021138981,0.02935957908630371,6.5755908489227295 +192,384,95,cx_heavy,6146,6119,27,0.004393101204035145,0.02831888198852539,5.602689027786255 +192,384,94,cx_heavy,6239,6199,40,0.006411283859592883,0.029195547103881836,5.865516424179077 +192,384,92,cx_heavy,6288,6254,34,0.005407124681933842,0.034963369369506836,6.612090826034546 +192,384,96,cx_heavy,6295,6223,72,0.011437648927720413,0.02921605110168457,5.289191722869873 +192,384,93,cx_heavy,6273,6243,30,0.004782400765184123,0.05447840690612793,6.902698278427124 +192,384,97,cx_heavy,6325,6282,43,0.006798418972332016,0.029124975204467773,7.353044033050537 +192,384,98,cx_heavy,6310,6285,25,0.003961965134706815,0.02897787094116211,6.54324197769165 +192,384,99,cx_heavy,6255,6202,53,0.00847322142286171,0.05478930473327637,6.535972833633423 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_256.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_256.csv index bddfefdf1..699424af3 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_256.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_256.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -256,512,0,cx_heavy,10847,10778,69,0.0063612058633723614,0.08411526679992676,19.81896662712097 -256,512,1,cx_heavy,10965,10902,63,0.005745554035567715,0.08187675476074219,21.739771604537964 -256,512,2,cx_heavy,10969,10909,60,0.0054699607986142765,0.08487796783447266,21.528332710266113 -256,512,4,cx_heavy,11068,11006,62,0.005601734730755331,0.0871281623840332,21.61903429031372 -256,512,3,cx_heavy,11153,11106,47,0.004214112794763741,0.08316898345947266,23.365206956863403 -256,512,5,cx_heavy,10936,10873,63,0.005760790051207023,0.0895090103149414,22.41569447517395 -256,512,6,cx_heavy,10950,10877,73,0.006666666666666667,0.0852513313293457,20.462015628814697 -256,512,7,cx_heavy,11073,10990,83,0.007495710286281947,0.08600854873657227,17.14758539199829 -256,512,9,cx_heavy,11033,10966,67,0.006072691017855524,0.08217477798461914,16.12584376335144 -256,512,8,cx_heavy,10897,10826,71,0.006515554739836653,0.08940792083740234,20.014920949935913 -256,512,11,cx_heavy,10960,10889,71,0.006478102189781022,0.12092351913452148,18.367836952209473 -256,512,10,cx_heavy,11173,11122,51,0.004564575315492705,0.0867462158203125,22.713499307632446 -256,512,12,cx_heavy,10942,10892,50,0.0045695485286053735,0.08933305740356445,19.83634066581726 -256,512,14,cx_heavy,11018,10962,56,0.005082592121982211,0.08198428153991699,17.818547248840332 -256,512,13,cx_heavy,10935,10899,36,0.0032921810699588477,0.08342146873474121,21.65278196334839 -256,512,15,cx_heavy,11154,11053,101,0.009055047516585979,0.08804035186767578,17.696715116500854 -256,512,17,cx_heavy,11056,10995,61,0.005517366136034732,0.08509349822998047,18.779326677322388 -256,512,16,cx_heavy,11097,11026,71,0.006398125619536812,0.12286663055419922,20.014049768447876 -256,512,18,cx_heavy,11160,11103,57,0.00510752688172043,0.08527326583862305,22.020682096481323 -256,512,19,cx_heavy,11042,10973,69,0.006248867958703133,0.08151698112487793,21.496822834014893 -256,512,21,cx_heavy,11066,11006,60,0.005422013374299656,0.08242416381835938,17.275959014892578 -256,512,20,cx_heavy,10945,10900,45,0.004111466423024212,0.08877301216125488,20.174404621124268 -256,512,22,cx_heavy,10975,10915,60,0.005466970387243736,0.08226132392883301,23.161612272262573 -256,512,23,cx_heavy,11170,11112,58,0.0051924798567591765,0.0829629898071289,20.14376163482666 -256,512,24,cx_heavy,11005,10939,66,0.005997273966378919,0.08639931678771973,20.94250798225403 -256,512,26,cx_heavy,11180,11119,61,0.005456171735241502,0.08410072326660156,20.201372623443604 -256,512,25,cx_heavy,10990,10942,48,0.004367606915377616,0.08447265625,21.914729356765747 -256,512,27,cx_heavy,11120,11040,80,0.007194244604316547,0.08170175552368164,19.882195234298706 -256,512,28,cx_heavy,11028,10963,65,0.005894087776568734,0.0875251293182373,20.5903263092041 -256,512,29,cx_heavy,10977,10928,49,0.004463879019768607,0.08720541000366211,21.77120065689087 -256,512,30,cx_heavy,10705,10656,49,0.004577300326950024,0.08287358283996582,20.070136308670044 -256,512,31,cx_heavy,10767,10717,50,0.004643819076808767,0.08443975448608398,19.87762475013733 -256,512,32,cx_heavy,10910,10861,49,0.004491292392300642,0.0911409854888916,21.75892996788025 -256,512,33,cx_heavy,11095,10997,98,0.008832807570977918,0.08299541473388672,19.218435764312744 -256,512,34,cx_heavy,11008,10952,56,0.005087209302325582,0.08049798011779785,20.094552755355835 -256,512,35,cx_heavy,10969,10918,51,0.004649466678822135,0.08299112319946289,19.889482021331787 -256,512,36,cx_heavy,11164,11108,56,0.005016123253314225,0.08464837074279785,20.076923370361328 -256,512,37,cx_heavy,11063,10993,70,0.006327397631745458,0.08856439590454102,20.00394082069397 -256,512,38,cx_heavy,10984,10904,80,0.007283321194464676,0.08430242538452148,19.15147876739502 -256,512,39,cx_heavy,11173,11117,56,0.0050120826993645395,0.09199285507202148,20.22799062728882 -256,512,40,cx_heavy,11023,10924,99,0.008981221083189694,0.08382964134216309,18.397151708602905 -256,512,41,cx_heavy,11010,10959,51,0.004632152588555858,0.09001731872558594,22.551002740859985 -256,512,43,cx_heavy,11015,10932,83,0.007535179300953245,0.08265161514282227,17.930343866348267 -256,512,42,cx_heavy,11057,11009,48,0.004341141358415484,0.08125138282775879,20.69124960899353 -256,512,44,cx_heavy,11099,11054,45,0.00405441931705559,0.08943653106689453,21.662933111190796 -256,512,45,cx_heavy,10932,10867,65,0.005945847054518844,0.08233284950256348,20.289989709854126 -256,512,46,cx_heavy,10968,10897,71,0.006473377097009482,0.08282470703125,20.917925596237183 -256,512,48,cx_heavy,10921,10832,89,0.008149436864755975,0.08207845687866211,18.48033833503723 -256,512,47,cx_heavy,11021,10967,54,0.004899736865983123,0.08904552459716797,21.710436582565308 -256,512,49,cx_heavy,11087,11034,53,0.004780373410300352,0.08648037910461426,21.752354860305786 -256,512,50,cx_heavy,10973,10907,66,0.006014763510434703,0.08117556571960449,21.68799901008606 -256,512,51,cx_heavy,11062,11017,45,0.004067980473693726,0.0817258358001709,21.318511962890625 -256,512,52,cx_heavy,10895,10838,57,0.005231757687012391,0.08383941650390625,19.368189334869385 -256,512,53,cx_heavy,11126,11058,68,0.006111810174366349,0.08156633377075195,17.700599670410156 -256,512,54,cx_heavy,11034,10988,46,0.004168932390792097,0.08698034286499023,20.349328994750977 -256,512,55,cx_heavy,11009,10940,69,0.006267599236987919,0.08254337310791016,20.56406021118164 -256,512,56,cx_heavy,11159,11069,90,0.008065238820682857,0.14031744003295898,14.718780040740967 -256,512,58,cx_heavy,11131,11051,80,0.0071871350282993445,0.08543157577514648,18.33815312385559 -256,512,57,cx_heavy,11018,10964,54,0.0049010709747685606,0.08210515975952148,21.939094305038452 -256,512,59,cx_heavy,11017,10978,39,0.0035399836616138696,0.08831381797790527,22.322714805603027 -256,512,61,cx_heavy,11043,10982,61,0.005523861269582541,0.08208751678466797,17.84218692779541 -256,512,60,cx_heavy,10995,10936,59,0.005366075488858572,0.08695125579833984,21.68651032447815 -256,512,62,cx_heavy,11132,11069,63,0.005659360402443406,0.08445906639099121,21.832980155944824 -256,512,63,cx_heavy,11024,10967,57,0.005170537010159652,0.08362722396850586,23.168050050735474 -256,512,64,cx_heavy,10942,10892,50,0.0045695485286053735,0.08115911483764648,21.558133125305176 -256,512,65,cx_heavy,11070,11014,56,0.005058717253839205,0.08447980880737305,22.12438154220581 -256,512,66,cx_heavy,11006,10945,61,0.005542431401053971,0.08733725547790527,20.809298992156982 -256,512,67,cx_heavy,11284,11179,105,0.009305210918114143,0.08282327651977539,18.280085802078247 -256,512,68,cx_heavy,11027,10974,53,0.004806384329373356,0.08107376098632812,22.42332911491394 -256,512,70,cx_heavy,11124,11031,93,0.008360302049622438,0.09699797630310059,16.846730947494507 -256,512,69,cx_heavy,10892,10845,47,0.004315093646713184,0.08037066459655762,22.37643551826477 -256,512,71,cx_heavy,11181,11118,63,0.005634558626240944,0.09087204933166504,18.68740487098694 -256,512,72,cx_heavy,10862,10805,57,0.005247652366046769,0.09071683883666992,21.99443769454956 -256,512,74,cx_heavy,11161,11102,59,0.005286264671624406,0.0887749195098877,15.537357568740845 -256,512,73,cx_heavy,10956,10905,51,0.004654983570646221,0.08572936058044434,23.924504041671753 -256,512,75,cx_heavy,11265,11204,61,0.005415002219263204,0.08888530731201172,16.27565360069275 -256,512,76,cx_heavy,10861,10810,51,0.004695700211766872,0.0831296443939209,20.14537262916565 -256,512,77,cx_heavy,11041,10965,76,0.006883434471515262,0.08967137336730957,21.890079259872437 -256,512,78,cx_heavy,10919,10854,65,0.005952926092132979,0.08722925186157227,20.202067136764526 -256,512,80,cx_heavy,11000,10928,72,0.006545454545454545,0.08426451683044434,18.57129693031311 -256,512,79,cx_heavy,11109,11047,62,0.005581060401476281,0.08394241333007812,21.811724424362183 -256,512,81,cx_heavy,11044,11005,39,0.003531329228540384,0.08303618431091309,22.548296689987183 -256,512,82,cx_heavy,10975,10914,61,0.005558086560364464,0.08770966529846191,20.5891010761261 -256,512,83,cx_heavy,11030,10952,78,0.007071622846781505,0.11359620094299316,16.811177492141724 -256,512,84,cx_heavy,11015,10946,69,0.006264185201997277,0.09224081039428711,20.264973163604736 -256,512,85,cx_heavy,10944,10880,64,0.005847953216374269,0.08231878280639648,21.97313356399536 -256,512,86,cx_heavy,11113,11054,59,0.005309097453432917,0.08813905715942383,21.849549770355225 -256,512,87,cx_heavy,11006,10952,54,0.004906414682900236,0.08496212959289551,20.52542805671692 -256,512,88,cx_heavy,11170,11120,50,0.004476275738585497,0.08835959434509277,20.456401348114014 -256,512,89,cx_heavy,11068,11005,63,0.005692085290928804,0.08810782432556152,20.48742413520813 -256,512,90,cx_heavy,11041,10973,68,0.0061588624218820755,0.09863781929016113,22.869003295898438 -256,512,91,cx_heavy,11194,11123,71,0.006342683580489548,0.08597326278686523,20.56241202354431 -256,512,92,cx_heavy,11216,11157,59,0.005260342368045649,0.08376598358154297,22.261187076568604 -256,512,93,cx_heavy,11019,10952,67,0.006080406570469189,0.08348512649536133,22.438182592391968 -256,512,94,cx_heavy,10938,10889,49,0.004479795209361858,0.08860206604003906,23.38670802116394 -256,512,95,cx_heavy,10990,10930,60,0.00545950864422202,0.08112645149230957,21.51253581047058 -256,512,96,cx_heavy,11080,11032,48,0.004332129963898917,0.08986186981201172,20.19445276260376 -256,512,97,cx_heavy,11191,11140,51,0.004557233491198284,0.08377313613891602,20.705275774002075 -256,512,98,cx_heavy,10939,10884,55,0.005027881890483591,0.08656835556030273,19.996461391448975 -256,512,99,cx_heavy,10848,10773,75,0.006913716814159292,0.08568429946899414,22.49933958053589 +256,512,0,cx_heavy,10847,10778,69,0.0063612058633723614,0.051937103271484375,13.786640167236328 +256,512,1,cx_heavy,10965,10902,63,0.005745554035567715,0.05289721488952637,15.046093463897705 +256,512,2,cx_heavy,10969,10909,60,0.0054699607986142765,0.0516359806060791,15.10642695426941 +256,512,4,cx_heavy,11068,11006,62,0.005601734730755331,0.05155634880065918,15.127829551696777 +256,512,5,cx_heavy,10936,10873,63,0.005760790051207023,0.0531001091003418,14.33872652053833 +256,512,3,cx_heavy,11153,11106,47,0.004214112794763741,0.0525968074798584,16.42445397377014 +256,512,7,cx_heavy,11073,10990,83,0.007495710286281947,0.051255226135253906,11.617760419845581 +256,512,6,cx_heavy,10950,10877,73,0.006666666666666667,0.05749630928039551,14.466567516326904 +256,512,8,cx_heavy,10897,10826,71,0.006515554739836653,0.052397966384887695,15.542448043823242 +256,512,9,cx_heavy,11033,10966,67,0.006072691017855524,0.0542750358581543,11.652633428573608 +256,512,11,cx_heavy,10960,10889,71,0.006478102189781022,0.05227375030517578,12.097418069839478 +256,512,14,cx_heavy,11018,10962,56,0.005082592121982211,0.05327463150024414,11.543445110321045 +256,512,12,cx_heavy,10942,10892,50,0.0045695485286053735,0.051695823669433594,13.751831769943237 +256,512,15,cx_heavy,11154,11053,101,0.009055047516585979,0.052909135818481445,12.970629453659058 +256,512,13,cx_heavy,10935,10899,36,0.0032921810699588477,0.052092790603637695,14.716688394546509 +256,512,10,cx_heavy,11173,11122,51,0.004564575315492705,0.08182406425476074,15.850600004196167 +256,512,16,cx_heavy,11097,11026,71,0.006398125619536812,0.05353522300720215,13.814055681228638 +256,512,17,cx_heavy,11056,10995,61,0.005517366136034732,0.06079864501953125,12.790918588638306 +256,512,18,cx_heavy,11160,11103,57,0.00510752688172043,0.05527353286743164,15.35637354850769 +256,512,21,cx_heavy,11066,11006,60,0.005422013374299656,0.05195808410644531,12.281207799911499 +256,512,19,cx_heavy,11042,10973,69,0.006248867958703133,0.05251741409301758,15.580494403839111 +256,512,20,cx_heavy,10945,10900,45,0.004111466423024212,0.06423473358154297,14.160865306854248 +256,512,24,cx_heavy,11005,10939,66,0.005997273966378919,0.05166363716125488,13.425607442855835 +256,512,23,cx_heavy,11170,11112,58,0.0051924798567591765,0.055700063705444336,14.402681350708008 +256,512,25,cx_heavy,10990,10942,48,0.004367606915377616,0.0521240234375,14.180037498474121 +256,512,22,cx_heavy,10975,10915,60,0.005466970387243736,0.05296921730041504,16.39938497543335 +256,512,26,cx_heavy,11180,11119,61,0.005456171735241502,0.051171064376831055,13.786540031433105 +256,512,27,cx_heavy,11120,11040,80,0.007194244604316547,0.0521697998046875,14.169697284698486 +256,512,28,cx_heavy,11028,10963,65,0.005894087776568734,0.07082056999206543,14.319695472717285 +256,512,30,cx_heavy,10705,10656,49,0.004577300326950024,0.05250287055969238,13.731611967086792 +256,512,31,cx_heavy,10767,10717,50,0.004643819076808767,0.05312943458557129,12.914405822753906 +256,512,29,cx_heavy,10977,10928,49,0.004463879019768607,0.051929473876953125,16.42199730873108 +256,512,32,cx_heavy,10910,10861,49,0.004491292392300642,0.0523219108581543,14.762349605560303 +256,512,33,cx_heavy,11095,10997,98,0.008832807570977918,0.05303692817687988,12.832022666931152 +256,512,34,cx_heavy,11008,10952,56,0.005087209302325582,0.05267739295959473,13.91346788406372 +256,512,35,cx_heavy,10969,10918,51,0.004649466678822135,0.06584477424621582,15.40597939491272 +256,512,36,cx_heavy,11164,11108,56,0.005016123253314225,0.05179786682128906,12.904728174209595 +256,512,38,cx_heavy,10984,10904,80,0.007283321194464676,0.05187058448791504,13.251290082931519 +256,512,37,cx_heavy,11063,10993,70,0.006327397631745458,0.05086684226989746,13.905919313430786 +256,512,39,cx_heavy,11173,11117,56,0.0050120826993645395,0.05224919319152832,14.424694299697876 +256,512,40,cx_heavy,11023,10924,99,0.008981221083189694,0.10825181007385254,13.17169713973999 +256,512,43,cx_heavy,11015,10932,83,0.007535179300953245,0.052654266357421875,12.824077129364014 +256,512,42,cx_heavy,11057,11009,48,0.004341141358415484,0.052202463150024414,14.528171300888062 +256,512,41,cx_heavy,11010,10959,51,0.004632152588555858,0.05494213104248047,15.558414220809937 +256,512,44,cx_heavy,11099,11054,45,0.00405441931705559,0.07504773139953613,14.13938283920288 +256,512,45,cx_heavy,10932,10867,65,0.005945847054518844,0.05305314064025879,14.261754512786865 +256,512,46,cx_heavy,10968,10897,71,0.006473377097009482,0.052080631256103516,14.485779523849487 +256,512,48,cx_heavy,10921,10832,89,0.008149436864755975,0.06048393249511719,13.050487756729126 +256,512,47,cx_heavy,11021,10967,54,0.004899736865983123,0.05166053771972656,15.25826096534729 +256,512,51,cx_heavy,11062,11017,45,0.004067980473693726,0.05191183090209961,13.948086977005005 +256,512,49,cx_heavy,11087,11034,53,0.004780373410300352,0.05273175239562988,16.17303204536438 +256,512,50,cx_heavy,10973,10907,66,0.006014763510434703,0.05265498161315918,15.136340856552124 +256,512,52,cx_heavy,10895,10838,57,0.005231757687012391,0.06811714172363281,14.433958053588867 +256,512,53,cx_heavy,11126,11058,68,0.006111810174366349,0.05222177505493164,12.340094566345215 +256,512,54,cx_heavy,11034,10988,46,0.004168932390792097,0.05225539207458496,11.275532007217407 +256,512,56,cx_heavy,11159,11069,90,0.008065238820682857,0.07421875,10.306772232055664 +256,512,55,cx_heavy,11009,10940,69,0.006267599236987919,0.053771257400512695,14.55269479751587 +256,512,57,cx_heavy,11018,10964,54,0.0049010709747685606,0.07408618927001953,15.782801866531372 +256,512,58,cx_heavy,11131,11051,80,0.0071871350282993445,0.07123970985412598,12.976875305175781 +256,512,61,cx_heavy,11043,10982,61,0.005523861269582541,0.07712578773498535,12.633771657943726 +256,512,59,cx_heavy,11017,10978,39,0.0035399836616138696,0.08390593528747559,15.263264417648315 +256,512,62,cx_heavy,11132,11069,63,0.005659360402443406,0.05418968200683594,14.7962486743927 +256,512,60,cx_heavy,10995,10936,59,0.005366075488858572,0.05257463455200195,17.020673990249634 +256,512,63,cx_heavy,11024,10967,57,0.005170537010159652,0.05503392219543457,15.597994804382324 +256,512,64,cx_heavy,10942,10892,50,0.0045695485286053735,0.05219626426696777,14.898292541503906 +256,512,67,cx_heavy,11284,11179,105,0.009305210918114143,0.08302927017211914,11.78777813911438 +256,512,65,cx_heavy,11070,11014,56,0.005058717253839205,0.05049467086791992,15.362154245376587 +256,512,66,cx_heavy,11006,10945,61,0.005542431401053971,0.06964874267578125,14.824572086334229 +256,512,70,cx_heavy,11124,11031,93,0.008360302049622438,0.05204296112060547,11.56344723701477 +256,512,68,cx_heavy,11027,10974,53,0.004806384329373356,0.05111384391784668,14.427429914474487 +256,512,71,cx_heavy,11181,11118,63,0.005634558626240944,0.05181121826171875,11.704574584960938 +256,512,69,cx_heavy,10892,10845,47,0.004315093646713184,0.05283665657043457,15.30533766746521 +256,512,72,cx_heavy,10862,10805,57,0.005247652366046769,0.0520017147064209,15.751023292541504 +256,512,73,cx_heavy,10956,10905,51,0.004654983570646221,0.05431365966796875,15.035122632980347 +256,512,74,cx_heavy,11161,11102,59,0.005286264671624406,0.05191516876220703,12.883186340332031 +256,512,75,cx_heavy,11265,11204,61,0.005415002219263204,0.05138373374938965,12.444108009338379 +256,512,77,cx_heavy,11041,10965,76,0.006883434471515262,0.055075883865356445,14.127745389938354 +256,512,78,cx_heavy,10919,10854,65,0.005952926092132979,0.05145668983459473,13.861984252929688 +256,512,76,cx_heavy,10861,10810,51,0.004695700211766872,0.05158829689025879,15.58041000366211 +256,512,80,cx_heavy,11000,10928,72,0.006545454545454545,0.05151700973510742,12.560969114303589 +256,512,79,cx_heavy,11109,11047,62,0.005581060401476281,0.05148673057556152,15.433888912200928 +256,512,81,cx_heavy,11044,11005,39,0.003531329228540384,0.05153656005859375,15.799423456192017 +256,512,82,cx_heavy,10975,10914,61,0.005558086560364464,0.05169987678527832,14.483675241470337 +256,512,83,cx_heavy,11030,10952,78,0.007071622846781505,0.059026479721069336,12.742782592773438 +256,512,84,cx_heavy,11015,10946,69,0.006264185201997277,0.05622434616088867,15.247560739517212 +256,512,85,cx_heavy,10944,10880,64,0.005847953216374269,0.053360939025878906,15.04026484489441 +256,512,88,cx_heavy,11170,11120,50,0.004476275738585497,0.0529177188873291,13.724417924880981 +256,512,87,cx_heavy,11006,10952,54,0.004906414682900236,0.0527040958404541,14.202817440032959 +256,512,86,cx_heavy,11113,11054,59,0.005309097453432917,0.05199861526489258,15.034995794296265 +256,512,89,cx_heavy,11068,11005,63,0.005692085290928804,0.052230119705200195,12.601784706115723 +256,512,92,cx_heavy,11216,11157,59,0.005260342368045649,0.05231642723083496,13.450339317321777 +256,512,91,cx_heavy,11194,11123,71,0.006342683580489548,0.09448909759521484,14.130861043930054 +256,512,90,cx_heavy,11041,10973,68,0.0061588624218820755,0.05306577682495117,15.390493392944336 +256,512,93,cx_heavy,11019,10952,67,0.006080406570469189,0.05138540267944336,15.203534364700317 +256,512,97,cx_heavy,11191,11140,51,0.004557233491198284,0.07007455825805664,13.055207252502441 +256,512,95,cx_heavy,10990,10930,60,0.00545950864422202,0.05307459831237793,14.608895063400269 +256,512,98,cx_heavy,10939,10884,55,0.005027881890483591,0.05174660682678223,14.499609470367432 +256,512,96,cx_heavy,11080,11032,48,0.004332129963898917,0.0710446834564209,14.702243328094482 +256,512,94,cx_heavy,10938,10889,49,0.004479795209361858,0.05116105079650879,16.171141386032104 +256,512,99,cx_heavy,10848,10773,75,0.006913716814159292,0.05267667770385742,15.460986852645874 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_320.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_320.csv index 9ec1c02e2..df62a4b57 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_320.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_320.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -320,640,2,cx_heavy,17140,17064,76,0.004434072345390899,0.08672642707824707,26.26118564605713 -320,640,1,cx_heavy,17367,17287,80,0.004606437496401221,0.12822222709655762,27.87004852294922 -320,640,0,cx_heavy,17193,17116,77,0.004478566858605247,0.09636592864990234,28.938657522201538 -320,640,6,cx_heavy,17109,17044,65,0.0037991700274709215,0.09809446334838867,25.076823949813843 -320,640,4,cx_heavy,17306,17233,73,0.004218190223044031,0.10189986228942871,26.578639268875122 -320,640,7,cx_heavy,16980,16911,69,0.004063604240282685,0.08592343330383301,25.775379419326782 -320,640,3,cx_heavy,17243,17189,54,0.003131705619671751,0.10094976425170898,31.540977954864502 -320,640,5,cx_heavy,17123,17048,75,0.004380073585236232,0.08225560188293457,31.417765140533447 -320,640,8,cx_heavy,16967,16874,93,0.005481228266635233,0.08207440376281738,28.88640856742859 -320,640,9,cx_heavy,17296,17215,81,0.0046831637372802964,0.16432666778564453,28.484369039535522 -320,640,10,cx_heavy,17243,17146,97,0.0056254712057066635,0.1633315086364746,32.59636378288269 -320,640,11,cx_heavy,17048,16980,68,0.003988737681839512,0.15709710121154785,33.32123017311096 -320,640,13,cx_heavy,17164,17090,74,0.004311349335819156,0.16569042205810547,32.53320670127869 -320,640,12,cx_heavy,16953,16894,59,0.003480209992331741,0.0993187427520752,34.9533166885376 -320,640,16,cx_heavy,17241,17172,69,0.00400208804593701,0.08654403686523438,31.579012155532837 -320,640,15,cx_heavy,17421,17331,90,0.0051661787497847425,0.08676290512084961,33.02850341796875 -320,640,14,cx_heavy,17280,17185,95,0.005497685185185185,0.13966846466064453,36.30639600753784 -320,640,17,cx_heavy,17365,17284,81,0.004664555139648719,0.08444929122924805,31.62510657310486 -320,640,18,cx_heavy,17407,17311,96,0.005515022692020452,0.10766816139221191,24.775550365447998 -320,640,21,cx_heavy,17237,17167,70,0.004061031502001509,0.09627699851989746,25.64311695098877 -320,640,19,cx_heavy,17119,17054,65,0.00379695075646942,0.08658742904663086,27.812731742858887 -320,640,22,cx_heavy,17328,17265,63,0.0036357340720221606,0.08467936515808105,27.10350012779236 -320,640,20,cx_heavy,17235,17162,73,0.004235567159849144,0.10679745674133301,29.137956142425537 -320,640,23,cx_heavy,17455,17393,62,0.003551990833572042,0.08363032341003418,29.541671991348267 -320,640,25,cx_heavy,17359,17275,84,0.004838988420991993,0.0846858024597168,28.306052923202515 -320,640,24,cx_heavy,17427,17351,76,0.004361048947036208,0.08386945724487305,30.6567165851593 -320,640,26,cx_heavy,17177,17105,72,0.004191651627175875,0.08051228523254395,30.99039101600647 -320,640,27,cx_heavy,17174,17099,75,0.004367066495865843,0.08156776428222656,33.20882487297058 -320,640,28,cx_heavy,17319,17235,84,0.004850164559154686,0.1672511100769043,27.335999011993408 -320,640,29,cx_heavy,17093,17009,84,0.004914292400397824,0.16537880897521973,28.018115758895874 -320,640,30,cx_heavy,16958,16885,73,0.004304752918976295,0.1654508113861084,29.267776012420654 -320,640,31,cx_heavy,16814,16722,92,0.005471630783870584,0.1630246639251709,29.546514749526978 -320,640,33,cx_heavy,17135,17030,105,0.00612780857893201,0.08626556396484375,28.32194185256958 -320,640,32,cx_heavy,17111,17054,57,0.003331190462275729,0.1600942611694336,30.044269323349 -320,640,34,cx_heavy,17187,17112,75,0.004363763309478094,0.0852057933807373,31.1345956325531 -320,640,35,cx_heavy,17187,17110,77,0.004480130331064177,0.08266592025756836,31.07314896583557 -320,640,37,cx_heavy,17291,17173,118,0.006824359493378058,0.08364105224609375,22.84031105041504 -320,640,36,cx_heavy,17607,17539,68,0.003862100301016641,0.0833899974822998,27.551135778427124 -320,640,38,cx_heavy,17447,17356,91,0.0052157964119906005,0.08255481719970703,27.997910499572754 -320,640,39,cx_heavy,17403,17296,107,0.0061483652243866,0.09252429008483887,26.730478763580322 -320,640,42,cx_heavy,17183,17100,83,0.004830355584007449,0.12111115455627441,24.466776132583618 -320,640,41,cx_heavy,17276,17199,77,0.004457050243111832,0.1579146385192871,27.14075517654419 -320,640,40,cx_heavy,17185,17106,79,0.004597032295606634,0.15877532958984375,28.604066610336304 -320,640,43,cx_heavy,17384,17286,98,0.005637367694431661,0.08601856231689453,26.574302196502686 -320,640,44,cx_heavy,17162,17063,99,0.005768558443071903,0.08196473121643066,22.26234459877014 -320,640,45,cx_heavy,17138,17065,73,0.004259540203057533,0.08378458023071289,24.291213512420654 -320,640,46,cx_heavy,17059,16996,63,0.0036930652441526466,0.08859729766845703,24.355032444000244 -320,640,47,cx_heavy,17032,16963,69,0.0040511977454203854,0.08539152145385742,23.72847318649292 -320,640,51,cx_heavy,17040,16954,86,0.005046948356807511,0.08435273170471191,23.57857036590576 -320,640,49,cx_heavy,17146,17068,78,0.004549165986235857,0.10488152503967285,25.829867362976074 -320,640,48,cx_heavy,17074,16971,103,0.006032564132599273,0.15889263153076172,26.278986930847168 -320,640,52,cx_heavy,17049,16952,97,0.005689483254149803,0.08313226699829102,22.595027685165405 -320,640,50,cx_heavy,17018,16954,64,0.0037607239393583265,0.08493685722351074,27.45245337486267 -320,640,53,cx_heavy,17292,17215,77,0.004452926208651399,0.08331584930419922,27.21228051185608 -320,640,54,cx_heavy,17388,17327,61,0.0035081665516448124,0.08414411544799805,27.31899094581604 -320,640,55,cx_heavy,17169,17095,74,0.004310093773661833,0.12603378295898438,25.93315362930298 -320,640,56,cx_heavy,17145,17062,83,0.00484106153397492,0.08395886421203613,27.482191801071167 -320,640,59,cx_heavy,17173,17109,64,0.003726780411110464,0.08476901054382324,23.379993677139282 -320,640,57,cx_heavy,17281,17177,104,0.006018170244777501,0.13573956489562988,24.249056339263916 -320,640,58,cx_heavy,17287,17208,79,0.004569908023370163,0.19421744346618652,26.6547954082489 -320,640,60,cx_heavy,17097,17007,90,0.005264081417792595,0.12172198295593262,27.222525119781494 -320,640,61,cx_heavy,17059,16997,62,0.0036344451609121287,0.08461999893188477,29.007848262786865 -320,640,62,cx_heavy,17298,17217,81,0.004682622268470343,0.08419966697692871,26.867384433746338 -320,640,63,cx_heavy,17352,17260,92,0.005301982480405717,0.0830390453338623,23.00599718093872 -320,640,64,cx_heavy,17302,17230,72,0.004161368627904289,0.14868974685668945,26.43447732925415 -320,640,65,cx_heavy,16952,16876,76,0.004483246814535158,0.08155512809753418,26.148572206497192 -320,640,68,cx_heavy,17193,17108,85,0.004943872506252544,0.08359718322753906,25.565797567367554 -320,640,67,cx_heavy,17354,17287,67,0.0038607813760516306,0.08296918869018555,29.98156428337097 -320,640,66,cx_heavy,17164,17090,74,0.004311349335819156,0.08397960662841797,30.075482845306396 -320,640,71,cx_heavy,17393,17289,104,0.0059794170068418325,0.0836496353149414,22.724093914031982 -320,640,69,cx_heavy,17144,17076,68,0.003966402239850677,0.08295798301696777,27.37639808654785 -320,640,70,cx_heavy,17256,17180,76,0.00440426518312471,0.08593297004699707,28.021519660949707 -320,640,72,cx_heavy,17050,16981,69,0.00404692082111437,0.0807960033416748,27.705171585083008 -320,640,74,cx_heavy,17243,17125,118,0.0068433567244679,0.08219146728515625,25.365588665008545 -320,640,73,cx_heavy,17286,17233,53,0.0030660650237186162,0.08729672431945801,29.16146230697632 -320,640,75,cx_heavy,17326,17212,114,0.006579706799030359,0.08202934265136719,24.728248357772827 -320,640,79,cx_heavy,17323,17260,63,0.0036367834670669053,0.08500909805297852,23.640119075775146 -320,640,77,cx_heavy,17299,17200,99,0.005722874154575409,0.08443689346313477,24.97621178627014 -320,640,76,cx_heavy,17197,17094,103,0.005989416758736989,0.10524654388427734,25.641762018203735 -320,640,78,cx_heavy,17289,17227,62,0.003586095205043669,0.08617234230041504,25.646555423736572 -320,640,80,cx_heavy,17045,16960,85,0.004986799647990613,0.08201074600219727,24.91845726966858 -320,640,81,cx_heavy,17241,17145,96,0.005568122498694972,0.08374834060668945,25.350773334503174 -320,640,83,cx_heavy,17147,17084,63,0.003674112089578352,0.08393311500549316,25.91791605949402 -320,640,82,cx_heavy,17187,17115,72,0.0041892127770989706,0.08214426040649414,27.17173480987549 -320,640,84,cx_heavy,17216,17138,78,0.0045306691449814125,0.08338785171508789,27.50962495803833 -320,640,88,cx_heavy,17475,17392,83,0.00474964234620887,0.0824882984161377,25.906726360321045 -320,640,85,cx_heavy,17087,17014,73,0.004272253760168549,0.10322022438049316,27.508423566818237 -320,640,86,cx_heavy,17202,17127,75,0.004359958144401814,0.0858759880065918,27.618285179138184 -320,640,87,cx_heavy,17080,17027,53,0.0031030444964871193,0.08207917213439941,27.377718687057495 -320,640,89,cx_heavy,17236,17164,72,0.004177303318635414,0.0840144157409668,26.38891339302063 -320,640,90,cx_heavy,17205,17109,96,0.005579773321708806,0.08159327507019043,26.72418475151062 -320,640,92,cx_heavy,17002,16930,72,0.004234795906363957,0.08051753044128418,25.834646224975586 -320,640,91,cx_heavy,17353,17298,55,0.00316948078142108,0.08155941963195801,27.927798986434937 -320,640,97,cx_heavy,17257,17176,81,0.004693747464796894,0.08466839790344238,24.84082555770874 -320,640,93,cx_heavy,17295,17216,79,0.004567794160161897,0.08142352104187012,27.543810606002808 -320,640,95,cx_heavy,17209,17089,120,0.006973095473298855,0.0843348503112793,25.784019947052002 -320,640,96,cx_heavy,17210,17127,83,0.004822777454968042,0.0837714672088623,27.46620750427246 -320,640,94,cx_heavy,17256,17183,73,0.0042304126101066295,0.09340333938598633,29.68706727027893 -320,640,98,cx_heavy,17096,17021,75,0.004386991109031352,0.08184123039245605,25.9281587600708 -320,640,99,cx_heavy,17107,17028,79,0.004617992634594026,0.08115482330322266,30.037296056747437 +320,640,0,cx_heavy,17193,17116,77,0.004478566858605247,0.08335018157958984,27.98261785507202 +320,640,1,cx_heavy,17367,17287,80,0.004606437496401221,0.08405208587646484,27.591055870056152 +320,640,2,cx_heavy,17140,17064,76,0.004434072345390899,0.08370041847229004,24.836584329605103 +320,640,3,cx_heavy,17243,17189,54,0.003131705619671751,0.08219075202941895,25.99182629585266 +320,640,4,cx_heavy,17306,17233,73,0.004218190223044031,0.09693145751953125,26.12449312210083 +320,640,6,cx_heavy,17109,17044,65,0.0037991700274709215,0.0827019214630127,25.58201503753662 +320,640,5,cx_heavy,17123,17048,75,0.004380073585236232,0.1028139591217041,29.62275242805481 +320,640,7,cx_heavy,16980,16911,69,0.004063604240282685,0.08510184288024902,29.664923191070557 +320,640,8,cx_heavy,16967,16874,93,0.005481228266635233,0.08250021934509277,28.165438652038574 +320,640,9,cx_heavy,17296,17215,81,0.0046831637372802964,0.08481788635253906,34.17864799499512 +320,640,10,cx_heavy,17243,17146,97,0.0056254712057066635,0.08182978630065918,37.9664146900177 +320,640,11,cx_heavy,17048,16980,68,0.003988737681839512,0.0821523666381836,38.89807367324829 +320,640,12,cx_heavy,16953,16894,59,0.003480209992331741,0.08159112930297852,38.33725023269653 +320,640,13,cx_heavy,17164,17090,74,0.004311349335819156,0.0818784236907959,38.20228815078735 +320,640,14,cx_heavy,17280,17185,95,0.005497685185185185,0.16341304779052734,37.04625654220581 +320,640,15,cx_heavy,17421,17331,90,0.0051661787497847425,0.17693567276000977,38.0707733631134 +320,640,17,cx_heavy,17365,17284,81,0.004664555139648719,0.16472816467285156,35.96816039085388 +320,640,16,cx_heavy,17241,17172,69,0.00400208804593701,0.29955077171325684,37.38749814033508 +320,640,18,cx_heavy,17407,17311,96,0.005515022692020452,0.16460728645324707,33.4713032245636 +320,640,19,cx_heavy,17119,17054,65,0.00379695075646942,0.20430684089660645,42.13425588607788 +320,640,20,cx_heavy,17235,17162,73,0.004235567159849144,0.16348958015441895,41.777833700180054 +320,640,22,cx_heavy,17328,17265,63,0.0036357340720221606,0.16832804679870605,37.43005681037903 +320,640,23,cx_heavy,17455,17393,62,0.003551990833572042,0.16459226608276367,38.722238302230835 +320,640,21,cx_heavy,17237,17167,70,0.004061031502001509,0.1837928295135498,41.43112373352051 +320,640,25,cx_heavy,17359,17275,84,0.004838988420991993,0.1787571907043457,34.114365577697754 +320,640,24,cx_heavy,17427,17351,76,0.004361048947036208,0.2965056896209717,41.341325759887695 +320,640,26,cx_heavy,17177,17105,72,0.004191651627175875,0.15892410278320312,41.4606397151947 +320,640,27,cx_heavy,17174,17099,75,0.004367066495865843,0.16345620155334473,37.95460057258606 +320,640,28,cx_heavy,17319,17235,84,0.004850164559154686,0.14549016952514648,34.12667226791382 +320,640,29,cx_heavy,17093,17009,84,0.004914292400397824,0.16129183769226074,36.164299726486206 +320,640,30,cx_heavy,16958,16885,73,0.004304752918976295,0.18282008171081543,36.25035548210144 +320,640,31,cx_heavy,16814,16722,92,0.005471630783870584,0.16450977325439453,38.933666706085205 +320,640,33,cx_heavy,17135,17030,105,0.00612780857893201,0.1827404499053955,36.49721932411194 +320,640,32,cx_heavy,17111,17054,57,0.003331190462275729,0.16317009925842285,41.66174626350403 +320,640,35,cx_heavy,17187,17110,77,0.004480130331064177,0.15917372703552246,40.28071570396423 +320,640,34,cx_heavy,17187,17112,75,0.004363763309478094,0.15106749534606934,40.85415768623352 +320,640,37,cx_heavy,17291,17173,118,0.006824359493378058,0.22760272026062012,31.455294370651245 +320,640,36,cx_heavy,17607,17539,68,0.003862100301016641,0.1881694793701172,40.48699712753296 +320,640,39,cx_heavy,17403,17296,107,0.0061483652243866,0.16473889350891113,33.54426074028015 +320,640,38,cx_heavy,17447,17356,91,0.0052157964119906005,0.14452362060546875,37.652753829956055 +320,640,42,cx_heavy,17183,17100,83,0.004830355584007449,0.16121411323547363,35.96173977851868 +320,640,41,cx_heavy,17276,17199,77,0.004457050243111832,0.16643452644348145,40.33541250228882 +320,640,40,cx_heavy,17185,17106,79,0.004597032295606634,0.16738557815551758,40.68521499633789 +320,640,44,cx_heavy,17162,17063,99,0.005768558443071903,0.16942048072814941,33.40892839431763 +320,640,43,cx_heavy,17384,17286,98,0.005637367694431661,0.16734051704406738,38.531676054000854 +320,640,46,cx_heavy,17059,16996,63,0.0036930652441526466,0.16756129264831543,33.70435857772827 +320,640,48,cx_heavy,17074,16971,103,0.006032564132599273,0.16960597038269043,30.57886576652527 +320,640,47,cx_heavy,17032,16963,69,0.0040511977454203854,0.1741173267364502,35.59676122665405 +320,640,45,cx_heavy,17138,17065,73,0.004259540203057533,0.15207934379577637,39.56094551086426 +320,640,52,cx_heavy,17049,16952,97,0.005689483254149803,0.08294081687927246,31.889447450637817 +320,640,49,cx_heavy,17146,17068,78,0.004549165986235857,0.15976762771606445,37.27314329147339 +320,640,51,cx_heavy,17040,16954,86,0.005046948356807511,0.13660287857055664,37.375407457351685 +320,640,50,cx_heavy,17018,16954,64,0.0037607239393583265,0.16378140449523926,38.332621812820435 +320,640,53,cx_heavy,17292,17215,77,0.004452926208651399,0.1570444107055664,36.5313503742218 +320,640,57,cx_heavy,17281,17177,104,0.006018170244777501,0.15844035148620605,31.431883811950684 +320,640,54,cx_heavy,17388,17327,61,0.0035081665516448124,0.12182044982910156,37.284976959228516 +320,640,56,cx_heavy,17145,17062,83,0.00484106153397492,0.15997815132141113,39.7960319519043 +320,640,55,cx_heavy,17169,17095,74,0.004310093773661833,0.16029882431030273,41.54549264907837 +320,640,58,cx_heavy,17287,17208,79,0.004569908023370163,0.157883882522583,35.913671255111694 +320,640,59,cx_heavy,17173,17109,64,0.003726780411110464,0.15694284439086914,35.213318824768066 +320,640,60,cx_heavy,17097,17007,90,0.005264081417792595,0.15967392921447754,36.50418949127197 +320,640,61,cx_heavy,17059,16997,62,0.0036344451609121287,0.18656039237976074,41.44029498100281 +320,640,62,cx_heavy,17298,17217,81,0.004682622268470343,0.1822681427001953,38.315393924713135 +320,640,63,cx_heavy,17352,17260,92,0.005301982480405717,0.18692564964294434,36.58324933052063 +320,640,64,cx_heavy,17302,17230,72,0.004161368627904289,0.15886664390563965,37.61918258666992 +320,640,66,cx_heavy,17164,17090,74,0.004311349335819156,0.1817150115966797,38.41894316673279 +320,640,65,cx_heavy,16952,16876,76,0.004483246814535158,0.1782841682434082,39.850982666015625 +320,640,67,cx_heavy,17354,17287,67,0.0038607813760516306,0.16759037971496582,39.767526388168335 +320,640,69,cx_heavy,17144,17076,68,0.003966402239850677,0.2698984146118164,37.859259605407715 +320,640,68,cx_heavy,17193,17108,85,0.004943872506252544,0.16900873184204102,41.59900903701782 +320,640,71,cx_heavy,17393,17289,104,0.0059794170068418325,0.15878582000732422,34.496110916137695 +320,640,70,cx_heavy,17256,17180,76,0.00440426518312471,0.15661883354187012,40.56640291213989 +320,640,72,cx_heavy,17050,16981,69,0.00404692082111437,0.15975260734558105,41.94823908805847 +320,640,74,cx_heavy,17243,17125,118,0.0068433567244679,0.17888283729553223,35.78624510765076 +320,640,73,cx_heavy,17286,17233,53,0.0030660650237186162,0.17829203605651855,43.69937038421631 +320,640,75,cx_heavy,17326,17212,114,0.006579706799030359,0.16103100776672363,35.790364503860474 +320,640,76,cx_heavy,17197,17094,103,0.005989416758736989,0.16736960411071777,35.11686182022095 +320,640,77,cx_heavy,17299,17200,99,0.005722874154575409,0.15939879417419434,37.68882393836975 +320,640,78,cx_heavy,17289,17227,62,0.003586095205043669,0.18475794792175293,40.33918213844299 +320,640,80,cx_heavy,17045,16960,85,0.004986799647990613,0.17090535163879395,35.3603937625885 +320,640,79,cx_heavy,17323,17260,63,0.0036367834670669053,0.15985989570617676,38.337191343307495 +320,640,81,cx_heavy,17241,17145,96,0.005568122498694972,0.16035842895507812,36.329477071762085 +320,640,82,cx_heavy,17187,17115,72,0.0041892127770989706,0.16199707984924316,42.433058738708496 +320,640,83,cx_heavy,17147,17084,63,0.003674112089578352,0.1588437557220459,42.82778573036194 +320,640,84,cx_heavy,17216,17138,78,0.0045306691449814125,0.16796302795410156,43.672483682632446 +320,640,89,cx_heavy,17236,17164,72,0.004177303318635414,0.16730690002441406,35.869664669036865 +320,640,85,cx_heavy,17087,17014,73,0.004272253760168549,0.15883970260620117,41.924376010894775 +320,640,86,cx_heavy,17202,17127,75,0.004359958144401814,0.16781878471374512,41.364503145217896 +320,640,88,cx_heavy,17475,17392,83,0.00474964234620887,0.2500133514404297,37.12634873390198 +320,640,87,cx_heavy,17080,17027,53,0.0031030444964871193,0.29671311378479004,42.58624029159546 +320,640,90,cx_heavy,17205,17109,96,0.005579773321708806,0.17739534378051758,39.68436241149902 +320,640,91,cx_heavy,17353,17298,55,0.00316948078142108,0.20414113998413086,41.87435579299927 +320,640,92,cx_heavy,17002,16930,72,0.004234795906363957,0.18290972709655762,41.94116401672363 +320,640,93,cx_heavy,17295,17216,79,0.004567794160161897,0.16690635681152344,41.67226839065552 +320,640,95,cx_heavy,17209,17089,120,0.006973095473298855,0.15933895111083984,32.87612819671631 +320,640,96,cx_heavy,17210,17127,83,0.004822777454968042,0.16309881210327148,38.72098970413208 +320,640,97,cx_heavy,17257,17176,81,0.004693747464796894,0.18621349334716797,38.53886795043945 +320,640,94,cx_heavy,17256,17183,73,0.0042304126101066295,0.24399447441101074,45.01754140853882 +320,640,98,cx_heavy,17096,17021,75,0.004386991109031352,0.187485933303833,39.28002214431763 +320,640,99,cx_heavy,17107,17028,79,0.004617992634594026,0.17122149467468262,45.57267761230469 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_384.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_384.csv index 650e4d41a..c05dd85d5 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_384.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_384.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -384,768,0,cx_heavy,24862,24777,85,0.003418872174402703,0.22910308837890625,64.14647436141968 -384,768,1,cx_heavy,24807,24731,76,0.0030636513887209254,0.22996306419372559,60.71980857849121 -384,768,4,cx_heavy,24914,24819,95,0.0038131171229027856,0.2276625633239746,55.23775553703308 -384,768,2,cx_heavy,24587,24519,68,0.0027656891853418473,0.22884750366210938,64.4366226196289 -384,768,3,cx_heavy,24802,24724,78,0.0031449076687363924,0.3068423271179199,60.26888179779053 -384,768,6,cx_heavy,24848,24734,114,0.004587894397939472,0.2288823127746582,55.83569025993347 -384,768,5,cx_heavy,24760,24669,91,0.0036752827140549274,0.22828149795532227,60.75231099128723 -384,768,8,cx_heavy,24492,24385,107,0.004368773477053732,0.232987642288208,57.17789101600647 -384,768,7,cx_heavy,24634,24542,92,0.003734675651538524,0.22119379043579102,64.24318742752075 -384,768,12,cx_heavy,24454,24346,108,0.0044164553856219846,0.3707764148712158,48.29965400695801 -384,768,10,cx_heavy,25017,24900,117,0.004676819762561458,0.2629072666168213,54.93082904815674 -384,768,13,cx_heavy,24796,24670,126,0.005081464752379416,0.22913527488708496,52.83742070198059 -384,768,14,cx_heavy,24932,24844,88,0.003529600513396438,0.31590867042541504,54.05348062515259 -384,768,9,cx_heavy,24911,24847,64,0.0025691461603307778,0.2500743865966797,65.25979781150818 -384,768,11,cx_heavy,24760,24673,87,0.0035137318255250402,0.1567091941833496,60.26435732841492 -384,768,15,cx_heavy,25140,25060,80,0.0031821797931583136,0.23029088973999023,64.16718602180481 -384,768,16,cx_heavy,24714,24612,102,0.004127215343529983,0.2690918445587158,55.715210914611816 -384,768,17,cx_heavy,24884,24792,92,0.0036971547982639448,0.24357986450195312,69.35813856124878 -384,768,18,cx_heavy,24987,24889,98,0.00392203946051947,0.22753334045410156,56.048216581344604 -384,768,21,cx_heavy,24830,24746,84,0.003383004430124849,0.2277698516845703,54.879570960998535 -384,768,19,cx_heavy,24919,24825,94,0.00377222199927766,0.23768854141235352,64.22758793830872 -384,768,22,cx_heavy,24847,24718,129,0.005191773654767175,0.2551839351654053,55.7691376209259 -384,768,20,cx_heavy,24557,24474,83,0.0033798916805798753,0.24376964569091797,60.66446399688721 -384,768,23,cx_heavy,24828,24741,87,0.0035041082648622525,0.2344663143157959,58.932379961013794 -384,768,24,cx_heavy,24673,24579,94,0.003809832610545941,0.22085142135620117,62.05014371871948 -384,768,25,cx_heavy,24667,24596,71,0.0028783394818988933,0.22881698608398438,59.530569553375244 -384,768,26,cx_heavy,24923,24832,91,0.0036512458371785097,0.22966837882995605,60.52410006523132 -384,768,27,cx_heavy,24541,24442,99,0.004034065441506051,0.22932219505310059,54.941964864730835 -384,768,30,cx_heavy,24525,24448,77,0.0031396534148827727,0.269359827041626,50.80872201919556 -384,768,28,cx_heavy,24890,24801,89,0.0035757332261952593,0.2531318664550781,59.2176034450531 -384,768,29,cx_heavy,24603,24536,67,0.0027232451327073933,0.23017501831054688,60.425398111343384 -384,768,32,cx_heavy,24816,24753,63,0.002538684719535783,0.2543315887451172,58.05169630050659 -384,768,31,cx_heavy,24502,24406,96,0.003918047506326014,0.25442004203796387,64.1745343208313 -384,768,33,cx_heavy,24704,24617,87,0.0035216968911917098,0.22792577743530273,60.763407468795776 -384,768,34,cx_heavy,24575,24486,89,0.0036215666327568665,0.2524862289428711,63.9547975063324 -384,768,35,cx_heavy,24723,24640,83,0.0033571977510819884,0.22637033462524414,56.99892830848694 -384,768,36,cx_heavy,25224,25143,81,0.0032112274024738343,0.22800707817077637,59.84455466270447 -384,768,38,cx_heavy,24816,24657,159,0.00640715667311412,0.23124384880065918,54.821633100509644 -384,768,37,cx_heavy,24659,24576,83,0.0033659110264000975,0.23524188995361328,64.87582063674927 -384,768,39,cx_heavy,24974,24872,102,0.0040842476175222235,0.23326754570007324,57.25301766395569 -384,768,41,cx_heavy,24576,24484,92,0.0037434895833333335,0.25649333000183105,51.66234874725342 -384,768,40,cx_heavy,24655,24546,109,0.004421009937132427,0.22417283058166504,60.93150544166565 -384,768,42,cx_heavy,24760,24672,88,0.003554119547657512,0.2279520034790039,55.48905277252197 -384,768,43,cx_heavy,24934,24849,85,0.003408999759364723,0.24962425231933594,59.38828086853027 -384,768,45,cx_heavy,24720,24619,101,0.004085760517799353,0.24033594131469727,61.371806383132935 -384,768,47,cx_heavy,24679,24585,94,0.0038089063576319947,0.306751012802124,52.180716037750244 -384,768,44,cx_heavy,24811,24734,77,0.00310346217403571,0.23728227615356445,64.16339993476868 -384,768,48,cx_heavy,24632,24546,86,0.0034913933095160766,0.22936105728149414,60.47279953956604 -384,768,46,cx_heavy,24450,24375,75,0.003067484662576687,0.23477983474731445,63.40704560279846 -384,768,49,cx_heavy,24900,24810,90,0.0036144578313253013,0.23268580436706543,63.93830370903015 -384,768,51,cx_heavy,24463,24347,116,0.004741855046396599,0.2536180019378662,51.92073321342468 -384,768,50,cx_heavy,24525,24450,75,0.0030581039755351682,0.23313045501708984,62.572017431259155 -384,768,52,cx_heavy,24800,24729,71,0.0028629032258064516,0.3128807544708252,59.51005959510803 -384,768,54,cx_heavy,24702,24621,81,0.003279086713626427,0.30417776107788086,59.32367563247681 -384,768,55,cx_heavy,24734,24665,69,0.0027896822188081183,0.2604053020477295,59.80956268310547 -384,768,53,cx_heavy,24690,24601,89,0.003604698258404212,0.36376190185546875,63.22566556930542 -384,768,57,cx_heavy,24484,24369,115,0.004696944943636661,0.23014020919799805,61.28360366821289 -384,768,56,cx_heavy,24798,24699,99,0.003992257440116139,0.23757195472717285,64.17763948440552 -384,768,58,cx_heavy,24789,24724,65,0.002622130783815402,0.27103304862976074,63.99345064163208 -384,768,59,cx_heavy,24872,24799,73,0.0029350273399807014,0.23412179946899414,63.374037742614746 -384,768,60,cx_heavy,24727,24653,74,0.002992680066324261,0.23979663848876953,63.941967487335205 -384,768,63,cx_heavy,24785,24643,142,0.005729271736937664,0.2794485092163086,52.56243395805359 -384,768,61,cx_heavy,24758,24664,94,0.0037967525648275307,0.22571873664855957,55.98103308677673 -384,768,65,cx_heavy,24606,24531,75,0.0030480370641307,0.2286827564239502,50.03233480453491 -384,768,64,cx_heavy,24701,24600,101,0.004088903283267884,0.2296147346496582,60.22615623474121 -384,768,62,cx_heavy,24899,24815,84,0.0033736294630306437,0.22893905639648438,63.05528998374939 -384,768,66,cx_heavy,24628,24515,113,0.004588273509826214,0.23398041725158691,53.16818428039551 -384,768,67,cx_heavy,25014,24948,66,0.002638522427440633,0.27291250228881836,59.734333753585815 -384,768,69,cx_heavy,24686,24581,105,0.0042534229927894355,0.22854351997375488,58.02313685417175 -384,768,68,cx_heavy,24925,24833,92,0.0036910732196589768,0.2303769588470459,61.04511070251465 -384,768,70,cx_heavy,24799,24695,104,0.004193717488608412,0.24135208129882812,47.3937554359436 -384,768,71,cx_heavy,24751,24668,83,0.0033533998626318127,0.23408269882202148,59.04169678688049 -384,768,72,cx_heavy,24691,24577,114,0.0046170669474707385,0.21721315383911133,55.643306732177734 -384,768,74,cx_heavy,24614,24511,103,0.004184610384334118,0.2270047664642334,58.88030457496643 -384,768,73,cx_heavy,24644,24538,106,0.004301249797110858,0.22922873497009277,60.46002435684204 -384,768,75,cx_heavy,24855,24731,124,0.004988935827801248,0.2600071430206299,52.90948033332825 -384,768,77,cx_heavy,24849,24737,112,0.004507223630729607,0.23719334602355957,57.281179428100586 -384,768,78,cx_heavy,24720,24596,124,0.005016181229773463,0.22860193252563477,57.710437059402466 -384,768,76,cx_heavy,24496,24411,85,0.00346995427824951,0.25815486907958984,65.16415286064148 -384,768,79,cx_heavy,24856,24762,94,0.0037817830704859993,0.23369431495666504,58.475162506103516 -384,768,81,cx_heavy,24842,24718,124,0.004991546574349891,0.27320075035095215,53.35991716384888 -384,768,80,cx_heavy,24614,24527,87,0.0035345738197773624,0.23326373100280762,56.50616669654846 -384,768,82,cx_heavy,24723,24572,151,0.006107673017028678,0.2502124309539795,55.80096077919006 -384,768,83,cx_heavy,24562,24465,97,0.003949189805390441,0.22949814796447754,59.87116527557373 -384,768,84,cx_heavy,24584,24481,103,0.004189716889033517,0.22914934158325195,58.95169401168823 -384,768,85,cx_heavy,24491,24420,71,0.002899024131313544,0.2841918468475342,54.96589732170105 -384,768,86,cx_heavy,24873,24800,73,0.0029349093394443774,0.2571406364440918,64.78656816482544 -384,768,87,cx_heavy,24683,24606,77,0.003119555969695742,0.23848724365234375,60.63347005844116 -384,768,89,cx_heavy,24712,24656,56,0.0022661055357720947,0.2438046932220459,55.68106007575989 -384,768,88,cx_heavy,24999,24921,78,0.0031201248049922,0.23106622695922852,59.85044074058533 -384,768,91,cx_heavy,24893,24808,85,0.0034146145502751777,0.23139739036560059,54.4623076915741 -384,768,90,cx_heavy,24725,24638,87,0.003518705763397371,0.24723339080810547,59.549640417099 -384,768,92,cx_heavy,24763,24684,79,0.003190243508460203,0.232957124710083,56.5877890586853 -384,768,93,cx_heavy,25013,24941,72,0.0028785031783472594,0.29335594177246094,63.97894740104675 -384,768,94,cx_heavy,24693,24620,73,0.002956303405823513,0.24323105812072754,63.684245109558105 -384,768,95,cx_heavy,24670,24566,104,0.004215646534252128,0.2599649429321289,56.30104160308838 -384,768,96,cx_heavy,24832,24761,71,0.002859213917525773,0.23579001426696777,68.11660552024841 -384,768,99,cx_heavy,24536,24401,135,0.0055021193348549075,0.25426197052001953,61.48212122917175 -384,768,97,cx_heavy,24813,24719,94,0.003788336758956998,0.3376893997192383,64.61888575553894 -384,768,98,cx_heavy,24787,24681,106,0.004276435228143785,0.23969554901123047,64.43619728088379 +384,768,4,cx_heavy,24914,24819,95,0.0038131171229027856,0.22190594673156738,53.91786599159241 +384,768,3,cx_heavy,24802,24724,78,0.0031449076687363924,0.2545294761657715,57.02605319023132 +384,768,0,cx_heavy,24862,24777,85,0.003418872174402703,0.25957250595092773,64.65929079055786 +384,768,5,cx_heavy,24760,24669,91,0.0036752827140549274,0.1991748809814453,55.56224489212036 +384,768,1,cx_heavy,24807,24731,76,0.0030636513887209254,0.203141450881958,63.65972185134888 +384,768,2,cx_heavy,24587,24519,68,0.0027656891853418473,0.2166299819946289,67.30209994316101 +384,768,6,cx_heavy,24848,24734,114,0.004587894397939472,0.26917505264282227,55.56596493721008 +384,768,8,cx_heavy,24492,24385,107,0.004368773477053732,0.23636722564697266,50.4411416053772 +384,768,7,cx_heavy,24634,24542,92,0.003734675651538524,0.27120041847229004,67.37813210487366 +384,768,12,cx_heavy,24454,24346,108,0.0044164553856219846,0.25949978828430176,51.51939058303833 +384,768,13,cx_heavy,24796,24670,126,0.005081464752379416,0.2719147205352783,54.4538357257843 +384,768,10,cx_heavy,25017,24900,117,0.004676819762561458,0.23174262046813965,60.53815269470215 +384,768,14,cx_heavy,24932,24844,88,0.003529600513396438,0.25741124153137207,54.23395347595215 +384,768,11,cx_heavy,24760,24673,87,0.0035137318255250402,0.2872335910797119,59.44471788406372 +384,768,9,cx_heavy,24911,24847,64,0.0025691461603307778,0.22435259819030762,63.71869897842407 +384,768,15,cx_heavy,25140,25060,80,0.0031821797931583136,0.22979474067687988,63.22631049156189 +384,768,16,cx_heavy,24714,24612,102,0.004127215343529983,0.23630547523498535,50.76548886299133 +384,768,17,cx_heavy,24884,24792,92,0.0036971547982639448,0.24258041381835938,64.87331914901733 +384,768,22,cx_heavy,24847,24718,129,0.005191773654767175,0.4108693599700928,52.3733184337616 +384,768,18,cx_heavy,24987,24889,98,0.00392203946051947,0.31593942642211914,55.03900861740112 +384,768,21,cx_heavy,24830,24746,84,0.003383004430124849,0.24629807472229004,58.725791454315186 +384,768,19,cx_heavy,24919,24825,94,0.00377222199927766,0.24465417861938477,64.12137866020203 +384,768,20,cx_heavy,24557,24474,83,0.0033798916805798753,0.22425389289855957,64.61916184425354 +384,768,24,cx_heavy,24673,24579,94,0.003809832610545941,0.27585434913635254,59.80160140991211 +384,768,23,cx_heavy,24828,24741,87,0.0035041082648622525,0.21330809593200684,68.28335428237915 +384,768,25,cx_heavy,24667,24596,71,0.0028783394818988933,0.27956366539001465,64.20256280899048 +384,768,26,cx_heavy,24923,24832,91,0.0036512458371785097,0.2555210590362549,58.97868800163269 +384,768,27,cx_heavy,24541,24442,99,0.004034065441506051,0.2663145065307617,59.69245219230652 +384,768,28,cx_heavy,24890,24801,89,0.0035757332261952593,0.2387981414794922,60.15147304534912 +384,768,30,cx_heavy,24525,24448,77,0.0031396534148827727,0.2979416847229004,54.511709451675415 +384,768,29,cx_heavy,24603,24536,67,0.0027232451327073933,0.44714903831481934,58.943854093551636 +384,768,32,cx_heavy,24816,24753,63,0.002538684719535783,0.23780107498168945,54.332648515701294 +384,768,31,cx_heavy,24502,24406,96,0.003918047506326014,0.24065494537353516,64.4140260219574 +384,768,33,cx_heavy,24704,24617,87,0.0035216968911917098,0.22872328758239746,61.60947227478027 +384,768,34,cx_heavy,24575,24486,89,0.0036215666327568665,0.23532795906066895,64.24762344360352 +384,768,35,cx_heavy,24723,24640,83,0.0033571977510819884,0.2474663257598877,57.8735830783844 +384,768,38,cx_heavy,24816,24657,159,0.00640715667311412,0.2439591884613037,55.87391209602356 +384,768,39,cx_heavy,24974,24872,102,0.0040842476175222235,0.12482261657714844,59.50341725349426 +384,768,40,cx_heavy,24655,24546,109,0.004421009937132427,0.25736117362976074,58.9013454914093 +384,768,36,cx_heavy,25224,25143,81,0.0032112274024738343,0.24681329727172852,63.37341547012329 +384,768,37,cx_heavy,24659,24576,83,0.0033659110264000975,0.27060747146606445,65.67602348327637 +384,768,41,cx_heavy,24576,24484,92,0.0037434895833333335,0.3222804069519043,55.175942182540894 +384,768,42,cx_heavy,24760,24672,88,0.003554119547657512,0.2368485927581787,59.51386642456055 +384,768,43,cx_heavy,24934,24849,85,0.003408999759364723,0.23146700859069824,59.512386322021484 +384,768,44,cx_heavy,24811,24734,77,0.00310346217403571,0.30190086364746094,59.15459132194519 +384,768,45,cx_heavy,24720,24619,101,0.004085760517799353,0.2546195983886719,60.78449749946594 +384,768,47,cx_heavy,24679,24585,94,0.0038089063576319947,0.24371671676635742,56.498295068740845 +384,768,46,cx_heavy,24450,24375,75,0.003067484662576687,0.2535369396209717,58.57999920845032 +384,768,48,cx_heavy,24632,24546,86,0.0034913933095160766,0.22680377960205078,59.51680779457092 +384,768,51,cx_heavy,24463,24347,116,0.004741855046396599,0.26176977157592773,53.87173295021057 +384,768,49,cx_heavy,24900,24810,90,0.0036144578313253013,0.23650288581848145,68.29660272598267 +384,768,50,cx_heavy,24525,24450,75,0.0030581039755351682,0.27155494689941406,68.52733159065247 +384,768,52,cx_heavy,24800,24729,71,0.0028629032258064516,0.29097723960876465,58.21928906440735 +384,768,53,cx_heavy,24690,24601,89,0.003604698258404212,0.22972440719604492,64.07183146476746 +384,768,55,cx_heavy,24734,24665,69,0.0027896822188081183,0.22976899147033691,54.91944980621338 +384,768,54,cx_heavy,24702,24621,81,0.003279086713626427,0.2328794002532959,58.53213715553284 +384,768,56,cx_heavy,24798,24699,99,0.003992257440116139,0.25006103515625,58.32591009140015 +384,768,57,cx_heavy,24484,24369,115,0.004696944943636661,0.23970317840576172,62.74858903884888 +384,768,58,cx_heavy,24789,24724,65,0.002622130783815402,0.24443316459655762,62.03990292549133 +384,768,59,cx_heavy,24872,24799,73,0.0029350273399807014,0.24425792694091797,62.09309768676758 +384,768,60,cx_heavy,24727,24653,74,0.002992680066324261,0.2825467586517334,62.662875175476074 +384,768,61,cx_heavy,24758,24664,94,0.0037967525648275307,0.24864506721496582,55.38136124610901 +384,768,62,cx_heavy,24899,24815,84,0.0033736294630306437,0.23389720916748047,62.31649661064148 +384,768,63,cx_heavy,24785,24643,142,0.005729271736937664,0.25183677673339844,50.95107316970825 +384,768,65,cx_heavy,24606,24531,75,0.0030480370641307,0.25972580909729004,48.92461133003235 +384,768,64,cx_heavy,24701,24600,101,0.004088903283267884,0.23581504821777344,55.616596698760986 +384,768,66,cx_heavy,24628,24515,113,0.004588273509826214,0.2483227252960205,53.3970308303833 +384,768,70,cx_heavy,24799,24695,104,0.004193717488608412,0.23635101318359375,45.19861054420471 +384,768,69,cx_heavy,24686,24581,105,0.0042534229927894355,0.16634845733642578,52.6364643573761 +384,768,67,cx_heavy,25014,24948,66,0.002638522427440633,0.24547243118286133,57.24038600921631 +384,768,68,cx_heavy,24925,24833,92,0.0036910732196589768,0.26991987228393555,57.35026216506958 +384,768,71,cx_heavy,24751,24668,83,0.0033533998626318127,0.16948938369750977,61.15490007400513 +384,768,72,cx_heavy,24691,24577,114,0.0046170669474707385,0.11807441711425781,55.57906699180603 +384,768,74,cx_heavy,24614,24511,103,0.004184610384334118,0.24295926094055176,55.33523917198181 +384,768,73,cx_heavy,24644,24538,106,0.004301249797110858,0.12063217163085938,57.69257068634033 +384,768,75,cx_heavy,24855,24731,124,0.004988935827801248,0.2020244598388672,53.55527639389038 +384,768,76,cx_heavy,24496,24411,85,0.00346995427824951,0.21884870529174805,59.979281187057495 +384,768,78,cx_heavy,24720,24596,124,0.005016181229773463,0.23371577262878418,54.2595419883728 +384,768,77,cx_heavy,24849,24737,112,0.004507223630729607,0.23962187767028809,57.464749574661255 +384,768,79,cx_heavy,24856,24762,94,0.0037817830704859993,0.2320256233215332,60.516812562942505 +384,768,80,cx_heavy,24614,24527,87,0.0035345738197773624,0.12657618522644043,54.09918999671936 +384,768,81,cx_heavy,24842,24718,124,0.004991546574349891,0.2974882125854492,48.199472427368164 +384,768,82,cx_heavy,24723,24572,151,0.006107673017028678,0.22714495658874512,50.79035568237305 +384,768,84,cx_heavy,24584,24481,103,0.004189716889033517,0.12023210525512695,50.176889419555664 +384,768,83,cx_heavy,24562,24465,97,0.003949189805390441,0.25301599502563477,57.490785360336304 +384,768,85,cx_heavy,24491,24420,71,0.002899024131313544,0.27836132049560547,49.77247762680054 +384,768,86,cx_heavy,24873,24800,73,0.0029349093394443774,0.16645216941833496,55.51184439659119 +384,768,87,cx_heavy,24683,24606,77,0.003119555969695742,0.17460298538208008,59.5979323387146 +384,768,88,cx_heavy,24999,24921,78,0.0031201248049922,0.12390351295471191,57.05103087425232 +384,768,89,cx_heavy,24712,24656,56,0.0022661055357720947,0.23363685607910156,55.10455799102783 +384,768,91,cx_heavy,24893,24808,85,0.0034146145502751777,0.22823262214660645,51.65715503692627 +384,768,90,cx_heavy,24725,24638,87,0.003518705763397371,0.24410104751586914,58.21368598937988 +384,768,92,cx_heavy,24763,24684,79,0.003190243508460203,0.3497426509857178,59.56014966964722 +384,768,93,cx_heavy,25013,24941,72,0.0028785031783472594,0.27104616165161133,58.61266016960144 +384,768,95,cx_heavy,24670,24566,104,0.004215646534252128,0.23439979553222656,51.69857311248779 +384,768,94,cx_heavy,24693,24620,73,0.002956303405823513,0.23367762565612793,59.38258743286133 +384,768,96,cx_heavy,24832,24761,71,0.002859213917525773,0.22278714179992676,58.30967998504639 +384,768,97,cx_heavy,24813,24719,94,0.003788336758956998,0.2258601188659668,66.46413016319275 +384,768,98,cx_heavy,24787,24681,106,0.004276435228143785,0.22921395301818848,65.39461421966553 +384,768,99,cx_heavy,24536,24401,135,0.0055021193348549075,0.25092244148254395,58.48066425323486 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_448.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_448.csv index c3d24f0c5..3670eee9a 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_448.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_448.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -448,896,1,cx_heavy,33611,33508,103,0.0030644729404064146,0.31089019775390625,80.0670440196991 -448,896,0,cx_heavy,33619,33514,105,0.0031232338856004046,0.2996814250946045,87.25664615631104 -448,896,2,cx_heavy,33602,33447,155,0.004612820665436581,0.3122518062591553,80.48066139221191 -448,896,3,cx_heavy,33597,33488,109,0.0032443372920201207,0.31313586235046387,92.94416642189026 -448,896,5,cx_heavy,33850,33753,97,0.0028655834564254063,0.3124818801879883,87.22328901290894 -448,896,4,cx_heavy,33879,33783,96,0.0028336137430266537,0.3110642433166504,91.68124532699585 -448,896,6,cx_heavy,33680,33594,86,0.0025534441805225654,0.3101320266723633,88.57039737701416 -448,896,7,cx_heavy,33528,33444,84,0.0025053686471009306,0.3141016960144043,93.0227723121643 -448,896,8,cx_heavy,33332,33251,81,0.0024300972038881555,0.31294941902160645,98.85026216506958 -448,896,10,cx_heavy,33655,33555,100,0.0029713266973703757,0.311767578125,88.76694202423096 -448,896,9,cx_heavy,33678,33597,81,0.002405130946018172,0.3261864185333252,91.06172966957092 -448,896,11,cx_heavy,34018,33926,92,0.00270445058498442,0.3117804527282715,98.08296537399292 -448,896,13,cx_heavy,33638,33540,98,0.0029133717819133124,0.310671329498291,86.16788506507874 -448,896,12,cx_heavy,33630,33551,79,0.0023490930716622066,0.3113980293273926,95.50946068763733 -448,896,14,cx_heavy,33793,33693,100,0.0029591927322226495,0.3106262683868408,91.68095445632935 -448,896,15,cx_heavy,33769,33656,113,0.0033462643252687376,0.33958888053894043,92.01276016235352 -448,896,16,cx_heavy,33814,33701,113,0.0033418110841663216,0.32077836990356445,91.28300142288208 -448,896,17,cx_heavy,33707,33598,109,0.0032337496662414337,0.31355881690979004,93.53433179855347 -448,896,18,cx_heavy,33689,33558,131,0.0038885096025408888,0.3169095516204834,94.13170790672302 -448,896,19,cx_heavy,33724,33620,104,0.0030838571936899536,0.34455275535583496,97.06382441520691 -448,896,20,cx_heavy,33388,33306,82,0.002455972205582844,0.31085848808288574,95.58560276031494 -448,896,21,cx_heavy,33756,33666,90,0.0026661926768574476,0.3080594539642334,93.393878698349 -448,896,24,cx_heavy,33423,33285,138,0.004128893277084642,0.3262062072753906,79.33445858955383 -448,896,22,cx_heavy,33490,33399,91,0.002717229023589131,0.3507828712463379,92.04355978965759 -448,896,23,cx_heavy,33774,33644,130,0.003849114703618168,0.31330204010009766,93.88740611076355 -448,896,25,cx_heavy,33574,33454,120,0.003574194317031036,0.3100461959838867,86.61963248252869 -448,896,26,cx_heavy,33570,33480,90,0.002680965147453083,0.32876062393188477,96.58744359016418 -448,896,28,cx_heavy,34110,34007,103,0.0030196423336265026,0.3481109142303467,83.2246515750885 -448,896,27,cx_heavy,33709,33614,95,0.0028182384526387614,0.3305022716522217,93.18260025978088 -448,896,31,cx_heavy,33531,33436,95,0.0028331991291640573,0.3187575340270996,81.24328994750977 -448,896,29,cx_heavy,33450,33367,83,0.0024813153961136024,0.3524589538574219,93.45761227607727 -448,896,33,cx_heavy,33603,33494,109,0.0032437579977978156,0.3212594985961914,89.24123978614807 -448,896,34,cx_heavy,33599,33519,80,0.002381023244739427,0.30533576011657715,85.98663449287415 -448,896,32,cx_heavy,33455,33372,83,0.002480944552383799,0.32465052604675293,98.13922262191772 -448,896,30,cx_heavy,33524,33441,83,0.0024758382054647417,0.3288235664367676,103.43727350234985 -448,896,35,cx_heavy,33594,33440,154,0.0045841519318926,0.3391704559326172,82.60706043243408 -448,896,36,cx_heavy,34105,33999,106,0.003108048673215071,0.33175158500671387,98.18552374839783 -448,896,37,cx_heavy,33530,33426,104,0.003101699970175962,0.3124232292175293,97.96255135536194 -448,896,38,cx_heavy,33801,33673,128,0.0037868702109405046,0.3128378391265869,93.43299269676208 -448,896,39,cx_heavy,33788,33700,88,0.002604474961524802,0.32021141052246094,85.23735666275024 -448,896,43,cx_heavy,33761,33650,111,0.003287817303989811,0.3095378875732422,80.3199200630188 -448,896,40,cx_heavy,33613,33483,130,0.003867551245053997,0.30977416038513184,87.17063403129578 -448,896,41,cx_heavy,33575,33470,105,0.003127326880119136,0.3165583610534668,92.17931723594666 -448,896,42,cx_heavy,33622,33531,91,0.0027065611801796443,0.31503868103027344,94.00511646270752 -448,896,44,cx_heavy,33627,33536,91,0.0027061587414874953,0.30908656120300293,86.24603271484375 -448,896,46,cx_heavy,33276,33153,123,0.003696357735304724,0.3092629909515381,90.2004885673523 -448,896,45,cx_heavy,33835,33744,91,0.002689522683611645,0.3308134078979492,93.8833839893341 -448,896,47,cx_heavy,33460,33376,84,0.002510460251046025,0.31447625160217285,86.57068037986755 -448,896,49,cx_heavy,33737,33636,101,0.002993745739099505,0.3150510787963867,81.89066433906555 -448,896,48,cx_heavy,33347,33263,84,0.00251896722343839,0.314345121383667,91.05299234390259 -448,896,50,cx_heavy,33543,33452,91,0.002712935634856751,0.31231069564819336,93.2547812461853 -448,896,52,cx_heavy,33668,33585,83,0.0024652489010336225,0.32091522216796875,92.01228976249695 -448,896,51,cx_heavy,33392,33279,113,0.0033840440824149495,0.32196736335754395,96.28140997886658 -448,896,53,cx_heavy,33593,33495,98,0.0029172744321733697,0.3318965435028076,85.9763810634613 -448,896,55,cx_heavy,33670,33589,81,0.0024057024057024057,0.31255602836608887,88.11309123039246 -448,896,54,cx_heavy,33398,33307,91,0.0027247140547338165,0.33945393562316895,96.15877532958984 -448,896,56,cx_heavy,33789,33664,125,0.0036994288081920153,0.3114278316497803,86.0994918346405 -448,896,57,cx_heavy,33582,33477,105,0.0031266750044666785,0.31163573265075684,85.64772772789001 -448,896,58,cx_heavy,33680,33593,87,0.0025831353919239905,0.360471248626709,91.86365795135498 -448,896,59,cx_heavy,33766,33678,88,0.0026061718888823076,0.32174253463745117,92.15677070617676 -448,896,60,cx_heavy,33267,33148,119,0.0035771184657468363,0.3861582279205322,83.70738434791565 -448,896,61,cx_heavy,33866,33728,138,0.004074883363845745,0.2982654571533203,89.42578053474426 -448,896,62,cx_heavy,33634,33555,79,0.002348813700422192,0.3155026435852051,97.72228622436523 -448,896,63,cx_heavy,33610,33497,113,0.0033620946146980064,0.41877055168151855,80.14900040626526 -448,896,64,cx_heavy,33711,33591,120,0.003559668950787577,0.3108692169189453,92.92180681228638 -448,896,66,cx_heavy,33512,33411,101,0.0030138457865839102,0.31118226051330566,91.71427249908447 -448,896,65,cx_heavy,33505,33399,106,0.003163706909416505,0.31360483169555664,98.37874364852905 -448,896,68,cx_heavy,33778,33642,136,0.004026289300728285,0.31755852699279785,81.08557224273682 -448,896,67,cx_heavy,33912,33814,98,0.0028898325076669026,0.3144698143005371,91.24570441246033 -448,896,69,cx_heavy,33486,33400,86,0.0025682374723765156,0.30797886848449707,96.64487266540527 -448,896,70,cx_heavy,33850,33711,139,0.004106351550960118,0.3121054172515869,91.79870438575745 -448,896,71,cx_heavy,34017,33875,142,0.004174383396537026,0.3164229393005371,89.63385033607483 -448,896,72,cx_heavy,33248,33099,149,0.004481472569778633,0.3124415874481201,93.66265153884888 -448,896,73,cx_heavy,33755,33662,93,0.002755147385572508,0.33193087577819824,96.4166533946991 -448,896,75,cx_heavy,33841,33741,100,0.0029549954197570995,0.3448483943939209,82.34935426712036 -448,896,77,cx_heavy,33728,33613,115,0.003409629981024668,0.3240838050842285,80.12537240982056 -448,896,74,cx_heavy,33640,33558,82,0.002437574316290131,0.31241703033447266,91.93869543075562 -448,896,76,cx_heavy,33504,33400,104,0.0031041069723018147,0.3211832046508789,91.41358542442322 -448,896,78,cx_heavy,33612,33515,97,0.002885874092585981,0.3312256336212158,92.45966458320618 -448,896,79,cx_heavy,33489,33363,126,0.0037624294544477293,0.30167722702026367,94.2098662853241 -448,896,80,cx_heavy,33260,33179,81,0.0024353577871316897,0.3181421756744385,91.3232250213623 -448,896,81,cx_heavy,33740,33631,109,0.0032305868405453466,0.43686580657958984,85.72898173332214 -448,896,84,cx_heavy,33770,33661,109,0.0032277169084986676,0.33376574516296387,84.46810412406921 -448,896,85,cx_heavy,33694,33584,110,0.003264676203478364,0.30973172187805176,85.36983633041382 -448,896,82,cx_heavy,33552,33458,94,0.0028016213638531236,0.48219895362854004,92.14504933357239 -448,896,83,cx_heavy,33412,33285,127,0.0038010295702142942,0.3120148181915283,93.09026503562927 -448,896,86,cx_heavy,33456,33369,87,0.0026004304160688664,0.3147006034851074,85.0884599685669 -448,896,88,cx_heavy,33816,33742,74,0.0021883132245091082,0.3103749752044678,85.00261497497559 -448,896,87,cx_heavy,33320,33229,91,0.0027310924369747898,0.3160991668701172,102.73357462882996 -448,896,89,cx_heavy,33907,33808,99,0.002919751083846993,0.3194563388824463,89.79739451408386 -448,896,90,cx_heavy,33637,33533,104,0.0030918333977465293,0.3117210865020752,88.71137714385986 -448,896,91,cx_heavy,33803,33682,121,0.0035795639440286365,0.30939292907714844,83.90220379829407 -448,896,93,cx_heavy,33952,33853,99,0.0029158812441093308,0.31677699089050293,86.08816599845886 -448,896,92,cx_heavy,33636,33533,103,0.003062195266975859,0.4022178649902344,86.74782371520996 -448,896,95,cx_heavy,33793,33688,105,0.0031071523688337823,0.32614612579345703,87.4510326385498 -448,896,94,cx_heavy,33464,33320,144,0.004303131723643318,0.33347368240356445,93.635906457901 -448,896,97,cx_heavy,33952,33810,142,0.0041823751178133835,0.31246113777160645,93.13698196411133 -448,896,96,cx_heavy,33669,33575,94,0.0027918857108913246,0.2942333221435547,101.00485682487488 -448,896,98,cx_heavy,33708,33577,131,0.0038863177880621813,0.30976176261901855,94.4091408252716 -448,896,99,cx_heavy,33244,33118,126,0.0037901576224281075,0.3120872974395752,110.51953625679016 +448,896,2,cx_heavy,33602,33447,155,0.004612820665436581,0.2886171340942383,75.43545174598694 +448,896,0,cx_heavy,33619,33514,105,0.0031232338856004046,0.297377347946167,81.50048041343689 +448,896,1,cx_heavy,33611,33508,103,0.0030644729404064146,0.35234522819519043,82.8712887763977 +448,896,3,cx_heavy,33597,33488,109,0.0032443372920201207,0.2972078323364258,86.34637594223022 +448,896,5,cx_heavy,33850,33753,97,0.0028655834564254063,0.3110787868499756,86.55905246734619 +448,896,4,cx_heavy,33879,33783,96,0.0028336137430266537,0.32695913314819336,90.56440448760986 +448,896,6,cx_heavy,33680,33594,86,0.0025534441805225654,0.32161426544189453,87.80699467658997 +448,896,7,cx_heavy,33528,33444,84,0.0025053686471009306,0.3334846496582031,90.12248468399048 +448,896,8,cx_heavy,33332,33251,81,0.0024300972038881555,0.3154599666595459,95.9281792640686 +448,896,9,cx_heavy,33678,33597,81,0.002405130946018172,0.3234293460845947,85.34169054031372 +448,896,11,cx_heavy,34018,33926,92,0.00270445058498442,0.3571341037750244,89.62251734733582 +448,896,10,cx_heavy,33655,33555,100,0.0029713266973703757,0.3408794403076172,92.5789999961853 +448,896,13,cx_heavy,33638,33540,98,0.0029133717819133124,0.32062268257141113,86.91450500488281 +448,896,14,cx_heavy,33793,33693,100,0.0029591927322226495,0.33060145378112793,90.78218221664429 +448,896,12,cx_heavy,33630,33551,79,0.0023490930716622066,0.40677690505981445,96.48818850517273 +448,896,15,cx_heavy,33769,33656,113,0.0033462643252687376,0.31814002990722656,90.28223180770874 +448,896,16,cx_heavy,33814,33701,113,0.0033418110841663216,0.3297910690307617,88.01612687110901 +448,896,17,cx_heavy,33707,33598,109,0.0032337496662414337,0.32300400733947754,88.05667042732239 +448,896,18,cx_heavy,33689,33558,131,0.0038885096025408888,0.33821940422058105,86.78095412254333 +448,896,19,cx_heavy,33724,33620,104,0.0030838571936899536,0.34282803535461426,86.55959939956665 +448,896,20,cx_heavy,33388,33306,82,0.002455972205582844,0.3549036979675293,92.39016962051392 +448,896,21,cx_heavy,33756,33666,90,0.0026661926768574476,0.3825347423553467,86.06198501586914 +448,896,23,cx_heavy,33774,33644,130,0.003849114703618168,0.3289906978607178,90.8351035118103 +448,896,22,cx_heavy,33490,33399,91,0.002717229023589131,0.315579891204834,96.7654333114624 +448,896,24,cx_heavy,33423,33285,138,0.004128893277084642,0.3158907890319824,88.64514327049255 +448,896,25,cx_heavy,33574,33454,120,0.003574194317031036,0.3088395595550537,95.0038583278656 +448,896,26,cx_heavy,33570,33480,90,0.002680965147453083,0.31757116317749023,92.93976759910583 +448,896,27,cx_heavy,33709,33614,95,0.0028182384526387614,0.303774356842041,86.28246402740479 +448,896,28,cx_heavy,34110,34007,103,0.0030196423336265026,0.30629801750183105,88.31464171409607 +448,896,29,cx_heavy,33450,33367,83,0.0024813153961136024,0.33098292350769043,93.56170773506165 +448,896,31,cx_heavy,33531,33436,95,0.0028331991291640573,0.31501245498657227,83.0711452960968 +448,896,30,cx_heavy,33524,33441,83,0.0024758382054647417,0.34116649627685547,103.36127400398254 +448,896,33,cx_heavy,33603,33494,109,0.0032437579977978156,0.33507609367370605,86.75480699539185 +448,896,32,cx_heavy,33455,33372,83,0.002480944552383799,0.31821417808532715,96.84581065177917 +448,896,34,cx_heavy,33599,33519,80,0.002381023244739427,0.317169189453125,80.57516384124756 +448,896,35,cx_heavy,33594,33440,154,0.0045841519318926,0.31757235527038574,82.58621764183044 +448,896,36,cx_heavy,34105,33999,106,0.003108048673215071,0.33911871910095215,93.19904494285583 +448,896,37,cx_heavy,33530,33426,104,0.003101699970175962,0.3100240230560303,92.35067462921143 +448,896,39,cx_heavy,33788,33700,88,0.002604474961524802,0.3149287700653076,90.27413082122803 +448,896,38,cx_heavy,33801,33673,128,0.0037868702109405046,0.29721593856811523,94.16376495361328 +448,896,40,cx_heavy,33613,33483,130,0.003867551245053997,0.3044612407684326,83.80264282226562 +448,896,41,cx_heavy,33575,33470,105,0.003127326880119136,0.3081846237182617,91.78775215148926 +448,896,42,cx_heavy,33622,33531,91,0.0027065611801796443,0.29272007942199707,93.35509872436523 +448,896,43,cx_heavy,33761,33650,111,0.003287817303989811,0.31377506256103516,84.66101884841919 +448,896,44,cx_heavy,33627,33536,91,0.0027061587414874953,0.3790156841278076,92.12644934654236 +448,896,46,cx_heavy,33276,33153,123,0.003696357735304724,0.3257889747619629,84.83224558830261 +448,896,45,cx_heavy,33835,33744,91,0.002689522683611645,0.3003551959991455,96.22693181037903 +448,896,47,cx_heavy,33460,33376,84,0.002510460251046025,0.32480287551879883,88.95321321487427 +448,896,48,cx_heavy,33347,33263,84,0.00251896722343839,0.31784677505493164,90.15653562545776 +448,896,49,cx_heavy,33737,33636,101,0.002993745739099505,0.3211522102355957,80.78981900215149 +448,896,52,cx_heavy,33668,33585,83,0.0024652489010336225,0.3303556442260742,85.02681684494019 +448,896,51,cx_heavy,33392,33279,113,0.0033840440824149495,0.3131394386291504,90.69311904907227 +448,896,50,cx_heavy,33543,33452,91,0.002712935634856751,0.32134318351745605,97.2378740310669 +448,896,53,cx_heavy,33593,33495,98,0.0029172744321733697,0.31658458709716797,91.6285605430603 +448,896,54,cx_heavy,33398,33307,91,0.0027247140547338165,0.3599390983581543,95.07550597190857 +448,896,55,cx_heavy,33670,33589,81,0.0024057024057024057,0.3177356719970703,86.05801701545715 +448,896,56,cx_heavy,33789,33664,125,0.0036994288081920153,0.31364893913269043,86.47194218635559 +448,896,57,cx_heavy,33582,33477,105,0.0031266750044666785,0.321674108505249,88.76926755905151 +448,896,58,cx_heavy,33680,33593,87,0.0025831353919239905,0.3119518756866455,95.5499312877655 +448,896,60,cx_heavy,33267,33148,119,0.0035771184657468363,0.3193635940551758,89.56068754196167 +448,896,61,cx_heavy,33866,33728,138,0.004074883363845745,0.32841992378234863,88.69382047653198 +448,896,59,cx_heavy,33766,33678,88,0.0026061718888823076,0.312885046005249,91.56729936599731 +448,896,62,cx_heavy,33634,33555,79,0.002348813700422192,0.276261568069458,91.37726926803589 +448,896,63,cx_heavy,33610,33497,113,0.0033620946146980064,0.3363175392150879,91.43617248535156 +448,896,64,cx_heavy,33711,33591,120,0.003559668950787577,0.3630516529083252,91.55921745300293 +448,896,66,cx_heavy,33512,33411,101,0.0030138457865839102,0.32879209518432617,90.8531403541565 +448,896,65,cx_heavy,33505,33399,106,0.003163706909416505,0.3124372959136963,97.57150435447693 +448,896,67,cx_heavy,33912,33814,98,0.0028898325076669026,0.31198716163635254,92.5892083644867 +448,896,68,cx_heavy,33778,33642,136,0.004026289300728285,0.33707165718078613,87.16721105575562 +448,896,70,cx_heavy,33850,33711,139,0.004106351550960118,0.312237024307251,91.25386619567871 +448,896,69,cx_heavy,33486,33400,86,0.0025682374723765156,0.34351611137390137,97.13839054107666 +448,896,71,cx_heavy,34017,33875,142,0.004174383396537026,0.31084299087524414,85.6001787185669 +448,896,72,cx_heavy,33248,33099,149,0.004481472569778633,0.3582592010498047,86.88002705574036 +448,896,74,cx_heavy,33640,33558,82,0.002437574316290131,0.33048129081726074,84.42691159248352 +448,896,75,cx_heavy,33841,33741,100,0.0029549954197570995,0.32231974601745605,83.23595881462097 +448,896,73,cx_heavy,33755,33662,93,0.002755147385572508,0.307614803314209,90.7882730960846 +448,896,76,cx_heavy,33504,33400,104,0.0031041069723018147,0.30414748191833496,85.03229069709778 +448,896,77,cx_heavy,33728,33613,115,0.003409629981024668,0.3301582336425781,82.67259740829468 +448,896,79,cx_heavy,33489,33363,126,0.0037624294544477293,0.3109874725341797,87.62248110771179 +448,896,78,cx_heavy,33612,33515,97,0.002885874092585981,0.3173787593841553,96.10875511169434 +448,896,80,cx_heavy,33260,33179,81,0.0024353577871316897,0.3372383117675781,92.8746874332428 +448,896,81,cx_heavy,33740,33631,109,0.0032305868405453466,0.27509117126464844,86.10385131835938 +448,896,82,cx_heavy,33552,33458,94,0.0028016213638531236,0.3555562496185303,86.96842789649963 +448,896,85,cx_heavy,33694,33584,110,0.003264676203478364,0.33789896965026855,83.42850637435913 +448,896,83,cx_heavy,33412,33285,127,0.0038010295702142942,0.3514750003814697,94.53925156593323 +448,896,84,cx_heavy,33770,33661,109,0.0032277169084986676,0.32654786109924316,97.88141441345215 +448,896,86,cx_heavy,33456,33369,87,0.0026004304160688664,0.3407409191131592,97.65794491767883 +448,896,87,cx_heavy,33320,33229,91,0.0027310924369747898,0.32288408279418945,97.45118880271912 +448,896,88,cx_heavy,33816,33742,74,0.0021883132245091082,0.3158590793609619,93.10084962844849 +448,896,89,cx_heavy,33907,33808,99,0.002919751083846993,0.3312549591064453,88.23384475708008 +448,896,91,cx_heavy,33803,33682,121,0.0035795639440286365,0.32837629318237305,80.48726344108582 +448,896,90,cx_heavy,33637,33533,104,0.0030918333977465293,0.3538999557495117,86.52469277381897 +448,896,93,cx_heavy,33952,33853,99,0.0029158812441093308,0.36194467544555664,83.2967369556427 +448,896,92,cx_heavy,33636,33533,103,0.003062195266975859,0.3739771842956543,88.54770159721375 +448,896,94,cx_heavy,33464,33320,144,0.004303131723643318,0.2903413772583008,84.21855807304382 +448,896,95,cx_heavy,33793,33688,105,0.0031071523688337823,0.3041200637817383,81.05459499359131 +448,896,97,cx_heavy,33952,33810,142,0.0041823751178133835,0.32953572273254395,87.29951810836792 +448,896,96,cx_heavy,33669,33575,94,0.0027918857108913246,0.34012293815612793,88.14564847946167 +448,896,98,cx_heavy,33708,33577,131,0.0038863177880621813,0.30882883071899414,104.00950455665588 +448,896,99,cx_heavy,33244,33118,126,0.0037901576224281075,0.3141298294067383,105.75977778434753 diff --git a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_64.csv b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_64.csv index fcde04120..00a938142 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_64.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/cx_heavy/results_64.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -64,128,0,cx_heavy,718,697,21,0.02924791086350975,0.005136251449584961,0.6305351257324219 -64,128,2,cx_heavy,690,670,20,0.028985507246376812,0.005389690399169922,0.49971771240234375 -64,128,1,cx_heavy,720,708,12,0.016666666666666666,0.0050542354583740234,0.5329878330230713 -64,128,4,cx_heavy,768,750,18,0.0234375,0.008667707443237305,0.5267465114593506 -64,128,3,cx_heavy,740,722,18,0.024324324324324326,0.005353689193725586,0.6352782249450684 -64,128,6,cx_heavy,700,682,18,0.025714285714285714,0.004999637603759766,0.37989068031311035 -64,128,5,cx_heavy,758,739,19,0.025065963060686015,0.005095243453979492,0.4684324264526367 -64,128,7,cx_heavy,711,700,11,0.015471167369901548,0.005104780197143555,0.558819055557251 -64,128,9,cx_heavy,710,692,18,0.02535211267605634,0.008261919021606445,0.41462087631225586 -64,128,8,cx_heavy,640,630,10,0.015625,0.004990816116333008,0.640709400177002 -64,128,10,cx_heavy,669,649,20,0.029895366218236172,0.032447099685668945,0.512031078338623 -64,128,11,cx_heavy,725,705,20,0.027586206896551724,0.008899450302124023,0.5023996829986572 -64,128,12,cx_heavy,716,701,15,0.02094972067039106,0.005383968353271484,0.5399558544158936 -64,128,14,cx_heavy,730,695,35,0.04794520547945205,0.005511760711669922,0.448192834854126 -64,128,13,cx_heavy,703,686,17,0.02418207681365576,0.0077266693115234375,0.6494040489196777 -64,128,15,cx_heavy,710,686,24,0.03380281690140845,0.02435135841369629,0.40962767601013184 -64,128,16,cx_heavy,709,697,12,0.01692524682651622,0.008733749389648438,0.5013446807861328 -64,128,17,cx_heavy,734,718,16,0.021798365122615803,0.005234479904174805,0.6729288101196289 -64,128,19,cx_heavy,706,670,36,0.05099150141643059,0.008305549621582031,0.35490989685058594 -64,128,18,cx_heavy,744,732,12,0.016129032258064516,0.009668350219726562,0.4379711151123047 -64,128,20,cx_heavy,713,692,21,0.029453015427769985,0.005209684371948242,0.5217792987823486 -64,128,21,cx_heavy,658,650,8,0.0121580547112462,0.009235858917236328,0.6866912841796875 -64,128,23,cx_heavy,723,714,9,0.012448132780082987,0.0049860477447509766,0.44420361518859863 -64,128,22,cx_heavy,746,727,19,0.02546916890080429,0.005069255828857422,0.5305783748626709 -64,128,24,cx_heavy,717,705,12,0.016736401673640166,0.009904146194458008,0.6317203044891357 -64,128,25,cx_heavy,688,679,9,0.01308139534883721,0.00917196273803711,0.6234304904937744 -64,128,27,cx_heavy,752,733,19,0.02526595744680851,0.008670568466186523,0.4651331901550293 -64,128,26,cx_heavy,689,676,13,0.018867924528301886,0.007203102111816406,0.5530118942260742 -64,128,28,cx_heavy,711,694,17,0.02390998593530239,0.00966954231262207,0.5015664100646973 -64,128,29,cx_heavy,701,687,14,0.019971469329529243,0.0053539276123046875,0.4943268299102783 -64,128,30,cx_heavy,669,654,15,0.02242152466367713,0.005012989044189453,0.613229513168335 -64,128,31,cx_heavy,716,691,25,0.034916201117318434,0.005038261413574219,0.35785460472106934 -64,128,32,cx_heavy,734,725,9,0.01226158038147139,0.023447275161743164,0.4891185760498047 -64,128,34,cx_heavy,730,716,14,0.019178082191780823,0.005381107330322266,0.3453099727630615 -64,128,33,cx_heavy,740,721,19,0.025675675675675677,0.004977703094482422,0.5687596797943115 -64,128,35,cx_heavy,703,677,26,0.03698435277382646,0.02460455894470215,0.4247324466705322 -64,128,37,cx_heavy,671,654,17,0.02533532041728763,0.008369922637939453,0.44605278968811035 -64,128,36,cx_heavy,702,688,14,0.019943019943019943,0.007853031158447266,0.5326483249664307 -64,128,38,cx_heavy,732,720,12,0.01639344262295082,0.007593631744384766,0.4759645462036133 -64,128,39,cx_heavy,761,744,17,0.022339027595269383,0.005827426910400391,0.48372912406921387 -64,128,40,cx_heavy,757,733,24,0.031704095112285335,0.00861501693725586,0.5130550861358643 -64,128,41,cx_heavy,718,697,21,0.02924791086350975,0.007745265960693359,0.4773733615875244 -64,128,43,cx_heavy,699,688,11,0.015736766809728183,0.007989645004272461,0.4833519458770752 -64,128,42,cx_heavy,741,724,17,0.022941970310391364,0.008551359176635742,0.5544760227203369 -64,128,44,cx_heavy,764,743,21,0.0274869109947644,0.0057675838470458984,0.5454807281494141 -64,128,46,cx_heavy,778,759,19,0.02442159383033419,0.00868535041809082,0.3566164970397949 -64,128,48,cx_heavy,686,665,21,0.030612244897959183,0.008667469024658203,0.35994410514831543 -64,128,45,cx_heavy,759,742,17,0.022397891963109356,0.0053730010986328125,0.6838407516479492 -64,128,47,cx_heavy,674,664,10,0.01483679525222552,0.005648374557495117,0.5429964065551758 -64,128,49,cx_heavy,702,687,15,0.021367521367521368,0.005076169967651367,0.4554860591888428 -64,128,51,cx_heavy,744,725,19,0.025537634408602152,0.009779930114746094,0.43039894104003906 -64,128,50,cx_heavy,744,721,23,0.030913978494623656,0.009437322616577148,0.5103738307952881 -64,128,52,cx_heavy,675,665,10,0.014814814814814815,0.005174398422241211,0.5746316909790039 -64,128,53,cx_heavy,702,688,14,0.019943019943019943,0.005453586578369141,0.5340194702148438 -64,128,54,cx_heavy,722,708,14,0.019390581717451522,0.005365133285522461,0.6634969711303711 -64,128,56,cx_heavy,691,672,19,0.027496382054992764,0.005197286605834961,0.5828099250793457 -64,128,55,cx_heavy,674,659,15,0.02225519287833828,0.00565791130065918,0.6172096729278564 -64,128,57,cx_heavy,659,641,18,0.027314112291350532,0.009521007537841797,0.6534624099731445 -64,128,58,cx_heavy,735,715,20,0.027210884353741496,0.005269527435302734,0.6480104923248291 -64,128,59,cx_heavy,684,665,19,0.027777777777777776,0.005201578140258789,0.5923569202423096 -64,128,61,cx_heavy,698,678,20,0.02865329512893983,0.005429983139038086,0.3998985290527344 -64,128,60,cx_heavy,738,727,11,0.014905149051490514,0.005751132965087891,0.5920853614807129 -64,128,62,cx_heavy,699,678,21,0.030042918454935622,0.005211830139160156,0.6742136478424072 -64,128,63,cx_heavy,729,713,16,0.02194787379972565,0.012167930603027344,0.6495966911315918 -64,128,64,cx_heavy,747,732,15,0.020080321285140562,0.008939981460571289,0.6645753383636475 -64,128,65,cx_heavy,676,667,9,0.013313609467455622,0.0054035186767578125,0.720020055770874 -64,128,66,cx_heavy,681,671,10,0.014684287812041116,0.005145072937011719,0.6247260570526123 -64,128,67,cx_heavy,736,715,21,0.028532608695652172,0.005577564239501953,0.6105453968048096 -64,128,68,cx_heavy,696,680,16,0.022988505747126436,0.0052280426025390625,0.5275590419769287 -64,128,69,cx_heavy,725,710,15,0.020689655172413793,0.005271434783935547,0.7176206111907959 -64,128,71,cx_heavy,737,717,20,0.027137042062415198,0.006120204925537109,0.44098448753356934 -64,128,70,cx_heavy,692,680,12,0.017341040462427744,0.00868082046508789,0.7240157127380371 -64,128,72,cx_heavy,721,698,23,0.0319001386962552,0.008606910705566406,0.43709254264831543 -64,128,73,cx_heavy,682,666,16,0.02346041055718475,0.008183956146240234,0.5214142799377441 -64,128,74,cx_heavy,698,690,8,0.011461318051575931,0.009167671203613281,0.6540582180023193 -64,128,75,cx_heavy,702,692,10,0.014245014245014245,0.0052073001861572266,0.6142349243164062 -64,128,77,cx_heavy,724,699,25,0.034530386740331494,0.00531458854675293,0.26306915283203125 -64,128,76,cx_heavy,722,710,12,0.01662049861495845,0.005479097366333008,0.6034286022186279 -64,128,78,cx_heavy,731,714,17,0.023255813953488372,0.0056133270263671875,0.35457873344421387 -64,128,79,cx_heavy,746,732,14,0.01876675603217158,0.007086515426635742,0.5371062755584717 -64,128,80,cx_heavy,716,701,15,0.02094972067039106,0.008924722671508789,0.47816038131713867 -64,128,82,cx_heavy,715,690,25,0.03496503496503497,0.005929231643676758,0.38271546363830566 -64,128,81,cx_heavy,681,670,11,0.016152716593245228,0.0051457881927490234,0.5635225772857666 -64,128,83,cx_heavy,660,644,16,0.024242424242424242,0.005380153656005859,0.5537261962890625 -64,128,84,cx_heavy,708,696,12,0.01694915254237288,0.008690834045410156,0.6313192844390869 -64,128,85,cx_heavy,709,686,23,0.03244005641748942,0.0066623687744140625,0.4174020290374756 -64,128,87,cx_heavy,669,653,16,0.02391629297458894,0.005465269088745117,0.5619199275970459 -64,128,86,cx_heavy,707,699,8,0.011315417256011316,0.0051229000091552734,0.5729477405548096 -64,128,88,cx_heavy,713,701,12,0.016830294530154277,0.0056095123291015625,0.47530150413513184 -64,128,90,cx_heavy,716,698,18,0.025139664804469275,0.005074262619018555,0.47336792945861816 -64,128,89,cx_heavy,709,695,14,0.019746121297602257,0.0051763057708740234,0.6855666637420654 -64,128,92,cx_heavy,740,720,20,0.02702702702702703,0.005923271179199219,0.34714770317077637 -64,128,93,cx_heavy,705,690,15,0.02127659574468085,0.005271434783935547,0.4691352844238281 -64,128,91,cx_heavy,693,680,13,0.01875901875901876,0.025737762451171875,0.6640872955322266 -64,128,94,cx_heavy,709,693,16,0.022566995768688293,0.024518251419067383,0.491091251373291 -64,128,95,cx_heavy,693,669,24,0.03463203463203463,0.009573221206665039,0.42356443405151367 -64,128,96,cx_heavy,719,704,15,0.02086230876216968,0.005260467529296875,0.591510534286499 -64,128,97,cx_heavy,687,677,10,0.01455604075691412,0.005217790603637695,0.5983920097351074 -64,128,98,cx_heavy,690,676,14,0.020289855072463767,0.0050814151763916016,0.3910696506500244 -64,128,99,cx_heavy,738,723,15,0.02032520325203252,0.009305238723754883,0.5588474273681641 +64,128,2,cx_heavy,690,670,20,0.028985507246376812,0.00479435920715332,0.37334227561950684 +64,128,0,cx_heavy,718,697,21,0.02924791086350975,0.004786252975463867,0.3581054210662842 +64,128,1,cx_heavy,720,708,12,0.016666666666666666,0.004940509796142578,0.4964478015899658 +64,128,4,cx_heavy,768,750,18,0.0234375,0.006572246551513672,0.39697957038879395 +64,128,6,cx_heavy,700,682,18,0.025714285714285714,0.014281034469604492,0.40296435356140137 +64,128,5,cx_heavy,758,739,19,0.025065963060686015,0.004838466644287109,0.32335710525512695 +64,128,7,cx_heavy,711,700,11,0.015471167369901548,0.004769086837768555,0.35645532608032227 +64,128,3,cx_heavy,740,722,18,0.024324324324324326,0.006334066390991211,0.5776097774505615 +64,128,8,cx_heavy,640,630,10,0.015625,0.0033693313598632812,0.4457581043243408 +64,128,10,cx_heavy,669,649,20,0.029895366218236172,0.00475621223449707,0.40677332878112793 +64,128,9,cx_heavy,710,692,18,0.02535211267605634,0.005858182907104492,0.34124326705932617 +64,128,11,cx_heavy,725,705,20,0.027586206896551724,0.006541252136230469,0.403653621673584 +64,128,13,cx_heavy,703,686,17,0.02418207681365576,0.005962371826171875,0.42780447006225586 +64,128,12,cx_heavy,716,701,15,0.02094972067039106,0.003482341766357422,0.28864550590515137 +64,128,15,cx_heavy,710,686,24,0.03380281690140845,0.0031609535217285156,0.22375202178955078 +64,128,16,cx_heavy,709,697,12,0.01692524682651622,0.00321197509765625,0.2281949520111084 +64,128,14,cx_heavy,730,695,35,0.04794520547945205,0.005824089050292969,0.2410588264465332 +64,128,17,cx_heavy,734,718,16,0.021798365122615803,0.005900859832763672,0.41774749755859375 +64,128,19,cx_heavy,706,670,36,0.05099150141643059,0.0034673213958740234,0.37302494049072266 +64,128,18,cx_heavy,744,732,12,0.016129032258064516,0.0031647682189941406,0.3879826068878174 +64,128,25,cx_heavy,688,679,9,0.01308139534883721,0.007846593856811523,0.2971210479736328 +64,128,20,cx_heavy,713,692,21,0.029453015427769985,0.005671501159667969,0.31748127937316895 +64,128,23,cx_heavy,723,714,9,0.012448132780082987,0.009612083435058594,0.2551300525665283 +64,128,21,cx_heavy,658,650,8,0.0121580547112462,0.004586458206176758,0.413332462310791 +64,128,22,cx_heavy,746,727,19,0.02546916890080429,0.009907245635986328,0.38637781143188477 +64,128,24,cx_heavy,717,705,12,0.016736401673640166,0.00658106803894043,0.48224544525146484 +64,128,26,cx_heavy,689,676,13,0.018867924528301886,0.004620790481567383,0.3863992691040039 +64,128,28,cx_heavy,711,694,17,0.02390998593530239,0.004801750183105469,0.4758744239807129 +64,128,27,cx_heavy,752,733,19,0.02526595744680851,0.003553152084350586,0.48914337158203125 +64,128,30,cx_heavy,669,654,15,0.02242152466367713,0.004645824432373047,0.35719728469848633 +64,128,29,cx_heavy,701,687,14,0.019971469329529243,0.008103370666503906,0.2921488285064697 +64,128,31,cx_heavy,716,691,25,0.034916201117318434,0.004667520523071289,0.3532707691192627 +64,128,32,cx_heavy,734,725,9,0.01226158038147139,0.004815816879272461,0.35376620292663574 +64,128,34,cx_heavy,730,716,14,0.019178082191780823,0.0039327144622802734,0.27799487113952637 +64,128,33,cx_heavy,740,721,19,0.025675675675675677,0.003218412399291992,0.43291568756103516 +64,128,35,cx_heavy,703,677,26,0.03698435277382646,0.006568193435668945,0.4174647331237793 +64,128,37,cx_heavy,671,654,17,0.02533532041728763,0.004909038543701172,0.3603029251098633 +64,128,38,cx_heavy,732,720,12,0.01639344262295082,0.005751609802246094,0.3956732749938965 +64,128,36,cx_heavy,702,688,14,0.019943019943019943,0.0065174102783203125,0.42669224739074707 +64,128,39,cx_heavy,761,744,17,0.022339027595269383,0.0062749385833740234,0.39233946800231934 +64,128,40,cx_heavy,757,733,24,0.031704095112285335,0.0033555030822753906,0.3553483486175537 +64,128,41,cx_heavy,718,697,21,0.02924791086350975,0.005233049392700195,0.3545675277709961 +64,128,43,cx_heavy,699,688,11,0.015736766809728183,0.0031485557556152344,0.3500666618347168 +64,128,42,cx_heavy,741,724,17,0.022941970310391364,0.006354808807373047,0.46572184562683105 +64,128,44,cx_heavy,764,743,21,0.0274869109947644,0.004728078842163086,0.4160749912261963 +64,128,46,cx_heavy,778,759,19,0.02442159383033419,0.003251791000366211,0.26989054679870605 +64,128,48,cx_heavy,686,665,21,0.030612244897959183,0.005967617034912109,0.28841662406921387 +64,128,45,cx_heavy,759,742,17,0.022397891963109356,0.004973649978637695,0.49092578887939453 +64,128,49,cx_heavy,702,687,15,0.021367521367521368,0.004776477813720703,0.3252217769622803 +64,128,50,cx_heavy,744,721,23,0.030913978494623656,0.005544900894165039,0.35897397994995117 +64,128,47,cx_heavy,674,664,10,0.01483679525222552,0.004769802093505859,0.42542147636413574 +64,128,51,cx_heavy,744,725,19,0.025537634408602152,0.006429195404052734,0.43814754486083984 +64,128,52,cx_heavy,675,665,10,0.014814814814814815,0.0033597946166992188,0.3692145347595215 +64,128,54,cx_heavy,722,708,14,0.019390581717451522,0.004920005798339844,0.4089794158935547 +64,128,56,cx_heavy,691,672,19,0.027496382054992764,0.005010366439819336,0.41503286361694336 +64,128,55,cx_heavy,674,659,15,0.02225519287833828,0.005031585693359375,0.4748563766479492 +64,128,58,cx_heavy,735,715,20,0.027210884353741496,0.004915714263916016,0.42107653617858887 +64,128,59,cx_heavy,684,665,19,0.027777777777777776,0.004961490631103516,0.3530275821685791 +64,128,53,cx_heavy,702,688,14,0.019943019943019943,0.005851030349731445,0.503870964050293 +64,128,61,cx_heavy,698,678,20,0.02865329512893983,0.003371000289916992,0.1889357566833496 +64,128,57,cx_heavy,659,641,18,0.027314112291350532,0.006235837936401367,0.38112378120422363 +64,128,60,cx_heavy,738,727,11,0.014905149051490514,0.006740093231201172,0.49878430366516113 +64,128,65,cx_heavy,676,667,9,0.013313609467455622,0.004904508590698242,0.3130161762237549 +64,128,62,cx_heavy,699,678,21,0.030042918454935622,0.00473475456237793,0.36435651779174805 +64,128,68,cx_heavy,696,680,16,0.022988505747126436,0.004815101623535156,0.32894277572631836 +64,128,64,cx_heavy,747,732,15,0.020080321285140562,0.004983663558959961,0.372600793838501 +64,128,66,cx_heavy,681,671,10,0.014684287812041116,0.008852243423461914,0.3772578239440918 +64,128,67,cx_heavy,736,715,21,0.028532608695652172,0.004852294921875,0.36374807357788086 +64,128,63,cx_heavy,729,713,16,0.02194787379972565,0.013624191284179688,0.3923933506011963 +64,128,69,cx_heavy,725,710,15,0.020689655172413793,0.00493931770324707,0.36858105659484863 +64,128,70,cx_heavy,692,680,12,0.017341040462427744,0.0033168792724609375,0.2986598014831543 +64,128,77,cx_heavy,724,699,25,0.034530386740331494,0.004943370819091797,0.23339056968688965 +64,128,71,cx_heavy,737,717,20,0.027137042062415198,0.004887580871582031,0.2869913578033447 +64,128,72,cx_heavy,721,698,23,0.0319001386962552,0.005079984664916992,0.28742361068725586 +64,128,78,cx_heavy,731,714,17,0.023255813953488372,0.005491495132446289,0.21099567413330078 +64,128,74,cx_heavy,698,690,8,0.011461318051575931,0.004858493804931641,0.384021520614624 +64,128,75,cx_heavy,702,692,10,0.014245014245014245,0.004899024963378906,0.36679625511169434 +64,128,73,cx_heavy,682,666,16,0.02346041055718475,0.0053691864013671875,0.4284934997558594 +64,128,76,cx_heavy,722,710,12,0.01662049861495845,0.0061151981353759766,0.5008599758148193 +64,128,79,cx_heavy,746,732,14,0.01876675603217158,0.006064176559448242,0.4333024024963379 +64,128,81,cx_heavy,681,670,11,0.016152716593245228,0.004807949066162109,0.34308648109436035 +64,128,82,cx_heavy,715,690,25,0.03496503496503497,0.006563425064086914,0.25574755668640137 +64,128,80,cx_heavy,716,701,15,0.02094972067039106,0.004961729049682617,0.44150280952453613 +64,128,83,cx_heavy,660,644,16,0.024242424242424242,0.013143301010131836,0.33715033531188965 +64,128,85,cx_heavy,709,686,23,0.03244005641748942,0.0056917667388916016,0.3350346088409424 +64,128,84,cx_heavy,708,696,12,0.01694915254237288,0.006517171859741211,0.33637213706970215 +64,128,87,cx_heavy,669,653,16,0.02391629297458894,0.0049130916595458984,0.3789513111114502 +64,128,86,cx_heavy,707,699,8,0.011315417256011316,0.0049970149993896484,0.38695502281188965 +64,128,88,cx_heavy,713,701,12,0.016830294530154277,0.0034542083740234375,0.3867919445037842 +64,128,89,cx_heavy,709,695,14,0.019746121297602257,0.00484466552734375,0.4375951290130615 +64,128,92,cx_heavy,740,720,20,0.02702702702702703,0.006728410720825195,0.3359861373901367 +64,128,90,cx_heavy,716,698,18,0.025139664804469275,0.004996538162231445,0.42106032371520996 +64,128,95,cx_heavy,693,669,24,0.03463203463203463,0.006225109100341797,0.27802085876464844 +64,128,93,cx_heavy,705,690,15,0.02127659574468085,0.006464719772338867,0.3579671382904053 +64,128,94,cx_heavy,709,693,16,0.022566995768688293,0.004889965057373047,0.37790727615356445 +64,128,91,cx_heavy,693,680,13,0.01875901875901876,0.004985332489013672,0.5047454833984375 +64,128,96,cx_heavy,719,704,15,0.02086230876216968,0.004937648773193359,0.46726512908935547 +64,128,97,cx_heavy,687,677,10,0.01455604075691412,0.0031981468200683594,0.3202986717224121 +64,128,98,cx_heavy,690,676,14,0.020289855072463767,0.006104469299316406,0.3158121109008789 +64,128,99,cx_heavy,738,723,15,0.02032520325203252,0.004651069641113281,0.38150644302368164 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_128.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_128.csv index 2b9b9ecaf..da4a8b53e 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/even/results_128.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_128.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -128,256,0,even,4787,4738,49,0.010236055984959264,0.01766037940979004,1.304201364517212 -128,256,2,even,4865,4817,48,0.00986639260020555,0.017646074295043945,1.250685453414917 -128,256,3,even,4860,4816,44,0.00905349794238683,0.030127525329589844,1.5610215663909912 -128,256,1,even,4990,4942,48,0.009619238476953907,0.018967628479003906,1.497009038925171 -128,256,4,even,5037,4986,51,0.01012507444907683,0.018828153610229492,1.3913772106170654 -128,256,5,even,4980,4940,40,0.008032128514056224,0.018399953842163086,1.3248884677886963 -128,256,6,even,4983,4928,55,0.011037527593818985,0.01909327507019043,1.1844439506530762 -128,256,7,even,4889,4838,51,0.010431581100429535,0.018282651901245117,1.218031883239746 -128,256,8,even,4936,4887,49,0.00992706645056726,0.01907825469970703,1.3806042671203613 -128,256,9,even,4991,4947,44,0.008815868563414146,0.01956629753112793,1.3451459407806396 -128,256,10,even,4875,4840,35,0.0071794871794871795,0.029390335083007812,1.5105483531951904 -128,256,11,even,4974,4923,51,0.010253317249698432,0.01807379722595215,1.2380225658416748 -128,256,12,even,4863,4820,43,0.008842278428953321,0.029592275619506836,1.335494041442871 -128,256,13,even,4881,4843,38,0.007785289899610736,0.0182955265045166,1.5076014995574951 -128,256,14,even,4906,4860,46,0.009376273950264982,0.020328283309936523,1.6411683559417725 -128,256,16,even,4870,4829,41,0.008418891170431212,0.017415761947631836,1.2784667015075684 -128,256,15,even,4859,4806,53,0.010907594155175962,0.017896413803100586,1.5053164958953857 -128,256,17,even,4944,4896,48,0.009708737864077669,0.018749237060546875,1.3213694095611572 -128,256,18,even,4967,4917,50,0.010066438494060801,0.02152562141418457,1.225644588470459 -128,256,19,even,4974,4909,65,0.013067953357458785,0.02000284194946289,1.3422317504882812 -128,256,20,even,5069,5027,42,0.008285657920694417,0.01824665069580078,1.2202644348144531 -128,256,22,even,4954,4907,47,0.009487283003633428,0.018136978149414062,1.2152423858642578 -128,256,21,even,4854,4807,47,0.009682735887927483,0.029234647750854492,1.5019032955169678 -128,256,23,even,5085,5039,46,0.00904621435594887,0.019767045974731445,1.432363748550415 -128,256,24,even,4885,4836,49,0.010030706243602866,0.018518924713134766,1.4018800258636475 -128,256,25,even,5091,5036,55,0.010803378511098017,0.04356837272644043,1.4217150211334229 -128,256,26,even,4888,4835,53,0.010842880523731587,0.01789069175720215,1.45027494430542 -128,256,27,even,4924,4872,52,0.010560519902518278,0.018513917922973633,1.539693832397461 -128,256,28,even,4915,4867,48,0.009766022380467955,0.02072906494140625,1.4307539463043213 -128,256,29,even,4981,4931,50,0.01003814495081309,0.01844334602355957,1.4510085582733154 -128,256,30,even,4933,4880,53,0.010743969187107237,0.032717227935791016,1.2484545707702637 -128,256,31,even,4860,4805,55,0.01131687242798354,0.018046140670776367,1.3734638690948486 -128,256,32,even,4843,4799,44,0.009085277720421227,0.020578622817993164,1.3739664554595947 -128,256,33,even,4958,4909,49,0.009883017345703913,0.01885676383972168,1.474445104598999 -128,256,34,even,4956,4903,53,0.010694108151735271,0.01958632469177246,1.4368722438812256 -128,256,35,even,4818,4786,32,0.006641760066417601,0.01825571060180664,1.3845322132110596 -128,256,36,even,5058,5009,49,0.009687623566627125,0.018706083297729492,1.4341537952423096 -128,256,37,even,4851,4809,42,0.008658008658008658,0.029592037200927734,1.3424208164215088 -128,256,38,even,5036,4991,45,0.008935663224781574,0.018585205078125,1.4939651489257812 -128,256,39,even,4987,4949,38,0.007619811509925807,0.019049406051635742,1.6819367408752441 -128,256,40,even,4924,4889,35,0.00710804224207961,0.031235456466674805,1.4093906879425049 -128,256,42,even,4983,4952,31,0.006221151916516155,0.019409894943237305,1.2931835651397705 -128,256,43,even,5007,4957,50,0.009986019572598362,0.01812601089477539,1.2339725494384766 -128,256,41,even,4882,4823,59,0.012085210979106923,0.032271385192871094,1.5954618453979492 -128,256,44,even,4880,4810,70,0.014344262295081968,0.018147706985473633,1.3446860313415527 -128,256,45,even,4934,4893,41,0.008309687880016214,0.018495559692382812,1.2752013206481934 -128,256,47,even,4827,4780,47,0.009736896623161384,0.017897367477416992,1.3869585990905762 -128,256,46,even,4987,4956,31,0.006216162021255264,0.0188138484954834,1.5072426795959473 -128,256,48,even,4920,4867,53,0.010772357723577236,0.01957559585571289,1.4393079280853271 -128,256,49,even,4996,4924,72,0.014411529223378704,0.018491029739379883,1.2478375434875488 -128,256,50,even,4801,4746,55,0.011455946677775464,0.019634485244750977,1.3213081359863281 -128,256,51,even,4948,4902,46,0.009296685529506871,0.01891613006591797,1.218146562576294 -128,256,52,even,4929,4888,41,0.008318117265165348,0.029861927032470703,1.3601434230804443 -128,256,53,even,4896,4855,41,0.008374183006535947,0.018130064010620117,1.5662896633148193 -128,256,54,even,4990,4933,57,0.011422845691382766,0.018668413162231445,1.4254834651947021 -128,256,55,even,4945,4888,57,0.011526794742163803,0.018378019332885742,1.263188362121582 -128,256,56,even,4918,4859,59,0.011996746644977633,0.019338607788085938,1.3696422576904297 -128,256,57,even,4945,4905,40,0.008088978766430738,0.0201261043548584,1.32859206199646 -128,256,58,even,4972,4932,40,0.008045052292839904,0.018475055694580078,1.3318748474121094 -128,256,59,even,4875,4818,57,0.011692307692307693,0.019212722778320312,1.3762831687927246 -128,256,60,even,4867,4807,60,0.012327922745017464,0.018085956573486328,1.468505620956421 -128,256,61,even,4903,4856,47,0.009585967774831736,0.018347978591918945,1.2438247203826904 -128,256,62,even,4947,4900,47,0.009500707499494642,0.03359794616699219,1.3651654720306396 -128,256,63,even,5020,4976,44,0.008764940239043825,0.019728660583496094,1.5250723361968994 -128,256,64,even,4920,4872,48,0.00975609756097561,0.01902318000793457,1.673837423324585 -128,256,65,even,4983,4948,35,0.0070238811960666265,0.019330978393554688,1.2669792175292969 -128,256,66,even,4934,4895,39,0.00790433725172274,0.019208192825317383,1.603478193283081 -128,256,67,even,4907,4863,44,0.008966782147951905,0.018318891525268555,1.4369335174560547 -128,256,68,even,5017,4953,64,0.012756627466613515,0.029712200164794922,1.235569953918457 -128,256,69,even,4886,4840,46,0.009414654113794515,0.01812434196472168,1.2417387962341309 -128,256,70,even,4945,4898,47,0.009504550050556117,0.018736839294433594,1.2550268173217773 -128,256,71,even,4944,4896,48,0.009708737864077669,0.018135786056518555,1.2705950736999512 -128,256,72,even,4936,4875,61,0.012358184764991896,0.019379138946533203,1.386734962463379 -128,256,73,even,5002,4963,39,0.007796881247501,0.04488658905029297,1.517845630645752 -128,256,74,even,4931,4882,49,0.009937132427499494,0.018582582473754883,1.2184298038482666 -128,256,75,even,5009,4963,46,0.009183469754442005,0.020267486572265625,1.5081760883331299 -128,256,76,even,4844,4796,48,0.00990916597853014,0.031162500381469727,1.3297531604766846 -128,256,77,even,4992,4964,28,0.005608974358974359,0.019063472747802734,1.4492881298065186 -128,256,78,even,4964,4913,51,0.010273972602739725,0.025072813034057617,1.3235437870025635 -128,256,79,even,4906,4855,51,0.010395434162250305,0.01779937744140625,1.5286364555358887 -128,256,80,even,4715,4679,36,0.007635206786850477,0.018584251403808594,1.6110756397247314 -128,256,81,even,4911,4869,42,0.00855222968845449,0.018330812454223633,1.6543102264404297 -128,256,82,even,4930,4879,51,0.010344827586206896,0.02099299430847168,1.4328699111938477 -128,256,83,even,4849,4797,52,0.010723860589812333,0.018075227737426758,1.2234127521514893 -128,256,84,even,5041,4994,47,0.009323546915294585,0.018555641174316406,1.2968776226043701 -128,256,85,even,4912,4861,51,0.010382736156351791,0.019129276275634766,1.483614444732666 -128,256,86,even,4969,4904,65,0.013081102837593077,0.0316615104675293,1.39202880859375 -128,256,87,even,4843,4789,54,0.011150113565971505,0.06156420707702637,1.240691900253296 -128,256,88,even,4931,4891,40,0.008111944838775096,0.019414424896240234,1.334301471710205 -128,256,89,even,4960,4921,39,0.007862903225806451,0.01782965660095215,1.4123313426971436 -128,256,90,even,4886,4831,55,0.01125665165779779,0.019468069076538086,1.5057861804962158 -128,256,91,even,4819,4766,53,0.010998132392612575,0.018076658248901367,1.5037572383880615 -128,256,92,even,4992,4937,55,0.011017628205128206,0.019271373748779297,1.2158379554748535 -128,256,93,even,4946,4895,51,0.010311362717347351,0.018569231033325195,1.2846944332122803 -128,256,94,even,4911,4868,43,0.008755854204846264,0.0247499942779541,1.5264501571655273 -128,256,95,even,4859,4802,57,0.01173080880839679,0.017760276794433594,1.3292632102966309 -128,256,97,even,4925,4882,43,0.008730964467005076,0.038697004318237305,1.1958069801330566 -128,256,98,even,5065,5021,44,0.008687068114511353,0.02138209342956543,1.2564287185668945 -128,256,96,even,4975,4939,36,0.007236180904522613,0.01819634437561035,1.545858383178711 -128,256,99,even,4958,4911,47,0.009479628882613958,0.01811504364013672,1.4473788738250732 +128,256,0,even,4787,4738,49,0.010236055984959264,0.02384805679321289,0.9309964179992676 +128,256,1,even,4990,4942,48,0.009619238476953907,0.029034852981567383,1.0584685802459717 +128,256,4,even,5037,4986,51,0.01012507444907683,0.016462087631225586,0.8526852130889893 +128,256,5,even,4980,4940,40,0.008032128514056224,0.016561269760131836,0.8938300609588623 +128,256,2,even,4865,4817,48,0.00986639260020555,0.011081457138061523,0.8967533111572266 +128,256,6,even,4983,4928,55,0.011037527593818985,0.021442651748657227,0.847419261932373 +128,256,3,even,4860,4816,44,0.00905349794238683,0.02079010009765625,1.0191624164581299 +128,256,7,even,4889,4838,51,0.010431581100429535,0.011322975158691406,1.1668100357055664 +128,256,8,even,4936,4887,49,0.00992706645056726,0.011417627334594727,1.2248144149780273 +128,256,9,even,4991,4947,44,0.008815868563414146,0.02061176300048828,0.9033966064453125 +128,256,10,even,4875,4840,35,0.0071794871794871795,0.021135807037353516,0.9804775714874268 +128,256,11,even,4974,4923,51,0.010253317249698432,0.018031835556030273,0.904163122177124 +128,256,13,even,4881,4843,38,0.007785289899610736,0.04287314414978027,0.9721012115478516 +128,256,12,even,4863,4820,43,0.008842278428953321,0.017151355743408203,0.9289648532867432 +128,256,14,even,4906,4860,46,0.009376273950264982,0.011331558227539062,1.0824737548828125 +128,256,15,even,4859,4806,53,0.010907594155175962,0.011193990707397461,1.0223054885864258 +128,256,16,even,4870,4829,41,0.008418891170431212,0.01148533821105957,1.1531012058258057 +128,256,17,even,4944,4896,48,0.009708737864077669,0.01138615608215332,1.0909173488616943 +128,256,20,even,5069,5027,42,0.008285657920694417,0.022838115692138672,0.8430635929107666 +128,256,19,even,4974,4909,65,0.013067953357458785,0.018800735473632812,0.8680088520050049 +128,256,18,even,4967,4917,50,0.010066438494060801,0.011112451553344727,0.8878557682037354 +128,256,22,even,4954,4907,47,0.009487283003633428,0.016791820526123047,0.836169958114624 +128,256,21,even,4854,4807,47,0.009682735887927483,0.011317014694213867,1.04994797706604 +128,256,23,even,5085,5039,46,0.00904621435594887,0.016818761825561523,1.0057578086853027 +128,256,24,even,4885,4836,49,0.010030706243602866,0.01721048355102539,0.929368257522583 +128,256,25,even,5091,5036,55,0.010803378511098017,0.011969566345214844,1.2277917861938477 +128,256,26,even,4888,4835,53,0.010842880523731587,0.016249656677246094,1.110612392425537 +128,256,29,even,4981,4931,50,0.01003814495081309,0.011650800704956055,0.8367922306060791 +128,256,27,even,4924,4872,52,0.010560519902518278,0.013938665390014648,1.0323231220245361 +128,256,28,even,4915,4867,48,0.009766022380467955,0.01163172721862793,1.0314083099365234 +128,256,30,even,4933,4880,53,0.010743969187107237,0.011284112930297852,0.8849344253540039 +128,256,32,even,4843,4799,44,0.009085277720421227,0.015810012817382812,0.917325496673584 +128,256,33,even,4958,4909,49,0.009883017345703913,0.011702775955200195,0.8907890319824219 +128,256,31,even,4860,4805,55,0.01131687242798354,0.019527912139892578,1.0482804775238037 +128,256,34,even,4956,4903,53,0.010694108151735271,0.01645636558532715,0.9725344181060791 +128,256,35,even,4818,4786,32,0.006641760066417601,0.01506805419921875,0.9543771743774414 +128,256,37,even,4851,4809,42,0.008658008658008658,0.011308431625366211,0.9042785167694092 +128,256,36,even,5058,5009,49,0.009687623566627125,0.016913890838623047,1.136054515838623 +128,256,42,even,4983,4952,31,0.006221151916516155,0.011332988739013672,0.8414928913116455 +128,256,39,even,4987,4949,38,0.007619811509925807,0.019834041595458984,0.9701845645904541 +128,256,41,even,4882,4823,59,0.012085210979106923,0.011234521865844727,0.9493362903594971 +128,256,40,even,4924,4889,35,0.00710804224207961,0.011662483215332031,0.9951643943786621 +128,256,38,even,5036,4991,45,0.008935663224781574,0.01648092269897461,1.0471932888031006 +128,256,43,even,5007,4957,50,0.009986019572598362,0.021422624588012695,0.9884929656982422 +128,256,44,even,4880,4810,70,0.014344262295081968,0.010993003845214844,0.9969704151153564 +128,256,45,even,4934,4893,41,0.008309687880016214,0.011538267135620117,0.8814337253570557 +128,256,46,even,4987,4956,31,0.006216162021255264,0.013504266738891602,0.972996711730957 +128,256,49,even,4996,4924,72,0.014411529223378704,0.011282682418823242,0.8615448474884033 +128,256,51,even,4948,4902,46,0.009296685529506871,0.02205681800842285,0.8958561420440674 +128,256,47,even,4827,4780,47,0.009736896623161384,0.015026330947875977,0.946922779083252 +128,256,48,even,4920,4867,53,0.010772357723577236,0.011347770690917969,0.9972512722015381 +128,256,50,even,4801,4746,55,0.011455946677775464,0.011299848556518555,1.0150468349456787 +128,256,52,even,4929,4888,41,0.008318117265165348,0.012415409088134766,1.0509285926818848 +128,256,53,even,4896,4855,41,0.008374183006535947,0.020538330078125,1.1373372077941895 +128,256,54,even,4990,4933,57,0.011422845691382766,0.011286735534667969,1.017829418182373 +128,256,58,even,4972,4932,40,0.008045052292839904,0.025588274002075195,0.7930970191955566 +128,256,57,even,4945,4905,40,0.008088978766430738,0.027483224868774414,0.951817512512207 +128,256,55,even,4945,4888,57,0.011526794742163803,0.011080741882324219,0.9035370349884033 +128,256,56,even,4918,4859,59,0.011996746644977633,0.016228675842285156,0.9045615196228027 +128,256,60,even,4867,4807,60,0.012327922745017464,0.011734962463378906,0.8163454532623291 +128,256,59,even,4875,4818,57,0.011692307692307693,0.020251035690307617,1.0603511333465576 +128,256,61,even,4903,4856,47,0.009585967774831736,0.020992040634155273,0.9076390266418457 +128,256,62,even,4947,4900,47,0.009500707499494642,0.024260282516479492,0.8879175186157227 +128,256,65,even,4983,4948,35,0.0070238811960666265,0.026978254318237305,0.886577844619751 +128,256,67,even,4907,4863,44,0.008966782147951905,0.017801761627197266,0.864133358001709 +128,256,64,even,4920,4872,48,0.00975609756097561,0.011327505111694336,1.055037021636963 +128,256,66,even,4934,4895,39,0.00790433725172274,0.03138375282287598,0.9501430988311768 +128,256,63,even,5020,4976,44,0.008764940239043825,0.011622905731201172,1.0605430603027344 +128,256,68,even,5017,4953,64,0.012756627466613515,0.016908884048461914,0.821162223815918 +128,256,69,even,4886,4840,46,0.009414654113794515,0.011325836181640625,0.835547924041748 +128,256,71,even,4944,4896,48,0.009708737864077669,0.011320829391479492,0.9499685764312744 +128,256,70,even,4945,4898,47,0.009504550050556117,0.01623249053955078,0.9936425685882568 +128,256,74,even,4931,4882,49,0.009937132427499494,0.017466306686401367,0.8540201187133789 +128,256,72,even,4936,4875,61,0.012358184764991896,0.017975807189941406,0.9811351299285889 +128,256,78,even,4964,4913,51,0.010273972602739725,0.011228084564208984,0.8690991401672363 +128,256,76,even,4844,4796,48,0.00990916597853014,0.02132129669189453,0.8985595703125 +128,256,75,even,5009,4963,46,0.009183469754442005,0.06735730171203613,0.9596993923187256 +128,256,73,even,5002,4963,39,0.007796881247501,0.019166231155395508,1.0245320796966553 +128,256,77,even,4992,4964,28,0.005608974358974359,0.011457204818725586,1.0113060474395752 +128,256,79,even,4906,4855,51,0.010395434162250305,0.021045684814453125,1.0792396068572998 +128,256,80,even,4715,4679,36,0.007635206786850477,0.011255025863647461,1.0552561283111572 +128,256,83,even,4849,4797,52,0.010723860589812333,0.02195453643798828,0.809941291809082 +128,256,85,even,4912,4861,51,0.010382736156351791,0.01514577865600586,0.875781774520874 +128,256,81,even,4911,4869,42,0.00855222968845449,0.012949466705322266,0.9127445220947266 +128,256,84,even,5041,4994,47,0.009323546915294585,0.037526845932006836,0.9209921360015869 +128,256,82,even,4930,4879,51,0.010344827586206896,0.028663158416748047,0.9580245018005371 +128,256,87,even,4843,4789,54,0.011150113565971505,0.011303901672363281,0.8510069847106934 +128,256,86,even,4969,4904,65,0.013081102837593077,0.01664566993713379,0.9479014873504639 +128,256,88,even,4931,4891,40,0.008111944838775096,0.015854597091674805,0.9886608123779297 +128,256,89,even,4960,4921,39,0.007862903225806451,0.019209623336791992,1.051758050918579 +128,256,90,even,4886,4831,55,0.01125665165779779,0.011040210723876953,0.8940222263336182 +128,256,91,even,4819,4766,53,0.010998132392612575,0.011051416397094727,1.1657435894012451 +128,256,95,even,4859,4802,57,0.01173080880839679,0.017671823501586914,0.8636705875396729 +128,256,92,even,4992,4937,55,0.011017628205128206,0.020306110382080078,0.9347109794616699 +128,256,93,even,4946,4895,51,0.010311362717347351,0.01142740249633789,0.9573009014129639 +128,256,94,even,4911,4868,43,0.008755854204846264,0.021462440490722656,1.1369247436523438 +128,256,96,even,4975,4939,36,0.007236180904522613,0.01736283302307129,1.2785043716430664 +128,256,97,even,4925,4882,43,0.008730964467005076,0.016809940338134766,0.9079732894897461 +128,256,98,even,5065,5021,44,0.008687068114511353,0.01735377311706543,1.1107921600341797 +128,256,99,even,4958,4911,47,0.009479628882613958,0.031128406524658203,0.9513895511627197 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_192.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_192.csv index 4a7e8e8ca..beaa34796 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/even/results_192.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_192.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -192,384,1,even,11146,11060,86,0.0077157724744302885,0.047307491302490234,2.568192720413208 -192,384,0,even,11012,10939,73,0.00662913185615692,0.05780148506164551,2.5726025104522705 -192,384,3,even,11121,11037,84,0.007553277582951173,0.03803372383117676,2.5573277473449707 -192,384,5,even,10940,10865,75,0.006855575868372943,0.04262542724609375,2.704829216003418 -192,384,7,even,11170,11096,74,0.006624888093106535,0.02619767189025879,2.8550937175750732 -192,384,6,even,11062,10994,68,0.006147170493581631,0.04631829261779785,2.722604274749756 -192,384,4,even,11048,10990,58,0.0052498189717595945,0.02614426612854004,3.0031075477600098 -192,384,2,even,11006,10949,57,0.005178993276394693,0.07066130638122559,2.967210054397583 -192,384,8,even,11007,10938,69,0.006268738075769964,0.026679039001464844,2.8438165187835693 -192,384,9,even,11234,11153,81,0.007210254584297668,0.10558104515075684,2.4220805168151855 -192,384,10,even,10984,10917,67,0.006099781500364166,0.039786577224731445,2.6784441471099854 -192,384,11,even,11247,11171,76,0.006757357517560238,0.0471343994140625,2.428485870361328 -192,384,12,even,11054,10985,69,0.006242084313370725,0.031088590621948242,2.509521961212158 -192,384,15,even,11092,11005,87,0.007843490804183196,0.032903432846069336,2.4630260467529297 -192,384,14,even,11100,11027,73,0.006576576576576576,0.026172637939453125,2.633816719055176 -192,384,16,even,11047,10973,74,0.00669865121752512,0.025324344635009766,2.525066614151001 -192,384,13,even,11035,10982,53,0.004802899864068871,0.025861740112304688,2.7899811267852783 -192,384,17,even,10948,10865,83,0.007581293386919985,0.02553248405456543,2.895921468734741 -192,384,20,even,11120,11043,77,0.006924460431654676,0.032003164291381836,2.4071288108825684 -192,384,19,even,11068,11007,61,0.005511384170581858,0.09103679656982422,2.6960301399230957 -192,384,21,even,10917,10850,67,0.006137217184208116,0.032062530517578125,2.7826523780822754 -192,384,18,even,11152,11096,56,0.005021520803443328,0.04408454895019531,3.1689319610595703 -192,384,25,even,11112,11057,55,0.004949604031677466,0.025882482528686523,2.4725372791290283 -192,384,23,even,11156,11070,86,0.007708856220867695,0.04420185089111328,2.650768756866455 -192,384,22,even,11126,11065,61,0.005482653244652166,0.02849864959716797,2.665296792984009 -192,384,24,even,10983,10908,75,0.0068287353182190655,0.03755021095275879,2.8052072525024414 -192,384,26,even,11065,10994,71,0.006416629010393132,0.025714874267578125,3.324890375137329 -192,384,27,even,11026,10969,57,0.005169599129330673,0.09183120727539062,2.921828031539917 -192,384,28,even,11053,10979,74,0.006695014928073826,0.04245257377624512,2.475306510925293 -192,384,30,even,10895,10838,57,0.005231757687012391,0.046010732650756836,2.6200132369995117 -192,384,33,even,11100,11034,66,0.005945945945945946,0.025278091430664062,2.631903648376465 -192,384,31,even,11110,11039,71,0.006390639063906391,0.04211091995239258,2.4808826446533203 -192,384,34,even,11078,11016,62,0.005596678100740206,0.03128337860107422,2.4843926429748535 -192,384,29,even,11064,11000,64,0.005784526391901663,0.046837568283081055,2.7904534339904785 -192,384,32,even,10978,10902,76,0.006922936782656221,0.027878761291503906,2.9105021953582764 -192,384,35,even,10968,10891,77,0.0070204230488694385,0.02547430992126465,2.796248197555542 -192,384,38,even,11020,10940,80,0.007259528130671506,0.02482318878173828,2.3240199089050293 -192,384,36,even,11331,11269,62,0.005471714764804518,0.05138683319091797,2.610229730606079 -192,384,40,even,11150,11081,69,0.006188340807174888,0.025050878524780273,2.4727530479431152 -192,384,39,even,10905,10843,62,0.005685465382851903,0.02607893943786621,2.4902148246765137 -192,384,42,even,11096,11024,72,0.006488824801730353,0.025257110595703125,2.4076802730560303 -192,384,43,even,10947,10878,69,0.006303096738832557,0.025355100631713867,2.408700466156006 -192,384,41,even,11057,10978,79,0.00714479515239215,0.025336265563964844,2.5310118198394775 -192,384,37,even,11079,11011,68,0.006137738063002076,0.04468894004821777,2.9068169593811035 -192,384,44,even,11062,10996,66,0.005966371361417465,0.025741100311279297,3.0000264644622803 -192,384,47,even,10799,10737,62,0.005741272340031484,0.048514604568481445,2.4076883792877197 -192,384,45,even,10907,10840,67,0.006142844045108646,0.025197505950927734,2.6436190605163574 -192,384,48,even,11066,10997,69,0.0062353153804446055,0.026118755340576172,2.535414457321167 -192,384,46,even,10987,10923,64,0.005825065987075635,0.03831744194030762,2.7258684635162354 -192,384,51,even,11123,11045,78,0.00701249662860739,0.038187265396118164,2.43708872795105 -192,384,49,even,11050,10963,87,0.007873303167420815,0.05377507209777832,2.6321094036102295 -192,384,50,even,10891,10816,75,0.0068864199797998345,0.03928852081298828,2.5976860523223877 -192,384,52,even,11084,11027,57,0.005142547816672682,0.026451587677001953,3.298379898071289 -192,384,53,even,11119,11049,70,0.00629553017357676,0.02561211585998535,2.757108688354492 -192,384,57,even,10948,10871,77,0.007033248081841432,0.046489715576171875,2.406550884246826 -192,384,55,even,11028,10956,72,0.006528835690968444,0.07574200630187988,2.5830395221710205 -192,384,58,even,11163,11086,77,0.00689778733315417,0.05983877182006836,2.387251377105713 -192,384,56,even,11110,11019,91,0.00819081908190819,0.0478060245513916,2.627990961074829 -192,384,54,even,11202,11138,64,0.005713265488305659,0.038663387298583984,2.7973415851593018 -192,384,60,even,11085,11013,72,0.006495263870094722,0.025322675704956055,2.555666446685791 -192,384,59,even,10917,10864,53,0.004854813593478061,0.02493882179260254,2.894690752029419 -192,384,61,even,11100,11021,79,0.007117117117117117,0.045674800872802734,2.3181779384613037 -192,384,62,even,11102,11015,87,0.007836425869212755,0.025136232376098633,2.6141815185546875 -192,384,63,even,11140,11079,61,0.005475763016157989,0.05603456497192383,2.498675584793091 -192,384,64,even,11053,10972,81,0.007328327150999728,0.025448322296142578,2.4301366806030273 -192,384,65,even,11051,10950,101,0.009139444394172472,0.025083541870117188,2.472801685333252 -192,384,67,even,11133,11050,83,0.007455313033324351,0.03748154640197754,2.3581414222717285 -192,384,69,even,11072,10995,77,0.006954479768786127,0.07395076751708984,2.353102445602417 -192,384,66,even,11145,11079,66,0.0059219380888290716,0.059393882751464844,2.8042616844177246 -192,384,68,even,11041,10976,65,0.0058871479032696315,0.0291593074798584,2.689467668533325 -192,384,70,even,11097,11026,71,0.006398125619536812,0.0252530574798584,2.5454537868499756 -192,384,71,even,11344,11257,87,0.007669252468265162,0.0251920223236084,2.5100605487823486 -192,384,73,even,11040,10975,65,0.00588768115942029,0.04088568687438965,2.9118189811706543 -192,384,72,even,10977,10916,61,0.005557073881752756,0.04674124717712402,3.103134870529175 -192,384,78,even,11056,10983,73,0.0066027496382054995,0.02702784538269043,3.3831045627593994 -192,384,75,even,11123,11064,59,0.0053043243729209745,0.025382518768310547,3.8367395401000977 -192,384,77,even,11142,11047,95,0.00852629689463292,0.06771469116210938,3.660121202468872 -192,384,74,even,11070,11001,69,0.006233062330623307,0.04564857482910156,4.31794548034668 -192,384,76,even,11146,11070,76,0.006818589628566302,0.05744481086730957,3.8163230419158936 -192,384,79,even,11160,11096,64,0.005734767025089606,0.026002883911132812,3.7843410968780518 -192,384,80,even,10910,10851,59,0.0054078826764436295,0.024657011032104492,4.090895175933838 -192,384,81,even,10915,10852,63,0.005771873568483738,0.07237887382507324,4.066087007522583 -192,384,82,even,11167,11092,75,0.006716217426345482,0.10759758949279785,4.0635881423950195 -192,384,88,even,11066,10997,69,0.0062353153804446055,0.04760384559631348,3.5063817501068115 -192,384,83,even,11033,10958,75,0.006797788452823348,0.050150394439697266,4.102469205856323 -192,384,85,even,11108,11048,60,0.005401512423478574,0.08782815933227539,3.5224108695983887 -192,384,84,even,11098,11040,58,0.0052261668769147595,0.05081486701965332,4.2928972244262695 -192,384,87,even,11123,11053,70,0.0062932662051604785,0.06919670104980469,3.545943260192871 -192,384,86,even,10972,10902,70,0.0063798760481224934,0.07431292533874512,4.29385781288147 -192,384,89,even,10912,10856,56,0.005131964809384164,0.06145620346069336,4.2738425731658936 -192,384,91,even,11111,11071,40,0.0036000360003600037,0.09960269927978516,4.1288275718688965 -192,384,90,even,11034,10951,83,0.007522204096429219,0.04565095901489258,4.575017213821411 -192,384,95,even,11143,11074,69,0.006192228304765323,0.0988316535949707,3.664576530456543 -192,384,92,even,11035,10943,92,0.008337109198006343,0.07056593894958496,3.8915910720825195 -192,384,93,even,10931,10873,58,0.0053060104290549815,0.08988022804260254,4.335405588150024 -192,384,97,even,11252,11200,52,0.004621400639886242,0.11409378051757812,3.92327880859375 -192,384,94,even,10887,10822,65,0.0059704234408009555,0.04892611503601074,3.835655450820923 -192,384,96,even,11111,11028,83,0.0074700747007470075,0.09254908561706543,4.2300124168396 -192,384,98,even,11251,11174,77,0.006843836103457471,0.0682530403137207,3.9347984790802 -192,384,99,even,10992,10912,80,0.00727802037845706,0.08452534675598145,4.1051185131073 +192,384,1,even,11146,11060,86,0.0077157724744302885,0.02536940574645996,2.668349504470825 +192,384,0,even,11012,10939,73,0.00662913185615692,0.025232553482055664,2.772963523864746 +192,384,2,even,11006,10949,57,0.005178993276394693,0.024779319763183594,3.0581159591674805 +192,384,3,even,11121,11037,84,0.007553277582951173,0.02525925636291504,2.6959357261657715 +192,384,4,even,11048,10990,58,0.0052498189717595945,0.03688836097717285,2.926027774810791 +192,384,5,even,10940,10865,75,0.006855575868372943,0.025437593460083008,2.8664259910583496 +192,384,6,even,11062,10994,68,0.006147170493581631,0.025147199630737305,2.786029815673828 +192,384,7,even,11170,11096,74,0.006624888093106535,0.025674104690551758,3.039377450942993 +192,384,8,even,11007,10938,69,0.006268738075769964,0.02479696273803711,3.0136940479278564 +192,384,9,even,11234,11153,81,0.007210254584297668,0.030927658081054688,2.780853748321533 +192,384,11,even,11247,11171,76,0.006757357517560238,0.025557518005371094,2.5042457580566406 +192,384,10,even,10984,10917,67,0.006099781500364166,0.05129575729370117,2.935299873352051 +192,384,12,even,11054,10985,69,0.006242084313370725,0.02571725845336914,2.5002663135528564 +192,384,14,even,11100,11027,73,0.006576576576576576,0.032610177993774414,2.632227897644043 +192,384,13,even,11035,10982,53,0.004802899864068871,0.025327682495117188,2.7277233600616455 +192,384,15,even,11092,11005,87,0.007843490804183196,0.0257415771484375,2.6426563262939453 +192,384,16,even,11047,10973,74,0.00669865121752512,0.025409698486328125,2.8096249103546143 +192,384,17,even,10948,10865,83,0.007581293386919985,0.026213884353637695,3.1288623809814453 +192,384,19,even,11068,11007,61,0.005511384170581858,0.02549886703491211,2.7467217445373535 +192,384,20,even,11120,11043,77,0.006924460431654676,0.025945186614990234,2.5056939125061035 +192,384,18,even,11152,11096,56,0.005021520803443328,0.025858402252197266,3.0071346759796143 +192,384,21,even,10917,10850,67,0.006137217184208116,0.031768798828125,2.8778457641601562 +192,384,22,even,11126,11065,61,0.005482653244652166,0.03260493278503418,2.5335533618927 +192,384,23,even,11156,11070,86,0.007708856220867695,0.025435209274291992,2.599915027618408 +192,384,24,even,10983,10908,75,0.0068287353182190655,0.04389619827270508,2.7985622882843018 +192,384,25,even,11112,11057,55,0.004949604031677466,0.03258180618286133,2.7591967582702637 +192,384,26,even,11065,10994,71,0.006416629010393132,0.026044607162475586,3.2708709239959717 +192,384,28,even,11053,10979,74,0.006695014928073826,0.025533199310302734,2.5145423412323 +192,384,27,even,11026,10969,57,0.005169599129330673,0.0506434440612793,3.0631000995635986 +192,384,29,even,11064,11000,64,0.005784526391901663,0.05373263359069824,2.9349777698516846 +192,384,30,even,10895,10838,57,0.005231757687012391,0.03552722930908203,2.710935354232788 +192,384,31,even,11110,11039,71,0.006390639063906391,0.07288122177124023,2.632166862487793 +192,384,32,even,10978,10902,76,0.006922936782656221,0.025505781173706055,2.944209575653076 +192,384,33,even,11100,11034,66,0.005945945945945946,0.03936576843261719,2.9552104473114014 +192,384,34,even,11078,11016,62,0.005596678100740206,0.025700807571411133,2.8212509155273438 +192,384,35,even,10968,10891,77,0.0070204230488694385,0.026000022888183594,3.221475839614868 +192,384,36,even,11331,11269,62,0.005471714764804518,0.025248289108276367,2.7539682388305664 +192,384,39,even,10905,10843,62,0.005685465382851903,0.031093120574951172,2.466843366622925 +192,384,38,even,11020,10940,80,0.007259528130671506,0.0372776985168457,2.6113948822021484 +192,384,40,even,11150,11081,69,0.006188340807174888,0.024740219116210938,2.5338361263275146 +192,384,37,even,11079,11011,68,0.006137738063002076,0.025280475616455078,2.8901641368865967 +192,384,41,even,11057,10978,79,0.00714479515239215,0.04089975357055664,2.5098376274108887 +192,384,42,even,11096,11024,72,0.006488824801730353,0.04313254356384277,2.6821470260620117 +192,384,43,even,10947,10878,69,0.006303096738832557,0.025110960006713867,2.6267518997192383 +192,384,44,even,11062,10996,66,0.005966371361417465,0.03271055221557617,2.8808064460754395 +192,384,45,even,10907,10840,67,0.006142844045108646,0.024828433990478516,2.7858965396881104 +192,384,47,even,10799,10737,62,0.005741272340031484,0.0395655632019043,2.4571380615234375 +192,384,48,even,11066,10997,69,0.0062353153804446055,0.024994373321533203,2.476288080215454 +192,384,46,even,10987,10923,64,0.005825065987075635,0.05107259750366211,2.848555088043213 +192,384,49,even,11050,10963,87,0.007873303167420815,0.025490283966064453,2.7446465492248535 +192,384,50,even,10891,10816,75,0.0068864199797998345,0.02531290054321289,2.626992702484131 +192,384,51,even,11123,11045,78,0.00701249662860739,0.030505895614624023,2.727839469909668 +192,384,52,even,11084,11027,57,0.005142547816672682,0.02527904510498047,3.058865785598755 +192,384,58,even,11163,11086,77,0.00689778733315417,0.026060104370117188,2.3096156120300293 +192,384,53,even,11119,11049,70,0.00629553017357676,0.0429837703704834,2.832019329071045 +192,384,56,even,11110,11019,91,0.00819081908190819,0.025203227996826172,2.6128695011138916 +192,384,55,even,11028,10956,72,0.006528835690968444,0.027367830276489258,2.664611577987671 +192,384,54,even,11202,11138,64,0.005713265488305659,0.04484224319458008,2.8390352725982666 +192,384,57,even,10948,10871,77,0.007033248081841432,0.045804738998413086,2.599151372909546 +192,384,59,even,10917,10864,53,0.004854813593478061,0.025094270706176758,2.6337242126464844 +192,384,60,even,11085,11013,72,0.006495263870094722,0.024901866912841797,2.841247320175171 +192,384,61,even,11100,11021,79,0.007117117117117117,0.025335073471069336,2.7152328491210938 +192,384,65,even,11051,10950,101,0.009139444394172472,0.04793143272399902,2.3251240253448486 +192,384,62,even,11102,11015,87,0.007836425869212755,0.025162458419799805,2.4907867908477783 +192,384,64,even,11053,10972,81,0.007328327150999728,0.043589115142822266,2.4555861949920654 +192,384,63,even,11140,11079,61,0.005475763016157989,0.0483708381652832,2.6303133964538574 +192,384,67,even,11133,11050,83,0.007455313033324351,0.03913402557373047,2.5304477214813232 +192,384,66,even,11145,11079,66,0.0059219380888290716,0.025567293167114258,3.0433311462402344 +192,384,68,even,11041,10976,65,0.0058871479032696315,0.025338172912597656,2.6789495944976807 +192,384,69,even,11072,10995,77,0.006954479768786127,0.02496623992919922,2.6222314834594727 +192,384,70,even,11097,11026,71,0.006398125619536812,0.024866580963134766,2.6872634887695312 +192,384,71,even,11344,11257,87,0.007669252468265162,0.04863882064819336,2.5809824466705322 +192,384,73,even,11040,10975,65,0.00588768115942029,0.031708478927612305,2.4506702423095703 +192,384,72,even,10977,10916,61,0.005557073881752756,0.030428409576416016,2.7395637035369873 +192,384,74,even,11070,11001,69,0.006233062330623307,0.025423526763916016,2.9465103149414062 +192,384,77,even,11142,11047,95,0.00852629689463292,0.025963783264160156,2.6471424102783203 +192,384,75,even,11123,11064,59,0.0053043243729209745,0.04512667655944824,3.0604758262634277 +192,384,76,even,11146,11070,76,0.006818589628566302,0.02603006362915039,2.910612106323242 +192,384,78,even,11056,10983,73,0.0066027496382054995,0.025482177734375,2.8137919902801514 +192,384,79,even,11160,11096,64,0.005734767025089606,0.025206327438354492,2.961402177810669 +192,384,82,even,11167,11092,75,0.006716217426345482,0.07774138450622559,2.541923761367798 +192,384,81,even,10915,10852,63,0.005771873568483738,0.02529287338256836,2.8925390243530273 +192,384,80,even,10910,10851,59,0.0054078826764436295,0.027988910675048828,2.946681261062622 +192,384,85,even,11108,11048,60,0.005401512423478574,0.06722903251647949,2.390761375427246 +192,384,83,even,11033,10958,75,0.006797788452823348,0.027533769607543945,2.62579607963562 +192,384,84,even,11098,11040,58,0.0052261668769147595,0.02513432502746582,2.7554311752319336 +192,384,86,even,10972,10902,70,0.0063798760481224934,0.03706860542297363,2.7244927883148193 +192,384,87,even,11123,11053,70,0.0062932662051604785,0.025440216064453125,2.648104429244995 +192,384,88,even,11066,10997,69,0.0062353153804446055,0.025615453720092773,2.632488489151001 +192,384,89,even,10912,10856,56,0.005131964809384164,0.05742979049682617,2.818352699279785 +192,384,90,even,11034,10951,83,0.007522204096429219,0.024909496307373047,2.767634391784668 +192,384,92,even,11035,10943,92,0.008337109198006343,0.03379201889038086,2.473414897918701 +192,384,91,even,11111,11071,40,0.0036000360003600037,0.049269676208496094,2.7200698852539062 +192,384,94,even,10887,10822,65,0.0059704234408009555,0.025713205337524414,2.5257556438446045 +192,384,93,even,10931,10873,58,0.0053060104290549815,0.02526259422302246,2.5675389766693115 +192,384,95,even,11143,11074,69,0.006192228304765323,0.04594063758850098,2.4558603763580322 +192,384,96,even,11111,11028,83,0.0074700747007470075,0.025202035903930664,2.956355094909668 +192,384,97,even,11252,11200,52,0.004621400639886242,0.025330543518066406,2.950369119644165 +192,384,99,even,10992,10912,80,0.00727802037845706,0.03890419006347656,2.574141502380371 +192,384,98,even,11251,11174,77,0.006843836103457471,0.054503679275512695,2.6720328330993652 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_256.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_256.csv index 8a9f97321..2a5fe0e8a 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/even/results_256.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_256.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -256,512,0,even,19780,19701,79,0.003993933265925177,0.07332754135131836,8.774906158447266 -256,512,1,even,19722,19626,96,0.004867660480681472,0.07513666152954102,8.212276697158813 -256,512,2,even,19620,19546,74,0.0037716615698267075,0.07410168647766113,8.763195991516113 -256,512,4,even,19694,19617,77,0.0039098202498222805,0.07707357406616211,8.778756856918335 -256,512,3,even,19624,19538,86,0.004382388911536894,0.0762641429901123,10.109301567077637 -256,512,5,even,19598,19505,93,0.0047453821818552915,0.07175874710083008,8.514094352722168 -256,512,6,even,19819,19729,90,0.00454109692719108,0.07324767112731934,8.786444902420044 -256,512,7,even,19725,19626,99,0.0050190114068441065,0.07315587997436523,8.902799129486084 -256,512,9,even,19759,19668,91,0.004605496229566274,0.0723118782043457,8.11315655708313 -256,512,8,even,19793,19683,110,0.005557520335472137,0.10837888717651367,9.099198341369629 -256,512,10,even,19829,19733,96,0.004841393917998891,0.07752490043640137,8.93801736831665 -256,512,11,even,19745,19639,106,0.005368447708280578,0.07577800750732422,8.606537818908691 -256,512,13,even,19556,19471,85,0.0043464921251789735,0.1095278263092041,8.938661813735962 -256,512,12,even,19522,19416,106,0.00542977153980125,0.08034062385559082,10.159528255462646 -256,512,14,even,19526,19444,82,0.004199528833350404,0.07289624214172363,8.887916564941406 -256,512,15,even,19817,19711,106,0.005348942826865822,0.07582259178161621,8.253523588180542 -256,512,16,even,19741,19671,70,0.0035459196595917127,0.07158589363098145,10.452524900436401 -256,512,19,even,19612,19526,86,0.004385070365082603,0.07579326629638672,8.801421165466309 -256,512,17,even,19824,19725,99,0.004993946731234867,0.13032913208007812,10.271847248077393 -256,512,18,even,19726,19629,97,0.004917367940788807,0.1483922004699707,10.199046850204468 -256,512,20,even,19746,19646,100,0.005064316823660488,0.06952881813049316,8.014323472976685 -256,512,21,even,19674,19583,91,0.004625393920910847,0.07209610939025879,8.102063655853271 -256,512,22,even,19835,19730,105,0.005293672800604991,0.0743873119354248,9.105777740478516 -256,512,23,even,19751,19660,91,0.004607361652574553,0.0756676197052002,8.423725366592407 -256,512,24,even,19554,19451,103,0.00526746445740002,0.0726320743560791,8.541728734970093 -256,512,25,even,19546,19464,82,0.0041952317609741125,0.07499003410339355,9.156917333602905 -256,512,26,even,19592,19495,97,0.00495100040832993,0.0737600326538086,9.455599069595337 -256,512,27,even,19530,19448,82,0.004198668714797747,0.08182644844055176,8.51689338684082 -256,512,28,even,19666,19571,95,0.004830672226177159,0.10264778137207031,10.377200603485107 -256,512,29,even,19613,19528,85,0.004333860194768776,0.07336831092834473,10.297366857528687 -256,512,30,even,19404,19317,87,0.004483611626468769,0.07205724716186523,9.451220989227295 -256,512,31,even,19458,19355,103,0.005293452564497893,0.07179760932922363,9.147411823272705 -256,512,32,even,19427,19339,88,0.004529778143820456,0.07081174850463867,8.941199779510498 -256,512,33,even,19802,19699,103,0.005201494798505201,0.0762643814086914,8.959768295288086 -256,512,34,even,19505,19419,86,0.004409125865162779,0.07627725601196289,9.038321733474731 -256,512,35,even,19506,19425,81,0.004152568440479852,0.07077169418334961,9.071453094482422 -256,512,36,even,19992,19891,101,0.005052020808323329,0.07880067825317383,8.492259979248047 -256,512,37,even,19582,19476,106,0.005413134511285875,0.07250428199768066,9.193634986877441 -256,512,38,even,19797,19684,113,0.005707935545789766,0.0951840877532959,7.861550569534302 -256,512,39,even,19682,19597,85,0.004318666802154252,0.07812857627868652,9.219159364700317 -256,512,40,even,19740,19654,86,0.0043566362715298885,0.07033705711364746,8.671674489974976 -256,512,41,even,19721,19625,96,0.004867907306931697,0.07126951217651367,10.307224988937378 -256,512,42,even,19732,19651,81,0.004105007095073991,0.07420468330383301,7.9343743324279785 -256,512,43,even,19831,19735,96,0.004840905652765871,0.07830667495727539,8.435976505279541 -256,512,44,even,19833,19740,93,0.004689154439570413,0.08107566833496094,9.044258832931519 -256,512,45,even,19540,19456,84,0.004298874104401228,0.07198190689086914,8.987844467163086 -256,512,46,even,19652,19551,101,0.005139426012619581,0.07741761207580566,8.385510206222534 -256,512,47,even,19621,19528,93,0.004739819581061108,0.07207965850830078,8.96164870262146 -256,512,48,even,19712,19609,103,0.005225243506493506,0.07551002502441406,8.694995164871216 -256,512,49,even,19835,19753,82,0.004134106377615326,0.0779581069946289,8.860580682754517 -256,512,50,even,19595,19494,101,0.005154376116356213,0.07604622840881348,8.11277461051941 -256,512,51,even,19707,19604,103,0.005226569239356574,0.0746617317199707,8.241237163543701 -256,512,52,even,19683,19607,76,0.0038612000203221055,0.07483434677124023,8.63780403137207 -256,512,53,even,19709,19616,93,0.004718656451367396,0.07837080955505371,8.969764947891235 -256,512,54,even,19754,19674,80,0.004049812696162803,0.07587671279907227,8.208492040634155 -256,512,55,even,19777,19705,72,0.0036405926075744554,0.08095812797546387,9.542949199676514 -256,512,56,even,19762,19677,85,0.004301184090679081,0.07674598693847656,8.467037439346313 -256,512,57,even,19550,19443,107,0.005473145780051151,0.07483720779418945,10.127380132675171 -256,512,58,even,19672,19576,96,0.004880032533550223,0.0779721736907959,10.083190202713013 -256,512,59,even,19544,19454,90,0.004604993860008187,0.07748579978942871,8.744688510894775 -256,512,60,even,19920,19825,95,0.004769076305220884,0.0767664909362793,9.00144338607788 -256,512,61,even,19764,19660,104,0.005262092693786683,0.0722658634185791,8.50933051109314 -256,512,62,even,19672,19587,85,0.004320862139080927,0.0718679428100586,8.812368392944336 -256,512,64,even,19773,19670,103,0.005209123552318819,0.07650923728942871,8.598253965377808 -256,512,63,even,19746,19659,87,0.004405955636584625,0.0704352855682373,9.298535346984863 -256,512,65,even,19779,19688,91,0.004600839273977451,0.0701594352722168,8.53043532371521 -256,512,66,even,19587,19496,91,0.004645938632766631,0.07169032096862793,8.855998277664185 -256,512,67,even,19528,19437,91,0.004659975419909873,0.07555437088012695,9.15243148803711 -256,512,68,even,19882,19797,85,0.004275223820541193,0.0722508430480957,8.040820360183716 -256,512,69,even,19650,19561,89,0.004529262086513995,0.07280468940734863,8.893288373947144 -256,512,70,even,19703,19596,107,0.0054306450794295285,0.07724142074584961,7.912598371505737 -256,512,71,even,19739,19639,100,0.005066112771670297,0.07442522048950195,8.388463735580444 -256,512,73,even,19710,19627,83,0.004211060375443937,0.07606172561645508,8.011042356491089 -256,512,72,even,19478,19400,78,0.004004517917650683,0.07686471939086914,10.081991195678711 -256,512,74,even,19720,19642,78,0.003955375253549696,0.07627677917480469,8.631529569625854 -256,512,75,even,20026,19939,87,0.004344352341955458,0.07191324234008789,8.842134237289429 -256,512,76,even,19518,19434,84,0.004303719643406086,0.07383465766906738,8.950009107589722 -256,512,77,even,19554,19450,104,0.005318604889025263,0.07434391975402832,8.540579080581665 -256,512,78,even,19638,19542,96,0.00488848151542927,0.07091093063354492,7.918055295944214 -256,512,79,even,19762,19685,77,0.0038963667644975205,0.07679510116577148,8.930895805358887 -256,512,80,even,19604,19515,89,0.004539889818404408,0.07634353637695312,8.95839262008667 -256,512,81,even,19725,19641,84,0.004258555133079848,0.07473587989807129,8.983614206314087 -256,512,83,even,19674,19583,91,0.004625393920910847,0.07548356056213379,7.806763172149658 -256,512,82,even,20069,19979,90,0.004484528377099008,0.07171797752380371,9.129850387573242 -256,512,84,even,19808,19688,120,0.006058158319870759,0.07284164428710938,10.326082229614258 -256,512,85,even,19590,19506,84,0.004287901990811639,0.0717463493347168,8.96701455116272 -256,512,86,even,19779,19683,96,0.004853632640679509,0.07304573059082031,8.144886255264282 -256,512,87,even,19661,19564,97,0.004933624942780123,0.07515239715576172,9.037027359008789 -256,512,88,even,19680,19580,100,0.00508130081300813,0.07174825668334961,8.721602439880371 -256,512,89,even,19933,19814,119,0.00596999949831937,0.07110214233398438,7.895640134811401 -256,512,90,even,19490,19427,63,0.00323242688558235,0.07102513313293457,9.22670316696167 -256,512,91,even,19789,19699,90,0.0045479812016777,0.07460379600524902,8.294875383377075 -256,512,93,even,19754,19657,97,0.004910397894097398,0.07311272621154785,8.819411754608154 -256,512,94,even,19383,19277,106,0.005468709694061807,0.07215428352355957,7.924182891845703 -256,512,92,even,19743,19654,89,0.004507926860152966,0.07938909530639648,11.836632013320923 -256,512,95,even,19676,19568,108,0.005488920512299248,0.0714423656463623,8.033650159835815 -256,512,96,even,19803,19716,87,0.0043932737464020604,0.07492733001708984,8.990072011947632 -256,512,97,even,19941,19847,94,0.0047139060227671635,0.07202744483947754,7.86609673500061 -256,512,98,even,19835,19747,88,0.004436601966221326,0.07480239868164062,8.352844476699829 -256,512,99,even,19552,19475,77,0.003938216039279869,0.0753488540649414,8.22961711883545 +256,512,1,even,19722,19626,96,0.004867660480681472,0.051879167556762695,5.579563617706299 +256,512,0,even,19780,19701,79,0.003993933265925177,0.04546380043029785,5.801636695861816 +256,512,2,even,19620,19546,74,0.0037716615698267075,0.044933319091796875,5.819776773452759 +256,512,5,even,19598,19505,93,0.0047453821818552915,0.07649040222167969,5.49293327331543 +256,512,3,even,19624,19538,86,0.004382388911536894,0.044625282287597656,6.577275991439819 +256,512,4,even,19694,19617,77,0.0039098202498222805,0.06036734580993652,6.744080066680908 +256,512,6,even,19819,19729,90,0.00454109692719108,0.048587799072265625,6.289177179336548 +256,512,7,even,19725,19626,99,0.0050190114068441065,0.04516434669494629,6.107130527496338 +256,512,8,even,19793,19683,110,0.005557520335472137,0.04535841941833496,6.17806601524353 +256,512,9,even,19759,19668,91,0.004605496229566274,0.044315338134765625,5.26714301109314 +256,512,11,even,19745,19639,106,0.005368447708280578,0.04695272445678711,5.560352802276611 +256,512,10,even,19829,19733,96,0.004841393917998891,0.045847415924072266,5.840703725814819 +256,512,13,even,19556,19471,85,0.0043464921251789735,0.04463529586791992,6.271216154098511 +256,512,14,even,19526,19444,82,0.004199528833350404,0.04670882225036621,5.876998662948608 +256,512,12,even,19522,19416,106,0.00542977153980125,0.04515409469604492,7.000896453857422 +256,512,15,even,19817,19711,106,0.005348942826865822,0.044495344161987305,5.433831691741943 +256,512,16,even,19741,19671,70,0.0035459196595917127,0.04717206954956055,7.28924822807312 +256,512,17,even,19824,19725,99,0.004993946731234867,0.06501460075378418,6.4298927783966064 +256,512,20,even,19746,19646,100,0.005064316823660488,0.04479670524597168,5.144865274429321 +256,512,19,even,19612,19526,86,0.004385070365082603,0.04485917091369629,5.7143402099609375 +256,512,18,even,19726,19629,97,0.004917367940788807,0.07635068893432617,7.499980926513672 +256,512,21,even,19674,19583,91,0.004625393920910847,0.0740351676940918,5.5198986530303955 +256,512,23,even,19751,19660,91,0.004607361652574553,0.046106576919555664,5.480067729949951 +256,512,22,even,19835,19730,105,0.005293672800604991,0.04760432243347168,5.970018625259399 +256,512,24,even,19554,19451,103,0.00526746445740002,0.04523587226867676,5.577794313430786 +256,512,25,even,19546,19464,82,0.0041952317609741125,0.045351266860961914,5.999406337738037 +256,512,27,even,19530,19448,82,0.004198668714797747,0.04431438446044922,5.600795030593872 +256,512,26,even,19592,19495,97,0.00495100040832993,0.08264470100402832,6.329269170761108 +256,512,28,even,19666,19571,95,0.004830672226177159,0.04434633255004883,6.642906665802002 +256,512,29,even,19613,19528,85,0.004333860194768776,0.044611215591430664,5.8360536098480225 +256,512,30,even,19404,19317,87,0.004483611626468769,0.044341087341308594,5.688933849334717 +256,512,31,even,19458,19355,103,0.005293452564497893,0.05916452407836914,5.8981568813323975 +256,512,32,even,19427,19339,88,0.004529778143820456,0.04452037811279297,5.767733573913574 +256,512,33,even,19802,19699,103,0.005201494798505201,0.045301198959350586,5.935274839401245 +256,512,36,even,19992,19891,101,0.005052020808323329,0.04759860038757324,5.535007476806641 +256,512,35,even,19506,19425,81,0.004152568440479852,0.05164980888366699,6.6643290519714355 +256,512,34,even,19505,19419,86,0.004409125865162779,0.09283876419067383,6.749767780303955 +256,512,38,even,19797,19684,113,0.005707935545789766,0.044608354568481445,5.179487466812134 +256,512,37,even,19582,19476,106,0.005413134511285875,0.04490947723388672,5.673488140106201 +256,512,39,even,19682,19597,85,0.004318666802154252,0.045274972915649414,5.909948825836182 +256,512,40,even,19740,19654,86,0.0043566362715298885,0.044954538345336914,5.662971496582031 +256,512,41,even,19721,19625,96,0.004867907306931697,0.04542851448059082,6.4928553104400635 +256,512,42,even,19732,19651,81,0.004105007095073991,0.04619717597961426,5.24858546257019 +256,512,43,even,19831,19735,96,0.004840905652765871,0.045484304428100586,5.471421480178833 +256,512,45,even,19540,19456,84,0.004298874104401228,0.061136722564697266,5.729554891586304 +256,512,44,even,19833,19740,93,0.004689154439570413,0.04753851890563965,5.933124780654907 +256,512,46,even,19652,19551,101,0.005139426012619581,0.06611967086791992,5.380602121353149 +256,512,47,even,19621,19528,93,0.004739819581061108,0.04485273361206055,5.5936431884765625 +256,512,48,even,19712,19609,103,0.005225243506493506,0.0520167350769043,5.500055551528931 +256,512,49,even,19835,19753,82,0.004134106377615326,0.045011281967163086,5.743906021118164 +256,512,50,even,19595,19494,101,0.005154376116356213,0.0459139347076416,5.168583631515503 +256,512,51,even,19707,19604,103,0.005226569239356574,0.045157432556152344,5.378034830093384 +256,512,52,even,19683,19607,76,0.0038612000203221055,0.0488433837890625,5.754552602767944 +256,512,54,even,19754,19674,80,0.004049812696162803,0.07088851928710938,5.3199896812438965 +256,512,53,even,19709,19616,93,0.004718656451367396,0.05181741714477539,5.944813966751099 +256,512,56,even,19762,19677,85,0.004301184090679081,0.04489302635192871,5.485223770141602 +256,512,55,even,19777,19705,72,0.0036405926075744554,0.045018672943115234,6.601899147033691 +256,512,57,even,19550,19443,107,0.005473145780051151,0.0458829402923584,6.059810161590576 +256,512,59,even,19544,19454,90,0.004604993860008187,0.04597043991088867,5.615308523178101 +256,512,58,even,19672,19576,96,0.004880032533550223,0.04507613182067871,6.997460126876831 +256,512,60,even,19920,19825,95,0.004769076305220884,0.04616141319274902,5.705087184906006 +256,512,61,even,19764,19660,104,0.005262092693786683,0.045357465744018555,5.510135173797607 +256,512,62,even,19672,19587,85,0.004320862139080927,0.047354936599731445,6.032039642333984 +256,512,64,even,19773,19670,103,0.005209123552318819,0.044623613357543945,5.789342880249023 +256,512,63,even,19746,19659,87,0.004405955636584625,0.04464912414550781,5.893354892730713 +256,512,65,even,19779,19688,91,0.004600839273977451,0.051032066345214844,5.516754150390625 +256,512,66,even,19587,19496,91,0.004645938632766631,0.044617414474487305,5.954563140869141 +256,512,68,even,19882,19797,85,0.004275223820541193,0.045279741287231445,5.182441473007202 +256,512,67,even,19528,19437,91,0.004659975419909873,0.044536590576171875,6.780601263046265 +256,512,69,even,19650,19561,89,0.004529262086513995,0.04538130760192871,5.815312385559082 +256,512,70,even,19703,19596,107,0.0054306450794295285,0.046678781509399414,5.46722149848938 +256,512,73,even,19710,19627,83,0.004211060375443937,0.05236649513244629,5.3165788650512695 +256,512,71,even,19739,19639,100,0.005066112771670297,0.05529165267944336,5.577299118041992 +256,512,74,even,19720,19642,78,0.003955375253549696,0.045185089111328125,5.728973627090454 +256,512,72,even,19478,19400,78,0.004004517917650683,0.049269914627075195,6.72618556022644 +256,512,75,even,20026,19939,87,0.004344352341955458,0.04485607147216797,5.739215135574341 +256,512,78,even,19638,19542,96,0.00488848151542927,0.04425692558288574,4.986299276351929 +256,512,77,even,19554,19450,104,0.005318604889025263,0.04819536209106445,5.450183629989624 +256,512,76,even,19518,19434,84,0.004303719643406086,0.04441571235656738,6.865995645523071 +256,512,79,even,19762,19685,77,0.0038963667644975205,0.04491305351257324,6.22723388671875 +256,512,80,even,19604,19515,89,0.004539889818404408,0.045404672622680664,6.081985235214233 +256,512,81,even,19725,19641,84,0.004258555133079848,0.044818878173828125,5.935311317443848 +256,512,83,even,19674,19583,91,0.004625393920910847,0.0734715461730957,5.190703868865967 +256,512,82,even,20069,19979,90,0.004484528377099008,0.05010366439819336,5.92964506149292 +256,512,85,even,19590,19506,84,0.004287901990811639,0.044602155685424805,5.779475688934326 +256,512,86,even,19779,19683,96,0.004853632640679509,0.049158334732055664,5.4561028480529785 +256,512,84,even,19808,19688,120,0.006058158319870759,0.09942340850830078,6.931095123291016 +256,512,87,even,19661,19564,97,0.004933624942780123,0.04439997673034668,6.209628343582153 +256,512,88,even,19680,19580,100,0.00508130081300813,0.044567108154296875,5.868139982223511 +256,512,89,even,19933,19814,119,0.00596999949831937,0.08520746231079102,5.340963125228882 +256,512,90,even,19490,19427,63,0.00323242688558235,0.04448366165161133,5.865420818328857 +256,512,91,even,19789,19699,90,0.0045479812016777,0.044487714767456055,5.453898191452026 +256,512,94,even,19383,19277,106,0.005468709694061807,0.044443368911743164,5.223604917526245 +256,512,93,even,19754,19657,97,0.004910397894097398,0.04519295692443848,5.5002501010894775 +256,512,92,even,19743,19654,89,0.004507926860152966,0.0773928165435791,6.833667516708374 +256,512,95,even,19676,19568,108,0.005488920512299248,0.07372093200683594,5.439748287200928 +256,512,96,even,19803,19716,87,0.0043932737464020604,0.044922590255737305,6.025474309921265 +256,512,97,even,19941,19847,94,0.0047139060227671635,0.0452272891998291,5.358022689819336 +256,512,98,even,19835,19747,88,0.004436601966221326,0.06399250030517578,5.798542737960815 +256,512,99,even,19552,19475,77,0.003938216039279869,0.04682660102844238,5.625120162963867 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_320.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_320.csv index ea7619386..85a69d21b 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/even/results_320.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_320.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -320,640,2,even,30934,30809,125,0.004040861188336458,0.1196587085723877,10.674824476242065 -320,640,1,even,31073,30950,123,0.003958420493676182,0.18842458724975586,10.729465246200562 -320,640,3,even,30568,30484,84,0.002747971735147867,0.08835983276367188,11.151677370071411 -320,640,4,even,30569,30469,100,0.0032712879060486115,0.09623217582702637,11.191675662994385 -320,640,5,even,30545,30421,124,0.004059584220003274,0.08742523193359375,11.254238367080688 -320,640,7,even,30618,30505,113,0.003690639493108629,0.07340383529663086,12.08835506439209 -320,640,6,even,30765,30638,127,0.004128067609296278,0.09068918228149414,12.581279993057251 -320,640,8,even,30876,30763,113,0.0036598004922917477,0.07186746597290039,12.657500505447388 -320,640,0,even,30659,30543,116,0.0037835545842982484,0.13829636573791504,14.959959030151367 -320,640,10,even,30728,30607,121,0.0039377766206717,0.08084988594055176,11.171495914459229 -320,640,9,even,30795,30684,111,0.0036044812469556748,0.07542634010314941,11.150168895721436 -320,640,11,even,30676,30565,111,0.0036184639457556397,0.1037595272064209,11.120697498321533 -320,640,13,even,30740,30609,131,0.004261548471047495,0.07050037384033203,10.978219747543335 -320,640,12,even,30563,30448,115,0.003762719628308739,0.07242512702941895,11.1297025680542 -320,640,15,even,30932,30821,111,0.0035885167464114833,0.08218550682067871,10.031893968582153 -320,640,16,even,30692,30575,117,0.0038120682914114428,0.07138252258300781,9.953921794891357 -320,640,14,even,30628,30492,136,0.004440381350398329,0.08782815933227539,14.432943105697632 -320,640,17,even,31061,30936,125,0.004024339203502785,0.07115983963012695,12.264689207077026 -320,640,18,even,30971,30850,121,0.003906880630267024,0.1531696319580078,15.288753271102905 -320,640,19,even,30660,30538,122,0.003979125896934116,0.17324185371398926,16.500858783721924 -320,640,20,even,30920,30804,116,0.0037516170763260024,0.16646599769592285,15.566561937332153 -320,640,24,even,30742,30630,112,0.003643224253464316,0.14197063446044922,15.447338104248047 -320,640,21,even,30686,30572,114,0.003715049208107932,0.13709235191345215,16.687125205993652 -320,640,22,even,30770,30664,106,0.003444913877153071,0.19144463539123535,16.964285612106323 -320,640,23,even,30953,30840,113,0.0036506962168448938,0.14019775390625,17.907235383987427 -320,640,26,even,30784,30656,128,0.004158004158004158,0.14243698120117188,16.576027393341064 -320,640,25,even,30708,30595,113,0.0036798228474664582,0.1387772560119629,19.037472009658813 -320,640,27,even,30571,30457,114,0.0037290242386575512,0.2017817497253418,16.194595336914062 -320,640,31,even,30718,30598,120,0.003906504329708966,0.13917922973632812,16.325557231903076 -320,640,29,even,30825,30722,103,0.0033414436334144363,0.23489642143249512,17.597662210464478 -320,640,32,even,30526,30428,98,0.0032103780383935005,0.16383004188537598,17.76538324356079 -320,640,28,even,30911,30787,124,0.004011516935718676,0.19508099555969238,18.620819330215454 -320,640,30,even,30296,30185,111,0.003663850013203063,0.18668484687805176,19.12638545036316 -320,640,34,even,30597,30479,118,0.00385658724711573,0.15569591522216797,14.966388702392578 -320,640,33,even,30946,30807,139,0.004491695211012732,0.24500799179077148,16.54019021987915 -320,640,35,even,30474,30365,109,0.0035768195839075935,0.16890525817871094,16.89355206489563 -320,640,36,even,31183,31063,120,0.003848250649392297,0.2336132526397705,16.897051334381104 -320,640,37,even,30656,30541,115,0.003751304801670146,0.1423349380493164,16.932764768600464 -320,640,41,even,30773,30660,113,0.0036720501738537028,0.15581631660461426,15.50043511390686 -320,640,40,even,30603,30494,109,0.0035617423128451457,0.25818896293640137,16.215422868728638 -320,640,38,even,31020,30899,121,0.003900709219858156,0.16102814674377441,17.55115795135498 -320,640,42,even,30920,30819,101,0.0032664941785252263,0.1399097442626953,16.28926181793213 -320,640,39,even,30701,30598,103,0.003354939578515358,0.13673973083496094,19.072253942489624 -320,640,43,even,30858,30760,98,0.003175837708211809,0.16974949836730957,19.402916193008423 -320,640,44,even,30822,30716,106,0.003439101940172604,0.1600027084350586,17.348172664642334 -320,640,45,even,30578,30469,109,0.003564654326640068,0.12905216217041016,16.67869997024536 -320,640,46,even,30631,30526,105,0.003427899840031341,0.17815113067626953,16.728688955307007 -320,640,47,even,30553,30423,130,0.004254901319019409,0.18956232070922852,16.7278995513916 -320,640,49,even,30892,30778,114,0.0036902757995597568,0.2124772071838379,16.75514054298401 -320,640,50,even,30620,30514,106,0.0034617896799477464,0.1367795467376709,16.130273818969727 -320,640,48,even,30758,30636,122,0.003966447753430002,0.24771547317504883,17.559101343154907 -320,640,51,even,30854,30737,117,0.0037920528942762687,0.14092397689819336,19.114898443222046 -320,640,52,even,30787,30674,113,0.0036703803553447883,0.13159894943237305,16.533380270004272 -320,640,53,even,30817,30701,116,0.0037641561475808805,0.1437525749206543,16.908032655715942 -320,640,55,even,30749,30645,104,0.003382223812156493,0.22501707077026367,15.936238050460815 -320,640,57,even,30556,30440,116,0.0037963084173321116,0.1413884162902832,16.308329820632935 -320,640,54,even,30667,30588,79,0.0025760589558809143,0.1804041862487793,17.82092833518982 -320,640,58,even,30579,30442,137,0.004480198829261912,0.12492632865905762,15.95948052406311 -320,640,56,even,30610,30483,127,0.004148970924534466,0.15896821022033691,19.19828963279724 -320,640,60,even,30503,30380,123,0.004032390256696062,0.223419189453125,14.526575088500977 -320,640,59,even,30778,30657,121,0.003931379556826304,0.17009186744689941,17.874232053756714 -320,640,61,even,30726,30608,118,0.0038403957560372323,0.14557313919067383,16.237533807754517 -320,640,62,even,30877,30767,110,0.003562522265764161,0.1393733024597168,15.805821418762207 -320,640,63,even,30470,30355,115,0.0037742041352149657,0.17603731155395508,15.219116687774658 -320,640,65,even,30903,30775,128,0.004141992686794162,0.19977164268493652,15.216411113739014 -320,640,66,even,30640,30541,99,0.003231070496083551,0.1469557285308838,19.105478763580322 -320,640,69,even,30623,30513,110,0.003592071318943278,0.14936065673828125,16.3993923664093 -320,640,68,even,30812,30699,113,0.003667402310788005,0.19603490829467773,16.586562871932983 -320,640,67,even,30938,30820,118,0.003814079772448122,0.16141462326049805,18.49740719795227 -320,640,70,even,30845,30731,114,0.0036958988490841302,0.13951563835144043,16.600884437561035 -320,640,64,even,30743,30652,91,0.0029600234199655207,0.16819143295288086,20.96910047531128 -320,640,71,even,31132,31033,99,0.0031800077091095977,0.17844152450561523,16.228888988494873 -320,640,72,even,30714,30598,116,0.003776779318877385,0.14198946952819824,12.780401945114136 -320,640,75,even,31075,30951,124,0.003990345937248592,0.11540341377258301,10.742785215377808 -320,640,73,even,30677,30547,130,0.004237702513283568,0.1423182487487793,14.361780643463135 -320,640,74,even,30881,30777,104,0.0033677665878695637,0.1419980525970459,11.00420594215393 -320,640,76,even,30618,30498,120,0.003919263178522437,0.13825201988220215,11.572901487350464 -320,640,80,even,30447,30316,131,0.004302558544355766,0.11767053604125977,10.533258438110352 -320,640,77,even,30795,30696,99,0.003214807598636142,0.13593268394470215,12.497363567352295 -320,640,79,even,30916,30790,126,0.004075559580799586,0.08313965797424316,13.012418985366821 -320,640,78,even,30930,30820,110,0.003556417717426447,0.14242339134216309,13.569730520248413 -320,640,81,even,30674,30578,96,0.00312968637934407,0.07566261291503906,11.562374114990234 -320,640,84,even,30816,30695,121,0.003926531671858775,0.09937453269958496,11.031506776809692 -320,640,82,even,31070,30952,118,0.003797875764402961,0.07660126686096191,11.363186597824097 -320,640,83,even,30721,30610,111,0.003613163633996289,0.07397031784057617,11.225996017456055 -320,640,85,even,30913,30790,123,0.003978908549801054,0.07372498512268066,11.282597064971924 -320,640,86,even,30765,30629,136,0.004420607833577117,0.13557195663452148,10.486232280731201 -320,640,87,even,30731,30619,112,0.0036445283264456086,0.07329750061035156,10.790029287338257 -320,640,88,even,30765,30638,127,0.004128067609296278,0.09031343460083008,10.237789154052734 -320,640,89,even,30894,30785,109,0.0035281931766686088,0.0725557804107666,11.21349310874939 -320,640,90,even,30569,30450,119,0.0038928326081978477,0.07147860527038574,13.605032444000244 -320,640,93,even,30923,30807,116,0.0037512531125699316,0.07193946838378906,12.274933099746704 -320,640,92,even,30715,30625,90,0.002930164414781052,0.09237360954284668,12.664015769958496 -320,640,91,even,30908,30796,112,0.0036236573055519606,0.07169818878173828,13.56247591972351 -320,640,96,even,30985,30859,126,0.004066483782475391,0.14105534553527832,13.235751628875732 -320,640,95,even,30806,30669,137,0.004447185613192235,0.1392660140991211,13.270384550094604 -320,640,97,even,30668,30563,105,0.0034237641841659058,0.0781559944152832,13.008013010025024 -320,640,98,even,30647,30533,114,0.0037197768133911966,0.1420745849609375,11.34474515914917 -320,640,94,even,30705,30592,113,0.0036801823807197523,0.1389627456665039,15.33940315246582 -320,640,99,even,30566,30453,113,0.003696918144343388,0.130828857421875,11.770718574523926 +320,640,1,even,31073,30950,123,0.003958420493676182,0.07295393943786621,10.808641910552979 +320,640,0,even,30659,30543,116,0.0037835545842982484,0.0712125301361084,14.000164270401001 +320,640,2,even,30934,30809,125,0.004040861188336458,0.07165241241455078,10.35378885269165 +320,640,3,even,30568,30484,84,0.002747971735147867,0.07228779792785645,11.305540323257446 +320,640,5,even,30545,30421,124,0.004059584220003274,0.07274079322814941,11.097070932388306 +320,640,4,even,30569,30469,100,0.0032712879060486115,0.09152770042419434,11.656604766845703 +320,640,6,even,30765,30638,127,0.004128067609296278,0.07184171676635742,11.724937677383423 +320,640,7,even,30618,30505,113,0.003690639493108629,0.07176446914672852,12.407793760299683 +320,640,8,even,30876,30763,113,0.0036598004922917477,0.07358741760253906,12.82080340385437 +320,640,10,even,30728,30607,121,0.0039377766206717,0.07351899147033691,11.205532312393188 +320,640,9,even,30795,30684,111,0.0036044812469556748,0.07213187217712402,11.634349822998047 +320,640,11,even,30676,30565,111,0.0036184639457556397,0.07416725158691406,11.104160785675049 +320,640,12,even,30563,30448,115,0.003762719628308739,0.07409191131591797,11.215733528137207 +320,640,15,even,30932,30821,111,0.0035885167464114833,0.10092806816101074,10.38349723815918 +320,640,16,even,30692,30575,117,0.0038120682914114428,0.07584547996520996,10.120589017868042 +320,640,14,even,30628,30492,136,0.004440381350398329,0.07262849807739258,12.545202016830444 +320,640,13,even,30740,30609,131,0.004261548471047495,0.1347663402557373,12.738348245620728 +320,640,17,even,31061,30936,125,0.004024339203502785,0.07380056381225586,11.636778831481934 +320,640,18,even,30971,30850,121,0.003906880630267024,0.12796449661254883,10.535698175430298 +320,640,20,even,30920,30804,116,0.0037516170763260024,0.07209968566894531,10.544190168380737 +320,640,19,even,30660,30538,122,0.003979125896934116,0.07214117050170898,11.980111837387085 +320,640,21,even,30686,30572,114,0.003715049208107932,0.0746147632598877,11.07820463180542 +320,640,22,even,30770,30664,106,0.003444913877153071,0.0712440013885498,11.088497638702393 +320,640,24,even,30742,30630,112,0.003643224253464316,0.0941321849822998,11.009934902191162 +320,640,23,even,30953,30840,113,0.0036506962168448938,0.07455968856811523,11.95607304573059 +320,640,25,even,30708,30595,113,0.0036798228474664582,0.07272911071777344,12.599029064178467 +320,640,27,even,30571,30457,114,0.0037290242386575512,0.08529329299926758,10.72365951538086 +320,640,26,even,30784,30656,128,0.004158004158004158,0.13098597526550293,11.612510442733765 +320,640,28,even,30911,30787,124,0.004011516935718676,0.11070036888122559,11.455032110214233 +320,640,29,even,30825,30722,103,0.0033414436334144363,0.07207131385803223,11.36372447013855 +320,640,30,even,30296,30185,111,0.003663850013203063,0.0709831714630127,12.227844953536987 +320,640,31,even,30718,30598,120,0.003906504329708966,0.07061934471130371,11.549883604049683 +320,640,34,even,30597,30479,118,0.00385658724711573,0.07955622673034668,10.447465658187866 +320,640,33,even,30946,30807,139,0.004491695211012732,0.13347315788269043,11.286995649337769 +320,640,32,even,30526,30428,98,0.0032103780383935005,0.14635801315307617,12.820744276046753 +320,640,36,even,31183,31063,120,0.003848250649392297,0.07269763946533203,11.241316795349121 +320,640,35,even,30474,30365,109,0.0035768195839075935,0.07166552543640137,12.232340097427368 +320,640,37,even,30656,30541,115,0.003751304801670146,0.07238531112670898,11.221852540969849 +320,640,38,even,31020,30899,121,0.003900709219858156,0.10576248168945312,11.238333940505981 +320,640,40,even,30603,30494,109,0.0035617423128451457,0.07062530517578125,11.081042766571045 +320,640,39,even,30701,30598,103,0.003354939578515358,0.07181954383850098,13.169270753860474 +320,640,42,even,30920,30819,101,0.0032664941785252263,0.08335733413696289,11.245283603668213 +320,640,41,even,30773,30660,113,0.0036720501738537028,0.14909958839416504,11.584824323654175 +320,640,43,even,30858,30760,98,0.003175837708211809,0.07094573974609375,11.365705728530884 +320,640,45,even,30578,30469,109,0.003564654326640068,0.07115387916564941,11.088370084762573 +320,640,44,even,30822,30716,106,0.003439101940172604,0.13175344467163086,11.635293006896973 +320,640,47,even,30553,30423,130,0.004254901319019409,0.07161974906921387,10.98872447013855 +320,640,46,even,30631,30526,105,0.003427899840031341,0.07245755195617676,11.423138856887817 +320,640,48,even,30758,30636,122,0.003966447753430002,0.09501242637634277,11.570146322250366 +320,640,49,even,30892,30778,114,0.0036902757995597568,0.14147472381591797,11.524432897567749 +320,640,52,even,30787,30674,113,0.0036703803553447883,0.07188534736633301,11.478655338287354 +320,640,51,even,30854,30737,117,0.0037920528942762687,0.07157087326049805,12.26568341255188 +320,640,50,even,30620,30514,106,0.0034617896799477464,0.07091259956359863,12.641247749328613 +320,640,53,even,30817,30701,116,0.0037641561475808805,0.07053589820861816,11.345607042312622 +320,640,55,even,30749,30645,104,0.003382223812156493,0.09498190879821777,10.987525463104248 +320,640,54,even,30667,30588,79,0.0025760589558809143,0.0704810619354248,12.059786558151245 +320,640,56,even,30610,30483,127,0.004148970924534466,0.09401202201843262,12.72738528251648 +320,640,60,even,30503,30380,123,0.004032390256696062,0.07186150550842285,10.322742700576782 +320,640,57,even,30556,30440,116,0.0037963084173321116,0.07150125503540039,12.48432207107544 +320,640,58,even,30579,30442,137,0.004480198829261912,0.09186840057373047,11.740492105484009 +320,640,59,even,30778,30657,121,0.003931379556826304,0.12296152114868164,11.740057229995728 +320,640,61,even,30726,30608,118,0.0038403957560372323,0.07374429702758789,12.717738628387451 +320,640,63,even,30470,30355,115,0.0037742041352149657,0.09196257591247559,10.602458238601685 +320,640,62,even,30877,30767,110,0.003562522265764161,0.07854962348937988,11.09622311592102 +320,640,65,even,30903,30775,128,0.004141992686794162,0.07123947143554688,10.523680210113525 +320,640,64,even,30743,30652,91,0.0029600234199655207,0.10895967483520508,13.98283863067627 +320,640,68,even,30812,30699,113,0.003667402310788005,0.08457374572753906,11.410244703292847 +320,640,69,even,30623,30513,110,0.003592071318943278,0.07137084007263184,10.920068979263306 +320,640,66,even,30640,30541,99,0.003231070496083551,0.07344198226928711,12.64395809173584 +320,640,67,even,30938,30820,118,0.003814079772448122,0.12125158309936523,12.804377794265747 +320,640,70,even,30845,30731,114,0.0036958988490841302,0.07334113121032715,11.331414699554443 +320,640,71,even,31132,31033,99,0.0031800077091095977,0.0727241039276123,11.209528684616089 +320,640,72,even,30714,30598,116,0.003776779318877385,0.07398128509521484,12.092992782592773 +320,640,73,even,30677,30547,130,0.004237702513283568,0.07225561141967773,11.284335851669312 +320,640,74,even,30881,30777,104,0.0033677665878695637,0.0967414379119873,10.679150819778442 +320,640,75,even,31075,30951,124,0.003990345937248592,0.07093191146850586,10.448717594146729 +320,640,76,even,30618,30498,120,0.003919263178522437,0.06996750831604004,11.420141220092773 +320,640,78,even,30930,30820,110,0.003556417717426447,0.07145881652832031,11.411025285720825 +320,640,79,even,30916,30790,126,0.004075559580799586,0.07224345207214355,11.080206155776978 +320,640,77,even,30795,30696,99,0.003214807598636142,0.12238860130310059,12.648011207580566 +320,640,80,even,30447,30316,131,0.004302558544355766,0.08490800857543945,10.198704481124878 +320,640,81,even,30674,30578,96,0.00312968637934407,0.07221007347106934,12.026601552963257 +320,640,82,even,31070,30952,118,0.003797875764402961,0.07180595397949219,11.704776048660278 +320,640,83,even,30721,30610,111,0.003613163633996289,0.07163047790527344,11.993026733398438 +320,640,84,even,30816,30695,121,0.003926531671858775,0.07198715209960938,10.840328216552734 +320,640,86,even,30765,30629,136,0.004420607833577117,0.07294225692749023,11.064727306365967 +320,640,85,even,30913,30790,123,0.003978908549801054,0.07325506210327148,12.10647702217102 +320,640,88,even,30765,30638,127,0.004128067609296278,0.07007336616516113,10.443170547485352 +320,640,87,even,30731,30619,112,0.0036445283264456086,0.07033157348632812,11.195795774459839 +320,640,89,even,30894,30785,109,0.0035281931766686088,0.06995177268981934,11.414651870727539 +320,640,90,even,30569,30450,119,0.0038928326081978477,0.07001781463623047,11.724977970123291 +320,640,91,even,30908,30796,112,0.0036236573055519606,0.0703737735748291,12.01571798324585 +320,640,92,even,30715,30625,90,0.002930164414781052,0.07208776473999023,11.159833908081055 +320,640,93,even,30923,30807,116,0.0037512531125699316,0.08674216270446777,11.536386251449585 +320,640,96,even,30985,30859,126,0.004066483782475391,0.07086706161499023,11.016551733016968 +320,640,95,even,30806,30669,137,0.004447185613192235,0.12105631828308105,11.471938133239746 +320,640,94,even,30705,30592,113,0.0036801823807197523,0.08159112930297852,12.468016624450684 +320,640,97,even,30668,30563,105,0.0034237641841659058,0.07272672653198242,12.895769834518433 +320,640,98,even,30647,30533,114,0.0037197768133911966,0.06982064247131348,12.171642303466797 +320,640,99,even,30566,30453,113,0.003696918144343388,0.08370208740234375,10.588135480880737 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_384.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_384.csv index 14e83b112..fc10d51d5 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/even/results_384.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_384.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -384,768,0,even,44135,44005,130,0.0029455081001472753,0.10135197639465332,18.802589893341064 -384,768,1,even,44573,44462,111,0.0024902968164583943,0.10086464881896973,19.93380069732666 -384,768,2,even,44560,44407,153,0.003433572710951526,0.0997459888458252,17.829906463623047 -384,768,3,even,44075,43945,130,0.002949517867271696,0.10070919990539551,19.221399068832397 -384,768,5,even,44042,43879,163,0.003701012669724354,0.10111594200134277,18.252781867980957 -384,768,6,even,44276,44176,100,0.0022585599421808653,0.10429024696350098,17.731058597564697 -384,768,4,even,44328,44225,103,0.0023235878000360945,0.10109448432922363,22.764951705932617 -384,768,7,even,44479,44329,150,0.003372377976123564,0.10482192039489746,19.67781710624695 -384,768,9,even,44230,44088,142,0.0032104906172281257,0.10016536712646484,16.7515230178833 -384,768,8,even,44373,44240,133,0.0029973181889887996,0.10034775733947754,19.180917739868164 -384,768,10,even,43984,43849,135,0.003069297926518734,0.10395145416259766,19.59206247329712 -384,768,13,even,44297,44168,129,0.002912161094430774,0.10111594200134277,19.085848569869995 -384,768,14,even,44337,44221,116,0.0026163249656043484,0.10107231140136719,18.448315143585205 -384,768,11,even,44017,43890,127,0.002885248881114115,0.10259389877319336,23.335925340652466 -384,768,12,even,44051,43927,124,0.0028149190710767065,0.10641980171203613,21.293250560760498 -384,768,16,even,44227,44095,132,0.002984602166097633,0.10088729858398438,18.688853979110718 -384,768,15,even,44695,44527,168,0.003758809710258418,0.09935617446899414,19.323307514190674 -384,768,17,even,44523,44386,137,0.003077061294162568,0.11117148399353027,18.414686679840088 -384,768,18,even,44279,44152,127,0.002868176788093679,0.10273504257202148,20.01281452178955 -384,768,19,even,44321,44194,127,0.0028654588118499132,0.10364699363708496,19.61712145805359 -384,768,21,even,44378,44238,140,0.0031547163008698005,0.10116362571716309,17.442646503448486 -384,768,20,even,44139,44006,133,0.0030132082738621173,0.10558915138244629,18.394781827926636 -384,768,25,even,44714,44562,152,0.003399382743659704,0.10015511512756348,17.83229112625122 -384,768,22,even,44350,44217,133,0.0029988726042841037,0.12275552749633789,20.314740896224976 -384,768,23,even,44599,44481,118,0.002645799233166663,0.1414623260498047,21.446320056915283 -384,768,24,even,44235,44110,125,0.002825816661015033,0.10077333450317383,21.71264410018921 -384,768,26,even,44355,44221,134,0.0030210799233457335,0.09872579574584961,18.745517015457153 -384,768,27,even,43883,43759,124,0.0028256955996627396,0.09927511215209961,19.48081946372986 -384,768,28,even,44277,44161,116,0.00261987036158728,0.10135293006896973,20.031928300857544 -384,768,30,even,43960,43830,130,0.002957233848953594,0.11932563781738281,17.737399101257324 -384,768,29,even,44155,44030,125,0.002830936473785528,0.11037158966064453,20.252411603927612 -384,768,33,even,44376,44247,129,0.0029069767441860465,0.10247063636779785,16.862528800964355 -384,768,32,even,43863,43759,104,0.002371018854159542,0.10169053077697754,21.58971071243286 -384,768,31,even,44303,44155,148,0.0033406315599395077,0.10088062286376953,23.251624822616577 -384,768,34,even,44312,44188,124,0.002798339050370103,0.1011345386505127,19.943662881851196 -384,768,35,even,44388,44245,143,0.003221591421104803,0.10274124145507812,19.205458641052246 -384,768,36,even,44983,44860,123,0.002734366316163884,0.10060644149780273,20.44693398475647 -384,768,38,even,44324,44190,134,0.003023192852630629,0.10307121276855469,20.272923707962036 -384,768,39,even,44334,44188,146,0.003293183561149456,0.10161781311035156,20.09837508201599 -384,768,37,even,44303,44159,144,0.003250344220481683,0.10141468048095703,23.83192753791809 -384,768,40,even,44502,44352,150,0.003370635027639207,0.10149264335632324,23.73584270477295 -384,768,42,even,44678,44537,141,0.003155915663189937,0.10267925262451172,24.35201120376587 -384,768,41,even,44650,44534,116,0.0025979843225083987,0.10480499267578125,26.292567014694214 -384,768,43,even,44441,44297,144,0.003240251119461758,0.10005354881286621,27.293004035949707 -384,768,44,even,44204,44069,135,0.0030540222604289206,0.10012960433959961,30.677671909332275 -384,768,45,even,44268,44113,155,0.0035014005602240898,0.16677308082580566,24.816383361816406 -384,768,47,even,44012,43858,154,0.0034990457148050534,0.20490026473999023,22.768019676208496 -384,768,46,even,44110,43944,166,0.00376331897528905,0.2331852912902832,25.36747694015503 -384,768,48,even,44178,44029,149,0.0033727194531214632,0.2061624526977539,30.095190286636353 -384,768,49,even,44424,44301,123,0.0027687736358725013,0.19287633895874023,25.370508432388306 -384,768,51,even,44086,43941,145,0.003289025994646827,0.19535160064697266,25.641582250595093 -384,768,50,even,44057,43935,122,0.0027691399777560887,0.25287461280822754,30.436605215072632 -384,768,52,even,44204,44069,135,0.0030540222604289206,0.17656326293945312,28.408287525177002 -384,768,53,even,44083,43948,135,0.0030624050087335254,0.18157529830932617,29.81861400604248 -384,768,55,even,44085,43953,132,0.002994215719632528,0.2469160556793213,27.80243229866028 -384,768,54,even,44156,44024,132,0.0029894012138780685,0.1847982406616211,31.900442838668823 -384,768,56,even,44234,44112,122,0.002758059411312565,0.20055556297302246,31.048574447631836 -384,768,57,even,44007,43847,160,0.0036357852159883655,0.20129704475402832,26.75472402572632 -384,768,58,even,44178,44043,135,0.0030558196387342118,0.1861259937286377,27.400672912597656 -384,768,59,even,43919,43795,124,0.002823379402991871,0.20096397399902344,27.646958589553833 -384,768,60,even,44200,44040,160,0.0036199095022624436,0.20856761932373047,25.68509006500244 -384,768,61,even,44264,44142,122,0.002756190131935659,0.19408464431762695,26.676389932632446 -384,768,63,even,44128,43987,141,0.0031952501812907903,0.19504213333129883,27.69844341278076 -384,768,62,even,44609,44492,117,0.0026227891232710886,0.19463586807250977,29.61451745033264 -384,768,64,even,44166,44023,143,0.003237784721278812,0.21010255813598633,27.811986207962036 -384,768,65,even,44314,44161,153,0.003452633479261633,0.2065436840057373,28.581298351287842 -384,768,67,even,44527,44399,128,0.0028746603184584634,0.20351624488830566,26.50662064552307 -384,768,66,even,44074,43954,120,0.002722693651585969,0.20510411262512207,30.829243421554565 -384,768,68,even,44083,43944,139,0.0031531429349182225,0.20272088050842285,31.59119939804077 -384,768,69,even,44117,44003,114,0.002584037899222522,0.235245943069458,29.440292596817017 -384,768,70,even,44182,44043,139,0.0031460775881580736,0.21869754791259766,28.036017179489136 -384,768,71,even,44494,44377,117,0.002629568031644716,0.24471449851989746,27.133978128433228 -384,768,73,even,44294,44185,109,0.002460829909242787,0.19678139686584473,29.21970820426941 -384,768,72,even,44113,43971,142,0.003219005735270782,0.2603328227996826,31.140339374542236 -384,768,75,even,44707,44578,129,0.0028854541794349877,0.27966880798339844,25.480807781219482 -384,768,74,even,44493,44330,163,0.0036634976288404918,0.27230024337768555,29.622486114501953 -384,768,76,even,44016,43884,132,0.0029989094874591058,0.19385814666748047,30.206977605819702 -384,768,78,even,44323,44197,126,0.002842767863186156,0.2555086612701416,26.013043880462646 -384,768,77,even,44027,43861,166,0.0037704136098303314,0.19010400772094727,30.299991846084595 -384,768,79,even,44351,44202,149,0.0033595634822213703,0.23624086380004883,26.451820135116577 -384,768,80,even,44192,44045,147,0.0033263939174511224,0.216965913772583,30.166735410690308 -384,768,83,even,44150,44008,142,0.003216308040770102,0.2794311046600342,27.218489408493042 -384,768,82,even,44687,44547,140,0.0031329021863181687,0.3135077953338623,27.404772996902466 -384,768,81,even,44356,44224,132,0.0029759220849490484,0.23686909675598145,29.502690076828003 -384,768,84,even,44102,43926,176,0.003990748718878962,0.21820354461669922,27.71340584754944 -384,768,86,even,44069,43933,136,0.003086069572715514,0.2226564884185791,26.372435092926025 -384,768,85,even,44250,44131,119,0.002689265536723164,0.193925142288208,36.18115162849426 -384,768,88,even,44514,44387,127,0.0028530350002246483,0.21745753288269043,27.207640409469604 -384,768,87,even,44252,44112,140,0.003163698815872729,0.1883392333984375,27.075669527053833 -384,768,89,even,44118,43970,148,0.00335463982954803,0.19263267517089844,30.84587001800537 -384,768,91,even,44300,44131,169,0.00381489841986456,0.19414544105529785,29.74528193473816 -384,768,93,even,44369,44237,132,0.0029750501476255944,0.21494221687316895,28.271493434906006 -384,768,90,even,44174,44028,146,0.0033051116041110155,0.30077433586120605,29.802738904953003 -384,768,92,even,44226,44095,131,0.002962058517614073,0.19951152801513672,30.56457781791687 -384,768,94,even,44031,43878,153,0.003474824555426858,0.29283714294433594,27.010952472686768 -384,768,97,even,44167,44011,156,0.003532048814725927,0.2018418312072754,26.38448190689087 -384,768,95,even,44289,44157,132,0.002980424033055612,0.19578814506530762,28.759655237197876 -384,768,96,even,44814,44677,137,0.0030570803766680056,0.2682018280029297,30.03657603263855 -384,768,99,even,44124,43992,132,0.002991569214033179,0.20206618309020996,25.43299889564514 -384,768,98,even,44222,44089,133,0.003007552801772873,0.2255394458770752,30.01130437850952 +384,768,2,even,44560,44407,153,0.003433572710951526,0.19984769821166992,25.426462650299072 +384,768,0,even,44135,44005,130,0.0029455081001472753,0.2922670841217041,26.84971046447754 +384,768,3,even,44075,43945,130,0.002949517867271696,0.20134520530700684,27.832449674606323 +384,768,1,even,44573,44462,111,0.0024902968164583943,0.19868779182434082,30.14217495918274 +384,768,5,even,44042,43879,163,0.003701012669724354,0.20550298690795898,26.343578338623047 +384,768,6,even,44276,44176,100,0.0022585599421808653,0.1956958770751953,25.73628544807434 +384,768,4,even,44328,44225,103,0.0023235878000360945,0.19034528732299805,32.42924118041992 +384,768,7,even,44479,44329,150,0.003372377976123564,0.18719983100891113,26.3889422416687 +384,768,9,even,44230,44088,142,0.0032104906172281257,0.32765841484069824,23.842125415802002 +384,768,8,even,44373,44240,133,0.0029973181889887996,0.21953606605529785,30.011133909225464 +384,768,10,even,43984,43849,135,0.003069297926518734,0.2207341194152832,28.177433967590332 +384,768,11,even,44017,43890,127,0.002885248881114115,0.20307421684265137,30.580562353134155 +384,768,14,even,44337,44221,116,0.0026163249656043484,0.19285368919372559,25.820144653320312 +384,768,13,even,44297,44168,129,0.002912161094430774,0.20224857330322266,27.0716609954834 +384,768,12,even,44051,43927,124,0.0028149190710767065,0.20798373222351074,30.4286892414093 +384,768,15,even,44695,44527,168,0.003758809710258418,0.20571327209472656,27.89190173149109 +384,768,16,even,44227,44095,132,0.002984602166097633,0.1977214813232422,28.155280113220215 +384,768,17,even,44523,44386,137,0.003077061294162568,0.20313692092895508,27.337836980819702 +384,768,18,even,44279,44152,127,0.002868176788093679,0.20957732200622559,28.769230604171753 +384,768,19,even,44321,44194,127,0.0028654588118499132,0.20092082023620605,29.41314673423767 +384,768,20,even,44139,44006,133,0.0030132082738621173,0.19466090202331543,26.45302104949951 +384,768,21,even,44378,44238,140,0.0031547163008698005,0.21824860572814941,24.557409048080444 +384,768,23,even,44599,44481,118,0.002645799233166663,0.19258856773376465,28.547968864440918 +384,768,22,even,44350,44217,133,0.0029988726042841037,0.22501325607299805,29.191806077957153 +384,768,25,even,44714,44562,152,0.003399382743659704,0.20971155166625977,26.954375982284546 +384,768,24,even,44235,44110,125,0.002825816661015033,0.212066650390625,29.33586621284485 +384,768,26,even,44355,44221,134,0.0030210799233457335,0.19903779029846191,25.99878191947937 +384,768,28,even,44277,44161,116,0.00261987036158728,0.19529271125793457,29.32454013824463 +384,768,27,even,43883,43759,124,0.0028256955996627396,0.16783881187438965,30.565844535827637 +384,768,29,even,44155,44030,125,0.002830936473785528,0.18834614753723145,28.355366230010986 +384,768,30,even,43960,43830,130,0.002957233848953594,0.20142793655395508,25.909391403198242 +384,768,31,even,44303,44155,148,0.0033406315599395077,0.22078800201416016,29.403756141662598 +384,768,33,even,44376,44247,129,0.0029069767441860465,0.29387927055358887,25.883304595947266 +384,768,32,even,43863,43759,104,0.002371018854159542,0.2202749252319336,30.67770004272461 +384,768,34,even,44312,44188,124,0.002798339050370103,0.21588945388793945,28.511218786239624 +384,768,35,even,44388,44245,143,0.003221591421104803,0.19783568382263184,27.46824622154236 +384,768,39,even,44334,44188,146,0.003293183561149456,0.22374248504638672,25.000178337097168 +384,768,38,even,44324,44190,134,0.003023192852630629,0.19463109970092773,27.0103440284729 +384,768,37,even,44303,44159,144,0.003250344220481683,0.31919312477111816,30.125593185424805 +384,768,36,even,44983,44860,123,0.002734366316163884,0.19994497299194336,32.46760368347168 +384,768,40,even,44502,44352,150,0.003370635027639207,0.21327972412109375,27.31693720817566 +384,768,41,even,44650,44534,116,0.0025979843225083987,0.2327122688293457,27.257055521011353 +384,768,42,even,44678,44537,141,0.003155915663189937,0.1763460636138916,28.87954807281494 +384,768,43,even,44441,44297,144,0.003240251119461758,0.22295546531677246,29.39615559577942 +384,768,45,even,44268,44113,155,0.0035014005602240898,0.19801783561706543,25.007444858551025 +384,768,47,even,44012,43858,154,0.0034990457148050534,0.19910955429077148,23.553058624267578 +384,768,46,even,44110,43944,166,0.00376331897528905,0.22146964073181152,26.147473573684692 +384,768,44,even,44204,44069,135,0.0030540222604289206,0.20927643775939941,30.305118799209595 +384,768,48,even,44178,44029,149,0.0033727194531214632,0.3236982822418213,30.4813814163208 +384,768,49,even,44424,44301,123,0.0027687736358725013,0.21972322463989258,27.35556983947754 +384,768,51,even,44086,43941,145,0.003289025994646827,0.20345139503479004,25.931490421295166 +384,768,50,even,44057,43935,122,0.0027691399777560887,0.1989455223083496,28.09487819671631 +384,768,52,even,44204,44069,135,0.0030540222604289206,0.21420836448669434,26.041801691055298 +384,768,55,even,44085,43953,132,0.002994215719632528,0.1960597038269043,28.394984245300293 +384,768,53,even,44083,43948,135,0.0030624050087335254,0.19582176208496094,31.36250400543213 +384,768,54,even,44156,44024,132,0.0029894012138780685,0.2306218147277832,30.675751209259033 +384,768,56,even,44234,44112,122,0.002758059411312565,0.19287538528442383,31.698418855667114 +384,768,60,even,44200,44040,160,0.0036199095022624436,0.20948553085327148,24.892828226089478 +384,768,57,even,44007,43847,160,0.0036357852159883655,0.19653797149658203,27.3622624874115 +384,768,58,even,44178,44043,135,0.0030558196387342118,0.18910670280456543,27.531810760498047 +384,768,59,even,43919,43795,124,0.002823379402991871,0.2027428150177002,31.83940052986145 +384,768,61,even,44264,44142,122,0.002756190131935659,0.18424344062805176,29.33217477798462 +384,768,63,even,44128,43987,141,0.0031952501812907903,0.21191167831420898,27.310094356536865 +384,768,64,even,44166,44023,143,0.003237784721278812,0.22400927543640137,30.67649555206299 +384,768,65,even,44314,44161,153,0.003452633479261633,0.21593570709228516,27.291218519210815 +384,768,62,even,44609,44492,117,0.0026227891232710886,0.18519067764282227,31.67127799987793 +384,768,67,even,44527,44399,128,0.0028746603184584634,0.23085522651672363,25.495932579040527 +384,768,68,even,44083,43944,139,0.0031531429349182225,0.20884132385253906,27.884089946746826 +384,768,66,even,44074,43954,120,0.002722693651585969,0.17436480522155762,32.56905245780945 +384,768,69,even,44117,44003,114,0.002584037899222522,0.22536683082580566,26.616973876953125 +384,768,70,even,44182,44043,139,0.0031460775881580736,0.19618487358093262,27.33194637298584 +384,768,71,even,44494,44377,117,0.002629568031644716,0.22659945487976074,27.084137201309204 +384,768,74,even,44493,44330,163,0.0036634976288404918,0.20644617080688477,26.517682790756226 +384,768,75,even,44707,44578,129,0.0028854541794349877,0.21033906936645508,25.56572151184082 +384,768,73,even,44294,44185,109,0.002460829909242787,0.21698689460754395,32.093268156051636 +384,768,72,even,44113,43971,142,0.003219005735270782,0.35076236724853516,34.34346103668213 +384,768,78,even,44323,44197,126,0.002842767863186156,0.22143101692199707,25.270706176757812 +384,768,76,even,44016,43884,132,0.0029989094874591058,0.25482892990112305,29.395291805267334 +384,768,79,even,44351,44202,149,0.0033595634822213703,0.20461702346801758,25.594130992889404 +384,768,77,even,44027,43861,166,0.0037704136098303314,0.18727684020996094,29.246334552764893 +384,768,80,even,44192,44045,147,0.0033263939174511224,0.21841883659362793,28.228471517562866 +384,768,81,even,44356,44224,132,0.0029759220849490484,0.2856605052947998,28.548475980758667 +384,768,82,even,44687,44547,140,0.0031329021863181687,0.23371124267578125,27.790471076965332 +384,768,83,even,44150,44008,142,0.003216308040770102,0.2902398109436035,25.526855945587158 +384,768,84,even,44102,43926,176,0.003990748718878962,0.2250809669494629,27.059534549713135 +384,768,88,even,44514,44387,127,0.0028530350002246483,0.19371676445007324,26.007988452911377 +384,768,86,even,44069,43933,136,0.003086069572715514,0.23154830932617188,28.83370304107666 +384,768,87,even,44252,44112,140,0.003163698815872729,0.21300506591796875,29.32628345489502 +384,768,85,even,44250,44131,119,0.002689265536723164,0.214691162109375,38.02768898010254 +384,768,91,even,44300,44131,169,0.00381489841986456,0.1932673454284668,29.600358247756958 +384,768,89,even,44118,43970,148,0.00335463982954803,0.40267348289489746,31.429296493530273 +384,768,90,even,44174,44028,146,0.0033051116041110155,0.2190568447113037,31.07317543029785 +384,768,92,even,44226,44095,131,0.002962058517614073,0.20699095726013184,30.109495162963867 +384,768,93,even,44369,44237,132,0.0029750501476255944,0.24198198318481445,27.95018982887268 +384,768,94,even,44031,43878,153,0.003474824555426858,0.19506168365478516,26.609750747680664 +384,768,95,even,44289,44157,132,0.002980424033055612,0.19496726989746094,26.27553939819336 +384,768,96,even,44814,44677,137,0.0030570803766680056,0.21308660507202148,27.616783380508423 +384,768,97,even,44167,44011,156,0.003532048814725927,0.19412851333618164,26.545716524124146 +384,768,99,even,44124,43992,132,0.002991569214033179,0.23053503036499023,26.204430103302002 +384,768,98,even,44222,44089,133,0.003007552801772873,0.21588540077209473,28.455345153808594 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_448.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_448.csv index aee113369..840c2f087 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/even/results_448.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_448.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -448,896,0,even,60331,60185,146,0.0024199830932688004,0.28557848930358887,46.24008870124817 -448,896,2,even,60472,60296,176,0.0029104378886096044,0.26615381240844727,41.58626937866211 -448,896,1,even,60276,60128,148,0.002455371955670582,0.25181150436401367,50.043879985809326 -448,896,3,even,60085,59950,135,0.0022468170092369145,0.25064992904663086,42.21801424026489 -448,896,4,even,60398,60252,146,0.0024172985860458954,0.2663748264312744,45.7607057094574 -448,896,5,even,60123,59964,159,0.0026445786138416245,0.26631593704223633,41.415709018707275 -448,896,6,even,60621,60446,175,0.002886788406657759,0.28955507278442383,41.96250534057617 -448,896,7,even,60128,59972,156,0.002594465141032464,0.2678794860839844,45.79421806335449 -448,896,8,even,60289,60131,158,0.002620710245650119,0.274442195892334,45.674620389938354 -448,896,9,even,60877,60721,156,0.002562544146393548,0.2754991054534912,47.277628660202026 -448,896,11,even,60313,60151,162,0.0026859880954354784,0.27005958557128906,45.812877893447876 -448,896,10,even,59975,59808,167,0.0027844935389745727,0.26346588134765625,47.742236852645874 -448,896,12,even,59930,59788,142,0.0023694310028366428,0.2653188705444336,50.32005739212036 -448,896,13,even,60534,60337,197,0.0032543694452704264,0.2704026699066162,46.59091114997864 -448,896,14,even,60439,60263,176,0.0029120270024322044,0.2666194438934326,43.61987924575806 -448,896,15,even,60220,60063,157,0.002607107273331119,0.267561674118042,43.49715709686279 -448,896,18,even,60574,60428,146,0.0024102750354937762,0.2646803855895996,41.51128554344177 -448,896,16,even,60218,60072,146,0.002424524228635956,0.3035011291503906,46.37915539741516 -448,896,20,even,59669,59515,154,0.002580904657359768,0.2648632526397705,40.87191390991211 -448,896,19,even,60300,60148,152,0.002520729684908789,0.2691028118133545,44.994747161865234 -448,896,17,even,60235,60110,125,0.0020752054453390886,0.26707029342651367,50.850868701934814 -448,896,22,even,60603,60434,169,0.0027886408263617314,0.2665708065032959,40.20732879638672 -448,896,21,even,60513,60340,173,0.0028588898253267894,0.25163769721984863,45.91434693336487 -448,896,23,even,60395,60241,154,0.0025498799569500788,0.28579020500183105,46.63118124008179 -448,896,24,even,60014,59843,171,0.0028493351551304694,0.26639389991760254,49.995505809783936 -448,896,25,even,60566,60412,154,0.0025426807119505995,0.29125404357910156,45.824828147888184 -448,896,28,even,60592,60434,158,0.0026076049643517295,0.2641713619232178,42.246652603149414 -448,896,26,even,60278,60116,162,0.002687547695676698,0.2680661678314209,46.4005401134491 -448,896,27,even,60018,59857,161,0.002682528574760905,0.3898472785949707,45.31731581687927 -448,896,29,even,60083,59933,150,0.0024965464440856815,0.26961302757263184,42.131325006484985 -448,896,30,even,59932,59743,189,0.0031535740505906694,0.25528621673583984,42.485607385635376 -448,896,31,even,60528,60390,138,0.002279936558287074,0.2655332088470459,42.04866313934326 -448,896,32,even,60290,60154,136,0.002255763808260076,0.2721126079559326,47.159672021865845 -448,896,34,even,60618,60445,173,0.002853937774258471,0.2687859535217285,39.975653409957886 -448,896,35,even,60251,60103,148,0.0024563907652985014,0.2905550003051758,41.68750715255737 -448,896,37,even,59823,59658,165,0.0027581365026829144,0.27344679832458496,41.385178089141846 -448,896,36,even,60682,60533,149,0.0024554233545367654,0.29569554328918457,46.77360939979553 -448,896,33,even,60512,60350,162,0.0026771549444738235,0.30730581283569336,51.26889896392822 -448,896,40,even,60301,60129,172,0.002852357340674284,0.2662999629974365,42.629157304763794 -448,896,38,even,60475,60318,157,0.0025961140967341876,0.31496500968933105,51.77674198150635 -448,896,39,even,60279,60127,152,0.002521607856799217,0.3601350784301758,46.74969530105591 -448,896,41,even,60367,60219,148,0.0024516706147398415,0.2967336177825928,42.925050258636475 -448,896,44,even,60223,60047,176,0.002922471480995633,0.3013167381286621,40.03989219665527 -448,896,43,even,60505,60339,166,0.0027435749111643665,0.2654714584350586,44.00393724441528 -448,896,42,even,60166,59993,173,0.0028753781205331915,0.27424097061157227,50.73400950431824 -448,896,45,even,60213,60077,136,0.0022586484646172755,0.30219292640686035,46.36733150482178 -448,896,47,even,60139,59986,153,0.0025441061540763896,0.3246753215789795,46.47801661491394 -448,896,46,even,60111,59957,154,0.002561927101528838,0.29711389541625977,55.99434185028076 -448,896,48,even,60090,59932,158,0.0026293892494591445,0.2660520076751709,49.15348982810974 -448,896,49,even,60057,59909,148,0.002464325557387149,0.2801382541656494,52.63739800453186 -448,896,50,even,60063,59907,156,0.002597272863493332,0.2941601276397705,45.81230330467224 -448,896,52,even,60444,60283,161,0.002663622526636225,0.2632770538330078,41.247220516204834 -448,896,51,even,60057,59896,161,0.0026807865860765607,0.2691516876220703,42.49224519729614 -448,896,53,even,60104,59944,160,0.002662052442433116,0.26798272132873535,41.484047651290894 -448,896,54,even,59909,59762,147,0.002453721477574321,0.26940417289733887,40.43972373008728 -448,896,55,even,60184,60058,126,0.0020935796889538748,0.26802802085876465,43.22485423088074 -448,896,57,even,59926,59777,149,0.0024863998932016153,0.28910040855407715,43.462719202041626 -448,896,58,even,60151,59981,170,0.0028262206779604664,0.23114418983459473,44.86052870750427 -448,896,59,even,60088,59966,122,0.002030355478631341,0.1938626766204834,43.04508972167969 -448,896,56,even,60534,60371,163,0.00269270162222883,0.2638835906982422,51.18067812919617 -448,896,60,even,59984,59795,189,0.0031508402240597493,0.2869377136230469,42.221298694610596 -448,896,61,even,60431,60278,153,0.002531813142261422,0.26644039154052734,42.99336361885071 -448,896,62,even,60724,60554,170,0.002799552071668533,0.23539352416992188,42.26978826522827 -448,896,63,even,60367,60182,185,0.0030645882684248015,0.26836347579956055,43.68459868431091 -448,896,65,even,60420,60255,165,0.002730883813306852,0.2663860321044922,42.526349782943726 -448,896,64,even,60488,60342,146,0.0024137018912842216,0.27035951614379883,49.813445806503296 -448,896,68,even,60172,60024,148,0.0024596157681313568,0.27077746391296387,45.65946936607361 -448,896,67,even,60728,60539,189,0.003112238176788302,0.27123355865478516,45.897390365600586 -448,896,66,even,60313,60161,152,0.0025201863611493376,0.26345014572143555,51.281818151474 -448,896,70,even,60378,60209,169,0.002799032760276922,0.2695577144622803,42.342660665512085 -448,896,69,even,60152,59996,156,0.0025934299773906102,0.28884434700012207,45.91848587989807 -448,896,71,even,60789,60614,175,0.0028788103110760173,0.28020143508911133,45.898518562316895 -448,896,72,even,60330,60175,155,0.002569202718382231,0.2899901866912842,51.821730852127075 -448,896,73,even,60478,60300,178,0.0029432190217930487,0.2673323154449463,39.85402727127075 -448,896,74,even,60299,60136,163,0.002703195741222906,0.263289213180542,42.01216530799866 -448,896,75,even,60728,60557,171,0.0028158345409037017,0.27826738357543945,45.740999698638916 -448,896,76,even,60056,59913,143,0.0023811109631011055,0.25668978691101074,50.385831117630005 -448,896,77,even,60121,59956,165,0.002744465328254686,0.2589266300201416,50.433494329452515 -448,896,79,even,60264,60091,173,0.0028707022434621,0.2690746784210205,40.827335596084595 -448,896,80,even,60264,60089,175,0.0029038895526350725,0.26840996742248535,40.83694529533386 -448,896,78,even,60388,60226,162,0.002682652182552825,0.26605916023254395,50.33012056350708 -448,896,81,even,60287,60130,157,0.0026042098628228307,0.2667992115020752,41.75554871559143 -448,896,82,even,60446,60304,142,0.0023492042484200776,0.2673521041870117,44.03895115852356 -448,896,83,even,60131,59960,171,0.0028437910561939766,0.29018115997314453,46.94401264190674 -448,896,84,even,60183,60007,176,0.002924413871026702,0.26601147651672363,50.94476771354675 -448,896,85,even,60329,60179,150,0.002486366424107809,0.27710485458374023,47.14770269393921 -448,896,86,even,60354,60184,170,0.0028167147165059484,0.30083632469177246,42.13414168357849 -448,896,87,even,60458,60302,156,0.002580303681894869,0.2508678436279297,43.68947243690491 -448,896,89,even,60333,60195,138,0.002287305454726269,0.26642560958862305,42.128933906555176 -448,896,88,even,60564,60420,144,0.0023776500891618782,0.27833032608032227,46.055691719055176 -448,896,90,even,60012,59829,183,0.003049390121975605,0.2509148120880127,46.94697880744934 -448,896,91,even,60213,60066,147,0.002441333266902496,0.22398662567138672,43.98695158958435 -448,896,92,even,59991,59833,158,0.0026337283925922223,0.27864933013916016,41.545307874679565 -448,896,93,even,60278,60084,194,0.003218421314575799,0.26461005210876465,46.20287609100342 -448,896,94,even,60081,59928,153,0.002546562141109502,0.265408992767334,44.209113359451294 -448,896,96,even,60653,60493,160,0.0026379569023791075,0.26605892181396484,46.07539892196655 -448,896,95,even,60415,60264,151,0.002499379293221882,0.33087778091430664,51.29615640640259 -448,896,97,even,60056,59873,183,0.0030471559877447716,0.28008222579956055,46.15189814567566 -448,896,99,even,60238,60070,168,0.002788937215711013,0.2746913433074951,41.938215017318726 -448,896,98,even,60616,60468,148,0.0024415995776692623,0.26338672637939453,56.50556445121765 +448,896,0,even,60331,60185,146,0.0024199830932688004,0.28513216972351074,45.897480487823486 +448,896,2,even,60472,60296,176,0.0029104378886096044,0.26799535751342773,41.68360757827759 +448,896,1,even,60276,60128,148,0.002455371955670582,0.279721736907959,46.49669528007507 +448,896,3,even,60085,59950,135,0.0022468170092369145,0.26766252517700195,44.57680082321167 +448,896,4,even,60398,60252,146,0.0024172985860458954,0.2700033187866211,45.450114727020264 +448,896,5,even,60123,59964,159,0.0026445786138416245,0.2690010070800781,41.65771532058716 +448,896,6,even,60621,60446,175,0.002886788406657759,0.25086331367492676,42.54298663139343 +448,896,7,even,60128,59972,156,0.002594465141032464,0.3304469585418701,41.98373198509216 +448,896,9,even,60877,60721,156,0.002562544146393548,0.2865912914276123,41.4331431388855 +448,896,8,even,60289,60131,158,0.002620710245650119,0.387420654296875,50.98024916648865 +448,896,10,even,59975,59808,167,0.0027844935389745727,0.33661603927612305,51.09853267669678 +448,896,13,even,60534,60337,197,0.0032543694452704264,0.28824782371520996,46.270824909210205 +448,896,11,even,60313,60151,162,0.0026859880954354784,0.2568666934967041,51.800626039505005 +448,896,14,even,60439,60263,176,0.0029120270024322044,0.28671836853027344,44.659738540649414 +448,896,12,even,59930,59788,142,0.0023694310028366428,0.29216766357421875,51.803574562072754 +448,896,15,even,60220,60063,157,0.002607107273331119,0.2855644226074219,41.285722732543945 +448,896,16,even,60218,60072,146,0.002424524228635956,0.302933931350708,41.923720359802246 +448,896,17,even,60235,60110,125,0.0020752054453390886,0.2740364074707031,48.9128532409668 +448,896,20,even,59669,59515,154,0.002580904657359768,0.26858091354370117,41.374176263809204 +448,896,18,even,60574,60428,146,0.0024102750354937762,0.2658045291900635,45.68023443222046 +448,896,22,even,60603,60434,169,0.0027886408263617314,0.25749683380126953,39.7546443939209 +448,896,21,even,60513,60340,173,0.0028588898253267894,0.285489559173584,46.020061016082764 +448,896,19,even,60300,60148,152,0.002520729684908789,0.3548853397369385,50.04607367515564 +448,896,23,even,60395,60241,154,0.0025498799569500788,0.24384593963623047,45.70439553260803 +448,896,24,even,60014,59843,171,0.0028493351551304694,0.26776671409606934,45.71583938598633 +448,896,25,even,60566,60412,154,0.0025426807119505995,0.27394628524780273,40.81271839141846 +448,896,28,even,60592,60434,158,0.0026076049643517295,0.32007837295532227,41.5915412902832 +448,896,26,even,60278,60116,162,0.002687547695676698,0.3394942283630371,46.33628273010254 +448,896,29,even,60083,59933,150,0.0024965464440856815,0.27120065689086914,41.83613109588623 +448,896,27,even,60018,59857,161,0.002682528574760905,0.274461030960083,46.00434923171997 +448,896,31,even,60528,60390,138,0.002279936558287074,0.26811838150024414,40.9794979095459 +448,896,30,even,59932,59743,189,0.0031535740505906694,0.27321839332580566,47.97437906265259 +448,896,32,even,60290,60154,136,0.002255763808260076,0.24564886093139648,45.78171491622925 +448,896,33,even,60512,60350,162,0.0026771549444738235,0.26994800567626953,45.5176465511322 +448,896,34,even,60618,60445,173,0.002853937774258471,0.28714537620544434,39.38484835624695 +448,896,35,even,60251,60103,148,0.0024563907652985014,0.41479921340942383,41.94634461402893 +448,896,37,even,59823,59658,165,0.0027581365026829144,0.3254218101501465,41.72565221786499 +448,896,36,even,60682,60533,149,0.0024554233545367654,0.3114755153656006,46.16516327857971 +448,896,39,even,60279,60127,152,0.002521607856799217,0.2661111354827881,44.73089838027954 +448,896,38,even,60475,60318,157,0.0025961140967341876,0.27585339546203613,50.71300959587097 +448,896,41,even,60367,60219,148,0.0024516706147398415,0.2668631076812744,41.71113681793213 +448,896,40,even,60301,60129,172,0.002852357340674284,0.2664825916290283,46.301209688186646 +448,896,42,even,60166,59993,173,0.0028753781205331915,0.2533762454986572,51.36075210571289 +448,896,43,even,60505,60339,166,0.0027435749111643665,0.26877737045288086,41.64848351478577 +448,896,44,even,60223,60047,176,0.002922471480995633,0.35079169273376465,39.243709087371826 +448,896,45,even,60213,60077,136,0.0022586484646172755,0.2855997085571289,45.599282026290894 +448,896,47,even,60139,59986,153,0.0025441061540763896,0.33706188201904297,42.917959690093994 +448,896,46,even,60111,59957,154,0.002561927101528838,0.2717256546020508,50.35547351837158 +448,896,48,even,60090,59932,158,0.0026293892494591445,0.2774240970611572,49.39466118812561 +448,896,49,even,60057,59909,148,0.002464325557387149,0.2686319351196289,50.32413959503174 +448,896,50,even,60063,59907,156,0.002597272863493332,0.2930741310119629,44.2964026927948 +448,896,51,even,60057,59896,161,0.0026807865860765607,0.2692844867706299,41.183619260787964 +448,896,52,even,60444,60283,161,0.002663622526636225,0.2818279266357422,40.59215784072876 +448,896,53,even,60104,59944,160,0.002662052442433116,0.3108077049255371,42.692124366760254 +448,896,54,even,59909,59762,147,0.002453721477574321,0.3228874206542969,42.09049439430237 +448,896,55,even,60184,60058,126,0.0020935796889538748,0.338062047958374,44.76764440536499 +448,896,57,even,59926,59777,149,0.0024863998932016153,0.4373302459716797,44.9379608631134 +448,896,56,even,60534,60371,163,0.00269270162222883,0.34357166290283203,51.104055881500244 +448,896,58,even,60151,59981,170,0.0028262206779604664,0.28116321563720703,46.947420835494995 +448,896,59,even,60088,59966,122,0.002030355478631341,0.2806851863861084,42.74890184402466 +448,896,60,even,59984,59795,189,0.0031508402240597493,0.23122358322143555,40.7376594543457 +448,896,61,even,60431,60278,153,0.002531813142261422,0.26275038719177246,45.703789710998535 +448,896,62,even,60724,60554,170,0.002799552071668533,0.27396702766418457,42.07261061668396 +448,896,63,even,60367,60182,185,0.0030645882684248015,0.31413722038269043,43.68255043029785 +448,896,64,even,60488,60342,146,0.0024137018912842216,0.2577214241027832,46.45491337776184 +448,896,65,even,60420,60255,165,0.002730883813306852,0.30835819244384766,42.22165298461914 +448,896,68,even,60172,60024,148,0.0024596157681313568,0.2908327579498291,44.93331980705261 +448,896,67,even,60728,60539,189,0.003112238176788302,0.29990077018737793,46.5980486869812 +448,896,69,even,60152,59996,156,0.0025934299773906102,0.2737851142883301,46.60223865509033 +448,896,66,even,60313,60161,152,0.0025201863611493376,0.2664768695831299,48.65827488899231 +448,896,70,even,60378,60209,169,0.002799032760276922,0.2248225212097168,41.04714632034302 +448,896,71,even,60789,60614,175,0.0028788103110760173,0.2889540195465088,46.953747510910034 +448,896,72,even,60330,60175,155,0.002569202718382231,0.2584350109100342,50.08763122558594 +448,896,73,even,60478,60300,178,0.0029432190217930487,0.24432110786437988,39.80951380729675 +448,896,74,even,60299,60136,163,0.002703195741222906,0.26880383491516113,41.30671429634094 +448,896,75,even,60728,60557,171,0.0028158345409037017,0.27974414825439453,41.762017488479614 +448,896,76,even,60056,59913,143,0.0023811109631011055,0.2668311595916748,45.688881635665894 +448,896,78,even,60388,60226,162,0.002682652182552825,0.2848854064941406,45.36646246910095 +448,896,79,even,60264,60091,173,0.0028707022434621,0.260650634765625,40.910128593444824 +448,896,77,even,60121,59956,165,0.002744465328254686,0.2679264545440674,55.69317317008972 +448,896,80,even,60264,60089,175,0.0029038895526350725,0.2702293395996094,42.201284646987915 +448,896,81,even,60287,60130,157,0.0026042098628228307,0.265655517578125,42.36159801483154 +448,896,82,even,60446,60304,142,0.0023492042484200776,0.3053877353668213,45.603084564208984 +448,896,83,even,60131,59960,171,0.0028437910561939766,0.2970314025878906,46.46221923828125 +448,896,84,even,60183,60007,176,0.002924413871026702,0.2957642078399658,46.060622215270996 +448,896,85,even,60329,60179,150,0.002486366424107809,0.2929556369781494,41.7390718460083 +448,896,86,even,60354,60184,170,0.0028167147165059484,0.2721123695373535,41.526219606399536 +448,896,87,even,60458,60302,156,0.002580303681894869,0.2667512893676758,46.865113496780396 +448,896,88,even,60564,60420,144,0.0023776500891618782,0.27509260177612305,46.90436053276062 +448,896,89,even,60333,60195,138,0.002287305454726269,0.2914443016052246,46.21381378173828 +448,896,91,even,60213,60066,147,0.002441333266902496,0.2824687957763672,41.58116054534912 +448,896,90,even,60012,59829,183,0.003049390121975605,0.2475438117980957,51.887964487075806 +448,896,92,even,59991,59833,158,0.0026337283925922223,0.2649378776550293,42.34651851654053 +448,896,94,even,60081,59928,153,0.002546562141109502,0.2658720016479492,42.124162912368774 +448,896,93,even,60278,60084,194,0.003218421314575799,0.318206787109375,46.82911825180054 +448,896,95,even,60415,60264,151,0.002499379293221882,0.2792229652404785,46.60658264160156 +448,896,96,even,60653,60493,160,0.0026379569023791075,0.27422404289245605,42.2116539478302 +448,896,97,even,60056,59873,183,0.0030471559877447716,0.27246975898742676,46.50698518753052 +448,896,98,even,60616,60468,148,0.0024415995776692623,0.27715086936950684,51.6764862537384 +448,896,99,even,60238,60070,168,0.002788937215711013,0.26538848876953125,44.5227906703949 diff --git a/scripts/cs_compiler/results_performance_benchmarking/even/results_64.csv b/scripts/cs_compiler/results_performance_benchmarking/even/results_64.csv index 0246b8216..ed5e6c51a 100644 --- a/scripts/cs_compiler/results_performance_benchmarking/even/results_64.csv +++ b/scripts/cs_compiler/results_performance_benchmarking/even/results_64.csv @@ -1,101 +1,101 @@ n_qubits,layer_per_qubit,seed,gate_probs_type,naive,mincut,abs_saving,rel_saving,t_naive,t_mincut -64,128,4,even,1286,1264,22,0.017107309486780714,0.004285573959350586,0.2195284366607666 -64,128,1,even,1254,1235,19,0.015151515151515152,0.007921695709228516,0.19858551025390625 -64,128,3,even,1296,1275,21,0.016203703703703703,0.008450031280517578,0.20427227020263672 -64,128,0,even,1260,1227,33,0.02619047619047619,0.008586645126342773,0.20006155967712402 -64,128,2,even,1222,1204,18,0.014729950900163666,0.004280567169189453,0.2596619129180908 -64,128,5,even,1291,1258,33,0.025561580170410533,0.007285594940185547,0.2039182186126709 -64,128,6,even,1259,1232,27,0.021445591739475776,0.007346391677856445,0.18892288208007812 -64,128,8,even,1205,1167,38,0.03153526970954357,0.007337093353271484,0.21410584449768066 -64,128,9,even,1202,1178,24,0.019966722129783693,0.008018016815185547,0.20485162734985352 -64,128,7,even,1298,1274,24,0.01848998459167951,0.00469970703125,0.21927285194396973 -64,128,11,even,1281,1259,22,0.01717408274785324,0.00472712516784668,0.2558925151824951 -64,128,13,even,1228,1209,19,0.015472312703583062,0.007513761520385742,0.2381455898284912 -64,128,10,even,1203,1175,28,0.023275145469659187,0.023404836654663086,0.2450270652770996 -64,128,12,even,1236,1213,23,0.0186084142394822,0.008365154266357422,0.38123035430908203 -64,128,14,even,1194,1168,26,0.021775544388609715,0.007944107055664062,0.4728846549987793 -64,128,16,even,1261,1221,40,0.0317208564631245,0.007236003875732422,0.269195556640625 -64,128,15,even,1226,1199,27,0.02202283849918434,0.006959676742553711,0.25455427169799805 -64,128,17,even,1246,1227,19,0.015248796147672551,0.0046198368072509766,0.24801182746887207 -64,128,18,even,1248,1220,28,0.022435897435897436,0.004570722579956055,0.21655941009521484 -64,128,19,even,1217,1190,27,0.02218570254724733,0.00448155403137207,0.21644949913024902 -64,128,20,even,1287,1261,26,0.020202020202020204,0.007310152053833008,0.3245244026184082 -64,128,21,even,1224,1200,24,0.0196078431372549,0.007901191711425781,0.2627413272857666 -64,128,22,even,1245,1219,26,0.020883534136546186,0.004730701446533203,0.32392239570617676 -64,128,24,even,1240,1222,18,0.014516129032258065,0.0045816898345947266,0.20705914497375488 -64,128,23,even,1178,1154,24,0.02037351443123939,0.008108139038085938,0.22411227226257324 -64,128,25,even,1277,1260,17,0.01331245105716523,0.004456520080566406,0.27444958686828613 -64,128,26,even,1207,1182,25,0.020712510356255178,0.0073320865631103516,0.32901644706726074 -64,128,27,even,1286,1254,32,0.024883359253499222,0.004442691802978516,0.22503948211669922 -64,128,28,even,1256,1238,18,0.014331210191082803,0.004743099212646484,0.24612855911254883 -64,128,29,even,1214,1184,30,0.02471169686985173,0.007920980453491211,0.32226061820983887 -64,128,31,even,1201,1179,22,0.018318068276436304,0.007258415222167969,0.2947678565979004 -64,128,30,even,1198,1169,29,0.024207011686143573,0.004592418670654297,0.22347784042358398 -64,128,32,even,1232,1207,25,0.020292207792207792,0.007508516311645508,0.19940662384033203 -64,128,33,even,1278,1251,27,0.02112676056338028,0.00500178337097168,0.24211621284484863 -64,128,34,even,1251,1234,17,0.013589128697042365,0.0046617984771728516,0.3428921699523926 -64,128,36,even,1272,1240,32,0.025157232704402517,0.007525920867919922,0.22102689743041992 -64,128,35,even,1253,1222,31,0.024740622505985636,0.007548093795776367,0.20170021057128906 -64,128,38,even,1259,1241,18,0.014297061159650517,0.005155801773071289,0.19246888160705566 -64,128,37,even,1260,1237,23,0.018253968253968255,0.02347707748413086,0.2761833667755127 -64,128,39,even,1232,1210,22,0.017857142857142856,0.004918336868286133,0.34865760803222656 -64,128,41,even,1261,1240,21,0.016653449643140365,0.007367372512817383,0.22209596633911133 -64,128,40,even,1270,1240,30,0.023622047244094488,0.007572650909423828,0.24712896347045898 -64,128,42,even,1290,1268,22,0.017054263565891473,0.0047130584716796875,0.22239375114440918 -64,128,43,even,1207,1184,23,0.019055509527754765,0.004549264907836914,0.20597624778747559 -64,128,44,even,1250,1232,18,0.0144,0.007556438446044922,0.2813150882720947 -64,128,45,even,1237,1214,23,0.018593371059013743,0.019466638565063477,0.24029302597045898 -64,128,48,even,1240,1217,23,0.018548387096774192,0.008348703384399414,0.19772672653198242 -64,128,47,even,1160,1134,26,0.022413793103448276,0.008419036865234375,0.20029544830322266 -64,128,46,even,1273,1250,23,0.018067556952081697,0.0048809051513671875,0.18547391891479492 -64,128,49,even,1231,1208,23,0.01868399675060926,0.005013227462768555,0.30017995834350586 -64,128,52,even,1255,1228,27,0.02151394422310757,0.004933357238769531,0.19947481155395508 -64,128,51,even,1239,1220,19,0.01533494753833737,0.004630565643310547,0.19425559043884277 -64,128,50,even,1270,1244,26,0.02047244094488189,0.004730939865112305,0.21518611907958984 -64,128,53,even,1277,1244,33,0.025841816758026624,0.004632711410522461,0.2190697193145752 -64,128,54,even,1243,1220,23,0.01850362027353178,0.004969120025634766,0.2821974754333496 -64,128,57,even,1262,1222,40,0.03169572107765452,0.004796028137207031,0.194594144821167 -64,128,58,even,1273,1257,16,0.012568735271013355,0.007689476013183594,0.20081138610839844 -64,128,55,even,1228,1198,30,0.024429967426710098,0.0077762603759765625,0.19756150245666504 -64,128,56,even,1191,1171,20,0.016792611251049538,0.008056402206420898,0.29677438735961914 -64,128,59,even,1208,1182,26,0.02152317880794702,0.004908084869384766,0.3978922367095947 -64,128,60,even,1261,1232,29,0.022997620935765267,0.026337862014770508,0.23824787139892578 -64,128,61,even,1193,1171,22,0.018440905280804692,0.023988723754882812,0.25901365280151367 -64,128,62,even,1263,1237,26,0.02058590657165479,0.004410505294799805,0.23140764236450195 -64,128,63,even,1220,1199,21,0.01721311475409836,0.004484891891479492,0.2424793243408203 -64,128,64,even,1256,1231,25,0.019904458598726114,0.004805326461791992,0.22836589813232422 -64,128,67,even,1228,1206,22,0.017915309446254073,0.007750749588012695,0.2529144287109375 -64,128,65,even,1228,1205,23,0.018729641693811076,0.007916927337646484,0.27809977531433105 -64,128,66,even,1188,1166,22,0.018518518518518517,0.011220455169677734,0.23627066612243652 -64,128,68,even,1266,1243,23,0.018167456556082148,0.0048329830169677734,0.23731374740600586 -64,128,69,even,1245,1228,17,0.013654618473895583,0.005224466323852539,0.2836000919342041 -64,128,72,even,1224,1195,29,0.02369281045751634,0.004506111145019531,0.22829937934875488 -64,128,71,even,1252,1231,21,0.016773162939297124,0.004438638687133789,0.23737239837646484 -64,128,70,even,1229,1205,24,0.01952807160292921,0.008497476577758789,0.23168635368347168 -64,128,73,even,1267,1235,32,0.025256511444356748,0.005087137222290039,0.22846722602844238 -64,128,74,even,1209,1188,21,0.017369727047146403,0.004929065704345703,0.28978943824768066 -64,128,77,even,1253,1234,19,0.015163607342378291,0.005347251892089844,0.23686909675598145 -64,128,75,even,1210,1189,21,0.017355371900826446,0.004776716232299805,0.29251623153686523 -64,128,76,even,1253,1234,19,0.015163607342378291,0.004713773727416992,0.2768585681915283 -64,128,78,even,1244,1228,16,0.012861736334405145,0.004548311233520508,0.23886585235595703 -64,128,79,even,1223,1199,24,0.019623875715453803,0.004660844802856445,0.30077290534973145 -64,128,80,even,1234,1213,21,0.017017828200972446,0.015105485916137695,0.1967465877532959 -64,128,81,even,1216,1193,23,0.018914473684210526,0.004560947418212891,0.19093942642211914 -64,128,82,even,1201,1178,23,0.019150707743547043,0.005462646484375,0.19695043563842773 -64,128,83,even,1202,1176,26,0.021630615640599003,0.004820823669433594,0.3315119743347168 -64,128,84,even,1280,1253,27,0.02109375,0.007562160491943359,0.23861455917358398 -64,128,86,even,1159,1138,21,0.0181190681622088,0.007597446441650391,0.21752572059631348 -64,128,85,even,1263,1247,16,0.012668250197941409,0.03147101402282715,0.21575498580932617 -64,128,87,even,1248,1221,27,0.021634615384615384,0.008075714111328125,0.19658493995666504 -64,128,88,even,1218,1193,25,0.020525451559934318,0.004894256591796875,0.29839396476745605 -64,128,89,even,1239,1207,32,0.0258272800645682,0.004591941833496094,0.2787621021270752 -64,128,90,even,1254,1231,23,0.018341307814992026,0.008124351501464844,0.22206902503967285 -64,128,92,even,1269,1250,19,0.014972419227738377,0.008233070373535156,0.33421826362609863 -64,128,91,even,1258,1231,27,0.021462639109697933,0.009650945663452148,0.2760434150695801 -64,128,94,even,1175,1155,20,0.01702127659574468,0.008334875106811523,0.29343605041503906 -64,128,93,even,1174,1140,34,0.028960817717206135,0.005184173583984375,0.3376600742340088 -64,128,95,even,1206,1181,25,0.020729684908789386,0.008202791213989258,0.19187569618225098 -64,128,96,even,1255,1238,17,0.013545816733067729,0.008316993713378906,0.19533586502075195 -64,128,97,even,1236,1219,17,0.013754045307443365,0.004545927047729492,0.2036726474761963 -64,128,98,even,1211,1182,29,0.023947151114781174,0.007494926452636719,0.2916281223297119 -64,128,99,even,1241,1215,26,0.020950846091861403,0.005291938781738281,0.27841973304748535 +64,128,8,even,1205,1167,38,0.03153526970954357,0.009627580642700195,0.2572968006134033 +64,128,0,even,1260,1227,33,0.02619047619047619,0.02599167823791504,0.24604344367980957 +64,128,5,even,1291,1258,33,0.025561580170410533,0.005850315093994141,0.2573552131652832 +64,128,6,even,1259,1232,27,0.021445591739475776,0.005839347839355469,0.27923583984375 +64,128,1,even,1254,1235,19,0.015151515151515152,0.013209342956542969,0.2731285095214844 +64,128,7,even,1298,1274,24,0.01848998459167951,0.02186298370361328,0.2849390506744385 +64,128,2,even,1222,1204,18,0.014729950900163666,0.009732246398925781,0.2903473377227783 +64,128,4,even,1286,1264,22,0.017107309486780714,0.02178168296813965,0.29610323905944824 +64,128,3,even,1296,1275,21,0.016203703703703703,0.005400896072387695,0.28869104385375977 +64,128,9,even,1202,1178,24,0.019966722129783693,0.005597591400146484,0.2105240821838379 +64,128,14,even,1194,1168,26,0.021775544388609715,0.00577998161315918,0.47379302978515625 +64,128,13,even,1228,1209,19,0.015472312703583062,0.009696245193481445,0.6130175590515137 +64,128,12,even,1236,1213,23,0.0186084142394822,0.0054471492767333984,0.2872602939605713 +64,128,15,even,1226,1199,27,0.02202283849918434,0.015139579772949219,0.35530781745910645 +64,128,10,even,1203,1175,28,0.023275145469659187,0.005524635314941406,0.32218098640441895 +64,128,16,even,1261,1221,40,0.0317208564631245,0.0164639949798584,0.37389636039733887 +64,128,17,even,1246,1227,19,0.015248796147672551,0.006812095642089844,0.25638699531555176 +64,128,11,even,1281,1259,22,0.01717408274785324,0.005990505218505859,0.32416749000549316 +64,128,18,even,1248,1220,28,0.022435897435897436,0.0055828094482421875,0.2914419174194336 +64,128,21,even,1224,1200,24,0.0196078431372549,0.005837917327880859,0.29700565338134766 +64,128,22,even,1245,1219,26,0.020883534136546186,0.007214069366455078,0.23249125480651855 +64,128,26,even,1207,1182,25,0.020712510356255178,0.012352705001831055,0.4304490089416504 +64,128,19,even,1217,1190,27,0.02218570254724733,0.00440216064453125,0.4294734001159668 +64,128,25,even,1277,1260,17,0.01331245105716523,0.0053713321685791016,0.3351757526397705 +64,128,24,even,1240,1222,18,0.014516129032258065,0.01870250701904297,0.4172861576080322 +64,128,23,even,1178,1154,24,0.02037351443123939,0.005712985992431641,0.25234055519104004 +64,128,20,even,1287,1261,26,0.020202020202020204,0.013385295867919922,0.2826724052429199 +64,128,28,even,1256,1238,18,0.014331210191082803,0.012696266174316406,0.2785606384277344 +64,128,27,even,1286,1254,32,0.024883359253499222,0.010694742202758789,0.23242640495300293 +64,128,30,even,1198,1169,29,0.024207011686143573,0.006139039993286133,0.4450364112854004 +64,128,34,even,1251,1234,17,0.013589128697042365,0.02039623260498047,0.4905376434326172 +64,128,33,even,1278,1251,27,0.02112676056338028,0.0058994293212890625,0.3567330837249756 +64,128,31,even,1201,1179,22,0.018318068276436304,0.010098457336425781,0.4690260887145996 +64,128,29,even,1214,1184,30,0.02471169686985173,0.007598400115966797,0.47159504890441895 +64,128,35,even,1253,1222,31,0.024740622505985636,0.011439323425292969,0.3527202606201172 +64,128,32,even,1232,1207,25,0.020292207792207792,0.021259546279907227,0.374849796295166 +64,128,37,even,1260,1237,23,0.018253968253968255,0.004402875900268555,0.25083470344543457 +64,128,36,even,1272,1240,32,0.025157232704402517,0.019327640533447266,0.3060178756713867 +64,128,38,even,1259,1241,18,0.014297061159650517,0.01800823211669922,0.2208249568939209 +64,128,43,even,1207,1184,23,0.019055509527754765,0.0061664581298828125,0.43898701667785645 +64,128,39,even,1232,1210,22,0.017857142857142856,0.004515886306762695,0.4182860851287842 +64,128,41,even,1261,1240,21,0.016653449643140365,0.006151914596557617,0.21634387969970703 +64,128,42,even,1290,1268,22,0.017054263565891473,0.012859344482421875,0.437192440032959 +64,128,44,even,1250,1232,18,0.0144,0.006045103073120117,0.40099453926086426 +64,128,40,even,1270,1240,30,0.023622047244094488,0.0060274600982666016,0.35585927963256836 +64,128,45,even,1237,1214,23,0.018593371059013743,0.005988597869873047,0.30518436431884766 +64,128,46,even,1273,1250,23,0.018067556952081697,0.005887031555175781,0.2613253593444824 +64,128,47,even,1160,1134,26,0.022413793103448276,0.010882854461669922,0.20860934257507324 +64,128,48,even,1240,1217,23,0.018548387096774192,0.005716562271118164,0.27047061920166016 +64,128,51,even,1239,1220,19,0.01533494753833737,0.006305217742919922,0.2712116241455078 +64,128,50,even,1270,1244,26,0.02047244094488189,0.004907846450805664,0.39078807830810547 +64,128,49,even,1231,1208,23,0.01868399675060926,0.010544300079345703,0.2834346294403076 +64,128,52,even,1255,1228,27,0.02151394422310757,0.006148815155029297,0.2562553882598877 +64,128,53,even,1277,1244,33,0.025841816758026624,0.00586247444152832,0.32906103134155273 +64,128,54,even,1243,1220,23,0.01850362027353178,0.0058498382568359375,0.26027369499206543 +64,128,55,even,1228,1198,30,0.024429967426710098,0.010922670364379883,0.22858905792236328 +64,128,56,even,1191,1171,20,0.016792611251049538,0.009826898574829102,0.3243393898010254 +64,128,57,even,1262,1222,40,0.03169572107765452,0.005437612533569336,0.2560691833496094 +64,128,60,even,1261,1232,29,0.022997620935765267,0.005889415740966797,0.2509756088256836 +64,128,62,even,1263,1237,26,0.02058590657165479,0.005161285400390625,0.32843780517578125 +64,128,61,even,1193,1171,22,0.018440905280804692,0.008703231811523438,0.40578699111938477 +64,128,59,even,1208,1182,26,0.02152317880794702,0.0059506893157958984,0.3475320339202881 +64,128,58,even,1273,1257,16,0.012568735271013355,0.014168024063110352,0.3282337188720703 +64,128,63,even,1220,1199,21,0.01721311475409836,0.008656978607177734,0.2893218994140625 +64,128,65,even,1228,1205,23,0.018729641693811076,0.005140542984008789,0.46801328659057617 +64,128,66,even,1188,1166,22,0.018518518518518517,0.013260364532470703,0.23812389373779297 +64,128,67,even,1228,1206,22,0.017915309446254073,0.004918098449707031,0.23830509185791016 +64,128,64,even,1256,1231,25,0.019904458598726114,0.008690118789672852,0.2129807472229004 +64,128,71,even,1252,1231,21,0.016773162939297124,0.005616188049316406,0.21998286247253418 +64,128,68,even,1266,1243,23,0.018167456556082148,0.006005764007568359,0.25533437728881836 +64,128,70,even,1229,1205,24,0.01952807160292921,0.005877494812011719,0.423567533493042 +64,128,69,even,1245,1228,17,0.013654618473895583,0.005887508392333984,0.2736070156097412 +64,128,72,even,1224,1195,29,0.02369281045751634,0.00907278060913086,0.24025845527648926 +64,128,74,even,1209,1188,21,0.017369727047146403,0.011358261108398438,0.2897071838378906 +64,128,75,even,1210,1189,21,0.017355371900826446,0.005442619323730469,0.4199080467224121 +64,128,73,even,1267,1235,32,0.025256511444356748,0.008455991744995117,0.23023462295532227 +64,128,76,even,1253,1234,19,0.015163607342378291,0.005780220031738281,0.38106679916381836 +64,128,78,even,1244,1228,16,0.012861736334405145,0.004771232604980469,0.2928948402404785 +64,128,77,even,1253,1234,19,0.015163607342378291,0.010203123092651367,0.3435640335083008 +64,128,80,even,1234,1213,21,0.017017828200972446,0.006234169006347656,0.26203227043151855 +64,128,81,even,1216,1193,23,0.018914473684210526,0.006176948547363281,0.3323328495025635 +64,128,83,even,1202,1176,26,0.021630615640599003,0.005881786346435547,0.2418222427368164 +64,128,84,even,1280,1253,27,0.02109375,0.013803720474243164,0.3136577606201172 +64,128,79,even,1223,1199,24,0.019623875715453803,0.014014244079589844,0.29588866233825684 +64,128,82,even,1201,1178,23,0.019150707743547043,0.005974769592285156,0.47037291526794434 +64,128,85,even,1263,1247,16,0.012668250197941409,0.01780390739440918,0.2141406536102295 +64,128,86,even,1159,1138,21,0.0181190681622088,0.008766412734985352,0.2346043586730957 +64,128,87,even,1248,1221,27,0.021634615384615384,0.007897615432739258,0.31512880325317383 +64,128,88,even,1218,1193,25,0.020525451559934318,0.005466461181640625,0.2736475467681885 +64,128,92,even,1269,1250,19,0.014972419227738377,0.0056743621826171875,0.5186355113983154 +64,128,90,even,1254,1231,23,0.018341307814992026,0.009962320327758789,0.3252677917480469 +64,128,89,even,1239,1207,32,0.0258272800645682,0.010610818862915039,0.2808644771575928 +64,128,91,even,1258,1231,27,0.021462639109697933,0.0062713623046875,0.3360004425048828 +64,128,93,even,1174,1140,34,0.028960817717206135,0.00596165657043457,0.3884270191192627 +64,128,94,even,1175,1155,20,0.01702127659574468,0.01120305061340332,0.521127462387085 +64,128,95,even,1206,1181,25,0.020729684908789386,0.005753993988037109,0.30068135261535645 +64,128,96,even,1255,1238,17,0.013545816733067729,0.013659238815307617,0.32924389839172363 +64,128,99,even,1241,1215,26,0.020950846091861403,0.016283512115478516,0.2861015796661377 +64,128,98,even,1211,1182,29,0.023947151114781174,0.005916118621826172,0.3719906806945801 +64,128,97,even,1236,1219,17,0.013754045307443365,0.0058133602142333984,0.40236735343933105 From d37f0ab16d6949092c365e0595e01b0adfb01c5e Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 21 Nov 2025 08:21:42 +0100 Subject: [PATCH 39/90] move utils functions to utils file --- src/mqt/qecc/circuit_compilation/__init__.py | 4 +- .../code_switching_compiler.py | 151 +----------------- .../circuit_compilation/compilation_utils.py | 144 +++++++++++++++++ 3 files changed, 153 insertions(+), 146 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/__init__.py b/src/mqt/qecc/circuit_compilation/__init__.py index 0dbd3b6b1..1f2750144 100644 --- a/src/mqt/qecc/circuit_compilation/__init__.py +++ b/src/mqt/qecc/circuit_compilation/__init__.py @@ -9,7 +9,7 @@ from __future__ import annotations -from .code_switching_compiler import CodeSwitchGraph, insert_switch_placeholders -from .compilation_utils import count_code_switches, random_universal_circuit +from .code_switching_compiler import CodeSwitchGraph +from .compilation_utils import count_code_switches, insert_switch_placeholders, random_universal_circuit __all__ = ["CodeSwitchGraph", "count_code_switches", "insert_switch_placeholders", "random_universal_circuit"] diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index b1062c130..a87d3a05c 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -9,12 +9,15 @@ from __future__ import annotations -import re +from typing import TYPE_CHECKING import networkx as nx -from qiskit import QuantumCircuit from qiskit.converters import circuit_to_dag -from qiskit.dagcircuit import DAGOpNode + +from mqt.qecc.circuit_compilation.compilation_utils import parse_node_id + +if TYPE_CHECKING: + from qiskit import QuantumCircuit DEFAULT_TEMPORAL_EDGE_CAPACITY = 1.0 SWITCHING_LENGTH = 2 # minimum idle length before considering a bonus @@ -310,7 +313,7 @@ def compute_min_cut(self) -> tuple[int, list[tuple[int, int]], set[str], set[str - S is the set of nodes reachable from the source, - T is the complementary set of nodes. """ - _cut_value, (S, T) = nx.minimum_cut(self.G, self.source, self.sink, capacity="capacity") # noqa: N806 + _, (S, T) = nx.minimum_cut(self.G, self.source, self.sink, capacity="capacity") # noqa: N806 num_switches, switch_positions = self.extract_switch_locations(S, T) return num_switches, switch_positions, S, T @@ -329,143 +332,3 @@ def extract_switch_locations(self, S: set[str], T: set[str]) -> tuple[int, list[ qubit, depth = parse_node_id(u) switch_positions.append((qubit, depth)) return len(switch_positions), switch_positions - - -pattern = re.compile(r".*_q(\d+)_d(\d+)") - - -def parse_node_id(node_id: str) -> tuple[int, int]: - """Extract (qubit, depth) from a node_id like 'H_q0_d3'.""" - match = pattern.match(node_id) - if not match: - msg = f"Invalid node_id format: {node_id}" - raise ValueError(msg) - qubit, depth = map(int, match.groups()) - return qubit, depth - - -def inspect_serial_layers(circuit: QuantumCircuit) -> list[dict[str, object]]: - """Return a lightweight description of `dag.layers()` for debugging. - - Each list element corresponds to one serial layer and contains: - - 'ops': list of (op.name, [qubit indices touched]) tuples for the layer. - - Parameters - ---------- - circuit : QuantumCircuit - Circuit to inspect. - - Returns: - ------- - List[Dict] - A list describing each layer. Use this to confirm layer indices and which - qubits are active in each layer. - """ - dag = circuit_to_dag(circuit) - layers = list(dag.layers()) - layers_descr = [] - - for layer_idx, layer in enumerate(layers): - layer_graph = layer["graph"] - ops_in_layer = [] - for node in layer_graph.op_nodes(): - assert isinstance(node, DAGOpNode) - # map Qubit objects to their indices in the original circuit - q_indices = [circuit.find_bit(q).index for q in node.qargs] if node.qargs else [] - ops_in_layer.append((getattr(node.op, "name", repr(node.op)), q_indices)) - layers_descr.append({"layer_index": layer_idx, "ops": ops_in_layer}) - - return layers_descr - - -def insert_switch_placeholders( - circuit: QuantumCircuit, - switch_positions: list[tuple[int, int]], - placeholder_depth: int = 1, -) -> QuantumCircuit: - """Return a new circuit with 'switch' placeholders inserted between global DAG layers. - - This function inserts placeholders *after* the entire global layer with index - `layer_index` (i.e., between layer `layer_index` and the next). Placeholders are - placed on the requested qubit regardless of whether that qubit was active in that layer. - - Parameters - ---------- - circuit : QuantumCircuit - The original circuit to augment. - switch_positions : List[Tuple[int, int]] - List of (qubit_index, layer_index). `layer_index` refers to the index - from `list(circuit_to_dag(circuit).layers())`. A placeholder for - `(q, k)` will be inserted after global layer `k`. - placeholder_depth : int, optional - Virtual depth (single-qubit layers) the placeholder should represent. - expand_placeholder : bool, optional - If True, expand each placeholder into `placeholder_depth` calls to - `QuantumCircuit.id(qubit)` so that `QuantumCircuit.depth()` increases. - If False, append a single `SwitchGate` marker (informational only). - - Returns: - ------- - QuantumCircuit - New circuit with placeholders inserted. - """ - # Build DAG and layers - dag = circuit_to_dag(circuit) - layers = list(dag.layers()) - - # Normalize and group requested placeholders by qubit - placeholders_by_qubit: dict[int, list[int]] = {} - for qidx, layer_idx in switch_positions: - if layer_idx < 0: - # ignore negative indices (could alternatively raise) - continue - placeholders_by_qubit.setdefault(qidx, []).append(layer_idx) - - # Sort layer indices per qubit for deterministic behavior - for depths in placeholders_by_qubit.values(): - depths.sort() - - # Prepare output circuit with same registers - new_qc = QuantumCircuit(*circuit.qregs, *circuit.cregs, name=circuit.name + "_with_switches") - - # Track which placeholders we already inserted - inserted_placeholders: dict[int, set[int]] = {q: set() for q in placeholders_by_qubit} - - def _append_placeholder_on_qubit(q_index: int, depth_equiv: int) -> None: - """Append a placeholder (either expanded ids or a SwitchGate) on the qubit.""" - qubit = circuit.qubits[q_index] - # append id several times so `.depth()` counts them - for _ in range(max(1, int(depth_equiv))): - new_qc.id(qubit) - - # Iterate layers in order; copy each op, then after the whole layer insert placeholders for that layer - for depth_idx, layer in enumerate(layers): - layer_graph = layer["graph"] - # append ops of the layer to new_qc (deterministic order: iterate nodes) - for node in layer_graph.op_nodes(): - assert isinstance(node, DAGOpNode) - # Map node.qargs (Qubit objects) to the corresponding qubit objects of the original circuit - q_indices = [circuit.find_bit(q).index for q in node.qargs] if node.qargs else [] - qbit_objs = [circuit.qubits[i] for i in q_indices] - c_indices = [circuit.find_bit(c).index for c in node.cargs] if getattr(node, "cargs", None) else [] - cbit_objs = [circuit.clbits[i] for i in c_indices] if c_indices else [] - - # Append the operation to the new circuit on the same physical qubits/bits - new_qc.append(node.op, qbit_objs, cbit_objs) - - # --- AFTER FINISHING THIS GLOBAL LAYER: insert placeholders targeted at this layer --- - for q_index, depths in placeholders_by_qubit.items(): - for target_depth in depths: - if target_depth == depth_idx and target_depth not in inserted_placeholders[q_index]: - _append_placeholder_on_qubit(q_index, placeholder_depth) - inserted_placeholders[q_index].add(target_depth) - - # Append any placeholders whose requested layer index was beyond the number of layers - for q_index, depths in placeholders_by_qubit.items(): - for target_depth in depths: - if target_depth not in inserted_placeholders[q_index]: - # target was never inserted (layer out of range) -> append at end - _append_placeholder_on_qubit(q_index, placeholder_depth) - inserted_placeholders[q_index].add(target_depth) - - return new_qc diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/circuit_compilation/compilation_utils.py index a876e134c..f33fc1ae5 100644 --- a/src/mqt/qecc/circuit_compilation/compilation_utils.py +++ b/src/mqt/qecc/circuit_compilation/compilation_utils.py @@ -7,8 +7,12 @@ """Utility to generate random universal quantum circuits.""" +import re + import numpy as np from qiskit import QuantumCircuit +from qiskit.converters import circuit_to_dag +from qiskit.dagcircuit import DAGOpNode def random_universal_circuit( @@ -181,3 +185,143 @@ def compatible_codes(gate_name: str) -> set[str]: switch_count += 1 return switch_count, current_code + + +pattern = re.compile(r".*_q(\d+)_d(\d+)") + + +def parse_node_id(node_id: str) -> tuple[int, int]: + """Extract (qubit, depth) from a node_id like 'H_q0_d3'.""" + match = pattern.match(node_id) + if not match: + msg = f"Invalid node_id format: {node_id}" + raise ValueError(msg) + qubit, depth = map(int, match.groups()) + return qubit, depth + + +def inspect_serial_layers(circuit: QuantumCircuit) -> list[dict[str, object]]: + """Return a lightweight description of `dag.layers()` for debugging. + + Each list element corresponds to one serial layer and contains: + - 'ops': list of (op.name, [qubit indices touched]) tuples for the layer. + + Parameters + ---------- + circuit : QuantumCircuit + Circuit to inspect. + + Returns: + ------- + List[Dict] + A list describing each layer. Use this to confirm layer indices and which + qubits are active in each layer. + """ + dag = circuit_to_dag(circuit) + layers = list(dag.layers()) + layers_descr = [] + + for layer_idx, layer in enumerate(layers): + layer_graph = layer["graph"] + ops_in_layer = [] + for node in layer_graph.op_nodes(): + assert isinstance(node, DAGOpNode) + # map Qubit objects to their indices in the original circuit + q_indices = [circuit.find_bit(q).index for q in node.qargs] if node.qargs else [] + ops_in_layer.append((getattr(node.op, "name", repr(node.op)), q_indices)) + layers_descr.append({"layer_index": layer_idx, "ops": ops_in_layer}) + + return layers_descr + + +def insert_switch_placeholders( + circuit: QuantumCircuit, + switch_positions: list[tuple[int, int]], + placeholder_depth: int = 1, +) -> QuantumCircuit: + """Return a new circuit with 'switch' placeholders inserted between global DAG layers. + + This function inserts placeholders *after* the entire global layer with index + `layer_index` (i.e., between layer `layer_index` and the next). Placeholders are + placed on the requested qubit regardless of whether that qubit was active in that layer. + + Parameters + ---------- + circuit : QuantumCircuit + The original circuit to augment. + switch_positions : List[Tuple[int, int]] + List of (qubit_index, layer_index). `layer_index` refers to the index + from `list(circuit_to_dag(circuit).layers())`. A placeholder for + `(q, k)` will be inserted after global layer `k`. + placeholder_depth : int, optional + Virtual depth (single-qubit layers) the placeholder should represent. + expand_placeholder : bool, optional + If True, expand each placeholder into `placeholder_depth` calls to + `QuantumCircuit.id(qubit)` so that `QuantumCircuit.depth()` increases. + If False, append a single `SwitchGate` marker (informational only). + + Returns: + ------- + QuantumCircuit + New circuit with placeholders inserted. + """ + # Build DAG and layers + dag = circuit_to_dag(circuit) + layers = list(dag.layers()) + + # Normalize and group requested placeholders by qubit + placeholders_by_qubit: dict[int, list[int]] = {} + for qidx, layer_idx in switch_positions: + if layer_idx < 0: + # ignore negative indices (could alternatively raise) + continue + placeholders_by_qubit.setdefault(qidx, []).append(layer_idx) + + # Sort layer indices per qubit for deterministic behavior + for depths in placeholders_by_qubit.values(): + depths.sort() + + # Prepare output circuit with same registers + new_qc = QuantumCircuit(*circuit.qregs, *circuit.cregs, name=circuit.name + "_with_switches") + + # Track which placeholders we already inserted + inserted_placeholders: dict[int, set[int]] = {q: set() for q in placeholders_by_qubit} + + def _append_placeholder_on_qubit(q_index: int, depth_equiv: int) -> None: + """Append a placeholder (either expanded ids or a SwitchGate) on the qubit.""" + qubit = circuit.qubits[q_index] + # append id several times so `.depth()` counts them + for _ in range(max(1, int(depth_equiv))): + new_qc.id(qubit) + + # Iterate layers in order; copy each op, then after the whole layer insert placeholders for that layer + for depth_idx, layer in enumerate(layers): + layer_graph = layer["graph"] + # append ops of the layer to new_qc (deterministic order: iterate nodes) + for node in layer_graph.op_nodes(): + assert isinstance(node, DAGOpNode) + # Map node.qargs (Qubit objects) to the corresponding qubit objects of the original circuit + q_indices = [circuit.find_bit(q).index for q in node.qargs] if node.qargs else [] + qbit_objs = [circuit.qubits[i] for i in q_indices] + c_indices = [circuit.find_bit(c).index for c in node.cargs] if getattr(node, "cargs", None) else [] + cbit_objs = [circuit.clbits[i] for i in c_indices] if c_indices else [] + + # Append the operation to the new circuit on the same physical qubits/bits + new_qc.append(node.op, qbit_objs, cbit_objs) + + # --- AFTER FINISHING THIS GLOBAL LAYER: insert placeholders targeted at this layer --- + for q_index, depths in placeholders_by_qubit.items(): + for target_depth in depths: + if target_depth == depth_idx and target_depth not in inserted_placeholders[q_index]: + _append_placeholder_on_qubit(q_index, placeholder_depth) + inserted_placeholders[q_index].add(target_depth) + + # Append any placeholders whose requested layer index was beyond the number of layers + for q_index, depths in placeholders_by_qubit.items(): + for target_depth in depths: + if target_depth not in inserted_placeholders[q_index]: + # target was never inserted (layer out of range) -> append at end + _append_placeholder_on_qubit(q_index, placeholder_depth) + inserted_placeholders[q_index].add(target_depth) + + return new_qc From a7857485b8ece0f5ed7ef820c2ceeb75dc738dbd Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 21 Nov 2025 09:14:15 +0100 Subject: [PATCH 40/90] set up code switching compilation test --- tests/circuit_compilation/__init__.py | 8 ++ .../test_code_switching_compilation.py | 122 ++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 tests/circuit_compilation/__init__.py create mode 100644 tests/circuit_compilation/test_code_switching_compilation.py diff --git a/tests/circuit_compilation/__init__.py b/tests/circuit_compilation/__init__.py new file mode 100644 index 000000000..f0c5d3e8c --- /dev/null +++ b/tests/circuit_compilation/__init__.py @@ -0,0 +1,8 @@ +# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +"""Needed for imports in tests.""" diff --git a/tests/circuit_compilation/test_code_switching_compilation.py b/tests/circuit_compilation/test_code_switching_compilation.py new file mode 100644 index 000000000..f044b1e3a --- /dev/null +++ b/tests/circuit_compilation/test_code_switching_compilation.py @@ -0,0 +1,122 @@ +# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +"""Unit and integration tests for the code switching compilation module.""" + +import pytest +from qiskit import QuantumCircuit + +# Adjust imports based on your actual package structure +from mqt.qecc.circuit_compilation import ( + CodeSwitchGraph, + random_universal_circuit, +) +from mqt.qecc.circuit_compilation.compilation_utils import parse_node_id + + +@pytest.fixture +def simple_graph(): + """Fixture for a fresh graph instance.""" + return CodeSwitchGraph() + + +# ============================================================= +# Unit tests + + +def test_parse_node_id(): + """Test the regex parsing of node IDs.""" + q, d = parse_node_id("H_q0_d10") + assert q == 0 + assert d == 10 + + with pytest.raises(ValueError, match="Invalid node_id format"): + parse_node_id("Invalid_String") + + +def test_idle_bonus_logic(simple_graph): + """Test that idle bonus is calculated correctly.""" + # Case 1: Short idle (less than SWITCHING_LENGTH=2) -> 0 bonus + # depths 0 and 2 implies gap of 1 (depth 1 is empty) + bonus = simple_graph.compute_idle_bonus(previous_depth=0, current_depth=2) + assert bonus == 0.0 + + # Case 2: Long idle + # depths 0 and 10 implies gap of 9 + bonus = simple_graph.compute_idle_bonus(previous_depth=0, current_depth=10) + assert bonus > 0 + + # Ensure capacity reduction logic works + cap = simple_graph._edge_capacity_with_idle_bonus([0, 10], base_capacity=1.0) # noqa: SLF001 + assert cap < 1.0 + + +# ============================================================= +# Integration tests + + +def test_simple_switch_constraint(): + """Test a circuit that MUST switch: H (Source) -> T (Sink).""" + qc = QuantumCircuit(1) + qc.h(0) # Source code transversal + qc.t(0) # Sink code transversal + + csg = CodeSwitchGraph() + csg.build_from_qiskit(qc) + + # We expect the cut to sever the link between H and T or source/sink + num_switches, switch_pos, _, _ = csg.compute_min_cut() + + # H -> T requires 1 switch + assert num_switches > 0 + assert len(switch_pos) == 1 + # The switch should likely happen between depth 0 and 1 + assert switch_pos[0][0] == 0 # Qubit 0 + + +def test_same_code_no_switch(): + """Test a circuit that stays in one code: H -> H -> CX.""" + qc = QuantumCircuit(2) + qc.h(0) + qc.h(1) + qc.cx(0, 1) # All compatible with 2D Color Code (Source) + + csg = CodeSwitchGraph() + csg.build_from_qiskit(qc) + + num_switches, switch_pos, _, _ = csg.compute_min_cut() + + # Should flow entirely through Source + assert len(switch_pos) == 0 + assert num_switches == 0.0 + + +# ============================================================= +# Stress tests + + +def test_random_circuits_robustness(): + """Generate random circuits and ensure the compiler runs without error.""" + for seed in range(10): + qc = random_universal_circuit(num_qubits=3, depth=10, seed=seed) + + csg = CodeSwitchGraph() + csg.build_from_qiskit(qc) + + num_switches, switch_pos, S, T = csg.compute_min_cut() # noqa: N806 + + # Invariants + assert len(switch_pos) >= 0 + assert num_switches >= 0 + assert len(S) + len(T) == csg.G.number_of_nodes() + + # Ensure Source is in S and Sink is in T + assert csg.source in S + assert csg.sink in T + + +# ============================================================= From 4d7b7a1ce20791f8d5aa671b3bb839bc912dfab1 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:58:54 +0100 Subject: [PATCH 41/90] repair test for idle bonus --- tests/circuit_compilation/test_code_switching_compilation.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/circuit_compilation/test_code_switching_compilation.py b/tests/circuit_compilation/test_code_switching_compilation.py index f044b1e3a..6f9b0ef4a 100644 --- a/tests/circuit_compilation/test_code_switching_compilation.py +++ b/tests/circuit_compilation/test_code_switching_compilation.py @@ -10,7 +10,6 @@ import pytest from qiskit import QuantumCircuit -# Adjust imports based on your actual package structure from mqt.qecc.circuit_compilation import ( CodeSwitchGraph, random_universal_circuit, @@ -45,10 +44,10 @@ def test_idle_bonus_logic(simple_graph): bonus = simple_graph.compute_idle_bonus(previous_depth=0, current_depth=2) assert bonus == 0.0 - # Case 2: Long idle + # Case 2: Long idle greater than max_bonus # depths 0 and 10 implies gap of 9 bonus = simple_graph.compute_idle_bonus(previous_depth=0, current_depth=10) - assert bonus > 0 + assert bonus == 5 * simple_graph.base_unary_capacity # Ensure capacity reduction logic works cap = simple_graph._edge_capacity_with_idle_bonus([0, 10], base_capacity=1.0) # noqa: SLF001 From a333e5d38eaf1fca225f97b47103ce6935929755 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 21 Nov 2025 13:01:26 +0100 Subject: [PATCH 42/90] redefine api by making functions private --- .../code_switching_compiler.py | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index a87d3a05c..17fcc4fe8 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -54,7 +54,7 @@ def __init__(self, edge_cap_ratio: float = 0.001) -> None: self.edge_cap_ratio: float = edge_cap_ratio self.base_unary_capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY * self.edge_cap_ratio - def add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: + def _add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: """Add a node representing a quantum gate operation. Parameters @@ -75,7 +75,7 @@ def add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: self.G.add_node(node_id, gate=gate_type, qubit=qubit, depth=depth) return node_id - def add_edge_with_capacity( + def _add_edge_with_capacity( self, u: str, v: str, capacity: float, edge_type: str = "temporal", bidirectional: bool = True ) -> None: """Add a directed edge with specified capacity between two nodes. @@ -97,7 +97,7 @@ def add_edge_with_capacity( if bidirectional: self.G.add_edge(v, u, capacity=capacity, edge_type=edge_type) - def add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: + def _add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: """Add an edge of infinite capacity between two nodes. Parameters @@ -109,9 +109,9 @@ def add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: bidirectional : bool, optional If True, add the reverse edge as well (default is True). """ - self.add_edge_with_capacity(u, v, capacity=float("inf"), edge_type="fixed", bidirectional=bidirectional) + self._add_edge_with_capacity(u, v, capacity=float("inf"), edge_type="fixed", bidirectional=bidirectional) - def add_regular_edge( + def _add_regular_edge( self, u: str, v: str, capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY, bidirectional: bool = True ) -> None: """Add a regular (finite-capacity) directed edge. @@ -127,9 +127,9 @@ def add_regular_edge( bidirectional : bool, optional If True, add the reverse edge as well (default is True). """ - self.add_edge_with_capacity(u, v, capacity=capacity, edge_type="temporal", bidirectional=bidirectional) + self._add_edge_with_capacity(u, v, capacity=capacity, edge_type="temporal", bidirectional=bidirectional) - def add_bias_edges(self, node_id: str, biased_code: str = "SRC") -> None: + def _add_bias_edges(self, node_id: str, biased_code: str = "SRC") -> None: """Add biased_code unary edges to the terminal nodes slightly preferring one code over the other. Parameters @@ -138,15 +138,15 @@ def add_bias_edges(self, node_id: str, biased_code: str = "SRC") -> None: Capacity of the biased_code edges to be added. """ if biased_code == "SRC": - self.add_edge_with_capacity( + self._add_edge_with_capacity( self.source, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="unary" ) - self.add_edge_with_capacity(self.sink, node_id, capacity=self.base_unary_capacity, edge_type="unary") + self._add_edge_with_capacity(self.sink, node_id, capacity=self.base_unary_capacity, edge_type="unary") elif biased_code == "SNK": - self.add_edge_with_capacity(self.source, node_id, capacity=self.base_unary_capacity, edge_type="unary") - self.add_edge_with_capacity(self.sink, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="unary") + self._add_edge_with_capacity(self.source, node_id, capacity=self.base_unary_capacity, edge_type="unary") + self._add_edge_with_capacity(self.sink, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="unary") - def connect_to_code(self, node_id: str, gate_type: str) -> None: + def _connect_to_code(self, node_id: str, gate_type: str) -> None: """Connect a gate node to the source and/or sink according to which code can perform the operation transversally. Note: Here we fix the convention that the 2D Color Code corresponds to the source (can perform H and CNOT) @@ -164,12 +164,12 @@ def connect_to_code(self, node_id: str, gate_type: str) -> None: """ # Sink code can perform T and CNOT gates if gate_type == "T": - self.add_infinite_edge(self.sink, node_id) + self._add_infinite_edge(self.sink, node_id) # Source code can perform H and CNOT gates if gate_type == "H": - self.add_infinite_edge(node_id, self.source) + self._add_infinite_edge(node_id, self.source) - def add_cnot_links(self, control_node: str, target_node: str, one_way_transversal_cnot: bool = False) -> None: + def _add_cnot_links(self, control_node: str, target_node: str, one_way_transversal_cnot: bool = False) -> None: """Add bidirectional infinite-capacity edges between two CNOT-related nodes to enforce that both qubits remain in the same code. Parameters @@ -181,7 +181,7 @@ def add_cnot_links(self, control_node: str, target_node: str, one_way_transversa one_way_transversal_cnot : bool, optional If True, allow transversal CNOTs from 3D (control) to 2D (target) besides the usual requirement that both qubits remain in the same code. """ - self.add_infinite_edge(control_node, target_node, bidirectional=not (one_way_transversal_cnot)) + self._add_infinite_edge(control_node, target_node, bidirectional=not (one_way_transversal_cnot)) def compute_idle_bonus(self, previous_depth: int, current_depth: int) -> float: """Compute a bonus (capacity reduction) for idling qubits. @@ -278,20 +278,20 @@ def build_from_qiskit( if gate in {"H", "T"}: q = qubits[0] - gate_node = self.add_gate_node(gate, q, depth) - self.connect_to_code(gate_node, gate) + gate_node = self._add_gate_node(gate, q, depth) + self._connect_to_code(gate_node, gate) if qubit_last_node[q]: - self.add_regular_edge(qubit_last_node[q], gate_node) + self._add_regular_edge(qubit_last_node[q], gate_node) qubit_last_node[q] = gate_node elif gate == "CX": ctrl, tgt = qubits - node_ctrl = self.add_gate_node("CNOTc", ctrl, depth) - node_tgt = self.add_gate_node("CNOTt", tgt, depth) - self.add_cnot_links(node_ctrl, node_tgt, one_way_transversal_cnot=one_way_transversal_cnot) + node_ctrl = self._add_gate_node("CNOTc", ctrl, depth) + node_tgt = self._add_gate_node("CNOTt", tgt, depth) + self._add_cnot_links(node_ctrl, node_tgt, one_way_transversal_cnot=one_way_transversal_cnot) if code_bias: - self.add_bias_edges(node_ctrl) - self.add_bias_edges(node_tgt) + self._add_bias_edges(node_ctrl) + self._add_bias_edges(node_tgt) for q, gate_node in [(ctrl, node_ctrl), (tgt, node_tgt)]: if qubit_last_node[q]: capacity = ( @@ -299,7 +299,7 @@ def build_from_qiskit( if idle_bonus else DEFAULT_TEMPORAL_EDGE_CAPACITY ) - self.add_regular_edge(qubit_last_node[q], gate_node, capacity=capacity) + self._add_regular_edge(qubit_last_node[q], gate_node, capacity=capacity) qubit_last_node[q] = gate_node def compute_min_cut(self) -> tuple[int, list[tuple[int, int]], set[str], set[str]]: @@ -314,10 +314,10 @@ def compute_min_cut(self) -> tuple[int, list[tuple[int, int]], set[str], set[str - T is the complementary set of nodes. """ _, (S, T) = nx.minimum_cut(self.G, self.source, self.sink, capacity="capacity") # noqa: N806 - num_switches, switch_positions = self.extract_switch_locations(S, T) + num_switches, switch_positions = self._extract_switch_locations(S, T) return num_switches, switch_positions, S, T - def extract_switch_locations(self, S: set[str], T: set[str]) -> tuple[int, list[tuple[int, int]]]: # noqa: N803 + def _extract_switch_locations(self, S: set[str], T: set[str]) -> tuple[int, list[tuple[int, int]]]: # noqa: N803 """Return a list of (qubit, depth) pairs where switches should be inserted.""" switch_positions = [] seen = set() From 1d90c17106cde9722cb47a561ff4e17adcbf513e Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 21 Nov 2025 13:47:52 +0100 Subject: [PATCH 43/90] add full function docstring extract switch locations --- .../code_switching_compiler.py | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 17fcc4fe8..cc8562294 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -318,7 +318,25 @@ def compute_min_cut(self) -> tuple[int, list[tuple[int, int]], set[str], set[str return num_switches, switch_positions, S, T def _extract_switch_locations(self, S: set[str], T: set[str]) -> tuple[int, list[tuple[int, int]]]: # noqa: N803 - """Return a list of (qubit, depth) pairs where switches should be inserted.""" + """Return a list of (qubit, depth) pairs where switches should be inserted. + + Parameters: + ---------- + S : set[str] + Set of nodes reachable from the source after min-cut. + T : set[str] + Complementary set of nodes after min-cut. + + Returns: + ------- + Tuple[int, List[Tuple[int, int]]] + A tuple (num_switches, switch_positions) where: + - num_switches is the total number of switches detected, + - switch_positions is a list of (qubit, depth) pairs indicating where switches occur. + Here, 'qubit' is the qubit index and 'depth' is the temporal position of the gate in terms of number of gates per qubit. + So, a depth of 3 means that this is the 3rd single qubit gate position on that qubit line. + That means a switch should be inserted just after that depth layer on that qubit. + """ switch_positions = [] seen = set() for u, v, data in self.G.edges(data=True): From 1af4cd8b10597cfe206ce43fa239a0b9a071a1ce Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 21 Nov 2025 13:49:21 +0100 Subject: [PATCH 44/90] add one way transversal test --- .../test_code_switching_compilation.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/circuit_compilation/test_code_switching_compilation.py b/tests/circuit_compilation/test_code_switching_compilation.py index 6f9b0ef4a..ff396fcf4 100644 --- a/tests/circuit_compilation/test_code_switching_compilation.py +++ b/tests/circuit_compilation/test_code_switching_compilation.py @@ -94,6 +94,30 @@ def test_same_code_no_switch(): assert num_switches == 0.0 +def test_one_way_transversal(): + """Test capability to cover one-way transversal gates.""" + qc = QuantumCircuit(2) + qc.t(0) + qc.h(1) + qc.cx(0, 1) + + csg = CodeSwitchGraph() + csg.build_from_qiskit(qc) + num_switches, switch_pos, _, _ = csg.compute_min_cut() + + # We expect at least one switch due to T gate + assert num_switches == 1 + assert switch_pos == [(0, 0)] # Switch on qubit 0 at depth 0 + + csg = CodeSwitchGraph() + csg.build_from_qiskit(qc, one_way_transversal_cnot=True) + num_switches, switch_pos, _, _ = csg.compute_min_cut() + + # Now, no switches should be needed + assert num_switches == 0 + assert switch_pos == [] # Switch on qubit 0 at depth 0 + + # ============================================================= # Stress tests From 82fdcf15a710e6ebcb05998c5c168f81597161f0 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 21 Nov 2025 14:23:49 +0100 Subject: [PATCH 45/90] add CompilerConfig for different settings and keep it tidy --- .../code_switching_compiler.py | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index cc8562294..a096c5c06 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -9,6 +9,7 @@ from __future__ import annotations +from dataclasses import dataclass from typing import TYPE_CHECKING import networkx as nx @@ -19,8 +20,15 @@ if TYPE_CHECKING: from qiskit import QuantumCircuit -DEFAULT_TEMPORAL_EDGE_CAPACITY = 1.0 -SWITCHING_LENGTH = 2 # minimum idle length before considering a bonus + +@dataclass +class CompilerConfig: + """Holds all configuration parameters for the CodeSwitchGraph.""" + + edge_cap_ratio: float = 0.001 + default_temporal_edge_capacity: float = 1.0 + switching_length: int = 2 + biased_code: str = "SRC" class CodeSwitchGraph: @@ -44,15 +52,19 @@ class CodeSwitchGraph: Identifier for the sink node ("SNK"). """ - def __init__(self, edge_cap_ratio: float = 0.001) -> None: + def __init__(self, config: CompilerConfig | None = None) -> None: """Initialize the CodeSwitchGraph with source and sink nodes.""" + if config is None: + self.config = CompilerConfig() + else: + self.config = config + self.G: nx.DiGraph = nx.DiGraph() self.source: str = "SRC" self.sink: str = "SNK" self.G.add_node(self.source) self.G.add_node(self.sink) - self.edge_cap_ratio: float = edge_cap_ratio - self.base_unary_capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY * self.edge_cap_ratio + self.base_unary_capacity: float = self.config.default_temporal_edge_capacity * self.config.edge_cap_ratio def _add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: """Add a node representing a quantum gate operation. @@ -111,9 +123,7 @@ def _add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None """ self._add_edge_with_capacity(u, v, capacity=float("inf"), edge_type="fixed", bidirectional=bidirectional) - def _add_regular_edge( - self, u: str, v: str, capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY, bidirectional: bool = True - ) -> None: + def _add_regular_edge(self, u: str, v: str, capacity: float | None = None, bidirectional: bool = True) -> None: """Add a regular (finite-capacity) directed edge. Parameters @@ -127,6 +137,8 @@ def _add_regular_edge( bidirectional : bool, optional If True, add the reverse edge as well (default is True). """ + if capacity is None: + capacity = self.config.default_temporal_edge_capacity self._add_edge_with_capacity(u, v, capacity=capacity, edge_type="temporal", bidirectional=bidirectional) def _add_bias_edges(self, node_id: str, biased_code: str = "SRC") -> None: @@ -204,15 +216,13 @@ def compute_idle_bonus(self, previous_depth: int, current_depth: int) -> float: """ idle_length = max(0, current_depth - previous_depth - 1) - if idle_length <= SWITCHING_LENGTH: + if idle_length <= self.config.switching_length: idle_length = 0 max_bonus = 5 return min(max_bonus, idle_length) * self.base_unary_capacity - def _edge_capacity_with_idle_bonus( - self, depths: list[int], base_capacity: float = DEFAULT_TEMPORAL_EDGE_CAPACITY - ) -> float: + def _edge_capacity_with_idle_bonus(self, depths: list[int], base_capacity: float | None = None) -> float: """Compute the effective temporal edge capacity. Optionally reduced by an idle bonus if the qubit has been inactive for several layers. @@ -229,6 +239,8 @@ def _edge_capacity_with_idle_bonus( float The adjusted edge capacity, ensuring a lower bound of 1.0. """ + if base_capacity is None: + base_capacity = self.config.default_temporal_edge_capacity if len(depths) < 2: return base_capacity @@ -297,7 +309,7 @@ def build_from_qiskit( capacity = ( self._edge_capacity_with_idle_bonus(qubit_activity[q]) if idle_bonus - else DEFAULT_TEMPORAL_EDGE_CAPACITY + else self.config.default_temporal_edge_capacity ) self._add_regular_edge(qubit_last_node[q], gate_node, capacity=capacity) qubit_last_node[q] = gate_node From e73f6fc455e47075dffff67b165e57567f407858 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 21 Nov 2025 14:59:02 +0100 Subject: [PATCH 46/90] add CompilerConfig to init --- src/mqt/qecc/circuit_compilation/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/__init__.py b/src/mqt/qecc/circuit_compilation/__init__.py index 1f2750144..bb0364e6e 100644 --- a/src/mqt/qecc/circuit_compilation/__init__.py +++ b/src/mqt/qecc/circuit_compilation/__init__.py @@ -9,7 +9,13 @@ from __future__ import annotations -from .code_switching_compiler import CodeSwitchGraph +from .code_switching_compiler import CodeSwitchGraph, CompilerConfig from .compilation_utils import count_code_switches, insert_switch_placeholders, random_universal_circuit -__all__ = ["CodeSwitchGraph", "count_code_switches", "insert_switch_placeholders", "random_universal_circuit"] +__all__ = [ + "CodeSwitchGraph", + "CompilerConfig", + "count_code_switches", + "insert_switch_placeholders", + "random_universal_circuit", +] From 5c8f2ec5ea941b3a85a8b131bf844f5703bc5562 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 21 Nov 2025 15:18:56 +0100 Subject: [PATCH 47/90] connect biased code to CompilerConfig --- src/mqt/qecc/circuit_compilation/code_switching_compiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index a096c5c06..c94962f3d 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -141,7 +141,7 @@ def _add_regular_edge(self, u: str, v: str, capacity: float | None = None, bidir capacity = self.config.default_temporal_edge_capacity self._add_edge_with_capacity(u, v, capacity=capacity, edge_type="temporal", bidirectional=bidirectional) - def _add_bias_edges(self, node_id: str, biased_code: str = "SRC") -> None: + def _add_bias_edges(self, node_id: str, biased_code: str | None = None) -> None: """Add biased_code unary edges to the terminal nodes slightly preferring one code over the other. Parameters @@ -149,6 +149,8 @@ def _add_bias_edges(self, node_id: str, biased_code: str = "SRC") -> None: biased_code : float Capacity of the biased_code edges to be added. """ + if biased_code is None: + biased_code = self.config.biased_code if biased_code == "SRC": self._add_edge_with_capacity( self.source, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="unary" From ffc13755b013b65329bf9a127481f8c12c8dc148 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 21 Nov 2025 15:19:32 +0100 Subject: [PATCH 48/90] add code bias test --- .../test_code_switching_compilation.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/circuit_compilation/test_code_switching_compilation.py b/tests/circuit_compilation/test_code_switching_compilation.py index ff396fcf4..4fd5e4f92 100644 --- a/tests/circuit_compilation/test_code_switching_compilation.py +++ b/tests/circuit_compilation/test_code_switching_compilation.py @@ -14,6 +14,7 @@ CodeSwitchGraph, random_universal_circuit, ) +from mqt.qecc.circuit_compilation.code_switching_compiler import CompilerConfig from mqt.qecc.circuit_compilation.compilation_utils import parse_node_id @@ -118,6 +119,32 @@ def test_one_way_transversal(): assert switch_pos == [] # Switch on qubit 0 at depth 0 +def test_code_bias(): + """Test code bias effects switching positions.""" + qc = QuantumCircuit(2) + qc.t(0) + qc.h(1) + qc.cx(0, 1) + + # Check min-cuts build in source bias + csg = CodeSwitchGraph() + csg.build_from_qiskit(qc) + num_switches_source_bias, switch_pos_source_bias, _, _ = csg.compute_min_cut() + + assert num_switches_source_bias == 1 + assert switch_pos_source_bias == [(0, 0)] + + # To equalize min-cuts build in source bias, change CompilerConfig to bias sink. + config = CompilerConfig(biased_code="SNK") + csg = CodeSwitchGraph(config=config) + csg.build_from_qiskit(qc, code_bias=True) + num_switches_sink_bias, switch_pos_sink_bias, _, _ = csg.compute_min_cut() + + assert num_switches_sink_bias == 1 + assert switch_pos_sink_bias != switch_pos_source_bias + assert switch_pos_sink_bias == [(1, 0)] + + # ============================================================= # Stress tests From 42ae8cf6cff13466790838f5290b5f7e80066fd3 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Sun, 23 Nov 2025 15:38:29 +0100 Subject: [PATCH 49/90] add test for compilation utils --- .../test_compilation_utils.py | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 tests/circuit_compilation/test_compilation_utils.py diff --git a/tests/circuit_compilation/test_compilation_utils.py b/tests/circuit_compilation/test_compilation_utils.py new file mode 100644 index 000000000..b7d78ecff --- /dev/null +++ b/tests/circuit_compilation/test_compilation_utils.py @@ -0,0 +1,162 @@ +# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +"""Tests for utility functions in compilation_utils.""" + +import pytest +from qiskit import QuantumCircuit + +from mqt.qecc.circuit_compilation.compilation_utils import ( + count_code_switches, + insert_switch_placeholders, +) + +# ============================================================================== +# Tests for count_code_switches +# ============================================================================== + + +def test_count_switches_single_qubit_simple(): + """Test simple H -> T transition on a single qubit.""" + qc = QuantumCircuit(1) + qc.h(0) # Code A + qc.t(0) # Code B -> Expect 1 switch + + count, final_codes = count_code_switches(qc) + + assert count == 1 + assert final_codes[0] == "B" + + +def test_count_switches_no_switch_needed(): + """Test a sequence that stays within one code.""" + qc = QuantumCircuit(2) + qc.h(0) + qc.cx(0, 1) # H and CX are both supported by Code A + + count, final_codes = count_code_switches(qc) + + assert count == 0 + assert final_codes[0] == "A" + assert final_codes[1] == "A" + + +def test_count_switches_cnot_synchronization(): + """Test that CNOT forces qubits into the same code.""" + qc = QuantumCircuit(2) + # Q0 starts in Code A (H gate) + qc.h(0) + # Q1 starts in Code B (T gate) + qc.t(1) + + # CNOT requires them to be in the SAME code. + # The implementation defaults to switching to A if possible, or B. + # Here, one of them MUST switch. + qc.cx(0, 1) + + count, _ = count_code_switches(qc) + assert count == 1 + + +def test_count_switches_invalid_gate(): + """Test that an unsupported gate raises ValueError.""" + qc = QuantumCircuit(1) + qc.x(0) # 'x' is not in the defined sets for Code A or B in the utils + + with pytest.raises(ValueError, match="not supported by any code"): + count_code_switches(qc) + + +def test_count_switches_ignore_id(): + """Test that ID gates do not trigger initialization or switches.""" + qc = QuantumCircuit(1) + qc.id(0) # Should be ignored + qc.h(0) # Sets code to A + qc.id(0) # Should be ignored + qc.h(0) # Still A + + count, _ = count_code_switches(qc) + assert count == 0 + + +# ============================================================================== +# Tests for insert_switch_placeholders +# ============================================================================== + + +def test_insert_placeholders_increases_depth(): + """Test that inserting placeholders actually changes the circuit.""" + qc = QuantumCircuit(1) + qc.h(0) + qc.t(0) + + # Original Depth is 2 + original_depth = qc.depth() + + # Insert a placeholder after layer 0 (the H gate) + # This usually adds 'id' gates. + new_qc = insert_switch_placeholders(qc, switch_positions=[(0, 0)], placeholder_depth=1) + + # New depth should be Original + Placeholder Depth + assert new_qc.depth() == original_depth + 1 + # Ensure the circuit name is updated + assert new_qc.name == qc.name + "_with_switches" + + +def test_insert_placeholders_correct_location(): + """Verify placeholders are inserted on the correct qubit.""" + qc = QuantumCircuit(2) + qc.h(0) + qc.h(1) + # Both H gates are likely in Layer 0 of the DAG + + # Insert placeholder ONLY on qubit 1 at layer 0 + new_qc = insert_switch_placeholders(qc, switch_positions=[(1, 0)], placeholder_depth=5) + + # Qubit 0 should remain depth 1 (just the H) + # Qubit 1 should be depth 1 (H) + 5 (IDs) = 6 + # Note: Qiskit depth calculation can be tricky with IDs, + # so we check the operations count on the specific qubit. + + ops_q0 = new_qc.data[0].operation.name # Should be H + assert ops_q0 == "h" + + # We can simply count the number of 'id' gates in the circuit + # We expect exactly 5 id gates (all on qubit 1) + id_count = sum(1 for instr in new_qc.data if instr.operation.name == "id") + assert id_count == 5 + + +def test_insert_placeholders_out_of_bounds(): + """Test behavior when insertion index is beyond the last layer.""" + qc = QuantumCircuit(1) + qc.h(0) # Layer 0 + + # Request insertion at Layer 99 + # Logic dictates it should append at the end + new_qc = insert_switch_placeholders(qc, switch_positions=[(0, 99)], placeholder_depth=1) + + # Should have H then ID + assert new_qc.data[-1].operation.name == "id" + assert new_qc.depth() == 2 + + +def test_insert_multiple_placeholders(): + """Test inserting multiple placeholders at different layers.""" + qc = QuantumCircuit(1) + qc.h(0) # Layer 0 + qc.t(0) # Layer 1 + + # Insert after H and after T + new_qc = insert_switch_placeholders(qc, switch_positions=[(0, 0), (0, 1)], placeholder_depth=1) + + # Original (2) + 2 placeholders = 4 + assert new_qc.depth() == 4 + + # Verify order: H -> ID -> T -> ID + op_names = [instr.operation.name for instr in new_qc.data] + assert op_names == ["h", "id", "t", "id"] From 2e4e5882fb14cd4c21228a2e8b17f39abf047aba Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Sun, 23 Nov 2025 21:42:55 +0100 Subject: [PATCH 50/90] remove dag layer visualization used for debugging previously --- .../circuit_compilation/compilation_utils.py | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/circuit_compilation/compilation_utils.py index f33fc1ae5..36b7e7f7a 100644 --- a/src/mqt/qecc/circuit_compilation/compilation_utils.py +++ b/src/mqt/qecc/circuit_compilation/compilation_utils.py @@ -200,40 +200,6 @@ def parse_node_id(node_id: str) -> tuple[int, int]: return qubit, depth -def inspect_serial_layers(circuit: QuantumCircuit) -> list[dict[str, object]]: - """Return a lightweight description of `dag.layers()` for debugging. - - Each list element corresponds to one serial layer and contains: - - 'ops': list of (op.name, [qubit indices touched]) tuples for the layer. - - Parameters - ---------- - circuit : QuantumCircuit - Circuit to inspect. - - Returns: - ------- - List[Dict] - A list describing each layer. Use this to confirm layer indices and which - qubits are active in each layer. - """ - dag = circuit_to_dag(circuit) - layers = list(dag.layers()) - layers_descr = [] - - for layer_idx, layer in enumerate(layers): - layer_graph = layer["graph"] - ops_in_layer = [] - for node in layer_graph.op_nodes(): - assert isinstance(node, DAGOpNode) - # map Qubit objects to their indices in the original circuit - q_indices = [circuit.find_bit(q).index for q in node.qargs] if node.qargs else [] - ops_in_layer.append((getattr(node.op, "name", repr(node.op)), q_indices)) - layers_descr.append({"layer_index": layer_idx, "ops": ops_in_layer}) - - return layers_descr - - def insert_switch_placeholders( circuit: QuantumCircuit, switch_positions: list[tuple[int, int]], From 76a26498d06c8da1c3e62668a419fb29b8edac32 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 26 Nov 2025 10:45:51 +0100 Subject: [PATCH 51/90] work in CodeRabbitAI code review --- .../cs_compiler/generate_random_circuits.py | 9 ++++++--- scripts/cs_compiler/run_generate_circuits.sh | 9 ++++----- .../simulate_circuit_performance.py | 17 ++++++++++------- .../code_switching_compiler.py | 18 ++++++++++-------- .../circuit_compilation/compilation_utils.py | 2 +- 5 files changed, 31 insertions(+), 24 deletions(-) diff --git a/scripts/cs_compiler/generate_random_circuits.py b/scripts/cs_compiler/generate_random_circuits.py index 2ef4679e7..d126258a4 100644 --- a/scripts/cs_compiler/generate_random_circuits.py +++ b/scripts/cs_compiler/generate_random_circuits.py @@ -21,7 +21,6 @@ from qiskit.qasm2 import dumps -# Import your circuit generator (adjust this import!) from mqt.qecc.circuit_compilation import random_universal_circuit @@ -44,6 +43,10 @@ def generate_circuits(n: int, num_circuits: int, output_dir: Path, gate_distr_ty "cx_heavy": {"h": 0.1, "t": 0.1, "cx": 0.3, "id": 0.5}, } + if gate_distr_type not in gate_probs_options: + msg = f"Invalid gate_distr_type '{gate_distr_type}'. Must be one of: {list(gate_probs_options.keys())}" + raise ValueError(msg) + print(f"Generating {num_circuits} {gate_distr_type} circuits for n={n}, depth={depth}...") skipped = 0 @@ -65,8 +68,8 @@ def generate_circuits(n: int, num_circuits: int, output_dir: Path, gate_distr_ty generated += 1 - if seed % 50 == 0: - print(f" → Generated {seed}/{num_circuits}") + if (seed + 1) % 50 == 0 or seed == 0: + print(f" → Generated {seed + 1}/{num_circuits}") print(f"🟢 Finished: {generated} new circuits generated, {skipped} skipped.") print(f"Saved in: {folder}") diff --git a/scripts/cs_compiler/run_generate_circuits.sh b/scripts/cs_compiler/run_generate_circuits.sh index b3a3b0f02..892703c8f 100644 --- a/scripts/cs_compiler/run_generate_circuits.sh +++ b/scripts/cs_compiler/run_generate_circuits.sh @@ -6,10 +6,7 @@ # # Licensed under the MIT License -# Copyright ... -# SPDX-License-Identifier: MIT -# -# Generate random universal circuits for different system sizes in parallel. +"""Generate random universal circuits for different system sizes in parallel.""" # declare -a n_values=("64" "128" "256" "512") # declare -a n_values=("64" "128" "192" "256" "320" "384" "448" "512") @@ -20,11 +17,13 @@ done declare -a distr_types=("even" "cx_heavy") num_circuits=100 export num_circuits +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +export SCRIPT_DIR run_and_generate() { local n=$1 local distr_type=$2 - python generate_random_circuits.py --n "$n" --num_circuits "$num_circuits" --distr_type "$distr_type" + python "${SCRIPT_DIR}/generate_random_circuits.py" --n "$n" --num_circuits "$num_circuits" } export -f run_and_generate diff --git a/scripts/cs_compiler/simulate_circuit_performance.py b/scripts/cs_compiler/simulate_circuit_performance.py index 56ee0375b..1901d8e56 100644 --- a/scripts/cs_compiler/simulate_circuit_performance.py +++ b/scripts/cs_compiler/simulate_circuit_performance.py @@ -5,13 +5,15 @@ # # Licensed under the MIT License -"""Simulate existing QASM circuits and record results to CSV. +r"""Simulate existing QASM circuits and record results to CSV. -Each circuit is loaded from a folder structure like: - circuits/{n}/{n}_{seed}.qasm +Each circuit is loaded from a QASM file path given via ``--qasm_path``, e.g. + circuits_performance_benchmarking/{n}/{n}_{seed}.qasm Example: - python simulate_circuits.py --n 128 --input_dir circuits --output_csv results_128.csv + python simulate_circuit_performance.py \\ + --qasm_path circuits_performance_benchmarking/128/128_0.qasm \\ + --n 128 --seed 0 --output_csv results_performance_benchmarking/results_128.csv """ from __future__ import annotations @@ -32,6 +34,7 @@ def append_to_csv(csv_path: Path, row: dict) -> None: """Append a row to a CSV file, creating it with headers if it doesn't exist.""" + csv_path.parent.mkdir(parents=True, exist_ok=True) write_header = not csv_path.exists() with csv_path.open("a", newline="", encoding="utf-8") as f: writer = csv.DictWriter(f, fieldnames=row.keys()) @@ -63,9 +66,9 @@ def run_trial(qc: QuantumCircuit, n_qubits: int, depth: int, seed: int, probs_ty builder = CodeSwitchGraph() builder.build_from_qiskit(qc, one_way_transversal_cnot=True) - t0_mincut = time.time() + t0_mincut_solver = time.time() switches_mc, _, _, _ = builder.compute_min_cut() - t1_mincut = time.time() + t1_mincut_solver = time.time() return { "n_qubits": n_qubits, @@ -77,7 +80,7 @@ def run_trial(qc: QuantumCircuit, n_qubits: int, depth: int, seed: int, probs_ty "abs_saving": naive - switches_mc, "rel_saving": (naive - switches_mc) / naive if naive > 0 else None, "t_naive": t1_lookahead - t0_lookahead, - "t_mincut": t1_mincut - t0_mincut, + "t_mincut_solver": t1_mincut_solver - t0_mincut_solver, } diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index c94962f3d..83d41a2fa 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -37,8 +37,8 @@ class CodeSwitchGraph: The graph is constructed such that: - Each quantum operation (T, H, CNOT) corresponds to one or more nodes. - Source (SRC) and sink (SNK) nodes represent two different codes: - * Source-connected nodes (H, CNOT) → operations that can be done transversally in code a 2D Color Code. - * Sink-connected nodes (T, CNOT) → operations that can be done transversally in code a 3D Color Code. + * Source-connected nodes (H, CNOT) → operations that can be done transversally in a 2D Color Code. + * Sink-connected nodes (T, CNOT) → operations that can be done transversally in a 3D Surface Code. - Infinite-capacity edges enforce code consistency between operations (e.g., CNOT links). - Finite-capacity (temporal) edges represent potential code transitions along qubit timelines. @@ -88,7 +88,7 @@ def _add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: return node_id def _add_edge_with_capacity( - self, u: str, v: str, capacity: float, edge_type: str = "temporal", bidirectional: bool = True + self, u: str, v: str, capacity: float, edge_type: str = "temporal", *, bidirectional: bool = True ) -> None: """Add a directed edge with specified capacity between two nodes. @@ -109,7 +109,7 @@ def _add_edge_with_capacity( if bidirectional: self.G.add_edge(v, u, capacity=capacity, edge_type=edge_type) - def _add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None: + def _add_infinite_edge(self, u: str, v: str, *, bidirectional: bool = True) -> None: """Add an edge of infinite capacity between two nodes. Parameters @@ -123,7 +123,7 @@ def _add_infinite_edge(self, u: str, v: str, bidirectional: bool = True) -> None """ self._add_edge_with_capacity(u, v, capacity=float("inf"), edge_type="fixed", bidirectional=bidirectional) - def _add_regular_edge(self, u: str, v: str, capacity: float | None = None, bidirectional: bool = True) -> None: + def _add_regular_edge(self, u: str, v: str, capacity: float | None = None, *, bidirectional: bool = True) -> None: """Add a regular (finite-capacity) directed edge. Parameters @@ -183,7 +183,7 @@ def _connect_to_code(self, node_id: str, gate_type: str) -> None: if gate_type == "H": self._add_infinite_edge(node_id, self.source) - def _add_cnot_links(self, control_node: str, target_node: str, one_way_transversal_cnot: bool = False) -> None: + def _add_cnot_links(self, control_node: str, target_node: str, *, one_way_transversal_cnot: bool = False) -> None: """Add bidirectional infinite-capacity edges between two CNOT-related nodes to enforce that both qubits remain in the same code. Parameters @@ -239,7 +239,7 @@ def _edge_capacity_with_idle_bonus(self, depths: list[int], base_capacity: float Returns: ------- float - The adjusted edge capacity, ensuring a lower bound of 1.0. + The adjusted edge capacity. """ if base_capacity is None: base_capacity = self.config.default_temporal_edge_capacity @@ -253,6 +253,7 @@ def _edge_capacity_with_idle_bonus(self, depths: list[int], base_capacity: float def build_from_qiskit( self, circuit: QuantumCircuit, + *, one_way_transversal_cnot: bool = False, code_bias: bool = False, idle_bonus: bool = False, @@ -268,7 +269,8 @@ def build_from_qiskit( code_bias : bool, optional If True, add bias edges for CNOT nodes. idle_bonus : bool, optional - If True, apply idle bonuses to temporal edges. + If True, reduce temporal edge capacities based on idle durations via + `_edge_capacity_with_idle_bonus`. Default is False. Notes: ----- diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/circuit_compilation/compilation_utils.py index 36b7e7f7a..d0337f04c 100644 --- a/src/mqt/qecc/circuit_compilation/compilation_utils.py +++ b/src/mqt/qecc/circuit_compilation/compilation_utils.py @@ -26,7 +26,7 @@ def random_universal_circuit( Args: num_qubits (int): Number of qubits in the circuit. depth (int): Number of layers. - gate_probs (dict): Probabilities for each gate, e.g. {"h": 0.3, "t": 0.3, "cx": 0.2, "id": 0.2}. + gate_probs (dict): Probabilities for each gate, e.g. {"h": 0.3, "t": 0.3, "cx": 0.2, "id": 0.2}. All gates (h, t, cx, id) must be present. seed (int, optional): RNG seed for reproducibility. Returns: From 3c23ca5a988d59da824c84e04270f796ce7caeff Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 26 Nov 2025 14:15:19 +0100 Subject: [PATCH 52/90] fix more CodeRabbitAIs comments --- .../qecc/circuit_compilation/code_switching_compiler.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 83d41a2fa..b71039108 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -110,7 +110,7 @@ def _add_edge_with_capacity( self.G.add_edge(v, u, capacity=capacity, edge_type=edge_type) def _add_infinite_edge(self, u: str, v: str, *, bidirectional: bool = True) -> None: - """Add an edge of infinite capacity between two nodes. + """Add an edge of infinite capacity between two nodes. Possibly bidirectional. Parameters ---------- @@ -323,9 +323,10 @@ def compute_min_cut(self) -> tuple[int, list[tuple[int, int]], set[str], set[str Returns: ------- - Tuple[float, Set[str], Set[str]] - A tuple (cut_value, S, T) where: - - cut_value is the total capacity of the minimum cut, + tuple[int, list[tuple[int, int]], set[str], set[str]] + A tuple (num_switches, switch_positions, S, T) where: + - num_switches is the count of temporal edges crossing the cut (number of code switches), + - switch_positions is a list of (qubit, depth) pairs where switches occur, - S is the set of nodes reachable from the source, - T is the complementary set of nodes. """ From 0ffd8f10757025638ab1520183cb9ba46e1cac0b Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 28 Nov 2025 13:55:21 +0100 Subject: [PATCH 53/90] rename variables in scripts --- scripts/cs_compiler/run_generate_circuits.sh | 4 ++-- .../qecc/circuit_compilation/code_switching_compiler.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/cs_compiler/run_generate_circuits.sh b/scripts/cs_compiler/run_generate_circuits.sh index 892703c8f..8742dbedb 100644 --- a/scripts/cs_compiler/run_generate_circuits.sh +++ b/scripts/cs_compiler/run_generate_circuits.sh @@ -6,7 +6,7 @@ # # Licensed under the MIT License -"""Generate random universal circuits for different system sizes in parallel.""" +# Generate random universal circuits for different system sizes in parallel. # declare -a n_values=("64" "128" "256" "512") # declare -a n_values=("64" "128" "192" "256" "320" "384" "448" "512") @@ -23,7 +23,7 @@ export SCRIPT_DIR run_and_generate() { local n=$1 local distr_type=$2 - python "${SCRIPT_DIR}/generate_random_circuits.py" --n "$n" --num_circuits "$num_circuits" + python "${SCRIPT_DIR}/generate_random_circuits.py" --n "$n" --num_circuits "$num_circuits" --distr_type "$distr_type" } export -f run_and_generate diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index b71039108..fa9fcfeb9 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -25,9 +25,9 @@ class CompilerConfig: """Holds all configuration parameters for the CodeSwitchGraph.""" - edge_cap_ratio: float = 0.001 + edge_capacity_ratio: float = 0.001 default_temporal_edge_capacity: float = 1.0 - switching_length: int = 2 + switching_time: int = 2 biased_code: str = "SRC" @@ -64,7 +64,7 @@ def __init__(self, config: CompilerConfig | None = None) -> None: self.sink: str = "SNK" self.G.add_node(self.source) self.G.add_node(self.sink) - self.base_unary_capacity: float = self.config.default_temporal_edge_capacity * self.config.edge_cap_ratio + self.base_unary_capacity: float = self.config.default_temporal_edge_capacity * self.config.edge_capacity_ratio def _add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: """Add a node representing a quantum gate operation. @@ -218,7 +218,7 @@ def compute_idle_bonus(self, previous_depth: int, current_depth: int) -> float: """ idle_length = max(0, current_depth - previous_depth - 1) - if idle_length <= self.config.switching_length: + if idle_length <= self.config.switching_time: idle_length = 0 max_bonus = 5 From 6cb8917df2a5b41a44a235563861305ca01737fc Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Fri, 28 Nov 2025 13:57:32 +0100 Subject: [PATCH 54/90] rename class to MinimalCodeSwitchingCompiler --- scripts/cs_compiler/simulate_circuit_performance.py | 11 +++++------ src/mqt/qecc/circuit_compilation/__init__.py | 4 ++-- .../circuit_compilation/code_switching_compiler.py | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/cs_compiler/simulate_circuit_performance.py b/scripts/cs_compiler/simulate_circuit_performance.py index 1901d8e56..432a9e51d 100644 --- a/scripts/cs_compiler/simulate_circuit_performance.py +++ b/scripts/cs_compiler/simulate_circuit_performance.py @@ -26,7 +26,7 @@ from qiskit.qasm2 import loads -from mqt.qecc.circuit_compilation import CodeSwitchGraph, count_code_switches +from mqt.qecc.circuit_compilation import MinimalCodeSwitchingCompiler, count_code_switches if TYPE_CHECKING: from qiskit.circuit import QuantumCircuit @@ -51,7 +51,6 @@ def already_done(csv_path: Path, seed: int) -> bool: with csv_path.open("r", newline="", encoding="utf-8") as f: reader = csv.DictReader(f) for row in reader: - # safe integer comparison if int(row["seed"]) == seed: return True return False @@ -59,11 +58,11 @@ def already_done(csv_path: Path, seed: int) -> bool: def run_trial(qc: QuantumCircuit, n_qubits: int, depth: int, seed: int, probs_type: str) -> dict: """Run a single trial comparing naive and min-cut code switch counting.""" - t0_lookahead = time.time() + t0_naive = time.time() naive = count_code_switches(qc)[0] - t1_lookahead = time.time() + t1_naive = time.time() - builder = CodeSwitchGraph() + builder = MinimalCodeSwitchingCompiler() builder.build_from_qiskit(qc, one_way_transversal_cnot=True) t0_mincut_solver = time.time() @@ -79,7 +78,7 @@ def run_trial(qc: QuantumCircuit, n_qubits: int, depth: int, seed: int, probs_ty "mincut": switches_mc, "abs_saving": naive - switches_mc, "rel_saving": (naive - switches_mc) / naive if naive > 0 else None, - "t_naive": t1_lookahead - t0_lookahead, + "t_naive": t1_naive - t0_naive, "t_mincut_solver": t1_mincut_solver - t0_mincut_solver, } diff --git a/src/mqt/qecc/circuit_compilation/__init__.py b/src/mqt/qecc/circuit_compilation/__init__.py index bb0364e6e..1f42f7ab8 100644 --- a/src/mqt/qecc/circuit_compilation/__init__.py +++ b/src/mqt/qecc/circuit_compilation/__init__.py @@ -9,12 +9,12 @@ from __future__ import annotations -from .code_switching_compiler import CodeSwitchGraph, CompilerConfig +from .code_switching_compiler import CompilerConfig, MinimalCodeSwitchingCompiler from .compilation_utils import count_code_switches, insert_switch_placeholders, random_universal_circuit __all__ = [ - "CodeSwitchGraph", "CompilerConfig", + "MinimalCodeSwitchingCompiler", "count_code_switches", "insert_switch_placeholders", "random_universal_circuit", diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index fa9fcfeb9..3cd99c29e 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -31,7 +31,7 @@ class CompilerConfig: biased_code: str = "SRC" -class CodeSwitchGraph: +class MinimalCodeSwitchingCompiler: """A directed graph representation of a quantum circuit for code-switching analysis using min-cut / max-flow optimization. The graph is constructed such that: From 2defa2d886166c94bf3805a90f8506c8a9336b6f Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 13:08:57 +0100 Subject: [PATCH 55/90] generalise Graph construction before we hard coded 2D and 3D color codes with only H,T,CX gates. Now when initialising the Graph we require that the two transversal gate sets are provided. And based on that we create the graph. This allows for different structures. --- .../code_switching_compiler.py | 165 +++++++++++++----- .../test_code_switching_compilation.py | 59 +++---- 2 files changed, 145 insertions(+), 79 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 3cd99c29e..a6635c6c1 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -19,6 +19,7 @@ if TYPE_CHECKING: from qiskit import QuantumCircuit + from qiskit.dagcircuit import DAGOpNode @dataclass @@ -35,15 +36,27 @@ class MinimalCodeSwitchingCompiler: """A directed graph representation of a quantum circuit for code-switching analysis using min-cut / max-flow optimization. The graph is constructed such that: - - Each quantum operation (T, H, CNOT) corresponds to one or more nodes. + - Each quantum operation (e.g. T, H, CNOT) corresponds to one or more nodes. - Source (SRC) and sink (SNK) nodes represent two different codes: - * Source-connected nodes (H, CNOT) → operations that can be done transversally in a 2D Color Code. - * Sink-connected nodes (T, CNOT) → operations that can be done transversally in a 3D Surface Code. + * Source-connected nodes (e.g. H, CNOT) → operations that can be done transversally in a 2D Color Code. + * Sink-connected nodes (e.g. T, CNOT) → operations that can be done transversally in a 3D Surface Code. - Infinite-capacity edges enforce code consistency between operations (e.g., CNOT links). - Finite-capacity (temporal) edges represent potential code transitions along qubit timelines. Attributes: ---------- + gate_set_source : set[str] + Set of gate types supported by code A (e.g., 2D Color Code). + This gate set is associated with the source node. + Should be provided as a set of strings, e.g., {"H", "CNOT"}. + gate_set_sink : set[str] + Set of gate types supported by code B (e.g., 3D Surface Code). + This gate set is associated with the sink node. + Should be provided as a set of strings, e.g., {"T", "CNOT"}. + common_gates : set[str] + Set of gate types that can be performed transversally in both codes. + config : CompilerConfig + Configuration parameters for the compiler. G : nx.DiGraph Directed graph storing the nodes and edges. source : str @@ -52,13 +65,18 @@ class MinimalCodeSwitchingCompiler: Identifier for the sink node ("SNK"). """ - def __init__(self, config: CompilerConfig | None = None) -> None: + def __init__( + self, gate_set_code_a: set[str], gate_set_code_b: set[str], config: CompilerConfig | None = None + ) -> None: """Initialize the CodeSwitchGraph with source and sink nodes.""" if config is None: self.config = CompilerConfig() else: self.config = config + self.gate_set_source = gate_set_code_a + self.gate_set_sink = gate_set_code_b + self.common_gates = self._get_common_gates() self.G: nx.DiGraph = nx.DiGraph() self.source: str = "SRC" self.sink: str = "SNK" @@ -66,6 +84,10 @@ def __init__(self, config: CompilerConfig | None = None) -> None: self.G.add_node(self.sink) self.base_unary_capacity: float = self.config.default_temporal_edge_capacity * self.config.edge_capacity_ratio + def _get_common_gates(self) -> set[str]: + """Return the set of gates that can be performed transversally in both codes.""" + return self.gate_set_source.intersection(self.gate_set_sink) + def _add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: """Add a node representing a quantum gate operation. @@ -254,69 +276,116 @@ def build_from_qiskit( self, circuit: QuantumCircuit, *, - one_way_transversal_cnot: bool = False, + one_way_gates: set[str] | None = None, code_bias: bool = False, idle_bonus: bool = False, ) -> None: - """Construct the code-switch graph from a Qiskit QuantumCircuit. + """Construct the code-switch graph generically. Parameters ---------- circuit : QuantumCircuit - The input quantum circuit containing H, T, and CX (CNOT) gates. - one_way_transversal_cnot : bool, optional - If True, restrict transversal CNOTs to one direction. + The input quantum circuit. code_bias : bool, optional - If True, add bias edges for CNOT nodes. + If True, add bias edges for nodes. Default is False. idle_bonus : bool, optional If True, reduce temporal edge capacities based on idle durations via `_edge_capacity_with_idle_bonus`. Default is False. - - Notes: - ----- - - For each gate, a node is created per qubit. - - Temporal ordering along qubit lines is maintained via regular edges. - - CNOT gates create two linked nodes (control, target) with infinite capacity. - - Optionally adds code bias edges or one-way transversal CNOT constraints. - - Idle bonuses reduce temporal edge capacities for qubits idle over multiple layers. + one_way_gates : set[str], optional + A set of multi-qubit gate names (e.g. {"CX"}) that are in `common_gates` + but allow for one-way transversality (mixed codes). + If a common multi-qubit gate is NOT in this set, it is assumed + both qubits must be in the same code (bidirectional infinite edges). """ + if one_way_gates is None: + one_way_gates = set() + dag = circuit_to_dag(circuit) layers = list(dag.layers()) + qubit_activity: dict[int, list[int]] = {q: [] for q in range(circuit.num_qubits)} qubit_last_node: list[str | None] = [None] * circuit.num_qubits for depth, layer in enumerate(layers): for node in layer["graph"].op_nodes(): - qubits = [circuit.find_bit(q).index for q in node.qargs] - gate = node.name.upper() - for qubit_index in qubits: - qubit_activity[qubit_index].append(depth) - - if gate in {"H", "T"}: - q = qubits[0] - gate_node = self._add_gate_node(gate, q, depth) - self._connect_to_code(gate_node, gate) - if qubit_last_node[q]: - self._add_regular_edge(qubit_last_node[q], gate_node) - qubit_last_node[q] = gate_node - - elif gate == "CX": - ctrl, tgt = qubits - node_ctrl = self._add_gate_node("CNOTc", ctrl, depth) - node_tgt = self._add_gate_node("CNOTt", tgt, depth) - self._add_cnot_links(node_ctrl, node_tgt, one_way_transversal_cnot=one_way_transversal_cnot) - if code_bias: - self._add_bias_edges(node_ctrl) - self._add_bias_edges(node_tgt) - for q, gate_node in [(ctrl, node_ctrl), (tgt, node_tgt)]: - if qubit_last_node[q]: - capacity = ( - self._edge_capacity_with_idle_bonus(qubit_activity[q]) - if idle_bonus - else self.config.default_temporal_edge_capacity - ) - self._add_regular_edge(qubit_last_node[q], gate_node, capacity=capacity) - qubit_last_node[q] = gate_node + self._process_gate_operation( + node, depth, circuit, qubit_activity, qubit_last_node, one_way_gates, code_bias, idle_bonus + ) + + def _process_gate_operation( + self, + node: DAGOpNode, + depth: int, + circuit: QuantumCircuit, + qubit_activity: dict[int, list[int]], + qubit_last_node: list[str | None], + one_way_gates: set[str], + code_bias: bool, + idle_bonus: bool, + ) -> None: + """Handle node creation, temporal edges, and code constraints for a single gate. + + Parameters. + ---------- + node : DAGOpNode + The gate operation node from the DAG. + depth : int + The depth (layer index) of the operation in the circuit. + """ + qubits_indices = [circuit.find_bit(q).index for q in node.qargs] + gate_type = node.name.upper() + + current_step_nodes = [] + + for q_idx in qubits_indices: + qubit_activity[q_idx].append(depth) + + node_id = self._add_gate_node(gate_type, q_idx, depth) + current_step_nodes.append((q_idx, node_id)) + + prev_node = qubit_last_node[q_idx] + if prev_node: + capacity = self.config.default_temporal_edge_capacity + if idle_bonus: + capacity = self._edge_capacity_with_idle_bonus(qubit_activity[q_idx]) + self._add_regular_edge(prev_node, node_id, capacity=capacity) + + qubit_last_node[q_idx] = node_id + + self._apply_code_constraints(gate_type, current_step_nodes, one_way_gates, code_bias) + + def _apply_code_constraints( + self, gate_type: str, current_step_nodes: list[tuple[int, str]], one_way_gates: set[str], code_bias: bool + ) -> None: + """Apply infinite edges or bias edges based on gate sets.""" + is_source_unique = gate_type in self.gate_set_source and gate_type not in self.gate_set_sink + is_sink_unique = gate_type in self.gate_set_sink and gate_type not in self.gate_set_source + is_common = gate_type in self.common_gates + + if is_source_unique: + for _, node_id in current_step_nodes: + self._add_infinite_edge(self.source, node_id) + + elif is_sink_unique: + for _, node_id in current_step_nodes: + self._add_infinite_edge(self.sink, node_id) + + elif is_common: + is_multi_qubit = len(current_step_nodes) > 1 + + # Single qubit common gates are ignored (they float freely) + if is_multi_qubit: + is_one_way = gate_type in one_way_gates + + _, target_node = current_step_nodes[-1] + controls = current_step_nodes[:-1] + + for _, ctrl_node in controls: + self._add_infinite_edge(ctrl_node, target_node, bidirectional=not is_one_way) + + if code_bias: + for _, node_id in current_step_nodes: + self._add_bias_edges(node_id) def compute_min_cut(self) -> tuple[int, list[tuple[int, int]], set[str], set[str]]: """Compute the minimum s-t cut between the source and sink. diff --git a/tests/circuit_compilation/test_code_switching_compilation.py b/tests/circuit_compilation/test_code_switching_compilation.py index 4fd5e4f92..7372fd463 100644 --- a/tests/circuit_compilation/test_code_switching_compilation.py +++ b/tests/circuit_compilation/test_code_switching_compilation.py @@ -11,7 +11,7 @@ from qiskit import QuantumCircuit from mqt.qecc.circuit_compilation import ( - CodeSwitchGraph, + MinimalCodeSwitchingCompiler, random_universal_circuit, ) from mqt.qecc.circuit_compilation.code_switching_compiler import CompilerConfig @@ -21,7 +21,9 @@ @pytest.fixture def simple_graph(): """Fixture for a fresh graph instance.""" - return CodeSwitchGraph() + code_set_source = {"H", "CX"} + code_set_sink = {"T", "CX"} + return MinimalCodeSwitchingCompiler(code_set_source, code_set_sink) # ============================================================= @@ -59,17 +61,16 @@ def test_idle_bonus_logic(simple_graph): # Integration tests -def test_simple_switch_constraint(): +def test_simple_switch_constraint(simple_graph): """Test a circuit that MUST switch: H (Source) -> T (Sink).""" qc = QuantumCircuit(1) qc.h(0) # Source code transversal qc.t(0) # Sink code transversal - csg = CodeSwitchGraph() - csg.build_from_qiskit(qc) + simple_graph.build_from_qiskit(qc) # We expect the cut to sever the link between H and T or source/sink - num_switches, switch_pos, _, _ = csg.compute_min_cut() + num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() # H -> T requires 1 switch assert num_switches > 0 @@ -78,48 +79,46 @@ def test_simple_switch_constraint(): assert switch_pos[0][0] == 0 # Qubit 0 -def test_same_code_no_switch(): +def test_same_code_no_switch(simple_graph): """Test a circuit that stays in one code: H -> H -> CX.""" qc = QuantumCircuit(2) qc.h(0) qc.h(1) qc.cx(0, 1) # All compatible with 2D Color Code (Source) - csg = CodeSwitchGraph() - csg.build_from_qiskit(qc) + simple_graph.build_from_qiskit(qc) - num_switches, switch_pos, _, _ = csg.compute_min_cut() + num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() # Should flow entirely through Source assert len(switch_pos) == 0 assert num_switches == 0.0 -def test_one_way_transversal(): +def test_one_way_transversal(simple_graph): """Test capability to cover one-way transversal gates.""" qc = QuantumCircuit(2) qc.t(0) qc.h(1) qc.cx(0, 1) - csg = CodeSwitchGraph() - csg.build_from_qiskit(qc) - num_switches, switch_pos, _, _ = csg.compute_min_cut() + simple_graph.build_from_qiskit(qc) + num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() # We expect at least one switch due to T gate assert num_switches == 1 assert switch_pos == [(0, 0)] # Switch on qubit 0 at depth 0 - csg = CodeSwitchGraph() - csg.build_from_qiskit(qc, one_way_transversal_cnot=True) - num_switches, switch_pos, _, _ = csg.compute_min_cut() + simple_graph = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) + simple_graph.build_from_qiskit(qc, one_way_gates={"CX"}) + num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() # Now, no switches should be needed assert num_switches == 0 assert switch_pos == [] # Switch on qubit 0 at depth 0 -def test_code_bias(): +def test_code_bias(simple_graph): """Test code bias effects switching positions.""" qc = QuantumCircuit(2) qc.t(0) @@ -127,18 +126,17 @@ def test_code_bias(): qc.cx(0, 1) # Check min-cuts build in source bias - csg = CodeSwitchGraph() - csg.build_from_qiskit(qc) - num_switches_source_bias, switch_pos_source_bias, _, _ = csg.compute_min_cut() + simple_graph.build_from_qiskit(qc) + num_switches_source_bias, switch_pos_source_bias, _, _ = simple_graph.compute_min_cut() assert num_switches_source_bias == 1 assert switch_pos_source_bias == [(0, 0)] # To equalize min-cuts build in source bias, change CompilerConfig to bias sink. config = CompilerConfig(biased_code="SNK") - csg = CodeSwitchGraph(config=config) - csg.build_from_qiskit(qc, code_bias=True) - num_switches_sink_bias, switch_pos_sink_bias, _, _ = csg.compute_min_cut() + simple_graph = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}, config=config) + simple_graph.build_from_qiskit(qc, code_bias=True) + num_switches_sink_bias, switch_pos_sink_bias, _, _ = simple_graph.compute_min_cut() assert num_switches_sink_bias == 1 assert switch_pos_sink_bias != switch_pos_source_bias @@ -149,24 +147,23 @@ def test_code_bias(): # Stress tests -def test_random_circuits_robustness(): +def test_random_circuits_robustness(simple_graph): """Generate random circuits and ensure the compiler runs without error.""" for seed in range(10): qc = random_universal_circuit(num_qubits=3, depth=10, seed=seed) - csg = CodeSwitchGraph() - csg.build_from_qiskit(qc) + simple_graph.build_from_qiskit(qc) - num_switches, switch_pos, S, T = csg.compute_min_cut() # noqa: N806 + num_switches, switch_pos, S, T = simple_graph.compute_min_cut() # noqa: N806 # Invariants assert len(switch_pos) >= 0 assert num_switches >= 0 - assert len(S) + len(T) == csg.G.number_of_nodes() + assert len(S) + len(T) == simple_graph.G.number_of_nodes() # Ensure Source is in S and Sink is in T - assert csg.source in S - assert csg.sink in T + assert simple_graph.source in S + assert simple_graph.sink in T # ============================================================= From 648fe473539ec430940096dda8b3ab70c703ae7c Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 13:11:56 +0100 Subject: [PATCH 56/90] remove unused methods to connect to terminals and connecting CNOTs --- .../code_switching_compiler.py | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index a6635c6c1..7bdeabfb0 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -182,43 +182,6 @@ def _add_bias_edges(self, node_id: str, biased_code: str | None = None) -> None: self._add_edge_with_capacity(self.source, node_id, capacity=self.base_unary_capacity, edge_type="unary") self._add_edge_with_capacity(self.sink, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="unary") - def _connect_to_code(self, node_id: str, gate_type: str) -> None: - """Connect a gate node to the source and/or sink according to which code can perform the operation transversally. - - Note: Here we fix the convention that the 2D Color Code corresponds to the source (can perform H and CNOT) - and the 3D Surface Code corresponds to the sink (can perform T and CNOT). This convention is arbitrary and can be swapped. - However, swapping the convention requires to change the one-way transversal CNOT setting: - 2D Source + 3D Sink <-> (infinite edge) Control -> Target - 3D Source + 2D Sink <-> (infinite edge) Control <- Target - - Parameters - ---------- - node_id : str - Node identifier of the gate operation. - gate_type : str - Type of the gate (e.g., "H", "T", "CNOT"). - """ - # Sink code can perform T and CNOT gates - if gate_type == "T": - self._add_infinite_edge(self.sink, node_id) - # Source code can perform H and CNOT gates - if gate_type == "H": - self._add_infinite_edge(node_id, self.source) - - def _add_cnot_links(self, control_node: str, target_node: str, *, one_way_transversal_cnot: bool = False) -> None: - """Add bidirectional infinite-capacity edges between two CNOT-related nodes to enforce that both qubits remain in the same code. - - Parameters - ---------- - control_node : str - Node representing the control qubit's CNOT operation. - target_node : str - Node representing the target qubit's CNOT operation. - one_way_transversal_cnot : bool, optional - If True, allow transversal CNOTs from 3D (control) to 2D (target) besides the usual requirement that both qubits remain in the same code. - """ - self._add_infinite_edge(control_node, target_node, bidirectional=not (one_way_transversal_cnot)) - def compute_idle_bonus(self, previous_depth: int, current_depth: int) -> float: """Compute a bonus (capacity reduction) for idling qubits. From 7e2dd9823b0ac1ff565eb9e5abdf2a01d426feed Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 13:15:38 +0100 Subject: [PATCH 57/90] fix typo with parameter names --- src/mqt/qecc/circuit_compilation/code_switching_compiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 7bdeabfb0..430ef3c4b 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -66,7 +66,7 @@ class MinimalCodeSwitchingCompiler: """ def __init__( - self, gate_set_code_a: set[str], gate_set_code_b: set[str], config: CompilerConfig | None = None + self, gate_set_code_source: set[str], gate_set_code_sink: set[str], config: CompilerConfig | None = None ) -> None: """Initialize the CodeSwitchGraph with source and sink nodes.""" if config is None: @@ -74,8 +74,8 @@ def __init__( else: self.config = config - self.gate_set_source = gate_set_code_a - self.gate_set_sink = gate_set_code_b + self.gate_set_source = gate_set_code_source + self.gate_set_sink = gate_set_code_sink self.common_gates = self._get_common_gates() self.G: nx.DiGraph = nx.DiGraph() self.source: str = "SRC" From c8e66ca8475fd26e13943e58b22577b67726ec9b Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:13:55 +0100 Subject: [PATCH 58/90] add idle bonus calcualtion from the paper --- .../code_switching_compiler.py | 51 +++++++++++++------ .../test_code_switching_compilation.py | 47 +++++++++++++---- 2 files changed, 72 insertions(+), 26 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index 430ef3c4b..fb3571456 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -182,34 +182,42 @@ def _add_bias_edges(self, node_id: str, biased_code: str | None = None) -> None: self._add_edge_with_capacity(self.source, node_id, capacity=self.base_unary_capacity, edge_type="unary") self._add_edge_with_capacity(self.sink, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="unary") - def compute_idle_bonus(self, previous_depth: int, current_depth: int) -> float: - """Compute a bonus (capacity reduction) for idling qubits. + def compute_idle_bonus(self, previous_depth: int, current_depth: int, total_edges: int) -> float: + """Compute a normalized bonus (capacity reduction) for idling qubits. - The idea: if a qubit has been idle for several depth layers, - we reduce the capacity of the temporal edge between its last - and next gate nodes to encourage reuse of that qubit. + Formula: idle_time / (total_edges * (idle_time + 1)) + + This creates a 'micro-bias'. It ensures that the bonus is always + significantly smaller than the base capacity, acting only as a + tie-breaker for the min-cut algorithm rather than forcing a cut. Parameters ---------- previous_depth : int - The depth index of the previous active gate on the qubit. + The depth index of the previous active gate. current_depth : int - The depth index of the current active gate on the qubit. + The depth index of the current active gate. + total_edges : int + The total count of temporal edges (qubit-operations) in the circuit. Returns: ------- float - The capacity reduction (bonus) to apply. Can be tuned by formula. + The capacity reduction to apply. """ idle_length = max(0, current_depth - previous_depth - 1) if idle_length <= self.config.switching_time: - idle_length = 0 + return 0.0 + + if total_edges == 0: + return 0.0 - max_bonus = 5 - return min(max_bonus, idle_length) * self.base_unary_capacity + return idle_length / (total_edges * (idle_length + 1)) - def _edge_capacity_with_idle_bonus(self, depths: list[int], base_capacity: float | None = None) -> float: + def _edge_capacity_with_idle_bonus( + self, depths: list[int], total_edges: int, base_capacity: float | None = None + ) -> float: """Compute the effective temporal edge capacity. Optionally reduced by an idle bonus if the qubit has been inactive for several layers. @@ -232,7 +240,7 @@ def _edge_capacity_with_idle_bonus(self, depths: list[int], base_capacity: float return base_capacity prev_depth, curr_depth = depths[-2], depths[-1] - bonus = self.compute_idle_bonus(prev_depth, curr_depth) + bonus = self.compute_idle_bonus(prev_depth, curr_depth, total_edges) return base_capacity - bonus def build_from_qiskit( @@ -266,13 +274,25 @@ def build_from_qiskit( dag = circuit_to_dag(circuit) layers = list(dag.layers()) + total_temporal_edges = 0 + for node in dag.op_nodes(): + total_temporal_edges += len(node.qargs) + qubit_activity: dict[int, list[int]] = {q: [] for q in range(circuit.num_qubits)} qubit_last_node: list[str | None] = [None] * circuit.num_qubits for depth, layer in enumerate(layers): for node in layer["graph"].op_nodes(): self._process_gate_operation( - node, depth, circuit, qubit_activity, qubit_last_node, one_way_gates, code_bias, idle_bonus + node, + depth, + circuit, + qubit_activity, + qubit_last_node, + one_way_gates, + code_bias, + idle_bonus, + total_temporal_edges, ) def _process_gate_operation( @@ -285,6 +305,7 @@ def _process_gate_operation( one_way_gates: set[str], code_bias: bool, idle_bonus: bool, + total_temporal_edges: int, ) -> None: """Handle node creation, temporal edges, and code constraints for a single gate. @@ -310,7 +331,7 @@ def _process_gate_operation( if prev_node: capacity = self.config.default_temporal_edge_capacity if idle_bonus: - capacity = self._edge_capacity_with_idle_bonus(qubit_activity[q_idx]) + capacity = self._edge_capacity_with_idle_bonus(qubit_activity[q_idx], total_temporal_edges) self._add_regular_edge(prev_node, node_id, capacity=capacity) qubit_last_node[q_idx] = node_id diff --git a/tests/circuit_compilation/test_code_switching_compilation.py b/tests/circuit_compilation/test_code_switching_compilation.py index 7372fd463..7ef48a834 100644 --- a/tests/circuit_compilation/test_code_switching_compilation.py +++ b/tests/circuit_compilation/test_code_switching_compilation.py @@ -41,20 +41,45 @@ def test_parse_node_id(): def test_idle_bonus_logic(simple_graph): - """Test that idle bonus is calculated correctly.""" - # Case 1: Short idle (less than SWITCHING_LENGTH=2) -> 0 bonus - # depths 0 and 2 implies gap of 1 (depth 1 is empty) - bonus = simple_graph.compute_idle_bonus(previous_depth=0, current_depth=2) + """Test that idle bonus is calculated correctly using the normalized formula.""" + simple_graph.config.switching_time = 2 + base_cap = 1.0 + N = 100 # noqa: N806 + + bonus = simple_graph.compute_idle_bonus(previous_depth=0, current_depth=2, total_edges=N) + assert bonus == 0.0 + + bonus = simple_graph.compute_idle_bonus(previous_depth=0, current_depth=3, total_edges=N) assert bonus == 0.0 - # Case 2: Long idle greater than max_bonus - # depths 0 and 10 implies gap of 9 - bonus = simple_graph.compute_idle_bonus(previous_depth=0, current_depth=10) - assert bonus == 5 * simple_graph.base_unary_capacity + # --- Bonus Active (Calculation Check) --- + # prev=0, curr=10 -> idle = 9. + # Formula: 9 / (100 * (9 + 1)) = 9 / 1000 = 0.009 + idle_length = 9 + expected_bonus = idle_length / (N * (idle_length + 1)) + + bonus = simple_graph.compute_idle_bonus(previous_depth=0, current_depth=10, total_edges=N) + + # Use approx for float safety + assert bonus == pytest.approx(expected_bonus, rel=1e-9) + assert bonus > 0.0 + + eff_cap = simple_graph._edge_capacity_with_idle_bonus( # noqa: SLF001 + depths=[0, 10], total_edges=N, base_capacity=base_cap + ) + + assert eff_cap < base_cap + assert eff_cap == pytest.approx(base_cap - expected_bonus, rel=1e-9) + + # --- Large Graph Scaling (Safety Check) --- + # In a huge circuit, the bonus should become very small to avoid distorting the graph, + # but it must remain non-zero to act as a tie-breaker. + huge_N = 1_000_000 # noqa: N806 + + bonus_huge = simple_graph.compute_idle_bonus(previous_depth=0, current_depth=10, total_edges=huge_N) - # Ensure capacity reduction logic works - cap = simple_graph._edge_capacity_with_idle_bonus([0, 10], base_capacity=1.0) # noqa: SLF001 - assert cap < 1.0 + assert bonus_huge > 0.0 + assert bonus_huge < 1e-5 # Must be tiny # ============================================================= From 2dfb57dd59357597cacad151116e984010c1902e Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:19:25 +0100 Subject: [PATCH 59/90] move random circuit generation from utils to scripts --- .../cs_compiler/generate_random_circuits.py | 99 ++++++++++++++++- src/mqt/qecc/circuit_compilation/__init__.py | 3 +- .../circuit_compilation/compilation_utils.py | 100 +----------------- 3 files changed, 100 insertions(+), 102 deletions(-) diff --git a/scripts/cs_compiler/generate_random_circuits.py b/scripts/cs_compiler/generate_random_circuits.py index d126258a4..4a4b5071f 100644 --- a/scripts/cs_compiler/generate_random_circuits.py +++ b/scripts/cs_compiler/generate_random_circuits.py @@ -19,9 +19,106 @@ import argparse from pathlib import Path +import numpy as np +from qiskit import QuantumCircuit from qiskit.qasm2 import dumps -from mqt.qecc.circuit_compilation import random_universal_circuit + +def random_universal_circuit( + num_qubits: int, depth: int, gate_probs: dict[str, float] | None = None, seed: int | None = None +) -> QuantumCircuit: + """Generate a random universal quantum circuit using H, T, CNOT, and ID gates. + + Each depth layer assigns one operation per qubit (unless it's part of a CNOT). + Avoids consecutive identical non-ID single-qubit gates (even across ID layers). + + Args: + num_qubits (int): Number of qubits in the circuit. + depth (int): Number of layers. + gate_probs (dict): Probabilities for each gate, e.g. {"h": 0.3, "t": 0.3, "cx": 0.2, "id": 0.2}. All gates (h, t, cx, id) must be present. + seed (int, optional): RNG seed for reproducibility. + + Returns: + QuantumCircuit: Randomly generated circuit. + """ + if gate_probs is None: + gate_probs = {"h": 0.15, "t": 0.15, "cx": 0.15, "id": 0.55} + + # Normalize probabilities + total = sum(gate_probs.values()) + gate_probs = {k: v / total for k, v in gate_probs.items()} + + rng = np.random.default_rng(seed) + circuit = QuantumCircuit(num_qubits) + + gates = list(gate_probs.keys()) + probs = list(gate_probs.values()) + + # Track last gate and last non-id single-qubit gate + last_gate = ["id"] * num_qubits + last_non_id_gate = ["id"] * num_qubits + + for _ in range(depth): + available_qubits = set(range(num_qubits)) + + for q in available_qubits.copy(): + if q not in available_qubits: + continue # already consumed by a CNOT + + # Draw a gate with back-to-back restrictions + while True: + gate = rng.choice(gates, p=probs) + + # Always allow id + if gate == "id": + break + + # For single-qubit gates, avoid repeating last non-id gate + if gate in {"h", "t"} and gate != last_non_id_gate[q]: + break + + # For CX, handled separately + if gate == "cx": + break + + # Two-qubit gate handling + if gate == "cx": + others = list(available_qubits - {q}) + if not others: + # Fallback to single-qubit gate if no partner available + gate = rng.choice( + ["h", "t", "id"], + p=[ + gate_probs[g] / (gate_probs["h"] + gate_probs["t"] + gate_probs["id"]) + for g in ["h", "t", "id"] + ], + ) + else: + target = rng.choice(others) + if rng.random() < 0.5: + circuit.cx(q, target) + else: + circuit.cx(target, q) + available_qubits.discard(q) + available_qubits.discard(target) + last_gate[q] = last_gate[target] = "cx" + # don't update last_non_id_gate (CX isn't a single-qubit gate) + continue + + # Apply single-qubit gate + if gate == "h": + circuit.h(q) + elif gate == "t": + circuit.t(q) + elif gate == "id": + pass # do nothing + + available_qubits.discard(q) + last_gate[q] = gate + if gate != "id": + last_non_id_gate[q] = gate + + return circuit def generate_circuits(n: int, num_circuits: int, output_dir: Path, gate_distr_type: str = "even") -> None: diff --git a/src/mqt/qecc/circuit_compilation/__init__.py b/src/mqt/qecc/circuit_compilation/__init__.py index 1f42f7ab8..fa3b13a98 100644 --- a/src/mqt/qecc/circuit_compilation/__init__.py +++ b/src/mqt/qecc/circuit_compilation/__init__.py @@ -10,12 +10,11 @@ from __future__ import annotations from .code_switching_compiler import CompilerConfig, MinimalCodeSwitchingCompiler -from .compilation_utils import count_code_switches, insert_switch_placeholders, random_universal_circuit +from .compilation_utils import count_code_switches, insert_switch_placeholders __all__ = [ "CompilerConfig", "MinimalCodeSwitchingCompiler", "count_code_switches", "insert_switch_placeholders", - "random_universal_circuit", ] diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/circuit_compilation/compilation_utils.py index d0337f04c..04a52e019 100644 --- a/src/mqt/qecc/circuit_compilation/compilation_utils.py +++ b/src/mqt/qecc/circuit_compilation/compilation_utils.py @@ -5,113 +5,15 @@ # # Licensed under the MIT License -"""Utility to generate random universal quantum circuits.""" +"""Utilities for quantum circuit compilation: random circuit generation, code-switch analysis, node parsing, and placeholder insertion.""" import re -import numpy as np from qiskit import QuantumCircuit from qiskit.converters import circuit_to_dag from qiskit.dagcircuit import DAGOpNode -def random_universal_circuit( - num_qubits: int, depth: int, gate_probs: dict[str, float] | None = None, seed: int | None = None -) -> QuantumCircuit: - """Generate a random universal quantum circuit using H, T, CNOT, and ID gates. - - Each depth layer assigns one operation per qubit (unless it's part of a CNOT). - Avoids consecutive identical non-ID single-qubit gates (even across ID layers). - - Args: - num_qubits (int): Number of qubits in the circuit. - depth (int): Number of layers. - gate_probs (dict): Probabilities for each gate, e.g. {"h": 0.3, "t": 0.3, "cx": 0.2, "id": 0.2}. All gates (h, t, cx, id) must be present. - seed (int, optional): RNG seed for reproducibility. - - Returns: - QuantumCircuit: Randomly generated circuit. - """ - if gate_probs is None: - gate_probs = {"h": 0.15, "t": 0.15, "cx": 0.15, "id": 0.55} - - # Normalize probabilities - total = sum(gate_probs.values()) - gate_probs = {k: v / total for k, v in gate_probs.items()} - - rng = np.random.default_rng(seed) - circuit = QuantumCircuit(num_qubits) - - gates = list(gate_probs.keys()) - probs = list(gate_probs.values()) - - # Track last gate and last non-id single-qubit gate - last_gate = ["id"] * num_qubits - last_non_id_gate = ["id"] * num_qubits - - for _ in range(depth): - available_qubits = set(range(num_qubits)) - - for q in available_qubits.copy(): - if q not in available_qubits: - continue # already consumed by a CNOT - - # Draw a gate with back-to-back restrictions - while True: - gate = rng.choice(gates, p=probs) - - # Always allow id - if gate == "id": - break - - # For single-qubit gates, avoid repeating last non-id gate - if gate in {"h", "t"} and gate != last_non_id_gate[q]: - break - - # For CX, handled separately - if gate == "cx": - break - - # Two-qubit gate handling - if gate == "cx": - others = list(available_qubits - {q}) - if not others: - # Fallback to single-qubit gate if no partner available - gate = rng.choice( - ["h", "t", "id"], - p=[ - gate_probs[g] / (gate_probs["h"] + gate_probs["t"] + gate_probs["id"]) - for g in ["h", "t", "id"] - ], - ) - else: - target = rng.choice(others) - if rng.random() < 0.5: - circuit.cx(q, target) - else: - circuit.cx(target, q) - available_qubits.discard(q) - available_qubits.discard(target) - last_gate[q] = last_gate[target] = "cx" - # don't update last_non_id_gate (CX isn't a single-qubit gate) - continue - - # Apply single-qubit gate - if gate == "h": - circuit.h(q) - elif gate == "t": - circuit.t(q) - elif gate == "id": - pass # do nothing - - available_qubits.discard(q) - last_gate[q] = gate - if gate != "id": - last_non_id_gate[q] = gate - - return circuit - - def count_code_switches(circuit: QuantumCircuit) -> tuple[int, list[str | None]]: """Count how many code switches are needed for a circuit assuming. From fe4482251461e8e0254069d54b81bdf4115e1a40 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:24:55 +0100 Subject: [PATCH 60/90] rename naive code switching method and adjust collaterals --- scripts/cs_compiler/simulate_circuit_performance.py | 10 ++++++---- src/mqt/qecc/circuit_compilation/__init__.py | 4 ++-- src/mqt/qecc/circuit_compilation/compilation_utils.py | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/cs_compiler/simulate_circuit_performance.py b/scripts/cs_compiler/simulate_circuit_performance.py index 432a9e51d..b64206e83 100644 --- a/scripts/cs_compiler/simulate_circuit_performance.py +++ b/scripts/cs_compiler/simulate_circuit_performance.py @@ -26,7 +26,7 @@ from qiskit.qasm2 import loads -from mqt.qecc.circuit_compilation import MinimalCodeSwitchingCompiler, count_code_switches +from mqt.qecc.circuit_compilation import MinimalCodeSwitchingCompiler, naive_switching if TYPE_CHECKING: from qiskit.circuit import QuantumCircuit @@ -59,11 +59,13 @@ def already_done(csv_path: Path, seed: int) -> bool: def run_trial(qc: QuantumCircuit, n_qubits: int, depth: int, seed: int, probs_type: str) -> dict: """Run a single trial comparing naive and min-cut code switch counting.""" t0_naive = time.time() - naive = count_code_switches(qc)[0] + naive = naive_switching(qc)[0] t1_naive = time.time() - builder = MinimalCodeSwitchingCompiler() - builder.build_from_qiskit(qc, one_way_transversal_cnot=True) + source_code = {"H", "CX"} + sink_code = {"T", "CX"} + builder = MinimalCodeSwitchingCompiler(source_code, sink_code) + builder.build_from_qiskit(qc, one_way_gates={"CX"}) t0_mincut_solver = time.time() switches_mc, _, _, _ = builder.compute_min_cut() diff --git a/src/mqt/qecc/circuit_compilation/__init__.py b/src/mqt/qecc/circuit_compilation/__init__.py index fa3b13a98..967e5c5cc 100644 --- a/src/mqt/qecc/circuit_compilation/__init__.py +++ b/src/mqt/qecc/circuit_compilation/__init__.py @@ -10,11 +10,11 @@ from __future__ import annotations from .code_switching_compiler import CompilerConfig, MinimalCodeSwitchingCompiler -from .compilation_utils import count_code_switches, insert_switch_placeholders +from .compilation_utils import insert_switch_placeholders, naive_switching __all__ = [ "CompilerConfig", "MinimalCodeSwitchingCompiler", - "count_code_switches", "insert_switch_placeholders", + "naive_switching", ] diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/circuit_compilation/compilation_utils.py index 04a52e019..b3e5fc758 100644 --- a/src/mqt/qecc/circuit_compilation/compilation_utils.py +++ b/src/mqt/qecc/circuit_compilation/compilation_utils.py @@ -14,7 +14,7 @@ from qiskit.dagcircuit import DAGOpNode -def count_code_switches(circuit: QuantumCircuit) -> tuple[int, list[str | None]]: +def naive_switching(circuit: QuantumCircuit) -> tuple[int, list[str | None]]: """Count how many code switches are needed for a circuit assuming. - Code A supports H, CNOT From 364550b698d69505d670144878b7fc2dc4067ab4 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:26:52 +0100 Subject: [PATCH 61/90] remove unnecessary comments --- src/mqt/qecc/circuit_compilation/compilation_utils.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/circuit_compilation/compilation_utils.py index b3e5fc758..16253c549 100644 --- a/src/mqt/qecc/circuit_compilation/compilation_utils.py +++ b/src/mqt/qecc/circuit_compilation/compilation_utils.py @@ -48,7 +48,6 @@ def compatible_codes(gate_name: str) -> set[str]: gate = instr.operation.name qubits = [circuit.find_bit(q).index for q in instr.qubits] - # Skip ID gates, they don't constrain anything if gate == "id": continue @@ -60,9 +59,6 @@ def compatible_codes(gate_name: str) -> set[str]: # Initialize codes for untouched qubits for q in qubits: if current_code[q] is None: - # Assign to one of the compatible codes (non-deterministically -> set has no order) - # current_code[q] = next(iter(compat)) - # deterministic choice for testing current_code[q] = "A" if "A" in compat else "B" # If it's a multi-qubit gate, ensure code consistency @@ -80,8 +76,6 @@ def compatible_codes(gate_name: str) -> set[str]: # Check if qubits are in a valid code for this gate for q in qubits: if current_code[q] not in compat: - # Need to switch this qubit's code - # new_code = ({"A", "B"} - {current_code[q]}).pop() new_code = "A" if current_code[q] == "B" else "B" current_code[q] = new_code switch_count += 1 From 85b2d35ba153b2efd383d4623d3420d5a1047285 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:31:28 +0100 Subject: [PATCH 62/90] move node parser back to graph class --- .../code_switching_compiler.py | 17 ++++++++++++++--- .../circuit_compilation/compilation_utils.py | 15 --------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py index fb3571456..f7bb48c4b 100644 --- a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py +++ b/src/mqt/qecc/circuit_compilation/code_switching_compiler.py @@ -9,18 +9,19 @@ from __future__ import annotations +import re from dataclasses import dataclass from typing import TYPE_CHECKING import networkx as nx from qiskit.converters import circuit_to_dag -from mqt.qecc.circuit_compilation.compilation_utils import parse_node_id - if TYPE_CHECKING: from qiskit import QuantumCircuit from qiskit.dagcircuit import DAGOpNode +pattern = re.compile(r".*_q(\d+)_d(\d+)") + @dataclass class CompilerConfig: @@ -417,6 +418,16 @@ def _extract_switch_locations(self, S: set[str], T: set[str]) -> tuple[int, list seen.add(key) if (u in S and v in T) or (v in S and u in T): # We can take e.g. the 'earlier' node in time as the insertion point - qubit, depth = parse_node_id(u) + qubit, depth = self.parse_node_id(u) switch_positions.append((qubit, depth)) return len(switch_positions), switch_positions + + @staticmethod + def parse_node_id(node_id: str) -> tuple[int, int]: + """Extract (qubit, depth) from a node_id like 'H_q0_d3'.""" + match = pattern.match(node_id) + if not match: + msg = f"Invalid node_id format: {node_id}" + raise ValueError(msg) + qubit, depth = map(int, match.groups()) + return qubit, depth diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/circuit_compilation/compilation_utils.py index 16253c549..e385052e6 100644 --- a/src/mqt/qecc/circuit_compilation/compilation_utils.py +++ b/src/mqt/qecc/circuit_compilation/compilation_utils.py @@ -7,8 +7,6 @@ """Utilities for quantum circuit compilation: random circuit generation, code-switch analysis, node parsing, and placeholder insertion.""" -import re - from qiskit import QuantumCircuit from qiskit.converters import circuit_to_dag from qiskit.dagcircuit import DAGOpNode @@ -83,19 +81,6 @@ def compatible_codes(gate_name: str) -> set[str]: return switch_count, current_code -pattern = re.compile(r".*_q(\d+)_d(\d+)") - - -def parse_node_id(node_id: str) -> tuple[int, int]: - """Extract (qubit, depth) from a node_id like 'H_q0_d3'.""" - match = pattern.match(node_id) - if not match: - msg = f"Invalid node_id format: {node_id}" - raise ValueError(msg) - qubit, depth = map(int, match.groups()) - return qubit, depth - - def insert_switch_placeholders( circuit: QuantumCircuit, switch_positions: list[tuple[int, int]], From d9fe6523049571bb3df0bc38c955f2c6f7bcc506 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:51:16 +0100 Subject: [PATCH 63/90] remove redundancy --- src/mqt/qecc/circuit_compilation/compilation_utils.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/circuit_compilation/compilation_utils.py index e385052e6..8a9b7f9ea 100644 --- a/src/mqt/qecc/circuit_compilation/compilation_utils.py +++ b/src/mqt/qecc/circuit_compilation/compilation_utils.py @@ -120,7 +120,6 @@ def insert_switch_placeholders( placeholders_by_qubit: dict[int, list[int]] = {} for qidx, layer_idx in switch_positions: if layer_idx < 0: - # ignore negative indices (could alternatively raise) continue placeholders_by_qubit.setdefault(qidx, []).append(layer_idx) @@ -144,14 +143,11 @@ def _append_placeholder_on_qubit(q_index: int, depth_equiv: int) -> None: # Iterate layers in order; copy each op, then after the whole layer insert placeholders for that layer for depth_idx, layer in enumerate(layers): layer_graph = layer["graph"] - # append ops of the layer to new_qc (deterministic order: iterate nodes) for node in layer_graph.op_nodes(): assert isinstance(node, DAGOpNode) # Map node.qargs (Qubit objects) to the corresponding qubit objects of the original circuit - q_indices = [circuit.find_bit(q).index for q in node.qargs] if node.qargs else [] - qbit_objs = [circuit.qubits[i] for i in q_indices] - c_indices = [circuit.find_bit(c).index for c in node.cargs] if getattr(node, "cargs", None) else [] - cbit_objs = [circuit.clbits[i] for i in c_indices] if c_indices else [] + qbit_objs = list(node.qargs) + cbit_objs = list(node.cargs) if hasattr(node, "cargs") else [] # Append the operation to the new circuit on the same physical qubits/bits new_qc.append(node.op, qbit_objs, cbit_objs) From 4afedfb3a4495d5751491dca4e2b4432a3704a67 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:51:36 +0100 Subject: [PATCH 64/90] rename tests for naive switching --- .../circuit_compilation/test_compilation_utils.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/circuit_compilation/test_compilation_utils.py b/tests/circuit_compilation/test_compilation_utils.py index b7d78ecff..a0f053d5e 100644 --- a/tests/circuit_compilation/test_compilation_utils.py +++ b/tests/circuit_compilation/test_compilation_utils.py @@ -11,12 +11,12 @@ from qiskit import QuantumCircuit from mqt.qecc.circuit_compilation.compilation_utils import ( - count_code_switches, insert_switch_placeholders, + naive_switching, ) # ============================================================================== -# Tests for count_code_switches +# Tests for naive_switching # ============================================================================== @@ -26,7 +26,7 @@ def test_count_switches_single_qubit_simple(): qc.h(0) # Code A qc.t(0) # Code B -> Expect 1 switch - count, final_codes = count_code_switches(qc) + count, final_codes = naive_switching(qc) assert count == 1 assert final_codes[0] == "B" @@ -38,7 +38,7 @@ def test_count_switches_no_switch_needed(): qc.h(0) qc.cx(0, 1) # H and CX are both supported by Code A - count, final_codes = count_code_switches(qc) + count, final_codes = naive_switching(qc) assert count == 0 assert final_codes[0] == "A" @@ -58,7 +58,7 @@ def test_count_switches_cnot_synchronization(): # Here, one of them MUST switch. qc.cx(0, 1) - count, _ = count_code_switches(qc) + count, _ = naive_switching(qc) assert count == 1 @@ -68,7 +68,7 @@ def test_count_switches_invalid_gate(): qc.x(0) # 'x' is not in the defined sets for Code A or B in the utils with pytest.raises(ValueError, match="not supported by any code"): - count_code_switches(qc) + naive_switching(qc) def test_count_switches_ignore_id(): @@ -79,7 +79,7 @@ def test_count_switches_ignore_id(): qc.id(0) # Should be ignored qc.h(0) # Still A - count, _ = count_code_switches(qc) + count, _ = naive_switching(qc) assert count == 0 From 45a3a97c0210b635ea26a950aeba4c1e3d0162af Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:56:27 +0100 Subject: [PATCH 65/90] remove stress test, adapt parsing node test, fix num_switches typo --- .../test_code_switching_compilation.py | 36 +++---------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/tests/circuit_compilation/test_code_switching_compilation.py b/tests/circuit_compilation/test_code_switching_compilation.py index 7ef48a834..8c2a06c3a 100644 --- a/tests/circuit_compilation/test_code_switching_compilation.py +++ b/tests/circuit_compilation/test_code_switching_compilation.py @@ -12,10 +12,8 @@ from mqt.qecc.circuit_compilation import ( MinimalCodeSwitchingCompiler, - random_universal_circuit, ) from mqt.qecc.circuit_compilation.code_switching_compiler import CompilerConfig -from mqt.qecc.circuit_compilation.compilation_utils import parse_node_id @pytest.fixture @@ -30,14 +28,14 @@ def simple_graph(): # Unit tests -def test_parse_node_id(): +def test_parse_node_id(simple_graph): """Test the regex parsing of node IDs.""" - q, d = parse_node_id("H_q0_d10") + q, d = simple_graph.parse_node_id("H_q0_d10") assert q == 0 assert d == 10 with pytest.raises(ValueError, match="Invalid node_id format"): - parse_node_id("Invalid_String") + simple_graph.parse_node_id("Invalid_String") def test_idle_bonus_logic(simple_graph): @@ -117,7 +115,7 @@ def test_same_code_no_switch(simple_graph): # Should flow entirely through Source assert len(switch_pos) == 0 - assert num_switches == 0.0 + assert num_switches == 0 def test_one_way_transversal(simple_graph): @@ -166,29 +164,3 @@ def test_code_bias(simple_graph): assert num_switches_sink_bias == 1 assert switch_pos_sink_bias != switch_pos_source_bias assert switch_pos_sink_bias == [(1, 0)] - - -# ============================================================= -# Stress tests - - -def test_random_circuits_robustness(simple_graph): - """Generate random circuits and ensure the compiler runs without error.""" - for seed in range(10): - qc = random_universal_circuit(num_qubits=3, depth=10, seed=seed) - - simple_graph.build_from_qiskit(qc) - - num_switches, switch_pos, S, T = simple_graph.compute_min_cut() # noqa: N806 - - # Invariants - assert len(switch_pos) >= 0 - assert num_switches >= 0 - assert len(S) + len(T) == simple_graph.G.number_of_nodes() - - # Ensure Source is in S and Sink is in T - assert simple_graph.source in S - assert simple_graph.sink in T - - -# ============================================================= From 24793dda3d8b6b4d4d2ce58ea49d203cfc7d16c1 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Mon, 1 Dec 2025 15:25:49 +0100 Subject: [PATCH 66/90] improve placeholder test --- tests/circuit_compilation/test_compilation_utils.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/circuit_compilation/test_compilation_utils.py b/tests/circuit_compilation/test_compilation_utils.py index a0f053d5e..447a387d9 100644 --- a/tests/circuit_compilation/test_compilation_utils.py +++ b/tests/circuit_compilation/test_compilation_utils.py @@ -122,11 +122,12 @@ def test_insert_placeholders_correct_location(): # Note: Qiskit depth calculation can be tricky with IDs, # so we check the operations count on the specific qubit. - ops_q0 = new_qc.data[0].operation.name # Should be H - assert ops_q0 == "h" - - # We can simply count the number of 'id' gates in the circuit - # We expect exactly 5 id gates (all on qubit 1) + # All placeholder IDs should be on qubit 1 only. + id_targets = { + new_qc.find_bit(q).index for instr in new_qc.data if instr.operation.name == "id" for q in instr.qubits + } + assert id_targets == {1} + # And we still expect exactly 5 such IDs. id_count = sum(1 for instr in new_qc.data if instr.operation.name == "id") assert id_count == 5 From ec589b7ac17523a3314fdf78a21234fef70b2398 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:10:46 +0100 Subject: [PATCH 67/90] remove personal playground folder --- .gitignore | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.gitignore b/.gitignore index c0b563690..a9d8db638 100644 --- a/.gitignore +++ b/.gitignore @@ -176,9 +176,3 @@ node_modules/ wheelhouse/ pytest.ini - -# ----------------------------------------------------------------------------- -# Personal / local development ignore rules -# (Feel free to add your own scratch or playground folders here) -# ----------------------------------------------------------------------------- -playground/ From 74159038ea73d0c5cbd548861b5a0d56aa87897a Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:13:03 +0100 Subject: [PATCH 68/90] add networkx to pyproject.toml --- pyproject.toml | 3 ++- uv.lock | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 05673af8b..1f80d0ede 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,8 @@ dependencies = [ "bposd>=1.6", "qecsim>=1.0b9", "sinter>=1.14.0", - "tqdm>=4.66.2" + "tqdm>=4.66.2", + "networkx>=3.4.2", ] dynamic = ["version"] diff --git a/uv.lock b/uv.lock index 28ca13f2a..0a1aef93a 100644 --- a/uv.lock +++ b/uv.lock @@ -1571,6 +1571,8 @@ dependencies = [ { name = "bposd" }, { name = "ldpc" }, { name = "multiprocess" }, + { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "networkx", version = "3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "numba" }, { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, { name = "numpy", version = "2.3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, @@ -1644,6 +1646,7 @@ requires-dist = [ { name = "fastcore", marker = "extra == 'qsample'", specifier = ">=1.8.1" }, { name = "ldpc", specifier = ">=2.3.10" }, { name = "multiprocess", specifier = ">=0.70.17" }, + { name = "networkx", specifier = ">=3.4.2" }, { name = "numba", specifier = ">=0.57" }, { name = "numba", marker = "python_full_version >= '3.12'", specifier = ">=0.59" }, { name = "numba", marker = "python_full_version >= '3.13'", specifier = ">=0.61" }, From e5b3beb923266d58385ce844e3077fc611fdd5bc Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:14:41 +0100 Subject: [PATCH 69/90] automatic reordering by uv --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1f80d0ede..ee02391a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -125,6 +125,9 @@ filterwarnings = [ [tool.coverage] run.source = ["mqt.qecc"] +run.disable_warnings = [ + "no-sysmon", +] report.exclude_also = [ '\.\.\.', 'if TYPE_CHECKING:', @@ -133,9 +136,6 @@ report.exclude_also = [ 'def __dir__()', # Ignore __dir__ method that exists mainly for better IDE support '@overload' # Overloads are only for static typing ] -run.disable_warnings = [ - "no-sysmon", -] [tool.mypy] files = ["src/mqt", "tests", "noxfile.py"] From 30509e0cc2275ec2cffa50a11c524263de778b5a Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:52:13 +0100 Subject: [PATCH 70/90] fix logical error where same back to back gates are allowed --- scripts/cs_compiler/generate_random_circuits.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/cs_compiler/generate_random_circuits.py b/scripts/cs_compiler/generate_random_circuits.py index 4a4b5071f..1efc6b0f9 100644 --- a/scripts/cs_compiler/generate_random_circuits.py +++ b/scripts/cs_compiler/generate_random_circuits.py @@ -85,13 +85,12 @@ def random_universal_circuit( if gate == "cx": others = list(available_qubits - {q}) if not others: - # Fallback to single-qubit gate if no partner available + fallback_gates = [g for g in ["h", "t", "id"] if g == "id" or g != last_non_id_gate[q]] + fallback_probs = [gate_probs[g] for g in fallback_gates] + fallback_total = sum(fallback_probs) gate = rng.choice( - ["h", "t", "id"], - p=[ - gate_probs[g] / (gate_probs["h"] + gate_probs["t"] + gate_probs["id"]) - for g in ["h", "t", "id"] - ], + fallback_gates, + p=[p / fallback_total for p in fallback_probs], ) else: target = rng.choice(others) From 85fc4b6e7a71df886bfc998f37e2444f8635d40b Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:58:14 +0100 Subject: [PATCH 71/90] rabbit edits --- scripts/cs_compiler/run_generate_circuits.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/cs_compiler/run_generate_circuits.sh b/scripts/cs_compiler/run_generate_circuits.sh index 8742dbedb..42ab1b0b4 100644 --- a/scripts/cs_compiler/run_generate_circuits.sh +++ b/scripts/cs_compiler/run_generate_circuits.sh @@ -6,10 +6,9 @@ # # Licensed under the MIT License +set -euo pipefail # Generate random universal circuits for different system sizes in parallel. -# declare -a n_values=("64" "128" "256" "512") -# declare -a n_values=("64" "128" "192" "256" "320" "384" "448" "512") declare -a n_values=() for ((i=64; i<=1024; i+=64)); do n_values+=("$i") From e458daee315037d355eab05ec9b722d0a1d4832a Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:13:59 +0100 Subject: [PATCH 72/90] rename package to code_switching --- .../qecc/{circuit_compilation => code_switching}/__init__.py | 0 .../code_switching_compiler.py | 0 .../compilation_utils.py | 0 tests/{circuit_compilation => code_switching}/__init__.py | 0 .../test_code_switching_compilation.py | 4 ++-- .../test_compilation_utils.py | 2 +- 6 files changed, 3 insertions(+), 3 deletions(-) rename src/mqt/qecc/{circuit_compilation => code_switching}/__init__.py (100%) rename src/mqt/qecc/{circuit_compilation => code_switching}/code_switching_compiler.py (100%) rename src/mqt/qecc/{circuit_compilation => code_switching}/compilation_utils.py (100%) rename tests/{circuit_compilation => code_switching}/__init__.py (100%) rename tests/{circuit_compilation => code_switching}/test_code_switching_compilation.py (97%) rename tests/{circuit_compilation => code_switching}/test_compilation_utils.py (98%) diff --git a/src/mqt/qecc/circuit_compilation/__init__.py b/src/mqt/qecc/code_switching/__init__.py similarity index 100% rename from src/mqt/qecc/circuit_compilation/__init__.py rename to src/mqt/qecc/code_switching/__init__.py diff --git a/src/mqt/qecc/circuit_compilation/code_switching_compiler.py b/src/mqt/qecc/code_switching/code_switching_compiler.py similarity index 100% rename from src/mqt/qecc/circuit_compilation/code_switching_compiler.py rename to src/mqt/qecc/code_switching/code_switching_compiler.py diff --git a/src/mqt/qecc/circuit_compilation/compilation_utils.py b/src/mqt/qecc/code_switching/compilation_utils.py similarity index 100% rename from src/mqt/qecc/circuit_compilation/compilation_utils.py rename to src/mqt/qecc/code_switching/compilation_utils.py diff --git a/tests/circuit_compilation/__init__.py b/tests/code_switching/__init__.py similarity index 100% rename from tests/circuit_compilation/__init__.py rename to tests/code_switching/__init__.py diff --git a/tests/circuit_compilation/test_code_switching_compilation.py b/tests/code_switching/test_code_switching_compilation.py similarity index 97% rename from tests/circuit_compilation/test_code_switching_compilation.py rename to tests/code_switching/test_code_switching_compilation.py index 8c2a06c3a..67bb646e6 100644 --- a/tests/circuit_compilation/test_code_switching_compilation.py +++ b/tests/code_switching/test_code_switching_compilation.py @@ -10,10 +10,10 @@ import pytest from qiskit import QuantumCircuit -from mqt.qecc.circuit_compilation import ( +from mqt.qecc.code_switching import ( MinimalCodeSwitchingCompiler, ) -from mqt.qecc.circuit_compilation.code_switching_compiler import CompilerConfig +from mqt.qecc.code_switching.code_switching_compiler import CompilerConfig @pytest.fixture diff --git a/tests/circuit_compilation/test_compilation_utils.py b/tests/code_switching/test_compilation_utils.py similarity index 98% rename from tests/circuit_compilation/test_compilation_utils.py rename to tests/code_switching/test_compilation_utils.py index 447a387d9..17ca76a3b 100644 --- a/tests/circuit_compilation/test_compilation_utils.py +++ b/tests/code_switching/test_compilation_utils.py @@ -10,7 +10,7 @@ import pytest from qiskit import QuantumCircuit -from mqt.qecc.circuit_compilation.compilation_utils import ( +from mqt.qecc.code_switching.compilation_utils import ( insert_switch_placeholders, naive_switching, ) From 5b529a0e086fdd924f3cb8e24d072b90f641c699 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:22:57 +0100 Subject: [PATCH 73/90] add safe guard for non negative bonus --- src/mqt/qecc/code_switching/code_switching_compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqt/qecc/code_switching/code_switching_compiler.py b/src/mqt/qecc/code_switching/code_switching_compiler.py index f7bb48c4b..890796ee9 100644 --- a/src/mqt/qecc/code_switching/code_switching_compiler.py +++ b/src/mqt/qecc/code_switching/code_switching_compiler.py @@ -242,7 +242,7 @@ def _edge_capacity_with_idle_bonus( prev_depth, curr_depth = depths[-2], depths[-1] bonus = self.compute_idle_bonus(prev_depth, curr_depth, total_edges) - return base_capacity - bonus + return max(0.0, base_capacity - bonus) def build_from_qiskit( self, From a8d3ca293eabcd63b0d22656a31be87e7265754a Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:10:56 +0100 Subject: [PATCH 74/90] save uv.lock --- uv.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/uv.lock b/uv.lock index 0a1aef93a..bea153300 100644 --- a/uv.lock +++ b/uv.lock @@ -1572,7 +1572,7 @@ dependencies = [ { name = "ldpc" }, { name = "multiprocess" }, { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, - { name = "networkx", version = "3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "networkx", version = "3.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "numba" }, { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, { name = "numpy", version = "2.3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, @@ -1829,16 +1829,16 @@ wheels = [ [[package]] name = "networkx" -version = "3.5" +version = "3.6" source = { registry = "https://pypi.org/simple" } resolution-markers = [ "python_full_version >= '3.13'", "python_full_version == '3.12.*'", "python_full_version == '3.11.*'", ] -sdist = { url = "https://files.pythonhosted.org/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz", hash = "sha256:d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037", size = 2471065, upload-time = "2025-05-29T11:35:07.804Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e8/fc/7b6fd4d22c8c4dc5704430140d8b3f520531d4fe7328b8f8d03f5a7950e8/networkx-3.6.tar.gz", hash = "sha256:285276002ad1f7f7da0f7b42f004bcba70d381e936559166363707fdad3d72ad", size = 2511464, upload-time = "2025-11-24T03:03:47.158Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/eb/8d/776adee7bbf76365fdd7f2552710282c79a4ead5d2a46408c9043a2b70ba/networkx-3.5-py3-none-any.whl", hash = "sha256:0030d386a9a06dee3565298b4a734b68589749a544acbb6c412dc9e2489ec6ec", size = 2034406, upload-time = "2025-05-29T11:35:04.961Z" }, + { url = "https://files.pythonhosted.org/packages/07/c7/d64168da60332c17d24c0d2f08bdf3987e8d1ae9d84b5bbd0eec2eb26a55/networkx-3.6-py3-none-any.whl", hash = "sha256:cdb395b105806062473d3be36458d8f1459a4e4b98e236a66c3a48996e07684f", size = 2063713, upload-time = "2025-11-24T03:03:45.21Z" }, ] [[package]] @@ -2254,7 +2254,7 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "matplotlib" }, { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, - { name = "networkx", version = "3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "networkx", version = "3.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, { name = "numpy", version = "2.3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "requests" }, @@ -2388,7 +2388,7 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "matplotlib" }, { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, - { name = "networkx", version = "3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "networkx", version = "3.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, { name = "numpy", version = "2.3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "scipy", version = "1.15.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, @@ -2671,7 +2671,7 @@ dependencies = [ { name = "click" }, { name = "mpmath" }, { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, - { name = "networkx", version = "3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "networkx", version = "3.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, { name = "numpy", version = "2.3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "scipy", version = "1.15.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, @@ -2744,7 +2744,7 @@ dependencies = [ { name = "latextools" }, { name = "matplotlib" }, { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, - { name = "networkx", version = "3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "networkx", version = "3.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, { name = "numpy", version = "2.3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "projectq" }, From 27060ceb3d1f9b74ed0d779e3c52490a7a558fee Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 2 Dec 2025 15:12:51 +0100 Subject: [PATCH 75/90] add CodeSwitching docs --- docs/CodeSwitching.md | 102 ++++++++++++++++++++++++++++++++++++++++++ docs/index.md | 1 + 2 files changed, 103 insertions(+) create mode 100644 docs/CodeSwitching.md diff --git a/docs/CodeSwitching.md b/docs/CodeSwitching.md new file mode 100644 index 000000000..e9565d4b5 --- /dev/null +++ b/docs/CodeSwitching.md @@ -0,0 +1,102 @@ +--- +file_format: mystnb +kernelspec: + name: python3 +mystnb: + number_source_lines: true +--- + +# Code Switching Optimization + +Different Quantum Error Correction Codes (QECCs) support distinct sets of gates that can be implemented transversally. Transversal +gates, which act on individual physical qubits of different logical code blocks, are inherently fault-tolerant as they do not spread +errors uncontrollably through a quantum circuit. Code switching has been proposed as a technique that employs multiple QECCs +whose respective sets of transversal gates complement each other to achieve universality. Logical qubits are dynamically transferred +between these codes depending on which gate needs to be applied; in other words, the logical information is switched from one code +to the other. + +However, code switching is a costly operation in terms of space and time overhead. Therefore, given a quantum circuit, we want to find the **minimum number of switches** required to execute it. + +For this documentation we consider the combination of a 2D and 3D color code as a possible QECC pair for code switching. +2D color codes implement, among others, CNOT and Hadamard gates transversally. On the other hand, 3D color codes +have CNOT and T gates in their transversal gate set. The union of both sets provides a universal gate set {$H$,$T$,$CNOT$}. +So for simplicity we will only consider these three gates in the following examples. + +We model this problem as a **Min-Cut / Max-Flow** problem on a directed graph. The graph is constructed such that: + +- **Source (SRC):** Represents the first code (e.g., 2D Color Code). +- **Sink (SNK):** Represents the second code (e.g., 3D Color Code). +- **Nodes:** Quantum gates in the circuit. +- **Edges:** + - **Infinite Capacity:** Connect gates unique to one code (e.g., T gates) to their respective terminal (Sink). + - **Temporal Edges:** Finite capacity edges connecting sequential operations on the same qubit. A "cut" here represents a code switch. + +The minimum cut separating the Source from the Sink corresponds to the optimal switching strategy. + +## Basic Usage + +Let's look at how to use the `MinimalCodeSwitchingCompiler` to analyze a simple quantum circuit. We start by defining the gate sets supported by our two hypothetical codes. + +```{code-cell} ipython3 +from qiskit import QuantumCircuit +from mqt.qecc.code_switching import MinimalCodeSwitchingCompiler, CompilerConfig + +# Define the transversal gate sets (names must be uppercase to match Qiskit's node names) +# Code A (Source): 2D Color Code +SOURCE_GATES = {"H", "CX"} + +# Code B (Sink): 3D Color Code +SINK_GATES = {"T", "CX"} + +# Initialize the compiler +compiler = MinimalCodeSwitchingCompiler( + gate_set_code_source=SOURCE_GATES, + gate_set_code_sink=SINK_GATES +) +``` + +Next, we create a Qiskit circuit that forces the compiler to make decisions. We will interleave Hadamard gates (Source-favored) and T gates (Sink-favored), separated by CNOTs (Common to both). + +```{code-cell} ipython3 +qc = QuantumCircuit(6) + +qc.h(range(3)) +qc.t(range(3,6)) + +qc.barrier() + +qc.cx(1, 4) +qc.cx(3, 4) +qc.cx(2, 3) +qc.cx(2, 4) +qc.cx(0, 4) +qc.cx(5, 3) + +qc.barrier() + +qc.h(range(3)) +qc.t(range(3,6)) +``` + +```{code-cell} ipython3 +:tags: [hide-input] +qc.draw('mpl') +``` + +The only optimization potential lies in the middle for the CNOT portion of the circuit, as the initial and final layers of single qubit gates force us to be in specific codes. +We can now build the graph from the circuit and compute the minimum cut. + +```{code-cell} ipython3 +# Build the graph representation of the circuit +compiler.build_from_qiskit(qc) + +# Compute Min-Cut +num_switches, positions, set_S, set_T = compiler.compute_min_cut() + +print(f"Total switches required: {num_switches}") +print("Switch locations (qubit, depth):") +for pos in positions: + print(f" - Qubit {pos[0]} after operation depth {pos[1]}") +``` + +The output positions provides the exact locations (qubit, depth) where a code switch operation must be inserted into the circuit. diff --git a/docs/index.md b/docs/index.md index c9395b14a..e240b108b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -29,6 +29,7 @@ installation LightsOutDecoder StatePrep CatStates +CodeSwitching Encoders AnalogInfo references From 518d63e78dd36b77aa7bf15c1b054ea42e58a77a Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:11:18 +0100 Subject: [PATCH 76/90] rename unary edges to bias edges --- src/mqt/qecc/code_switching/code_switching_compiler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mqt/qecc/code_switching/code_switching_compiler.py b/src/mqt/qecc/code_switching/code_switching_compiler.py index 890796ee9..d40d2319c 100644 --- a/src/mqt/qecc/code_switching/code_switching_compiler.py +++ b/src/mqt/qecc/code_switching/code_switching_compiler.py @@ -165,7 +165,7 @@ def _add_regular_edge(self, u: str, v: str, capacity: float | None = None, *, bi self._add_edge_with_capacity(u, v, capacity=capacity, edge_type="temporal", bidirectional=bidirectional) def _add_bias_edges(self, node_id: str, biased_code: str | None = None) -> None: - """Add biased_code unary edges to the terminal nodes slightly preferring one code over the other. + """Add biased_code bias edges to the terminal nodes slightly preferring one code over the other. Parameters ---------- @@ -176,12 +176,12 @@ def _add_bias_edges(self, node_id: str, biased_code: str | None = None) -> None: biased_code = self.config.biased_code if biased_code == "SRC": self._add_edge_with_capacity( - self.source, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="unary" + self.source, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="bias" ) - self._add_edge_with_capacity(self.sink, node_id, capacity=self.base_unary_capacity, edge_type="unary") + self._add_edge_with_capacity(self.sink, node_id, capacity=self.base_unary_capacity, edge_type="bias") elif biased_code == "SNK": - self._add_edge_with_capacity(self.source, node_id, capacity=self.base_unary_capacity, edge_type="unary") - self._add_edge_with_capacity(self.sink, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="unary") + self._add_edge_with_capacity(self.source, node_id, capacity=self.base_unary_capacity, edge_type="bias") + self._add_edge_with_capacity(self.sink, node_id, capacity=2.0 * self.base_unary_capacity, edge_type="bias") def compute_idle_bonus(self, previous_depth: int, current_depth: int, total_edges: int) -> float: """Compute a normalized bonus (capacity reduction) for idling qubits. From 364b6216f3ca87c6f7bb88421caa92986494ba8a Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:20:59 +0100 Subject: [PATCH 77/90] generalise one-way transversal gate definition. Definition should state which gates are one-way transversal and also in which direction this one-way-character holds. --- .../code_switching/code_switching_compiler.py | 58 ++++++++++++++++--- .../test_code_switching_compilation.py | 13 ++++- 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/src/mqt/qecc/code_switching/code_switching_compiler.py b/src/mqt/qecc/code_switching/code_switching_compiler.py index d40d2319c..96c573756 100644 --- a/src/mqt/qecc/code_switching/code_switching_compiler.py +++ b/src/mqt/qecc/code_switching/code_switching_compiler.py @@ -111,14 +111,21 @@ def _add_gate_node(self, gate_type: str, qubit: int, depth: int) -> str: return node_id def _add_edge_with_capacity( - self, u: str, v: str, capacity: float, edge_type: str = "temporal", *, bidirectional: bool = True + self, + u: str, + v: str, + capacity: float, + edge_type: str = "temporal", + *, + bidirectional: bool = True, + one_way_is_snk2src: bool = True, ) -> None: """Add a directed edge with specified capacity between two nodes. Parameters ---------- u : str - Source node identifier. + Control node identifier. v : str Target node identifier. capacity : float @@ -128,11 +135,15 @@ def _add_edge_with_capacity( bidirectional : bool, optional If True, add the reverse edge as well (default is True). """ + if not one_way_is_snk2src: + u, v = v, u self.G.add_edge(u, v, capacity=capacity, edge_type=edge_type) if bidirectional: self.G.add_edge(v, u, capacity=capacity, edge_type=edge_type) - def _add_infinite_edge(self, u: str, v: str, *, bidirectional: bool = True) -> None: + def _add_infinite_edge( + self, u: str, v: str, *, bidirectional: bool = True, one_way_is_snk2src: bool | None = None + ) -> None: """Add an edge of infinite capacity between two nodes. Possibly bidirectional. Parameters @@ -144,7 +155,16 @@ def _add_infinite_edge(self, u: str, v: str, *, bidirectional: bool = True) -> N bidirectional : bool, optional If True, add the reverse edge as well (default is True). """ - self._add_edge_with_capacity(u, v, capacity=float("inf"), edge_type="fixed", bidirectional=bidirectional) + if one_way_is_snk2src is None: + one_way_is_snk2src = True + self._add_edge_with_capacity( + u, + v, + capacity=float("inf"), + edge_type="fixed", + bidirectional=bidirectional, + one_way_is_snk2src=one_way_is_snk2src, + ) def _add_regular_edge(self, u: str, v: str, capacity: float | None = None, *, bidirectional: bool = True) -> None: """Add a regular (finite-capacity) directed edge. @@ -248,7 +268,7 @@ def build_from_qiskit( self, circuit: QuantumCircuit, *, - one_way_gates: set[str] | None = None, + one_way_gates: dict[str, tuple[str, str]] | None = None, code_bias: bool = False, idle_bonus: bool = False, ) -> None: @@ -270,7 +290,7 @@ def build_from_qiskit( both qubits must be in the same code (bidirectional infinite edges). """ if one_way_gates is None: - one_way_gates = set() + one_way_gates = {} dag = circuit_to_dag(circuit) layers = list(dag.layers()) @@ -303,7 +323,7 @@ def _process_gate_operation( circuit: QuantumCircuit, qubit_activity: dict[int, list[int]], qubit_last_node: list[str | None], - one_way_gates: set[str], + one_way_gates: dict[str, tuple[str, str]], code_bias: bool, idle_bonus: bool, total_temporal_edges: int, @@ -340,7 +360,11 @@ def _process_gate_operation( self._apply_code_constraints(gate_type, current_step_nodes, one_way_gates, code_bias) def _apply_code_constraints( - self, gate_type: str, current_step_nodes: list[tuple[int, str]], one_way_gates: set[str], code_bias: bool + self, + gate_type: str, + current_step_nodes: list[tuple[int, str]], + one_way_gates: dict[str, tuple[str, str]], + code_bias: bool, ) -> None: """Apply infinite edges or bias edges based on gate sets.""" is_source_unique = gate_type in self.gate_set_source and gate_type not in self.gate_set_sink @@ -361,17 +385,33 @@ def _apply_code_constraints( # Single qubit common gates are ignored (they float freely) if is_multi_qubit: is_one_way = gate_type in one_way_gates + direction_is_snk2src = None + if is_one_way: + direction = one_way_gates[gate_type] + direction_is_snk2src = self._parse_one_way_direction(direction) _, target_node = current_step_nodes[-1] controls = current_step_nodes[:-1] for _, ctrl_node in controls: - self._add_infinite_edge(ctrl_node, target_node, bidirectional=not is_one_way) + self._add_infinite_edge( + ctrl_node, target_node, bidirectional=not is_one_way, one_way_is_snk2src=direction_is_snk2src + ) if code_bias: for _, node_id in current_step_nodes: self._add_bias_edges(node_id) + @staticmethod + def _parse_one_way_direction(direction: tuple[str, str]) -> bool: + """Parse the one-way direction tuple into a boolean for control.""" + if direction == ("SRC", "SNK"): + return False + if direction == ("SNK", "SRC"): + return True + msg = f"Invalid one-way direction: {direction}. Must be ('SRC', 'SNK') or ('SNK', 'SRC')." + raise ValueError(msg) + def compute_min_cut(self) -> tuple[int, list[tuple[int, int]], set[str], set[str]]: """Compute the minimum s-t cut between the source and sink. diff --git a/tests/code_switching/test_code_switching_compilation.py b/tests/code_switching/test_code_switching_compilation.py index 67bb646e6..d96b09c93 100644 --- a/tests/code_switching/test_code_switching_compilation.py +++ b/tests/code_switching/test_code_switching_compilation.py @@ -133,12 +133,21 @@ def test_one_way_transversal(simple_graph): assert switch_pos == [(0, 0)] # Switch on qubit 0 at depth 0 simple_graph = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) - simple_graph.build_from_qiskit(qc, one_way_gates={"CX"}) + simple_graph.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() # Now, no switches should be needed assert num_switches == 0 - assert switch_pos == [] # Switch on qubit 0 at depth 0 + assert switch_pos == [] + + # One-way transversal should be invariant of source/sink definition + simple_graph = MinimalCodeSwitchingCompiler({"T", "CX"}, {"H", "CX"}) + simple_graph.build_from_qiskit(qc, one_way_gates={"CX": ("SRC", "SNK")}) + num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() + + # Again, no switches should be needed + assert num_switches == 0 + assert switch_pos == [] def test_code_bias(simple_graph): From bd003896f7907f8dc21492eb36c9214df7246cbe Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 3 Dec 2025 14:46:51 +0100 Subject: [PATCH 78/90] sketch doc structure --- docs/CodeSwitching.md | 135 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/docs/CodeSwitching.md b/docs/CodeSwitching.md index e9565d4b5..81bfc5109 100644 --- a/docs/CodeSwitching.md +++ b/docs/CodeSwitching.md @@ -100,3 +100,138 @@ for pos in positions: ``` The output positions provides the exact locations (qubit, depth) where a code switch operation must be inserted into the circuit. + +Under specific conditions, CNOT operations can be implemented transversally even when the control and target qubits +are encoded in different codes. This property, however, is directional. In the 2D-3D color code scheme, it holds only when the +control qubit is encoded in the 3D color code and the target qubit in the 2D color code + +To account for this, we can can pass a dictionary specifying gates that can be implemented one-way transverally together with their direction. +To see how this affect the optimization, consider the following circuit: + +```{code-cell} ipython3 +qc = QuantumCircuit(2) +qc.t(0) +qc.h(1) +qc.cx(0, 1) +``` + +```{code-cell} ipython3 +:tags: [hide-input] +qc.draw('mpl') +``` + +Calculating the minimum number of switches without considering the one-way transversal CNOT property yields: + +```{code-cell} ipython3 +mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) +mcsc.build_from_qiskit(qc) +num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +print(f"Total switches required (without one-way CNOT): {num_switches}") +print("Switch locations (qubit, depth):") +for pos in positions: + print(f" - Qubit {pos[0]} after operation depth {pos[1]}") +``` + +Hence, a single switch right after the T gate on qubit 0 is required. However, if we consider the one-way transversal CNOT property, we can avoid this switch: + +```{code-cell} ipython3 +mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) +mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) +num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +print(f"Total switches required (without one-way CNOT): {num_switches}") +print("Switch locations (qubit, depth):") +for pos in positions: + print(f" - Qubit {pos[0]} after operation depth {pos[1]}") +``` + +We tell here the graph construction method `build_from_qiskit` that CNOTs `CX` can be implemented transversally when the control qubit is in the Sink code (3D color code) and the target qubit is in the Source code (2D color code) `(control, target)=("SNK","SRC")`. + +## Extensions to the Min-Cut Model + +Finding the minimum number of switches is a good starting point, but in practice, we might want to consider additional factors such as: + +- **Depth Optimization:** Choosing the positions of the switching positions such that switching operations are placed preferribly on idling qubits while keeping the total number of switches minimal. This has the potential to reduce the overall circuit depth increase caused by the switching operations. +- **Code Bias:** If one of the codes has a significantly higher overhead for switching operations, we might want to minimize switches into that code specifically. + +### Depth Optimization + +To incorporate depth optimization, we can assign weights to the temporal edges based on whether the qubit is idling or active. For example, we can assign a lower weight to edges corresponding to idling qubits, encouraging the min-cut algorithm to place switches there. + +```{code-cell} ipython3 +qc = QuantumCircuit(3) +qc.h(0) +qc.t(1) +qc.t(2) +qc.cx(1, 2) +qc.cx(0, 2) +``` + +```{code-cell} ipython3 +:tags: [hide-input] +qc.draw('mpl') +``` + +Running the regular min-cut computation yields a switch on qubit 2 after the T gate: + +```{code-cell} ipython3 +mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) +mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) +num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +print(f"Total switches required (without one-way CNOT): {num_switches}") +print("Switch locations (qubit, depth):") +for pos in positions: + print(f" - Qubit {pos[0]} after operation depth {pos[1]}") +``` + +However, if we assign a lower weight to the temporal edge of qubit 0 (which is idling), the algorithm chooses to place the switch there instead: + +```{code-cell} ipython3 +mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) +mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}, idle_bonus=True) +num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +print(f"Total switches required (without one-way CNOT): {num_switches}") +print("Switch locations (qubit, depth):") +for pos in positions: + print(f" - Qubit {pos[0]} after operation depth {pos[1]}") +``` + +### Code Bias + +To minimize switches into a specific code, we can add a certain code bias. The implementation already has a bias towards the source code. + +```{code-cell} ipython3 +qc = QuantumCircuit(2) +qc.h(1) +qc.t(0) +qc.cx(0, 1) +``` + +```{code-cell} ipython3 +:tags: [hide-input] +qc.draw('mpl') +``` + +The default behavior with a bias towards the source code yields that the switch is placed after the T gate on qubit 0 such that the CNOT is in the source code: + +```{code-cell} ipython3 +mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) +mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) +num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +print(f"Total switches required (without one-way CNOT): {num_switches}") +print("Switch locations (qubit, depth):") +for pos in positions: + print(f" - Qubit {pos[0]} after operation depth {pos[1]}") +``` + +However, if we wanted to instead bias towards the sink code, we could adjust the compiler configuration as follows: + +```{code-cell} ipython3 +config = CompilerConfig(biased_code="SNK") +mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}, config=config) +mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}, code_bias=True) +num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +print(f"Total switches required (without one-way CNOT): {num_switches}") +print("Switch locations (qubit, depth):") +for pos in positions: + print(f" - Qubit {pos[0]} after operation depth {pos[1]}") +``` From 13d38b8a424787f3b8b46cecd1f0644f32ea91b8 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 3 Dec 2025 14:51:52 +0100 Subject: [PATCH 79/90] fix bug in docs --- docs/CodeSwitching.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/CodeSwitching.md b/docs/CodeSwitching.md index 81bfc5109..f0d187f61 100644 --- a/docs/CodeSwitching.md +++ b/docs/CodeSwitching.md @@ -125,7 +125,7 @@ Calculating the minimum number of switches without considering the one-way trans ```{code-cell} ipython3 mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) mcsc.build_from_qiskit(qc) -num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") for pos in positions: @@ -137,7 +137,7 @@ Hence, a single switch right after the T gate on qubit 0 is required. However, i ```{code-cell} ipython3 mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) -num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") for pos in positions: @@ -176,7 +176,7 @@ Running the regular min-cut computation yields a switch on qubit 2 after the T g ```{code-cell} ipython3 mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) -num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") for pos in positions: @@ -188,7 +188,7 @@ However, if we assign a lower weight to the temporal edge of qubit 0 (which is i ```{code-cell} ipython3 mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}, idle_bonus=True) -num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") for pos in positions: @@ -216,7 +216,7 @@ The default behavior with a bias towards the source code yields that the switch ```{code-cell} ipython3 mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) -num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") for pos in positions: @@ -229,7 +229,7 @@ However, if we wanted to instead bias towards the sink code, we could adjust the config = CompilerConfig(biased_code="SNK") mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}, config=config) mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}, code_bias=True) -num_switches, switch_pos, _, _ = simple_graph.compute_min_cut() +num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") for pos in positions: From b71d9b47998c0df128c3eb50efb9710febe08976 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 3 Dec 2025 16:20:59 +0100 Subject: [PATCH 80/90] fix bug in code cells --- docs/CodeSwitching.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/CodeSwitching.md b/docs/CodeSwitching.md index f0d187f61..640aca1db 100644 --- a/docs/CodeSwitching.md +++ b/docs/CodeSwitching.md @@ -91,15 +91,15 @@ We can now build the graph from the circuit and compute the minimum cut. compiler.build_from_qiskit(qc) # Compute Min-Cut -num_switches, positions, set_S, set_T = compiler.compute_min_cut() +num_switches, switch_pos, set_S, set_T = compiler.compute_min_cut() print(f"Total switches required: {num_switches}") print("Switch locations (qubit, depth):") -for pos in positions: +for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") ``` -The output positions provides the exact locations (qubit, depth) where a code switch operation must be inserted into the circuit. +The output pEositions provides the exact locations (qubit, depth) where a code switch operation must be inserted into the circuit. Under specific conditions, CNOT operations can be implemented transversally even when the control and target qubits are encoded in different codes. This property, however, is directional. In the 2D-3D color code scheme, it holds only when the @@ -128,7 +128,7 @@ mcsc.build_from_qiskit(qc) num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") -for pos in positions: +for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") ``` @@ -140,7 +140,7 @@ mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") -for pos in positions: +for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") ``` @@ -179,7 +179,7 @@ mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") -for pos in positions: +for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") ``` @@ -191,7 +191,7 @@ mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}, idle_bonus=True num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") -for pos in positions: +for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") ``` @@ -219,7 +219,7 @@ mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") -for pos in positions: +for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") ``` @@ -232,6 +232,6 @@ mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}, code_bias=True) num_switches, switch_pos, _, _ = mcsc.compute_min_cut() print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") -for pos in positions: +for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") ``` From f63fec28690f8f5ab3f6c7dc28133711b9b09e9b Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 3 Dec 2025 16:59:33 +0100 Subject: [PATCH 81/90] fix typos in the docs --- docs/CodeSwitching.md | 61 +++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/docs/CodeSwitching.md b/docs/CodeSwitching.md index 640aca1db..a406a6154 100644 --- a/docs/CodeSwitching.md +++ b/docs/CodeSwitching.md @@ -41,7 +41,7 @@ Let's look at how to use the `MinimalCodeSwitchingCompiler` to analyze a simple from qiskit import QuantumCircuit from mqt.qecc.code_switching import MinimalCodeSwitchingCompiler, CompilerConfig -# Define the transversal gate sets (names must be uppercase to match Qiskit's node names) +# Define the transversal gate sets: # Code A (Source): 2D Color Code SOURCE_GATES = {"H", "CX"} @@ -49,7 +49,7 @@ SOURCE_GATES = {"H", "CX"} SINK_GATES = {"T", "CX"} # Initialize the compiler -compiler = MinimalCodeSwitchingCompiler( +mcsc = MinimalCodeSwitchingCompiler( gate_set_code_source=SOURCE_GATES, gate_set_code_sink=SINK_GATES ) @@ -88,10 +88,10 @@ We can now build the graph from the circuit and compute the minimum cut. ```{code-cell} ipython3 # Build the graph representation of the circuit -compiler.build_from_qiskit(qc) +mcsc.build_from_qiskit(qc) # Compute Min-Cut -num_switches, switch_pos, set_S, set_T = compiler.compute_min_cut() +num_switches, switch_pos, set_S, set_T = mcsc.compute_min_cut() print(f"Total switches required: {num_switches}") print("Switch locations (qubit, depth):") @@ -99,13 +99,13 @@ for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") ``` -The output pEositions provides the exact locations (qubit, depth) where a code switch operation must be inserted into the circuit. +The output positions provide the exact locations (qubit, depth) where a code switch operation must be inserted into the circuit. -Under specific conditions, CNOT operations can be implemented transversally even when the control and target qubits +Note that under specific conditions, CNOT operations can be implemented transversally even when the control and target qubits are encoded in different codes. This property, however, is directional. In the 2D-3D color code scheme, it holds only when the -control qubit is encoded in the 3D color code and the target qubit in the 2D color code +control qubit is encoded in the 3D color code and the target qubit in the 2D color code. -To account for this, we can can pass a dictionary specifying gates that can be implemented one-way transverally together with their direction. +To account for this, we can pass a dictionary specifying gates that can be implemented one-way transverally together with their direction. To see how this affect the optimization, consider the following circuit: ```{code-cell} ipython3 @@ -126,6 +126,10 @@ Calculating the minimum number of switches without considering the one-way trans mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) mcsc.build_from_qiskit(qc) num_switches, switch_pos, _, _ = mcsc.compute_min_cut() +``` + +```{code-cell} ipython3 +:tags: [hide-input] print(f"Total switches required (without one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") for pos in switch_pos: @@ -138,24 +142,25 @@ Hence, a single switch right after the T gate on qubit 0 is required. However, i mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) num_switches, switch_pos, _, _ = mcsc.compute_min_cut() -print(f"Total switches required (without one-way CNOT): {num_switches}") -print("Switch locations (qubit, depth):") -for pos in switch_pos: - print(f" - Qubit {pos[0]} after operation depth {pos[1]}") ``` -We tell here the graph construction method `build_from_qiskit` that CNOTs `CX` can be implemented transversally when the control qubit is in the Sink code (3D color code) and the target qubit is in the Source code (2D color code) `(control, target)=("SNK","SRC")`. +```{code-cell} ipython3 +:tags: [hide-input] +print(f"Total switches required: {num_switches}") +``` + +We specify in the graph-construction method `build_from_qiskit` that CNOTs (`CX`) are implemented transversally when the control qubit is encoded in the Sink code (3D color code) and the target qubit is encoded in the Source code (2D color code), i.e., `(control, target) <=> ("SNK", "SRC")`. ## Extensions to the Min-Cut Model Finding the minimum number of switches is a good starting point, but in practice, we might want to consider additional factors such as: -- **Depth Optimization:** Choosing the positions of the switching positions such that switching operations are placed preferribly on idling qubits while keeping the total number of switches minimal. This has the potential to reduce the overall circuit depth increase caused by the switching operations. +- **Depth Optimization:** Choosing the placing of the switching positions such that switching operations are placed preferribly on idling qubits while keeping the total number of switches minimal. This has the potential to reduce the overall circuit depth increase caused by the switching operations. - **Code Bias:** If one of the codes has a significantly higher overhead for switching operations, we might want to minimize switches into that code specifically. ### Depth Optimization -To incorporate depth optimization, we can assign weights to the temporal edges based on whether the qubit is idling or active. For example, we can assign a lower weight to edges corresponding to idling qubits, encouraging the min-cut algorithm to place switches there. +To incorporate depth optimization, we can assign an idle bonus to weights of the temporal edges based on whether the qubit is idling or active. For example, we can assign a lower weight to edges corresponding to idling qubits, encouraging the min-cut algorithm to place switches there. ```{code-cell} ipython3 qc = QuantumCircuit(3) @@ -171,13 +176,17 @@ qc.cx(0, 2) qc.draw('mpl') ``` -Running the regular min-cut computation yields a switch on qubit 2 after the T gate: +Running the regular min-cut computation yields a switch on qubit 2 after the T gate (we allow one-way CNOTs here): ```{code-cell} ipython3 mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) num_switches, switch_pos, _, _ = mcsc.compute_min_cut() -print(f"Total switches required (without one-way CNOT): {num_switches}") +``` + +```{code-cell} ipython3 +:tags: [hide-input] +print(f"Total switches required (with one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") @@ -189,7 +198,11 @@ However, if we assign a lower weight to the temporal edge of qubit 0 (which is i mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}, idle_bonus=True) num_switches, switch_pos, _, _ = mcsc.compute_min_cut() -print(f"Total switches required (without one-way CNOT): {num_switches}") +``` + +```{code-cell} ipython3 +:tags: [hide-input] +print(f"Total switches required (with one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") @@ -217,7 +230,11 @@ The default behavior with a bias towards the source code yields that the switch mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}) mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}) num_switches, switch_pos, _, _ = mcsc.compute_min_cut() -print(f"Total switches required (without one-way CNOT): {num_switches}") +``` + +```{code-cell} ipython3 +:tags: [hide-input] +print(f"Total switches required (with one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") @@ -230,7 +247,11 @@ config = CompilerConfig(biased_code="SNK") mcsc = MinimalCodeSwitchingCompiler({"H", "CX"}, {"T", "CX"}, config=config) mcsc.build_from_qiskit(qc, one_way_gates={"CX": ("SNK", "SRC")}, code_bias=True) num_switches, switch_pos, _, _ = mcsc.compute_min_cut() -print(f"Total switches required (without one-way CNOT): {num_switches}") +``` + +```{code-cell} ipython3 +:tags: [hide-input] +print(f"Total switches required (with one-way CNOT): {num_switches}") print("Switch locations (qubit, depth):") for pos in switch_pos: print(f" - Qubit {pos[0]} after operation depth {pos[1]}") From 909c3c6f74ab5772b6047bcbfdb09e08d369e8df Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 9 Dec 2025 09:03:42 +0100 Subject: [PATCH 82/90] Update docs/CodeSwitching.md Co-authored-by: Tom Peham Signed-off-by: Erik Weilandt <48921674+inctechs@users.noreply.github.com> --- docs/CodeSwitching.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/CodeSwitching.md b/docs/CodeSwitching.md index a406a6154..1ad8d1135 100644 --- a/docs/CodeSwitching.md +++ b/docs/CodeSwitching.md @@ -17,11 +17,7 @@ to the other. However, code switching is a costly operation in terms of space and time overhead. Therefore, given a quantum circuit, we want to find the **minimum number of switches** required to execute it. -For this documentation we consider the combination of a 2D and 3D color code as a possible QECC pair for code switching. -2D color codes implement, among others, CNOT and Hadamard gates transversally. On the other hand, 3D color codes -have CNOT and T gates in their transversal gate set. The union of both sets provides a universal gate set {$H$,$T$,$CNOT$}. -So for simplicity we will only consider these three gates in the following examples. - +QECC has functionality to automatically determine the minimum number of switching operations required to perform a circuit using two complementary gate sets. We model this problem as a **Min-Cut / Max-Flow** problem on a directed graph. The graph is constructed such that: - **Source (SRC):** Represents the first code (e.g., 2D Color Code). From dff65bcf7f3fcb30c78ec4e0b4e019a44ce58a7d Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 9 Dec 2025 09:06:09 +0100 Subject: [PATCH 83/90] Apply suggestions from code review for docs Co-authored-by: Tom Peham Signed-off-by: Erik Weilandt <48921674+inctechs@users.noreply.github.com> --- docs/CodeSwitching.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/CodeSwitching.md b/docs/CodeSwitching.md index 1ad8d1135..bab5199bd 100644 --- a/docs/CodeSwitching.md +++ b/docs/CodeSwitching.md @@ -18,7 +18,7 @@ to the other. However, code switching is a costly operation in terms of space and time overhead. Therefore, given a quantum circuit, we want to find the **minimum number of switches** required to execute it. QECC has functionality to automatically determine the minimum number of switching operations required to perform a circuit using two complementary gate sets. -We model this problem as a **Min-Cut / Max-Flow** problem on a directed graph. The graph is constructed such that: +The problem can be modelled as a **Min-Cut / Max-Flow** problem on a directed graph. The graph is constructed such that: - **Source (SRC):** Represents the first code (e.g., 2D Color Code). - **Sink (SNK):** Represents the second code (e.g., 3D Color Code). @@ -31,7 +31,7 @@ The minimum cut separating the Source from the Sink corresponds to the optimal s ## Basic Usage -Let's look at how to use the `MinimalCodeSwitchingCompiler` to analyze a simple quantum circuit. We start by defining the gate sets supported by our two hypothetical codes. +Let's look at how to use the `MinimalCodeSwitchingCompiler` to analyze a simple quantum circuit. Assume the two codes in question are the 2D and 3D color codes, which have transversal gate sets $\{H, CX\}$ and $\{T, CX\}$, respectively. ```{code-cell} ipython3 from qiskit import QuantumCircuit From e81fe166cc108d82a31942c7bb038b5a2c0ac001 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 9 Dec 2025 09:08:56 +0100 Subject: [PATCH 84/90] Apply suggestions from code review: fix naming of class in docstrings Co-authored-by: Tom Peham Signed-off-by: Erik Weilandt <48921674+inctechs@users.noreply.github.com> --- src/mqt/qecc/code_switching/code_switching_compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mqt/qecc/code_switching/code_switching_compiler.py b/src/mqt/qecc/code_switching/code_switching_compiler.py index 96c573756..a3848ccb0 100644 --- a/src/mqt/qecc/code_switching/code_switching_compiler.py +++ b/src/mqt/qecc/code_switching/code_switching_compiler.py @@ -25,7 +25,7 @@ @dataclass class CompilerConfig: - """Holds all configuration parameters for the CodeSwitchGraph.""" + """Holds all configuration parameters for the MinimalCodeSwitchingCompiler.""" edge_capacity_ratio: float = 0.001 default_temporal_edge_capacity: float = 1.0 @@ -69,7 +69,7 @@ class MinimalCodeSwitchingCompiler: def __init__( self, gate_set_code_source: set[str], gate_set_code_sink: set[str], config: CompilerConfig | None = None ) -> None: - """Initialize the CodeSwitchGraph with source and sink nodes.""" + """Initialize the MinimalCodeSwitchingCompiler with source and sink nodes.""" if config is None: self.config = CompilerConfig() else: From 5674e4f14fe19961ac92bfd36cbbbb622b928670 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 9 Dec 2025 09:30:23 +0100 Subject: [PATCH 85/90] edit Changelog.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af1421ab1..0c1512aad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning], with the exception that minor rel ### Added +- New `MinimalCodeSwitchingCompiler` class that implements a compiler for minimal-overhead code switching on the logical level. ([#524], [arXiv:2512.04170](https://arxiv.org/abs/2512.04170)) ([**@inctechs**]) - Added `gottesman_encoding_circuit` methods that constructs a stim encoding circuit for a given stabilizer code using the method described in Gottesman's "Surviving as a Quantum Computer in a Classical World" Chapter 6.4.1. ([#486]) ([**@pehamtom**]) - Added class `SteaneNDFTStatePrepSimulator` for simulating non-deterministic state preparation protocols for CSS codes using verification with multiple ancilla states. ([#462]) ([**@pehamtom**]) - Extended estimation of error rates in `NoisyNDFTStatePrepSimulator` via `secondary_logical_error_rate`. Now Z (X) error rates can also be estimated for the preparation of logical zero (plus). ([#462]) ([**@pehamtom**]) From ed674dc6ecac7fab081476da88a92cb4b878c205 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 9 Dec 2025 09:53:52 +0100 Subject: [PATCH 86/90] fix latest coderabbit feedback --- .../qecc/code_switching/code_switching_compiler.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mqt/qecc/code_switching/code_switching_compiler.py b/src/mqt/qecc/code_switching/code_switching_compiler.py index a3848ccb0..c43008e6d 100644 --- a/src/mqt/qecc/code_switching/code_switching_compiler.py +++ b/src/mqt/qecc/code_switching/code_switching_compiler.py @@ -247,6 +247,8 @@ def _edge_capacity_with_idle_bonus( ---------- depths : list[int] The ordered list of depth indices for a given qubit's gates. + total_edges : int + The total count of temporal edges in the circuit, used for normalization. base_capacity : float, optional The default temporal edge capacity. @@ -283,10 +285,11 @@ def build_from_qiskit( idle_bonus : bool, optional If True, reduce temporal edge capacities based on idle durations via `_edge_capacity_with_idle_bonus`. Default is False. - one_way_gates : set[str], optional - A set of multi-qubit gate names (e.g. {"CX"}) that are in `common_gates` - but allow for one-way transversality (mixed codes). - If a common multi-qubit gate is NOT in this set, it is assumed + one_way_gates : dict[str, tuple[str, str]], optional + A dict mapping multi-qubit gate names (e.g., "CX") to direction tuples + (e.g., ("SNK", "SRC")) specifying which code the control and target + qubits should be in for one-way transversal execution. + If a common multi-qubit gate is NOT in this dict, it is assumed both qubits must be in the same code (bidirectional infinite edges). """ if one_way_gates is None: From e901ac51956bad2dcce0b9c174e8cf743cefcc2c Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:10:27 +0100 Subject: [PATCH 87/90] add missing references to changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c1512aad..3b953edbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ _📚 Refer to the [GitHub Release Notes](https://github.com/munich-quantum-tool +[#524]: https://github.com/munich-quantum-toolkit/qecc/pull/524 [#503]: https://github.com/munich-quantum-toolkit/qecc/pull/503 [#499]: https://github.com/munich-quantum-toolkit/qecc/pull/499 [#486]: https://github.com/munich-quantum-toolkit/qecc/pull/486 @@ -57,6 +58,7 @@ _📚 Refer to the [GitHub Release Notes](https://github.com/munich-quantum-tool [**@pehamtom**]: https://github.com/pehamtom [**@denialhaag**]: https://github.com/denialhaag +[**@inctechs**]: https://github.com/inctechs From 94f31eae185afec21764b557bde9fa89acaa2c07 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 09:41:10 +0000 Subject: [PATCH 88/90] =?UTF-8?q?=F0=9F=8E=A8=20pre-commit=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/cs_compiler/generate_random_circuits.py | 2 +- scripts/cs_compiler/run_generate_circuits.sh | 2 +- scripts/cs_compiler/run_performance_simulations.sh | 2 +- scripts/cs_compiler/simulate_circuit_performance.py | 2 +- src/mqt/qecc/code_switching/__init__.py | 2 +- src/mqt/qecc/code_switching/code_switching_compiler.py | 2 +- src/mqt/qecc/code_switching/compilation_utils.py | 2 +- tests/code_switching/__init__.py | 2 +- tests/code_switching/test_code_switching_compilation.py | 2 +- tests/code_switching/test_compilation_utils.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/cs_compiler/generate_random_circuits.py b/scripts/cs_compiler/generate_random_circuits.py index 1efc6b0f9..be602a9e1 100644 --- a/scripts/cs_compiler/generate_random_circuits.py +++ b/scripts/cs_compiler/generate_random_circuits.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM # All rights reserved. # # SPDX-License-Identifier: MIT diff --git a/scripts/cs_compiler/run_generate_circuits.sh b/scripts/cs_compiler/run_generate_circuits.sh index 42ab1b0b4..1634c0f4e 100644 --- a/scripts/cs_compiler/run_generate_circuits.sh +++ b/scripts/cs_compiler/run_generate_circuits.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM # All rights reserved. # # SPDX-License-Identifier: MIT diff --git a/scripts/cs_compiler/run_performance_simulations.sh b/scripts/cs_compiler/run_performance_simulations.sh index f9c45372e..b61644c6b 100644 --- a/scripts/cs_compiler/run_performance_simulations.sh +++ b/scripts/cs_compiler/run_performance_simulations.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM # All rights reserved. # # SPDX-License-Identifier: MIT diff --git a/scripts/cs_compiler/simulate_circuit_performance.py b/scripts/cs_compiler/simulate_circuit_performance.py index b64206e83..48e406eef 100644 --- a/scripts/cs_compiler/simulate_circuit_performance.py +++ b/scripts/cs_compiler/simulate_circuit_performance.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM # All rights reserved. # # SPDX-License-Identifier: MIT diff --git a/src/mqt/qecc/code_switching/__init__.py b/src/mqt/qecc/code_switching/__init__.py index 967e5c5cc..b2b0c6464 100644 --- a/src/mqt/qecc/code_switching/__init__.py +++ b/src/mqt/qecc/code_switching/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM # All rights reserved. # # SPDX-License-Identifier: MIT diff --git a/src/mqt/qecc/code_switching/code_switching_compiler.py b/src/mqt/qecc/code_switching/code_switching_compiler.py index c43008e6d..21046f430 100644 --- a/src/mqt/qecc/code_switching/code_switching_compiler.py +++ b/src/mqt/qecc/code_switching/code_switching_compiler.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM # All rights reserved. # # SPDX-License-Identifier: MIT diff --git a/src/mqt/qecc/code_switching/compilation_utils.py b/src/mqt/qecc/code_switching/compilation_utils.py index 8a9b7f9ea..ec935bbb8 100644 --- a/src/mqt/qecc/code_switching/compilation_utils.py +++ b/src/mqt/qecc/code_switching/compilation_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM # All rights reserved. # # SPDX-License-Identifier: MIT diff --git a/tests/code_switching/__init__.py b/tests/code_switching/__init__.py index f0c5d3e8c..fa9b07563 100644 --- a/tests/code_switching/__init__.py +++ b/tests/code_switching/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM # All rights reserved. # # SPDX-License-Identifier: MIT diff --git a/tests/code_switching/test_code_switching_compilation.py b/tests/code_switching/test_code_switching_compilation.py index d96b09c93..e27ea078c 100644 --- a/tests/code_switching/test_code_switching_compilation.py +++ b/tests/code_switching/test_code_switching_compilation.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM # All rights reserved. # # SPDX-License-Identifier: MIT diff --git a/tests/code_switching/test_compilation_utils.py b/tests/code_switching/test_compilation_utils.py index 17ca76a3b..5262f1d7d 100644 --- a/tests/code_switching/test_compilation_utils.py +++ b/tests/code_switching/test_compilation_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM # All rights reserved. # # SPDX-License-Identifier: MIT From 1eb3f399c2fbf39748b8495f193f5bb84a5dfb0e Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Wed, 14 Jan 2026 13:28:24 +0100 Subject: [PATCH 89/90] fix last coderabbit changes --- docs/CodeSwitching.md | 2 +- .../qecc/code_switching/code_switching_compiler.py | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/docs/CodeSwitching.md b/docs/CodeSwitching.md index bab5199bd..5478e1e29 100644 --- a/docs/CodeSwitching.md +++ b/docs/CodeSwitching.md @@ -151,7 +151,7 @@ We specify in the graph-construction method `build_from_qiskit` that CNOTs (`CX` Finding the minimum number of switches is a good starting point, but in practice, we might want to consider additional factors such as: -- **Depth Optimization:** Choosing the placing of the switching positions such that switching operations are placed preferribly on idling qubits while keeping the total number of switches minimal. This has the potential to reduce the overall circuit depth increase caused by the switching operations. +- **Depth Optimization:** Choosing the placing of the switching positions such that switching operations are placed preferably on idling qubits while keeping the total number of switches minimal. This has the potential to reduce the overall circuit depth increase caused by the switching operations. - **Code Bias:** If one of the codes has a significantly higher overhead for switching operations, we might want to minimize switches into that code specifically. ### Depth Optimization diff --git a/src/mqt/qecc/code_switching/code_switching_compiler.py b/src/mqt/qecc/code_switching/code_switching_compiler.py index c43008e6d..60683220e 100644 --- a/src/mqt/qecc/code_switching/code_switching_compiler.py +++ b/src/mqt/qecc/code_switching/code_switching_compiler.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM # All rights reserved. # # SPDX-License-Identifier: MIT @@ -331,15 +331,7 @@ def _process_gate_operation( idle_bonus: bool, total_temporal_edges: int, ) -> None: - """Handle node creation, temporal edges, and code constraints for a single gate. - - Parameters. - ---------- - node : DAGOpNode - The gate operation node from the DAG. - depth : int - The depth (layer index) of the operation in the circuit. - """ + """Handle node creation, temporal edges, and code constraints for a single gate.""" qubits_indices = [circuit.find_bit(q).index for q in node.qargs] gate_type = node.name.upper() From a43628c40a4df0e6cb998a35eeffafc31d7dbd29 Mon Sep 17 00:00:00 2001 From: Erik Weilandt <48921674+inctechs@users.noreply.github.com> Date: Thu, 15 Jan 2026 15:18:44 +0100 Subject: [PATCH 90/90] remove note from README and add key feature description --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 1b168be36..f5b639854 100644 --- a/README.md +++ b/README.md @@ -33,15 +33,12 @@ It is part of the [_Munich Quantum Toolkit (MQT)_](https://mqt.readthedocs.io). The SMT solver Z3 is used to determine minimal solutions of the MaxSAT problem, resulting in minimum-weight decoding estimates. - Decode bosonic quantum LDPC codes and conduct numerical simulations for analog information decoding under phenomenological (cat qubit) noise. - Synthesize non-deterministic and deterministic fault-tolerant state preparation circuits for qubit CSS codes. +- Find the minimum number of code switching operations and their placement in a given quantum circuit that employs code switching as a way to implement logical operations fault-tolerantly. > [!NOTE] > Usage for _Lattice Surgery Compilation Beyond the Surface Code_ as well as _Exploiting Movable Logical Qubits for Lattice Surgery Compilation_ is described in [`docs/cococo.md`](https://github.com/munich-quantum-toolkit/qecc/blob/cococo/docs/cococo.md) in the `cococo` branch. > The code quality in the branch is actively being improved. -> [!NOTE] -> Usage for _Minimizing the Number of Code Switching Operations in Fault-Tolerant Quantum Circuits_ is described in [`docs/CodeSwitching.md`](https://github.com/munich-quantum-toolkit/qecc/blob/code-switching-compiler/docs/CodeSwitching.md) in the `code-switching-compiler` branch. -> This branch undergoes some final improvements before being merged into `main`. - > [!WARNING] > The C++ implementation of the [union find decoder for LDPC codes](https://arxiv.org/pdf/2301.05731) and the [circuit transpilation framework](https://arxiv.org/abs/2209.0118) have been removed with `v2.0.0` and are no longer available. > QECC is now entirely a Python package.