Skip to content

Commit

Permalink
Fix import in shots=None case
Browse files Browse the repository at this point in the history
  • Loading branch information
cosenal committed Oct 21, 2024
1 parent cc7a844 commit 034ec88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pennylane_qrack/qrack_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import numpy as np

from pennylane import QubitDevice, DeviceError
from pennylane import QubitDevice, DeviceError, QuantumFunctionError
from pennylane.ops import (
QubitStateVector,
BasisState,
Expand Down Expand Up @@ -649,7 +649,7 @@ def expval(self, observable, **kwargs):

def generate_samples(self):
if self.shots is None:
raise qml.QuantumFunctionError(
raise QuantumFunctionError(
"The number of shots has to be explicitly set on the device "
"when using sample-based measurements."
)
Expand Down

0 comments on commit 034ec88

Please sign in to comment.