Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
austingmhuang committed Sep 20, 2024
1 parent bfa9e2f commit eb0670b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pennylane/spin/spin_hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"""

import pennylane as qml
from pennylane import X, Y, Z, math
from pennylane import I, X, Y, Z, math
from pennylane.fermi import FermiWord

from .lattice import Lattice, _generate_lattice
Expand Down Expand Up @@ -736,7 +736,7 @@ def spin_hamiltonian(lattice):
"Custom edges need to be defined and should have an operator defined as a `str`"
)

opmap = {"X": X, "Y": Y, "Z": Z}
opmap = {"I": I, "X": X, "Y": Y, "Z": Z}
hamiltonian = 0.0 * qml.I(0)
for edge in lattice.edges:
v1, v2 = edge[0:2]
Expand Down

0 comments on commit eb0670b

Please sign in to comment.