From 3b664daeddc9258633c972ebb08b11110cf1b812 Mon Sep 17 00:00:00 2001 From: lillian542 Date: Wed, 28 Aug 2024 10:26:00 -0400 Subject: [PATCH] change back to QuantumCircuit.from_qasm_str --- 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):