From 34ee0632dd478b823ddb46e505edc3ccb36c1dd2 Mon Sep 17 00:00:00 2001 From: Marie Salm Date: Fri, 1 Dec 2023 11:16:23 +0100 Subject: [PATCH] fix IonQ device naming --- app/ionq_handler.py | 4 ++++ app/routes.py | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/ionq_handler.py b/app/ionq_handler.py index 3a0e287..6a0bc7b 100644 --- a/app/ionq_handler.py +++ b/app/ionq_handler.py @@ -23,6 +23,10 @@ def get_qpu(token, qpu_name): provider = IonQProvider(token) + if "simulator" not in qpu_name: + qpu_name = qpu_name.replace(" ", "-").lower() + ionq_signature = "ionq_qpu." + qpu_name = ionq_signature + qpu_name return provider.get_backend(qpu_name) diff --git a/app/routes.py b/app/routes.py index 8968aa0..38af816 100644 --- a/app/routes.py +++ b/app/routes.py @@ -95,7 +95,6 @@ def transpile_circuit(): abort(400) try: - print(f"Circuit:\n{circuit}") non_transpiled_depth_old = 0 non_transpiled_depth = circuit.depth() while non_transpiled_depth_old < non_transpiled_depth: @@ -147,7 +146,6 @@ def transpile_circuit(): transpiled_circuit = transpile(circuit, backend=backend) else: transpiled_circuit = transpile(circuit, backend=backend, optimization_level=3) - print(f"Transpiled Circuit:\n{transpiled_circuit}") width = circuit_analysis.get_width_of_circuit(transpiled_circuit) depth = transpiled_circuit.depth() total_number_of_operations = transpiled_circuit.size() @@ -241,7 +239,6 @@ def analyze_original_circuit(): non_transpiled_number_of_measurement_operations non_transpiled_multi_qubit_gate_depth, non_transpiled_circuit = circuit_analysis.get_multi_qubit_gate_depth( circuit) - print(circuit) print(f"Non transpiled width {non_transpiled_width} & non transpiled depth {non_transpiled_depth}") if not circuit: app.logger.warn(f"{short_impl_name} not found.")