Numerical work with python 27: Wigner d matrix

This week I been working on a  python program for calculating the  wigner d matrix and displaying the real and imaginary parts. Below I have posted some of the images produced by this program:















This looks great when animated:




below is the python program for these diagrams.

from scipy.special import jv, legendre, sph_harm, jacobi
from scipy.misc import factorial, comb
from numpy import floor, sqrt, sin, cos, exp, power
from math import pi

def wignerd(j,m,n=0,approx_lim=10):
Wigner “small d” matrix. (Euler z-y-z convention)
j = 2
m = 1
n = 0
beta = linspace(0,pi,100)
wd210 = wignerd(j,m,n)(beta)

some conditions have to be met:
j >= 0
-j <= m <= j
-j <= n <= j

The approx_lim determines at what point
bessel functions are used. Default is when:
j > m+10
j > n+10

for integer l and n=0, we can use the spherical harmonics. If in
addition m=0, we can use the ordinary legendre polynomials.

if (j < 0) or (abs(m) > j) or (abs(n) > j):
raise ValueError(“wignerd(j = {0}, m = {1}, n = {2}) value error.”.format(j,m,n) \
+ ” Valid range for parameters: j>=0, -j<=m,n<=j.”)

if (j > (m + approx_lim)) and (j > (n + approx_lim)):
#print ‘bessel (approximation)’
return lambda beta: jv(m-n, j*beta)

if (floor(j) == j) and (n == 0):
if m == 0:
#print ‘legendre (exact)’
return lambda beta: legendre(j)(cos(beta))
elif False:
#print ‘spherical harmonics (exact)’
a = sqrt(4.*pi / (2.*j + 1.))
return lambda beta: a * conjugate(sph_harm(m,j,beta,0.))

