The Hamiltonian is the sum of the kinetic energies of all the particles, plus the potential energy of the particles associated with the system. For different situations or number of particles, the Hamiltonian is different since it includes the sum of kinetic energies of the particles, and the potential energy function corresponding to the situation.
By analogy with classical mechanics, the Hamiltonian is commonly expressed as the sum of operators corresponding to the kinetic and potential energies of a system in the form
H
^
=
T
^
+
V
^
where
V
^
=
V
=
V
(
r
,
t
)
is the potential energy operator and
T
^
=
p
^
⋅
p
^
2
m
=
p
^
2
2
m
=
−
ℏ
2
2
m
∇
2
is the kinetic energy operator in which m is the mass of the particle, the dot denotes the dot product of vectors, and
p
^
=
−
i
ℏ
∇
is the momentum operator wherein ∇ is the del operator. The dot product of ∇ with itself is the Laplacian ∇^{2}. In three dimensions using Cartesian coordinates the Laplace operator is
∇
2
=
∂
2
∂
x
2
+
∂
2
∂
y
2
+
∂
2
∂
z
2
Although this is not the technical definition of the Hamiltonian in classical mechanics, it is the form it most commonly takes. Combining these together yields the familiar form used in the Schrödinger equation:
H
^
=
T
^
+
V
^
=
p
^
⋅
p
^
2
m
+
V
(
r
,
t
)
=
−
ℏ
2
2
m
∇
2
+
V
(
r
,
t
)
which allows one to apply the Hamiltonian to systems described by a wave function Ψ(r, t). This is the approach commonly taken in introductory treatments of quantum mechanics, using the formalism of Schrödinger's wave mechanics.
One can also make substitutions to certain variables to fit specific cases, such as some involving electromagnetic fields.
The formalism can be extended to N particles:
H
^
=
∑
n
=
1
N
T
^
n
+
V
where
V
=
V
(
r
1
,
r
2
⋯
r
N
,
t
)
is the potential energy function, now a function of the spatial configuration of the system and time (a particular set of spatial positions at some instant of time defines a configuration) and;
T
^
n
=
p
n
⋅
p
n
2
m
n
is the kinetic energy operator of particle n, and ∇_{n} is the gradient for particle n, ∇_{n}^{2} is the Laplacian for particle using the coordinates:
∇
n
2
=
∂
2
∂
x
n
2
+
∂
2
∂
y
n
2
+
∂
2
∂
z
n
2
Combining these yields the Schrödinger Hamiltonian for the Nparticle case:
H
^
=
∑
n
=
1
N
T
^
n
+
V
=
∑
n
=
1
N
p
^
n
⋅
p
^
n
2
m
n
+
V
(
r
1
,
r
2
⋯
r
N
,
t
)
=
−
ℏ
2
2
∑
n
=
1
N
1
m
n
∇
n
2
+
V
(
r
1
,
r
2
⋯
r
N
,
t
)
However, complications can arise in the manybody problem. Since the potential energy depends on the spatial arrangement of the particles, the kinetic energy will also depend on the spatial configuration to conserve energy. The motion due to any one particle will vary due to the motion of all the other particles in the system. For this reason cross terms for kinetic energy may appear in the Hamiltonian; a mix of the gradients for two particles:
−
ℏ
2
2
M
∇
i
⋅
∇
j
where M denotes the mass of the collection of particles resulting in this extra kinetic energy. Terms of this form are known as mass polarization terms, and appear in the Hamiltonian of many electron atoms (see below).
For N interacting particles, i.e. particles which interact mutually and constitute a manybody situation, the potential energy function V is not simply a sum of the separate potentials (and certainly not a product, as this is dimensionally incorrect). The potential energy function can only be written as above: a function of all the spatial positions of each particle.
For noninteracting particles, i.e. particles which do not interact mutually and move independently, the potential of the system is the sum of the separate potential energy for each particle, that is
V
=
∑
i
=
1
N
V
(
r
i
,
t
)
=
V
(
r
1
,
t
)
+
V
(
r
2
,
t
)
+
⋯
+
V
(
r
N
,
t
)
The general form of the Hamiltonian in this case is:
H
^
=
−
ℏ
2
2
∑
i
=
1
N
1
m
i
∇
i
2
+
∑
i
=
1
N
V
i
=
∑
i
=
1
N
(
−
ℏ
2
2
m
i
∇
i
2
+
V
i
)
=
∑
i
=
1
N
H
^
i
where the sum is taken over all particles and their corresponding potentials; the result is that the Hamiltonian of the system is the sum of the separate Hamiltonians for each particle. This is an idealized situation  in practice the particles are usually always influenced by some potential, and there are manybody interactions. One illustrative example of a twobody interaction where this form would not apply is for electrostatic potentials due to charged particles, because they interact with each other by Coulomb interaction (electrostatic force), as shown below.
The Hamiltonian generates the time evolution of quantum states. If

