Skip to content

Commit

Permalink
Update pennylane_lightning/core/_serialize.py
Browse files Browse the repository at this point in the history
Co-authored-by: Mudit Pandey <[email protected]>
  • Loading branch information
multiphaseCFD and mudit2812 authored Sep 20, 2024
1 parent 5378b6a commit 041cf1e
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 @@ -286,7 +286,7 @@ def map_wire(wire: int):
return wires_map[wire] if wires_map else wire

if len(observable) == 0:
return self.named_obs(PAULI_NAME_MAP["I"], [map_wire(0)])
return self.named_obs(PAULI_NAME_MAP["I"], [0])

Check warning on line 289 in pennylane_lightning/core/_serialize.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/core/_serialize.py#L288-L289

Added lines #L288 - L289 were not covered by tests

if len(observable) == 1:
wire, pauli = list(observable.items())[0]
Expand Down

0 comments on commit 041cf1e

Please sign in to comment.