Skip to content

Commit

Permalink
remove Tensor handling from device
Browse files Browse the repository at this point in the history
  • Loading branch information
lillian542 committed Nov 15, 2024
1 parent f9200c0 commit 0675bce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

### Breaking changes 💔

* Support for the `pennylane.operation.Tensor` observable is removed. This observable was deprecated,
and is fully removed in PennyLane 0.40.
[(#)](https://github.com/PennyLaneAI/pennylane-rigetti/pull/)

### Deprecations 👋

### Documentation 📝
Expand Down
3 changes: 1 addition & 2 deletions pennylane_rigetti/qpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import numpy as np
from pennylane.measurements import Expectation
from pennylane.operation import Tensor
from pennylane.ops import Prod
from pennylane.tape import QuantumTape
from pyquil import get_qc
Expand Down Expand Up @@ -142,7 +141,7 @@ def expval(self, observable, shot_range=None, bin_size=None):
pauli_obs = sZ(wire)

# Multi-qubit observable
elif len(device_wires) > 1 and isinstance(observable, (Tensor, Prod)):
elif len(device_wires) > 1 and isinstance(observable, Prod):
# All observables are rotated to be measured in the Z-basis, so we just need to
# check which wires exist in the observable, map them to physical qubits, and measure
# the product of PauliZ operators on those qubits
Expand Down

0 comments on commit 0675bce

Please sign in to comment.