ψ
(
t
)
⟩
is the state of the system at time t, then
H

ψ
(
t
)
⟩
=
i
ℏ
∂
∂
t

ψ
(
t
)
⟩
.
This equation is the Schrödinger equation. It takes the same form as the Hamilton–Jacobi equation, which is one of the reasons H is also called the Hamiltonian. Given the state at some initial time (t = 0), we can solve it to obtain the state at any subsequent time. In particular, if H is independent of time, then

ψ
(
t
)
⟩
=
e
−
i
H
t
/
ℏ

ψ
(
0
)
⟩
.
The exponential operator on the right hand side of the Schrödinger equation is usually defined by the corresponding power series in H. One might notice that taking polynomials or power series of unbounded operators that are not defined everywhere may not make mathematical sense. Rigorously, to take functions of unbounded operators, a functional calculus is required. In the case of the exponential function, the continuous, or just the holomorphic functional calculus suffices. We note again, however, that for common calculations the physicists' formulation is quite sufficient.
By the *homomorphism property of the functional calculus, the operator
U
=
e
−
i
H
t
/
ℏ
is a unitary operator. It is the time evolution operator, or propagator, of a closed quantum system. If the Hamiltonian is timeindependent, {U(t)} form a one parameter unitary group (more than a semigroup); this gives rise to the physical principle of detailed balance.
However, in the more general formalism of Dirac, the Hamiltonian is typically implemented as an operator on a Hilbert space in the following way:
The eigenkets (eigenvectors) of H, denoted

a
⟩
, provide an orthonormal basis for the Hilbert space. The spectrum of allowed energy levels of the system is given by the set of eigenvalues, denoted {E_{a}}, solving the equation:
H

a
⟩
=
E
a

a
⟩
.
Since H is a Hermitian operator, the energy is always a real number.
From a mathematically rigorous point of view, care must be taken with the above assumptions. Operators on infinitedimensional Hilbert spaces need not have eigenvalues (the set of eigenvalues does not necessarily coincide with the spectrum of an operator). However, all routine quantum mechanical calculations can be done using the physical formulation.
Following are expressions for the Hamiltonian in a number of situations. Typical ways to classify the expressions are the number of particles, number of dimensions, and the nature of the potential energy function  importantly space and time dependence. Masses are denoted by m, and charges by q.
The particle is not bound by any potential energy, so the potential is zero and this Hamiltonian is the simplest. For one dimension:
H
^
=
−
ℏ
2
2
m
∂
2
∂
x
2
and in three dimensions:
H
^
=
−
ℏ
2
2
m
∇
2
For a particle in a region of constant potential V = V_{0} (no dependence on space or time), in one dimension, the Hamiltonian is:
H
^
=
−
ℏ
2
2
m
∂
2
∂
x
2
+
V
0
in three dimensions
H
^
=
−
ℏ
2
2
m
∇
2
+
V
0
This applies to the elementary "particle in a box" problem, and step potentials.
For a simple harmonic oscillator in one dimension, the potential varies with position (but not time), according to:
V
=
k
2
x
2
=
m
ω
2
2
x
2
where the angular frequency
ω
, effective spring constant k, and mass m of the oscillator satisfy:
ω
2
=
k
m
so the Hamiltonian is:
H
^
=
−
ℏ
2
2
m
∂
2
∂
x
2
+
m
ω
2
2
x
2
For three dimensions, this becomes
H
^
=
−
ℏ
2
2
m
∇
2
+
m
ω
2
2
r
2
where the threedimensional position vector r using cartesian coordinates is (x, y, z), its magnitude is
r
2
=
r
⋅
r
=

r

