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 2075d93 commit 5e0f4d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pennylane/spin/spin_hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ def kitaev(n_cells, coupling=None, boundary_condition=False):
return hamiltonian.simplify()


def custom_hamiltonian_from_lattice(lattice):
r"""Generates the Hamiltonian for a custom lattice.
def spin_hamiltonian(lattice):
r"""Generates a spin Hamiltonian for a custom lattice.
Args:
lattice (Lattice): custom lattice defined with custom_edges
Expand Down Expand Up @@ -432,7 +432,7 @@ def custom_hamiltonian_from_lattice(lattice):
)

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

0 comments on commit 5e0f4d7

Please sign in to comment.