Skip to content

Commit

Permalink
replace qml.QubitDevice with qml.devices.QubitDevice
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Preciado committed Sep 17, 2024
1 parent 725ef8f commit 80bce7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pennylane_cirq/qsim_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def capabilities(self): # pylint: disable=missing-function-docstring
return capabilities

def expval(self, observable, shot_range=None, bin_size=None):
return qml.QubitDevice.expval(self, observable, shot_range, bin_size)
return qml.devices.QubitDevice.expval(self, observable, shot_range, bin_size)

def apply(self, operations, **kwargs):
# pylint: disable=missing-function-docstring
Expand Down
2 changes: 1 addition & 1 deletion pennylane_cirq/simulator_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def expval(self, observable, shot_range=None, bin_size=None):
try:
return super().expval(observable, shot_range, bin_size)
except ValueError:
return qml.QubitDevice.expval(self, observable, shot_range, bin_size)
return qml.devices.QubitDevice.expval(self, observable, shot_range, bin_size)

def _apply_basis_state(self, basis_state_operation):
super()._apply_basis_state(basis_state_operation)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mixed_simulator_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ def circuit():
qml.apply(gate)
return qml.expval(qml.PauliZ(0))

spy = mocker.spy(qml.QubitDevice, "expval")
spy = mocker.spy(qml.devices.QubitDevice, "expval")

if use_super:
mock_simulate = mocker.patch("cirq.DensityMatrixSimulator.simulate_expectation_values")
Expand Down

0 comments on commit 80bce7f

Please sign in to comment.