2
=
x
2
+
y
2
+
z
2
Writing the Hamiltonian out in full shows it is simply the sum of the onedimensional Hamiltonians in each direction:
H
^
=
−
ℏ
2
2
m
(
∂
2
∂
x
2
+
∂
2
∂
y
2
+
∂
2
∂
z
2
)
+
m
ω
2
2
(
x
2
+
y
2
+
z
2
)
=
(
−
ℏ
2
2
m
∂
2
∂
x
2
+
m
ω
2
2
x
2
)
+
(
−
ℏ
2
2
m
∂
2
∂
y
2
+
m
ω
2
2
y
2
)
+
(
−
ℏ
2
2
m
∂
2
∂
z
2
+
m
ω
2
2
z
2
)
For a rigid rotor – i.e. system of particles which can rotate freely about any axes, not bound in any potential (such as free molecules with negligible vibrational degrees of freedom, say due to double or triple chemical bonds), Hamiltonian is:
H
^
=
−
ℏ
2
2
I
x
x
J
^
x
2
−
ℏ
2
2
I
y
y
J
^
y
2
−
ℏ
2
2
I
z
z
J
^
z
2
where I_{xx}, I_{yy}, and I_{zz} are the moment of inertia components (technically the diagonal elements of the moment of inertia tensor), and
J
^
x
,
J
^
y
and
J
^
z
are the total angular momentum operators (components), about the x, y, and z axes respectively.
The Coulomb potential energy for two point charges q_{1} and q_{2} (i.e. charged particles, since particles have no spatial extent), in three dimensions, is (in SI units  rather than Gaussian units which are frequently used in electromagnetism):
V
=
q
1
q
2
4
π
ϵ
0

r

However, this is only the potential for one point charge due to another. If there are many charged particles, each charge has a potential energy due to every other point charge (except itself). For N charges, the potential energy of charge q_{j} due to all other charges is (see also Electrostatic potential energy stored in a configuration of discrete point charges):
V
j
=
1
2
∑
i
≠
j
q
i
ϕ
(
r
i
)
=
1
8
π
ε
0
∑
i
≠
j
q
i
q
j

r
i
−
r
j

where φ(r_{i}) is the electrostatic potential of charge q_{j} at r_{i}. The total potential of the system is then the sum over j:
V
=
1
8
π
ε
0
∑
j
=
1
N
∑
i
≠
j
q
i
q
j

r
i
−
r
j

so the Hamiltonian is:
H
^
=
−
ℏ
2
2
∑
j
=
1
N
1
m
j
∇
j
2
+
1
8
π
ε
0
∑
j
=
1
N
∑
i
≠
j
q
i
q
j

r
i
−
r
j

=
∑
j
=
1
N
(
−
ℏ
2
2
m
j
∇
j
2
+
1
8
π
ε
0
∑
i
≠
j
q
i
q
j

r
i
−
r
j

)
For an electric dipole moment d constituting charges of magnitude q, in a uniform, electrostatic field (timeindependent) E, positioned in one place, the potential is:
V
=
−
d
^
⋅
E
the dipole moment itself is the operator
V
=
−
d
^
⋅
E
Since the particle is stationary, there is no translational kinetic energy of the dipole, so the Hamiltonian of the dipole is just the potential energy:
H
^
=
−
d
^
⋅
E
=
−
q
E
⋅
r
^
For a magnetic dipole moment μ in a uniform, magnetostatic field (timeindependent) B, positioned in one place, the potential is:
V
=
−
μ
⋅
B
Since the particle is stationary, there is no translational kinetic energy of the dipole, so the Hamiltonian of the dipole is just the potential energy:
H
^
=
−
μ
⋅
B
For a Spin½ particle, the corresponding spin magnetic moment is:
μ
S
=
g
s
e
2
m
S
where g_{s} is the spin gyromagnetic ratio (a.k.a. "spin gfactor"), e is the electron charge, S is the spin operator vector, whose components are the Pauli matrices, hence
H
^
=
g
s
e
2
m
S
⋅
B
For a charged particle q in an electromagnetic field, described by the scalar potential φ and vector potential A, there are two parts to the Hamiltonian to substitute for. The momentum operator must be replaced by the kinetic momentum operator, which includes a contribution from the A field:
Π
^
=
P
^
−
q
A
where
P
^
is the canonical momentum operator given as the usual momentum operator:
P
^
=
−
i
ℏ
∇
so the corresponding kinetic energy operator is:
T
^
=
Π
^
⋅
Π
^
2
m
=
1
2
m
(
P
^
−
q
A
)
2
and the potential energy, which is due to the φ field:
V
=
q
ϕ
Casting all of these into the Hamiltonian gives:
H
^
=
1
2
m
(
−
i
ℏ
∇
−
q
A
)
2
+
q
ϕ
In many systems, two or more energy eigenstates have the same energy. A simple example of this is a free particle, whose energy eigenstates have wavefunctions that are propagating plane waves. The energy of each of these plane waves is inversely proportional to the square of its wavelength. A wave propagating in the x direction is a different state from one propagating in the y direction, but if they have the same wavelength, then their energies will be the same. When this happens, the states are said to be degenerate.
It turns out that degeneracy occurs whenever a nontrivial unitary operator U commutes with the Hamiltonian. To see this, suppose that

