Skip to content

Commit

Permalink
change measure usage
Browse files Browse the repository at this point in the history
  • Loading branch information
antalszava committed Feb 22, 2022
1 parent 4b39772 commit 6b50a6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pennylane_qiskit/qiskit_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import numpy as np
from qiskit import ClassicalRegister, QuantumCircuit, QuantumRegister
from qiskit import extensions as ex
from qiskit.circuit.measure import measure
from qiskit.compiler import transpile
from qiskit.converters import circuit_to_dag, dag_to_circuit

Expand Down Expand Up @@ -237,7 +236,7 @@ def create_circuit_object(self, operations, **kwargs):
if self.backend_name not in self._state_backends:
# Add measurements if they are needed
for qr, cr in zip(self._reg, self._creg):
measure(self._circuit, qr, cr)
self._circuit.measure(qr, cr)
elif "aer" in self.backend_name:
self._circuit.save_state()

Expand Down

0 comments on commit 6b50a6d

Please sign in to comment.