How to calculate excited states¶
In the previous section, we calculated the ground state. However, the wave function can have additional solutions, known as excited states. These solutions feature extra zero crossings, referred to as nodes. To calculate excited states, we need to specify the number of nodes the wave function should have. This is done by configuring the solver to incorporate nodes in the solution:
solver.nodes.add(sg.PointNode(count=3))
In 1D problems, only point nodes are applicable, representing zero crossings at specific locations. In this case we tell the solver to find a solution with three zero crossings. You don't need to specify the locations in advance—the solver will determine them. Multiple types of nodes can be added, which will be useful for higher-dimensional problems. For now, let's run the one dimensional example:
import sigspace as sg
import numpy as np
def Vfun(x):
return -8/(1 + x**2)
H = sg.Hamiltonian(sdims=1) + Vfun
solver = sg.Solver(H)
solver.nodes.add(sg.PointNode(count=3))
solver.grid(-10, 10, 200)
solver.print_info = True
sol = solver.run()
sg.quickplot(sol)