From 0f7a9bf8d56e7f900c65aef2f0d9fbe96966c74e Mon Sep 17 00:00:00 2001 From: lillian542 <38584660+lillian542@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:32:45 -0400 Subject: [PATCH] change back to QuantumCircuit.from_qasm_str (#581) --- pennylane_qiskit/converter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pennylane_qiskit/converter.py b/pennylane_qiskit/converter.py index c2dfe9d0..938a3a3b 100644 --- a/pennylane_qiskit/converter.py +++ b/pennylane_qiskit/converter.py @@ -22,7 +22,6 @@ import numpy as np from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister from qiskit.converters import circuit_to_dag, dag_to_circuit -import qiskit.qasm2 from qiskit.circuit import Parameter, ParameterExpression, ParameterVector from qiskit.circuit import Measure, Barrier, ControlFlowOp, Clbit from qiskit.circuit import library as lib @@ -646,7 +645,7 @@ def load_qasm(qasm_string: str, measurements=None): Returns: function: the new PennyLane template """ - return load(qiskit.qasm2.loads(qasm_string), measurements=measurements) + return load(QuantumCircuit.from_qasm_str(qasm_string), measurements=measurements) def load_qasm_from_file(file: str):