Skip to content

Commit

Permalink
Fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentmr committed Apr 17, 2024
1 parent a4985de commit 103bad1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def map_wire(wire: int):

def _pauli_sentence(self, observable, wires_map: dict = None):
"""Serialize a :class:`pennylane.pauli.PauliSentence` into a Hamiltonian."""
# Trivial Pauli sentences' items is empty, cannot unpack
# Trivial Pauli sentences' items is empty, cannot unpack
if not observable:
return self.hamiltonian_obs(np.array([0.0]).astype(self.rtype), [self._ob(Identity(0))])
pwords, coeffs = zip(*observable.items())
Expand Down

0 comments on commit 103bad1

Please sign in to comment.