a
⟩
is an energy eigenket. Then
U

a
⟩
is an energy eigenket with the same eigenvalue, since
U
H

a
⟩
=
U
E
a

a
⟩
=
E
a
(
U

a
⟩
)
=
H
(
U

a
⟩
)
.
Since U is nontrivial, at least one pair of

a
⟩
and
U

a
⟩
must represent distinct states. Therefore, H has at least one pair of degenerate energy eigenkets. In the case of the free particle, the unitary operator which produces the symmetry is the rotation operator, which rotates the wavefunctions by some angle while otherwise preserving their shape.
The existence of a symmetry operator implies the existence of a conserved observable. Let G be the Hermitian generator of U:
U
=
I
−
i
ϵ
G
+
O
(
ϵ
2
)
It is straightforward to show that if U commutes with H, then so does G:
[
H
,
G
]
=
0
Therefore,
∂
∂
t
⟨
ψ
(
t
)

G

ψ
(
t
)
⟩
=
1
i
ℏ
⟨
ψ
(
t
)

[
G
,
H
]

ψ
(
t
)
⟩
=
0.
In obtaining this result, we have used the Schrödinger equation, as well as its dual,
⟨
ψ
(
t
)

H
=
−
i
ℏ
∂
∂
t
⟨
ψ
(
t
)

.
Thus, the expected value of the observable G is conserved for any state of the system. In the case of the free particle, the conserved quantity is the angular momentum.
Hamilton's equations in classical Hamiltonian mechanics have a direct analogy in quantum mechanics. Suppose we have a set of basis states
{

n
⟩
}
, which need not necessarily be eigenstates of the energy. For simplicity, we assume that they are discrete, and that they are orthonormal, i.e.,
⟨
n
′

n
⟩
=
δ
n
n
′
.
Note that these basis states are assumed to be independent of time. We will assume that the Hamiltonian is also independent of time.
The instantaneous state of the system at time t,

ψ
(
t
)
⟩
, can be expanded in terms of these basis states:

ψ
(
t
)
⟩
=
∑
n
a
n
(
t
)

n
⟩
where
a
n
(
t
)
=
⟨
n

ψ
(
t
)
⟩
.
The coefficients a_{n}(t) are complex variables. We can treat them as coordinates which specify the state of the system, like the position and momentum coordinates which specify a classical system. Like classical coordinates, they are generally not constant in time, and their time dependence gives rise to the time dependence of the system as a whole.
The expectation value of the Hamiltonian of this state, which is also the mean energy, is
⟨
H
(
t
)
⟩
=
d
e
f
⟨
ψ
(
t
)

H

ψ
(
t
)
⟩
=
∑
n
n
′
a
n
′
∗
a
n
⟨
n
′

H

n
⟩
where the last step was obtained by expanding

ψ
(
t
)
⟩
in terms of the basis states.
Each a_{n}(t) actually corresponds to two independent degrees of freedom, since the variable has a real part and an imaginary part. We now perform the following trick: instead of using the real and imaginary parts as the independent variables, we use a_{n}(t) and its complex conjugate a_{n}*(t). With this choice of independent variables, we can calculate the partial derivative
∂
⟨
H
⟩
∂
a
n
′
∗
=
∑
n
a
n
⟨
n
′

H

n
⟩
=
⟨
n
′

H

ψ
⟩
By applying Schrödinger's equation and using the orthonormality of the basis states, this further reduces to
∂
⟨
H
⟩
∂
a
n
′
∗
=
i
ℏ
∂
a
n
′
∂
t
Similarly, one can show that
∂
⟨
H
⟩
∂
a
n
=
−
i
ℏ
∂
a
n
∗
∂
t
If we define "conjugate momentum" variables π_{n} by
π
n
(
t
)
=
i
ℏ
a
n
∗
(
t
)
then the above equations become
∂
⟨
H
⟩
∂
π
n
=
∂
a
n
∂
t
,
∂
⟨
H
⟩
∂
a
n
=
−
∂
π
n
∂
t
which is precisely the form of Hamilton's equations, with the
a
n
s as the generalized coordinates, the
π
n
s as the conjugate momenta, and
⟨
H
⟩
taking the place of the classical Hamiltonian.