Quantum systems are described by wave functions and eigenvalues, which are solutionsof the Schrödinger equation. In this lecture, we study for the case of the one-dimensional harmonic oscillator how exactly the probabilities of quantum physics combine with the statistical weights in the Boltzmann distribution, before moving on to more general problems.

Harmonic wave functions

As an example of wave functions of a Schrödinger equation,

we consider the harmonic oscillator, a particle of mass m in a potential

This program uses a dictionary (hash table) for the wave functions

import numpy, pylab
frommathimport pi, exp, sqrt
grid = numpy.linspace(-5.0,5.0,500)
psi ={}
pylab.figure(1, figsize=(6.0,10.0))for x in grid:
psi[x]=[pi ** ( - 0.25) * exp( - x **2 / 2.0)]
psi[x].append(sqrt(2.0) * x * psi[x][0])for n inrange(2,50):
psi[x].append(sqrt(2.0 / n) * x * psi[x][n - 1] - sqrt((n - 1.0) / n) * psi[x][n - 2])for k inrange(40):
y =[psi[x][k] + k for x in grid]
pylab.plot(grid,y,'r-')
pylab.xlabel('$x$')
pylab.ylabel('$\psi_n(x)$ (offset)')
pylab.xlim(-5.0,5.0)
pylab.show()

Output of the above Python program: Wave functions of the Schrödinger equation for the harmonic oscillator.

Density Matrix

Definition and properties

For simplicity, we use in the following the position representation of operators and wave functions. Given a quantum system with an orthonormal set of wave functions and with energies, its density matrix at inverse temperature beta is defined as

The density matrix is where statistical mechanics (the Boltzmann factor) meets quantum mechanics (the quantum-mechanical probability of the squared wave function).

The expectation value of an observable O is given by

For example, the probability of finding the particle at position x is

The density matrix has three important properties:

Convolution

Given two inverse temperatures <math>\beta</math> and <math>\beta'</math>,

This follows from the fact that the eigenstates constitute an orthonormal basis of the Hilbert space. In the position representation, and in a simplified case, we have

This exact property of the density matrix will allow us to compute the density matrix at low temperature (high \beta), when we know it at high temperature (low \beta ) only.

High-temperature limit

In the limit of high temperature, the density matrix of a quantum system
described by a Hamiltonian

is given by
a general expression known as the Trotter formula:

This expression is very easy to prove by simply expanding all the exponentials (taking into
account non-commutativity of quantum operators).

Density matrix for a free particle

The density matrix for a free particle is given by

As we usually work in units with

this means

Matrix square

In the following Python program, we implement the matrix squaring algorithm

for the harmonic oscillator, with potential V(x)=x^2/2. At high temperature, we
initialize the density matrix following the Trotter formula, with half of the potential at x and the other half at x'.

import numpy, pylab
frommathimport pi, exp, sqrt, sinh, tanh
beta =1.0 / 64
N =100
grid = numpy.linspace(-5.0,5.0, N)
rho = numpy.zeros(shape=(N,N))
del_x = grid[1] - grid[0]for k inrange(N):
x = grid[k]for j inrange(N):
xp = grid[j]
rho[k][j]=1.0 / sqrt(2.0 * pi * beta) * exp(- beta / 4.0 * (x ** 2 + xp ** 2) -
(x - xp) ** 2 / 2.0 / beta)for k inrange(6):
beta *=2
rho = del_x*numpy.dot(rho, rho)
y_arrow =[rho[k][k]for k inrange(N)]
pylab.plot(grid, y_arrow,'ro')
y2_arrow =[1.0 / sqrt(2.0 * pi * sinh(beta)) * exp( -x ** 2 * tanh(beta / 2.0))for x in grid]
pylab.title('harm. diag. density matrix at beta=1 matrix squaring, exact sol.')
pylab.plot(grid, y2_arrow,'b-')
pylab.show()

Output of the above Python program: Comparing the exact solution for the harmonic oscillator density matrix to the solution obtained through matrix squaring.

700px|left|Comparing the exact solution for the harmonic oscillator density matrix to the solution obtained through matrix squaring.
<br clear="all" />

## Wave functions

Quantum systems are described by wave functions and eigenvalues, which are solutionsof the Schrödinger equation. In this lecture, we study for the case of the one-dimensional harmonic oscillator how exactly the probabilities of quantum physics combine with the statistical weights in the Boltzmann distribution, before moving on to more general problems.## Harmonic wave functions

As an example of wave functions of a Schrödinger equation,we consider the harmonic oscillator, a particle of mass

min a potentialThis program uses a dictionary (hash table) for the wave functions

## Density Matrix

## Definition and properties

For simplicity, we use in the following the position representation of operators and wave functions. Given a quantum system with an orthonormal set of wave functions and with energies, its density matrix at inverse temperature beta is defined asThe density matrix is where statistical mechanics (the Boltzmann factor) meets quantum mechanics (the quantum-mechanical probability of the squared wave function).

The expectation value of an observable

Ois given byFor example, the probability of finding the particle at position

xisThe density matrix has three important properties:

## Convolution

Given two inverse temperatures <math>\beta</math> and <math>\beta'</math>,This follows from the fact that the eigenstates constitute an orthonormal basis of the Hilbert space. In the position representation, and in a simplified case, we have

This exact property of the density matrix will allow us to compute the density matrix at low temperature (high \beta), when we know it at high temperature (low \beta ) only.

## High-temperature limit

In the limit of high temperature, the density matrix of a quantum systemdescribed by a Hamiltonian

is given by

a general expression known as the Trotter formula:

This expression is very easy to prove by simply expanding all the exponentials (taking into

account non-commutativity of quantum operators).

## Density matrix for a free particle

The density matrix for a free particle is given by

As we usually work in units with

this means

## Matrix square

In the following Python program, we implement the matrix squaring algorithmfor the harmonic oscillator, with potential

V(x)=x^2/2. At high temperature, weinitialize the density matrix following the Trotter formula, with half of the potential at

xand the other half atx'.700px|left|Comparing the exact solution for the harmonic oscillator density matrix to the solution obtained through matrix squaring.

<br clear="all" />

## Path Integral

## References