jmn_terms = {
j+n : (m-n,m-n),
j-n : (n-m,0.),
j+m : (n-m,0.),
j-m : (m-n,m-n),

k = min(jmn_terms)
a, lmb = jmn_terms[k]

b = 2.*j – 2.*k – a

if (a < 0) or (b < 0):
raise ValueError(“wignerd(j = {0}, m = {1}, n = {2}) value error.”.format(j,m,n) \
+ ” Encountered negative values in (a,b) = ({0},{1})”.format(a,b))

coeff = power(-1.,lmb) * sqrt(comb(2.*j-k,k+a)) * (1./sqrt(comb(k+b,b)))

#print ‘jacobi (exact)’
return lambda beta: coeff \
* power(sin(0.5*beta),a) \
* power(cos(0.5*beta),b) \
* jacobi(k,a,b)(cos(beta))
def wignerD(j,m,n=0,approx_lim=10):
Wigner D-function. (Euler z-y-z convention)

This returns a function of 2 to 3 Euler angles:
(alpha, beta, gamma)

gamma defaults to zero and does not need to be

The approx_lim determines at what point
bessel functions are used. Default is when:
j > m+10
j > n+10

from numpy import linspace, meshgrid
a = linspace(0, 2*pi, 100)
b = linspace(0, pi, 100)
aa,bb = meshgrid(a,b)
j,m,n = 1,1,1
zz = wignerD(j,m,n)(aa,bb)

return lambda alpha,beta,gamma=0: \
exp(-1j*m*alpha) \
* wignerd(j,m,n,approx_lim)(beta) \
* exp(-1j*n*gamma)
if __name__ == ‘__main__’:
just a bunch of plots in (phi,theta) for
integer and half-integer j and where m and
n take values of [-j, -j+1, …, j-1, j]

Note that all indexes can be any real number
with the conditions:
j >= 0
-j <= m <= j
-j <= n <= j
from matplotlib import pyplot, cm, rc
from numpy import linspace, arange, meshgrid, real, imag, arccos

rc(‘text’, usetex=False)

ext = [0.,2.*pi,0.,pi]

phi = linspace(ext[0],ext[1],200)
theta = linspace(ext[2],ext[3],200)

pphi,ttheta = meshgrid(phi,theta)

# The maximum value of j to plot. Will plot real and imaginary
# distributions for j = 0, 0.5, … maxj
maxj = 2.0

for j in arange(0,maxj+.1,step=0.5):

fsize = (j*2+3,j*2+3)
title = ‘WignerD(j,m,n)(phi,theta)’
if j == 0:
fsize = (4,4)
title += ‘, j = ‘+str(j)

figr = pyplot.figure(figsize=fsize)
figr.suptitle(r’Real Part of ‘+title)

figi = pyplot.figure(figsize=fsize)
figi.suptitle(r’Imaginary Part of ‘+title)

for fig in [figr,figi]:

if j == 0:
if j == 0.5:
if j == 1:
if j == 1.5:
if j == 2:

if j != 0:
axtot = fig.add_subplot(1,1,1)





nplts = 2*j+1

for m in arange(-j,j+0.1,step=1):
for n in arange(-j,j+0.1,step=1):
print j,m,n
zz = wignerD(j,m,n)(pphi,ttheta)
i = n+j + nplts*(j-m)

for fig,data in zip((figr,figi), (real(zz),imag(zz))):

ax = fig.add_subplot(nplts, nplts, i+1, projection=’polar’)
plt = ax.pcolormesh(pphi,ttheta,data.copy(),
vmin=-1., vmax=1.)

if j == 0:

ax.grid(True, alpha=0.5)
ax.set_title(r’j,m,n = (0,0,0)’, position=(0.5,1.1), size=12)
ax.set_ylabel(r’$\theta$’, rotation=’horizontal’, va=’bottom’)
ax.xaxis.set_ticklabels([‘0′,r’$\frac{\pi}{4}$’,r’$\frac{\pi}{2}$’,r’$\frac{3 \pi}{4}$’,r’$\pi$’,r’$\frac{5 \pi}{4}$’,r’$\frac{3 \pi}{2}$’,r’$\frac{7 \pi}{4}$’], size=14)
ax.yaxis.set_ticklabels([‘0′,r’$\frac{\pi}{4}$’,r’$\frac{\pi}{2}$’,r’$\frac{3 \pi}{4}$’,r’$\pi$’], size=14)


if j == 0:
fig.colorbar(plt, pad=0.07)
# uncomment the following if you want to save these to image files
#figr.savefig(‘wignerD_j’+str(j)+’_real.png’, dpi=150)
#figi.savefig(‘wignerD_j’+str(j)+’_imag.png’, dpi=150)
print ‘j_data=’,data_j
#print ‘zz_data=’, data_zz


Related posts

Numerical work using mathematica 26: The Gauge invariant area operator in the flux formulation of LQG

This week I been following up the posts:

The starting point is to take the action of the area operator in the spin representation, and to consider the following normalized trace of the area operator:

gauge invariant

If this give a well-defined operator on either the kinematical Hilbert space or on the Hilbert space of fully gauge-invariant wave functions, and also if we took the limit Λfix →∞ it is possible to  read off the spectrum from the representation. There, the oscillatory behaviour of the sine function is suppressed by a factor of 1/dwhich leads to a discrete spectrum for sufficiently small spins j.



Mathematica code for the normalized trace of the gauge invariant area operator for μ = 0.1 and j=1…100.

And below the figure from the original paper, A new realization of quantum geometry.




Mathematica code for the normalized trace of the gauge invariant area operator for μ = 0.3 and j=1…100.

And below the figure from the original paper, A new realization of quantum geometry.




Mathematica code for the normalized trace of the gauge invariant area operator for μ = 0.05, 0.1 and 0.3 and j=1…100

Related posts



Polyhedra in spacetime from null vectors by Neiman

This week I have been studying a nice paper about Polyhedra in spacetime.

The paper considers convex spacelike polyhedra oriented in Minkowski space. These are classical analogues of spinfoam intertwiners. There is  a parametrization of these shapes using null face normals. This construction is dimension-independent and in 3+1d, it provides the spacetime picture behind the property of the loop quantum gravity intertwiner space in spinor form that the closure constraint is always satisfied after some  SL(2,C) rotation.These  variables can be incorporated in a 4-simplex action that reproduces the large-spin behaviour of the Barrett–Crane vertex amplitude.

In loop quantum gravity and in spinfoam models, convex polyhedra are fundamental objects. Specifically, the intertwiners between rotation-group representations that feature in these theories can be viewed as the quantum versions of convex polyhedra. This makes the parametrization of such shapes a subject of interest for  LQG.
In kinematical LQG, one deals with the SU(2) intertwiners, which correspond to 3d polyhedra in a local 3d Euclidean frame. These polyhedra are naturally parametrized in terms of area-normal vectors: each face i is associated with a vector xi, such that its norm
equals the face area Ai, and its direction is orthogonal to the face. The area normals must satisfy a ‘closure constraint’:


Minkowski’s reconstruction theorem guarantees a one-to-one correspondence between space-spanning sets of vectors xi that satisfy (1) and convex polyhedra with a spatial orientation. In
LQG, the vectors xi correspond to the SU(2) fluxes. The closure condition  then encodes the Gauss constraint, which also generates spatial rotations of the polyhedron.

In the EPRL/FK spinfoam, the SU(2) intertwiners get lifted into SL(2,C) and are acted on by SL(2,C) ,Lorentz, rotations. Geometrically, this endows the polyhedra with an orientation in the local 3+1d Minkowski frame of a spinfoam vertex. The polyhedron’s
orientation is now correlated with those of the other polyhedra surrounding the vertex, so that together they define a generalized 4-polytope. In analogy with the spatial case, a polyhedron with spacetime orientation can be parametrized by a set of area-normal
simple bivectors Bi. In addition to closure, these bivectors must also satisfy a cross-simplicity


In this paper, the author presents a different parametrization of convex spacelike polyhedra with spacetime orientation. Instead of bivectors Bi, they associate null vectors i to the polyhedron’s
faces. This parametrization does not require any constraints between the variables on different faces. It is unusual in that both the area and the full orientation of each face are functions of the data on all the faces. This construction, like the area-vector and
area-bivector constructions above, is dimension-independent. So we can parametrize d-dimensional convex spacelike polytopes with (d − 1)-dimensional faces, oriented in a (d + 1)-dimensional Minkowski spacetime.  These variables can be to construct an action principle for a Lorentzian 4-simplex. The action principle reproduces the large spin behaviour of the Barrett–Crane spinfoam vertex. In particular, it recovers the Regge action for the classical simplicial gravity, up to a possible sign and the existence of additional,degenerate solutions.

In d = 2, 3 spatial dimensions, the parametrization is  contained in the spinor-based description of the LQG intertwiners. There, the face normals are constructed as squares of spinors. It was observed that the closure constraint in these variables can always be satisfied by acting on the spinors with an SL(2,C) boost.  The simple spacetime picture presented in this paper is new. Hopefully, it will contribute to the geometric interpretation of the modern spinor and twistor variables in LQG.

The parametrization
Consider a set of N null vectors liμ in the (d + 1)-dimensional Minkowski space Rd,1, where i = 1, 2, . . . ,N and d ≥2.  Assume the following conditions on the null vectors liμ.

  • The liμ span the Minkowski space and  N ≥  d + 1.
  • The  liμ  are either all future-pointing or all past-pointing.

The central observation in this paper is that such sets of null vectors are in one-to-one correspondence with convex d-dimensional spacelike polytopes oriented in Rd,1.

Constructing the polytrope

Consider a set {liμ} ,take the sum of the liμ normalized
to unit length:


The unit vector nμ is timelike, with the same time orientation as the liμ. Now take nμ to be the unit normal to the spacelike polytope. To construct the polytope in the spacelike hyperplane ∑ orthogonal to nμ define the projections of the null vectors liμinto this hyperplane:


The spacelike vectors siμ  automatically sum up to zero. Also, since the liμ span the spacetime, the siμ must span the hyperplane ∑ . By the Minkowski reconstruction theorem, it follows that the siμ are the (d − 1)-area normals of a unique convex d-dimensional polytope in . In this way, the null vectors li define a d-polytope oriented in spacetime.

Basic features of the parametrization.

The vectors  are liμ  associated to the polytope’s (d −1)-dimensional faces and are null normals to these faces. The orientation of a spacelike (d − 1)-plane in Rd,1 is in one-to-one correspondence with the directions of its two null normals. So each liμ carries partial information about the orientation of the ith face. The second null normal to the face is a function of all the liμ. It can be expressed as:


where  nμ is given by


Similarly, the area Ai of each face is a function of the
null normals liμ to all the faces:


The total area of the faces has the simple expression:


A (d+1)-simplex action

To construct a (d + 1)-simplex action that reproduces in the d = 3 case the large-spin behaviour of the Barrett–Crane spinfoam vertex.

At the level of degree-of-freedom counting, the shape of a (d +1)-simplex is determined by the (d + 1)(d + 2)/2 areas Aab of its (d − 1)-faces. These areas are directly analogous to the spins that appear in the Barrett–Crane spinfoam. Let us fix a set of values for Aab and consider the action:


Then restrict to the variations where:


The stationary points of the action  have the following properties. For each a, the vectors  labμ define a d-simplex with unit normal naμ
and (d − 1)-face areas Aab.


A (d − 1)-face in a (d + 1)-simplex, shared by two d-simplices a and b. The diagram depicts the 1+1d plane orthogonal to the face. The dashed lines are the two null rays in this normal plane.


The d-simplices automatically agree on the areas of their shared (d −1)-faces. The two d-simplices agree not only on the area of their shared (d − 1)-face, but also on the orientation of its (d − 1)-plane in spacetime. In other words, they agree on the face’s area-normal bivector:


The area bivectors defined  automatically satisfy closure and cross-simplicity:


We conclude that the stationary points are in one-to-one correspondence with the bivector geometries of the Barrett-Crane model with an action of the form:



A new realization of quantum geometry by Bahr, Dittrich and Geiller

This week I have continued to study the paper ‘A new realization of quantum geometry‘. In particular I am interested in the proposed forms of the translation operator and the Area Operator in both the  Abelian group U(1)³ and Non-Abelian group SU(2) cases.

In this article the authors obtain a new realization of quantum geometry by quantizing the recently introduced flux formulation of loop quantum gravity. The authors discuss how the spectra of geometric operators, including holonomy and area operators, are affected by this new quantization. They find that the area operator is bounded and that there are several diferent ways in which the Barbero-Immirzi parameter can be taken into account.

Spectrum of the translation operator

.For normalized eigenvectors  of the form


associated eigenvalues are:


The k-representation of the eigenvectors vα,κ, with ψα(k) = e􀀀-ikα is


Area Operator

In this section the authors  introduce the area operator and discuss some of its properties. For this they focus on the case with d = 3 spatial dimensions.

The area of a surface can be expressed in terms of the fluxes. This surface can be  triangulated  to form a surface ΔS with elementary triangles by t.

In order to quantize the area operators have to approximate the fluxes with difference operators. To do this choose a parameter μ> 0, along with a basis τi ∈ su(2), and define μi±∈SU(2) as:


Spectrum of the area operator

The quantized area operator is given by


Note that the squared area operator is a linear combination of bounded operators, and therefore is itself bounded. The bound does however grow with 1/μ.

Abelian group U(1)³

In the case U(1)³ we have generalized eigenvectors:


where wα,ρ is given by


This leads to a discrete spectrum:


Non-Abelian group SU(2)

In the more complicated case of the gauge group SU(2),the action of the square of the area operator is given by the matrix:


The general behaviour of the eigenvalues is similar to the case of
the gauge group U(1)³ discussed above, but for small μ and j, the
matrix Aj() is nearly diagonal with almost equal eigenvalues, approximating well the Casimir eigenvalues j(j+1). For growing spin, the approximate degeneracy of the eigenvalues is lifted, and the eigenvalues spread more and more. Moreover, the eigenvalues are bounded  and an oscillatory behaviour sets in.






Related Articles

Numerical work with sagemath 25 the wigner D matrix

Numerical work with sagemath 25: The Wigner D matrix

This week I have been studying the paper ‘A New Realisation of Quantum Geometry’. I’ll review the paper in the next post and follow up that with an analysis of the area operator in  the SU(2) case.

What I’m posting at the moment is some exploratory work looking at the behaviour of the Wigner D matrix elements and U(1)area operator using python and sagemath.

Below I look at the general behaviour of the Wigner D matrix elements:



Below  Here I  look at the behaviour of the spectrum of the area operator with U(1).



Below I look at the how the area varies with μ for the values 0.1, 0.3, 0.5:



Group field theories generating polyhedral complexes by Thürigen

This week I have been studying recent developments in  Group Field Theories. Group field theories are a generalization of matrix models which provide both a second quantized reformulation of loop quantum gravity as well as generating functions for spin foam models. Other posts looking at this include:

While states in canonical loop quantum gravity are based on graphs with vertices of arbitrary valence, group field theories have been defined so far in a simplicial setting such that states have support only on graphs of fixed valency. This has led to the question whether group field theory can indeed cover the whole state space of loop quantum gravity.

The paper discusses  the combinatorial structure of the complexes generated by the group field theory partition function. These new group field theories strengthen the links between the various quantum gravity approaches and  might also prove useful in the investigation of renormalizability.

The combinatorial structure of group field theory
The common notion of GFT is that of a quantum field theory on group manifolds with a particular kind of non-local interaction vertices. A group field is a function of a Lie group G and the GFT is defined by a partition function


the action is of the form:


The evaluation of expectation values of quantum observables O[φ], leads to a series of Gaussian integrals evaluated
through Wick contraction which are catalogued by Feynman diagrams Γ,


where sym(Γ) are the combinatorial factors related to the automorphism group of the Feynman diagram Γ:

The specific non-locality of each vertex is captured by a boundary graph. In the interaction term in each group field term  can be represented by a graph consisting of a k-valent vertex connected to k univalent vertices. One may further understand the graph as
the boundary  of a two-dimensional complex a with a single internal vertex v. Such a one-vertex two-complex a is called a spin foam atom.


The GFT Feynman diagrams in the perturbative sum have the structure of two complexes because Wick contractions effect bondings of such atoms along patches. The combinatorial
structure of a term in the perturbative sum is then a collection of spin foam atoms, one for each vertex kernel, quotiented by a set of bonding maps, one for each Wick contraction. Because of this construction such a two-complex will be called a spin foam molecule.


The crucial idea to create arbitrary boundary graphs in a more efficient way is to distinguish between virtual and real edges and obtain arbitrary graphs from regular ones by contraction of the
virtual edges.


In terms of these contractions, any spin foam molecule can be obtained from a molecule constructed from labelled regular graphs.


This paper has aimed to  generalization of GFT to be compatible with LQG. It has clarified the combinatorial structure underlying the amplitudes of perturbative GFT using the notion of spin foam atoms and molecules and discussed their possible spacetime interpretation.

Related articles



Encoding Curved Tetrahedra in Face Holonomies by Haggard, Han and Riello

This week I have been studying ‘Encoding Curved Tetrahedra in Face Holonomies’. This paper is closely related to the posts:

In this paper the authors  present a generalization of Minkowski’s classic theorem on the reconstruction of tetrahedra which will apply to homogeneously curved spaces.

Euclidean notions such as the normal vector to a face are replaced by Levi-Civita holonomies around each of the tetrahedron’s faces. This allows the reconstruction of both spherical and hyperbolic tetrahedra.

Generalizing the phase space of shapes associated to flat tetrahedra leads to group valued moment maps and quasi-Poisson spaces. These discrete geometries provide a natural arena for considering the quantization of gravity including a cosmological constant.

An example of this is  the relation with the spin-network states of loop quantum gravity. This paper provides a justification for the emergence of deformed gauge symmetries and quantum groups in 3+1 dimensional covariant loop quantum gravity in the
presence of a cosmological constant.

Minkowski’s theorem for curved tetrahedra

In the flat case, Minkowski’s theorem associates to any solution of the so-called closure equation


a tetrahedron in E³, whose faces have area al  and outward normals nl.

The paper’s  main result is that Minkowski’s theorem and the closure equation, admit a natural generalization to curved tetrahedra in S³ and H³. The curved closure equation is


where e denotes the identity in SO(3). This equation encodes
the geometry of curved tetrahedra.

As in the flat case, the variables appearing in the closure equation are associated to the faces of the tetrahedron. The {Ol} will be interpreted as the holonomies of the Levi-Civita connection around
each of the four faces of the tetrahedron.

The holonomy Ol around the l-th face of the spherical tetrahedron, calculated at the base point P contained in the face itself, is given by


where {J} are the three generators of so(3), al is the area of the face, and n(P) is the direction normal to the face in the local frame at which the holonomy is calculated.

The vertices of the geometrical tetrahedron are labelled as shown below:


This numbering induces a topological orientation on the tetrahedron, which must be consistent with the geometrical orientation of the paths around the faces.



The holonomies along the simple paths, {Ol}, can be expressed more explicitly by introducing the edge holonomies {oml}, encoding the parallel transport from vertex l to vertex m along the edge connecting them.


The holonomies {Ol } and the normals appearing in their exponents are defined at vertex 4, which is shared by all three faces. Therefore, indicating with θlm the external dihedral angle between faces l and m,



and similarly,


The Gram Matrix

For a given a tetrahedron, flatly embedded in a space of constant positive, negative or null curvature, the Gram matrix is defined  as the matrix of cosines of its external dihedral angles:


One of the main properties of the Gram matrix is that the sign of its determinant reflects the spherical, hyperbolic, or flat nature of the tetrahedron:


Curved Minkowski Theorem for tetrahedra

Four SO(3) group elements Ol , l= 1,..,4 satisfying the closure equation  can be used to reconstruct a unique generalized  constantly curved convex tetrahedron, provided:

  1. the {Ol } are interpreted as the Levi-Civita holonomies around the faces of the tetrahedron
  2.  the path followed around the faces is of the so-called simple type , and has been uniquely fixed by the choice of one of the two couples of faces (24) or (13),
  3.  the orientation of the tetrahedron is fixed and agrees with that of the paths used to calculate the holonomies,
  4.  the non-degeneracy condition det Gram(Ol )  ≠ 0 is satisfied.

Minkowski’s theorem establishes a one-to-one correspondence between closed non-planar polygons in E³ and convex polyhedra, via the interpretation of the vectors defining the sides of the polygon as area vectors for the polygon. This theorem can be extended to curved polyhedra.

In this paper the authors have given a generalization of Minkowski’s theorem for curved tetrahedra. This establishes a correspondence between non-planar, geodesic quadrilaterals in S³, encoded in four SO(3) group elements {Ol} whose product is the group identity, and flatly embedded tetrahedra in either S³ or H³.

This can be used to  reinterpret the Kapovich-Millson-Treloar symplectic structure of closed polygons on a homogeneous space as the symplectic structure on the space of shapes of curved
tetrahedra with fixed face areas.

Related articles

Atoms of spacetime

%d bloggers like this: