Skip to content

Commit

Permalink
fix IonQ device naming
Browse files Browse the repository at this point in the history
  • Loading branch information
salmma committed Dec 1, 2023
1 parent bd7b94c commit 34ee063
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/ionq_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
3 changes: 0 additions & 3 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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.")
Expand Down

0 comments on commit 34ee063

Please sign in to comment.