# Quantum numbers and Angular Momentum Algebra

 **Morten Hjorth-Jensen**, [National Superconducting Cyclotron Laboratory](http://www.nscl.msu.edu/) and [Department of Physics and Astronomy](https://www.pa.msu.edu/), [Michigan State University](http://www.msu.edu/), East Lansing, MI 48824, USA

Date: **Jun 27, 2017**

Copyright 2013-2017, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license

## Quantum numbers
**Outline.**

* Discussion of single-particle and two-particle quantum numbers, uncoupled and coupled schemes

* Discussion of angular momentum recouplings and the Wigner-Eckart theorem

* Applications to specific operators like the nuclear two-body tensor force

For quantum numbers, chapter 1 on angular momentum and chapter 5 of Suhonen and chapters 5, 12 and 13 of Alex Brown.
For a discussion of isospin, see for example Alex Brown's lecture notes chapter 12, 13 and 19.

## Motivation
When solving the Hartree-Fock project using a nucleon-nucleon interaction in an uncoupled basis (m-scheme), we found a high level of degeneracy. One sees clear from the table here that we have a  degeneracy in the angular momentum $j$, resulting in $2j+1$ states with the same energy. This reflects the rotational symmetry and spin symmetry of the nuclear forces.

Quantum numbers 	 Energy [MeV]

   $0s_{1/2}^{\pi}$    	    -40.4602

   $0s_{1/2}^{\pi}$    	    -40.4602

   $0s_{1/2}^{\nu}$    	    -40.6426

   $0s_{1/2}^{\nu}$    	    -40.6426

   $0p_{1/2}^{\pi}$    	    -6.7133

   $0p_{1/2}^{\pi}$    	    -6.7133

   $0p_{1/2}^{\nu}$    	    -6.8403

   $0p_{1/2}^{\nu}$    	    -6.8403

   $0p_{3/2}^{\pi}$    	    -11.5886

   $0p_{3/2}^{\pi}$    	    -11.5886

   $0p_{3/2}^{\pi}$    	    -11.5886

   $0p_{3/2}^{\pi}$    	    -11.5886

   $0p_{3/2}^{\nu}$    	    -11.7201

   $0p_{3/2}^{\nu}$    	    -11.7201

   $0p_{3/2}^{\nu}$    	    -11.7201

   $0p_{3/2}^{\nu}$    	    -11.7201

We observe that with increasing value of $j$ the degeneracy increases. For $j=3/2$ we end up diagonalizing
the same matrix four times. With increasing value of $j$, it is rather obvious that our insistence on using
an uncoupled scheme (or just m-scheme) will lead to unnecessary labor from our side (or more precisely, for the computer).   The obvious question we should pose ourselves then is whether we can use
the underlying symmetries of the nuclear forces in order to reduce our efforts.

## Single-particle and two-particle quantum numbers
In order to understand the basics of the nucleon-nucleon interaction and the pertaining symmetries, we need to define the relevant quantum numbers and how we build up a single-particle state and a two-body state, and obviously our final holy grail, a many-boyd state.

* For the single-particle states, due to the fact that we have the spin-orbit force, the quantum numbers for the projection of orbital momentum $l$, that is $m_l$, and for spin $s$, that is $m_s$, are no longer so-called good quantum numbers. The total angular momentum $j$ and its projection $m_j$ are then  so-called *good quantum numbers*.

* This means that the operator $\hat{J}^2$ does not commute with $\hat{L}_z$  or $\hat{S}_z$.

* We also start normally with single-particle state functions defined using say the harmonic oscillator. For these functions, we have no explicit dependence on $j$. How can we introduce single-particle wave functions which have $j$ and its projection $m_j$ as quantum numbers?

## Single-particle and two-particle quantum numbers, brief review on angular momenta etc

We have that the operators for the orbital momentum are given by

0

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

1

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
L_z=-i\hbar(x\frac{\partial }{\partial y}-y\frac{\partial }{\partial x})=xp_y-yp_x.
$$

## Single-particle and two-particle quantum numbers, brief review on angular momenta etc
Since we have a spin orbit force which is strong, it is easy to show that
the total angular momentum operator

$$
\hat{J}=\hat{L}+\hat{S}
$$

does not commute with $\hat{L}_z$ and $\hat{S}_z$. To see this, we calculate for example

$$
\begin{eqnarray}
   [\hat{L}_z,\hat{J}^2]&=&[\hat{L}_z,(\hat{L}+\hat{S})^2] \\ \nonumber
   &=&[\hat{L}_z,\hat{L}^2+\hat{S}^2+2\hat{L}\hat{S}]\\ \nonumber
   &=& [\hat{L}_z,\hat{L}\hat{S}]=[\hat{L}_z,\hat{L}_x\hat{S}_x+\hat{L}_y\hat{S}_y+\hat{L}_z\hat{S}_z]\ne 0,
\end{eqnarray}
$$

since we have that $[\hat{L}_z,\hat{L}_x]=i\hbar\hat{L}_y$ and $[\hat{L}_z,\hat{L}_y]=i\hbar\hat{L}_x$.

## Single-particle and two-particle quantum numbers, brief review on angular momenta etc
We have also

$$
|\hat{J}|=\hbar\sqrt{J(J+1)},
$$

with the the following degeneracy

$$
M_J=-J, -J+1, \dots, J-1, J.
$$

With a given value of  $L$ and $S$ we can then determine the possible values of
 $J$ by studying the $z$ component of  $\hat{J}$.
It is given by

$$
\hat{J}_z=\hat{L}_z+\hat{S}_z.
$$

The operators $\hat{L}_z$ and $\hat{S}_z$ have the quantum numbers
$L_z=M_L\hbar$ and $S_z=M_S\hbar$, respectively, meaning that

$$
M_J\hbar=M_L\hbar +M_S\hbar,
$$

or

$$
M_J=M_L +M_S.
$$

Since the max value of  $M_L$ is $L$ and for  $M_S$ is $S$
we obtain

$$
(M_J)_{\mathrm{maks}}=L+S.
$$

## Single-particle and two-particle quantum numbers, brief review on angular momenta etc
For nucleons we have that the maximum value of $M_S=m_s=1/2$, yielding

$$
(m_j)_{\mathrm{max}}=l+\frac{1}{2}.
$$

Using this and the fact that the maximum value of  $M_J=m_j$ is $j$ we have

$$
j=l+\frac{1}{2}, l-\frac{1}{2}, l-\frac{3}{2}, l-\frac{5}{2}, \dots
$$

To decide where this series terminates, we use the vector inequality

$$
|\hat{L}+\hat{S}| \ge \left| |\hat{L}|-|\hat{S}|\right|.
$$

## Single-particle and two-particle quantum numbers, brief review on angular momenta etc
Using $\hat{J}=\hat{L}+\hat{S}$ we get

$$
|\hat{J}| \ge |\hat{L}|-|\hat{S}|,
$$

or

$$
|\hat{J}|=\hbar\sqrt{J(J+1)}\ge |\hbar\sqrt{L(L+1)}-
   \hbar\sqrt{S(S+1)}|.
$$

## Single-particle and two-particle quantum numbers, brief review on angular momenta etc
If we limit ourselves to nucleons only with $s=1/2$ we find that

$$
|\hat{J}|=\hbar\sqrt{j(j+1)}\ge |\hbar\sqrt{l(l+1)}-
   \hbar\sqrt{\frac{1}{2}(\frac{1}{2}+1)}|.
$$

It is then easy to show that for nucleons there are only two possible values of
$j$ which satisfy the inequality, namely

$$
j=l+\frac{1}{2}\hspace{0.1cm} \mathrm{or} \hspace{0.1cm}j=l-\frac{1}{2},
$$

and with $l=0$ we get

$$
j=\frac{1}{2}.
$$

## Single-particle and two-particle quantum numbers, brief review on angular momenta etc
Let us study some selected examples. We need also to keep in mind that parity is conserved.
The strong and electromagnetic Hamiltonians conserve parity. Thus the eigenstates can be
broken down into two classes of states labeled by their parity $\pi= +1$ or $\pi=-1$.
The nuclear interactions do not mix states with different parity.

For nuclear structure the total parity originates
from the intrinsic parity of the nucleon which is $\pi_{\mathrm{intrinsic}}=+1$
and the parities associated with
the orbital angular momenta $\pi_l=(-1)^l$ . The total parity is the product over all nucleons
$\pi = \prod_i \pi_{\mathrm{intrinsic}}(i)\pi_l(i) = \prod_i (-1)^{l_i}$

The basis states we deal with are constructed so that they conserve parity and have thus a definite parity.

Note that we do have parity violating processes, more on this later although our focus will be mainly on non-parity viloating processes

## Single-particle and two-particle quantum numbers

Consider now the single-particle orbits of the $1s0d$ shell.
For a $0d$ state we have the quantum numbers $l=2$, $m_l=-2,-1,0,1,2$, $s+1/2$, $m_s=\pm 1/2$,
$n=0$ (the number of nodes of the wave function).   This means that we have positive parity and

$$
j=\frac{3}{2}=l-s\hspace{1cm} m_j=-\frac{3}{2},-\frac{1}{2},\frac{1}{2},\frac{3}{2}.
$$

and

$$
j=\frac{5}{2}=l+s\hspace{1cm} m_j=-\frac{5}{2},-\frac{3}{2},-\frac{1}{2},\frac{1}{2},\frac{3}{2},\frac{5}{2}.
$$

## Single-particle and two-particle quantum numbers
Our single-particle wave functions, if we use the harmonic oscillator, do however not contain the quantum numbers $j$ and $m_j$.
Normally what we have is an eigenfunction for the one-body problem defined as

$$
\phi_{nlm_lsm_s}(r,\theta,\phi)=R_{nl}(r)Y_{lm_l}(\theta,\phi)\xi_{sm_s},
$$

where we have used spherical coordinates (with a spherically symmetric potential) and the spherical harmonics

$$
Y_{lm_l}(\theta,\phi)=P(\theta)F(\phi)=\sqrt{\frac{(2l+1)(l-m_l)!}{4\pi (l+m_l)!}}
                      P_l^{m_l}(cos(\theta))\exp{(im_l\phi)},
$$

with $P_l^{m_l}$ being the so-called associated Legendre polynomials.

## Single-particle and two-particle quantum numbers
Examples are

$$
Y_{00}=\sqrt{\frac{1}{4\pi}},
$$

for $l=m_l=0$,

$$
Y_{10}=\sqrt{\frac{3}{4\pi}}cos(\theta),
$$

for $l=1$ and $m_l=0$,

$$
Y_{1\pm 1}=\sqrt{\frac{3}{8\pi}}sin(\theta)exp(\pm i\phi),
$$

for  $l=1$ and $m_l=\pm 1$,

$$
Y_{20}=\sqrt{\frac{5}{16\pi}}(3cos^2(\theta)-1)
$$

for $l=2$ and $m_l=0$ etc.

## Single-particle and two-particle quantum numbers
How can we get a function in terms of $j$ and $m_j$?
Define now

$$
\phi_{nlm_lsm_s}(r,\theta,\phi)=R_{nl}(r)Y_{lm_l}(\theta,\phi)\xi_{sm_s},
$$

and

$$
\psi_{njm_j;lm_lsm_s}(r,\theta,\phi),
$$

as the state with quantum numbers $jm_j$.
Operating with

$$
\hat{j}^2=(\hat{l}+\hat{s})^2=\hat{l}^2+\hat{s}^2+2\hat{l}_z\hat{s}_z+\hat{l}_+\hat{s}_{-}+\hat{l}_{-}\hat{s}_{+},
$$

on the latter state we will obtain admixtures from possible $\phi_{nlm_lsm_s}(r,\theta,\phi)$ states.

## Single-particle and two-particle quantum numbers
To see this, we consider the following example and fix

$$
j=\frac{3}{2}=l-s\hspace{1cm} m_j=\frac{3}{2}.
$$

and

$$
j=\frac{5}{2}=l+s\hspace{1cm} m_j=\frac{3}{2}.
$$

It means we can have, with $l=2$ and $s=1/2$ being fixed, in order to have $m_j=3/2$ either $m_l=1$ and $m_s=1/2$ or
$m_l=2$ and $m_s=-1/2$. The two states

$$
\psi_{n=0j=5/2m_j=3/2;l=2s=1/2}
$$

and

$$
\psi_{n=0j=3/2m_j=3/2;l=2s=1/2}
$$

will have admixtures from $\phi_{n=0l=2m_l=2s=1/2m_s=-1/2}$ and $\phi_{n=0l=2m_l=1s=1/2m_s=1/2}$.
How do we find these admixtures? Note that we don't specify the values of $m_l$ and $m_s$
in the functions $\psi$ since
$\hat{j}^2$ does not commute with $\hat{L}_z$ and $\hat{S}_z$.

## Single-particle and two-particle quantum numbers
We operate with

$$
\hat{j}^2=(\hat{l}+\hat{s})^2=\hat{l}^2+\hat{s}^2+2\hat{l}_z\hat{s}_z+\hat{l}_+\hat{s}_{-}+\hat{l}_{-}\hat{s}_{+}
$$

on the two $jm_j$ states, that is

3
5

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\beta\hbar^2\sqrt{l(l+1)-m_l(m_l-1)}\phi_{n=0l=2m_l=1s=1/2m_s=1/2},
$$

and

3
7

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\beta\hbar^2\sqrt{l(l+1)-m_l(m_l+1)}\phi_{n=0l=2m_l=2s=1/2m_s=-1/2}.
$$

## Single-particle and two-particle quantum numbers
This means that the eigenvectors $\phi_{n=0l=2m_l=2s=1/2m_s=-1/2}$ etc are not eigenvectors of $\hat{j}^2$. The above problems gives a $2\times2$ matrix that mixes the vectors $\psi_{n=0j=5/2m_j3/2;l=2m_ls=1/2m_s}$ and $\psi_{n=0j=3/2m_j3/2;l=2m_ls=1/2m_s}$ with the states  $\phi_{n=0l=2m_l=2s=1/2m_s=-1/2}$ and
$\phi_{n=0l=2m_l=1s=1/2m_s=1/2}$. The unknown coefficients $\alpha$ and $\beta$ are the  eigenvectors of this matrix. That is, inserting all values $m_l,l,m_s,s$ we obtain the matrix

$$
\left[ \begin{array} {cc} 19/4 & 2 \\ 2 & 31/4 \end{array} \right]
$$

whose eigenvectors are the columns of

$$
\left[ \begin{array} {cc} 2/\sqrt{5} &1/\sqrt{5}  \\ 1/\sqrt{5} & -2/\sqrt{5} \end{array}\right]
$$

These numbers define the so-called Clebsch-Gordan coupling coefficients  (the overlaps between the two basis sets). We can thus write

$$
\psi_{njm_j;ls}=\sum_{m_lm_s}\langle lm_lsm_s|jm_j\rangle\phi_{nlm_lsm_s},
$$

where the coefficients $\langle lm_lsm_s|jm_j\rangle$ are the so-called Clebsch-Gordan coeffficients.

## Clebsch-Gordan coefficients
The Clebsch-Gordan coeffficients $\langle lm_lsm_s|jm_j\rangle$ have some interesting properties for us, like the following  orthogonality relations

4
2

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

4
3

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\langle j_1m_1j_2m_2|JM\rangle=(-1)^{j_1+j_2-J}\langle j_2m_2j_1m_1|JM\rangle,
$$

and many others. The latter will turn extremely useful when we are going to define two-body states and interactions in a coupled basis.

## Clebsch-Gordan coefficients, testing the orthogonality relations
The orthogonality relation can be tested using the symbolic python package **wigner**.
Let us test

$$
\sum_{m_1m_2}\langle j_1m_1j_2m_2|JM\rangle\langle j_1m_1j_2m_2|J'M'\rangle=\delta_{J,J'}\delta_{M,M'},
$$

The following program tests this relation for the case of $j_1=3/2$ and $j_2=3/2$ meaning that $m_1$ and $m_2$
run from $-3/2$ to $3/2$.

```
from sympy import S
from sympy.physics.wigner import clebsch_gordan
# Twice the values of j1 and j2
j1 = 3
j2 = 3
J = 2
Jp = 2
M = 2
Mp = 3
sum = 0.0
for m1 in range(-j1, j1+2, 2):
    for m2 in range(-j2, j2+2, 2):
        M = (m1+m2)/2.
        """ Call j1, j2, J, m1, m2, m1+m2 """
        sum += clebsch_gordan(S(j1)/2, S(j2)/2, J, S(m1)/2, S(m2)/2, M)*clebsch_gordan(S(j1)/2, S(j2)/2, Jp, S(m1)/2, S(m2)/2, Mp)
print sum
```

## Quantum numbers and the Schroeodinger equation in relative and CM coordinates
Summing up, for
for the single-particle case, we have the following eigenfunctions

$$
\psi_{njm_j;ls}=\sum_{m_lm_s}\langle lm_lsm_s|jm_j\rangle\phi_{nlm_lsm_s},
$$

where the coefficients $\langle lm_lsm_s|jm_j\rangle$ are the so-called Clebsch-Gordan coeffficients.
The relevant quantum numbers are $n$ (related to the principal quantum number and the number of nodes of the wave function) and

4
7

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

4
8

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

4
9

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\hat{s}^2\psi_{njm_j;ls}=\hbar^2s(s+1)\psi_{njm_j;ls},
$$

but $s_z$ and $l_z$ do not result in good quantum numbers in a basis where we
use the angular momentum $j$.

## Quantum numbers and the Schroedinger equation in relative and CM coordinates
For a two-body state where we couple two angular momenta $j_1$ and $j_2$ to a final
angular momentum $J$ with projection $M_J$, we can define a similar transformation in terms
of the Clebsch-Gordan coeffficients

$$
\psi_{(j_1j_2)JM_J}=\sum_{m_{j_1}m_{j_2}}\langle j_1m_{j_1}j_2m_{j_2}|JM_J\rangle\psi_{n_1j_1m_{j_1};l_1s_1}\psi_{n_2j_2m_{j_2};l_2s_2}.
$$

We will write these functions in a more compact form hereafter, namely,

$$
|(j_1j_2)JM_J\rangle=\psi_{(j_1j_2)JM_J},
$$

and

$$
|j_im_{j_i}\rangle=\psi_{n_ij_im_{j_i};l_is_i},
$$

where we have skipped the explicit reference to $l$, $s$ and $n$. The spin of a nucleon is always $1/2$ while the value of $l$ can be deduced from the parity of the state.
It is thus normal to label a state with a given total angular momentum as
$j^{\pi}$, where $\pi=\pm 1$.

## Quantum numbers and the Schroedinger equation in relative and CM coordinates
Our two-body state can thus be written as

$$
|(j_1j_2)JM_J\rangle=\sum_{m_{j_1}m_{j_2}}\langle j_1m_{j_1}j_2m_{j_2}|JM_J\rangle|j_1m_{j_1}\rangle|j_2m_{j_2}\rangle.
$$

Due to the coupling order of the Clebsch-Gordan coefficient it reads as
$j_1$ coupled to $j_2$ to yield a final angular momentum $J$. If we invert the order of coupling we would have

$$
|(j_2j_1)JM_J\rangle=\sum_{m_{j_1}m_{j_2}}\langle j_2m_{j_2}j_1m_{j_1}|JM_J\rangle|j_1m_{j_1}\rangle|j_2m_{j_2}\rangle,
$$

and due to the symmetry properties of the Clebsch-Gordan coefficient we have

$$
|(j_2j_1)JM_J\rangle=(-1)^{j_1+j_2-J}\sum_{m_{j_1}m_{j_2}}\langle j_1m_{j_1}j_2m_{j_2}|JM_J\rangle|j_1m_{j_1}\rangle|j_2m_{j_2}\rangle=(-1)^{j_1+j_2-J}|(j_1j_2)JM_J\rangle.
$$

We call the basis $|(j_1j_2)JM_J\rangle$ for the **coupled basis**, or just $j$-coupled basis/scheme. The basis formed by the simple product of single-particle eigenstates
$|j_1m_{j_1}\rangle|j_2m_{j_2}\rangle$ is called the **uncoupled-basis**, or just the $m$-scheme basis.

## Quantum numbers
We have thus the coupled basis

$$
|(j_1j_2)JM_J\rangle=\sum_{m_{j_1}m_{j_2}}\langle j_1m_{j_1}j_2m_{j_2}|JM_J\rangle|j_1m_{j_1}\rangle|j_2m_{j_2}\rangle.
$$

and the uncoupled basis

$$
|j_1m_{j_1}\rangle|j_2m_{j_2}\rangle.
$$

The latter can easily be generalized to many single-particle states whereas the first
needs specific coupling coefficients and definitions of coupling orders.
The $m$-scheme basis is easy to implement numerically and is used in most standard shell-model codes.
Our coupled basis obeys also the following relations

5
9

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\hat{J}_z|(j_1j_2)JM_J\rangle=\hbar M_J|(j_1j_2)JM_J\rangle,
$$

## Components of the force and isospin
 The nuclear forces are almost charge independent. If we assume they are,
we can introduce a new quantum number which is conserved. For nucleons only, that is a proton and neutron, we can limit ourselves
to two possible values which allow us to distinguish between the two particles. If we assign an isospin value of $\tau=1/2$ for protons
and neutrons (they belong to an isospin doublet, in the same way as we discussed the spin $1/2$ multiplet), we can define
the neutron to have isospin projection $\tau_z=+1/2$ and a proton to have $\tau_z=-1/2$. These assignements are the standard choices in low-energy nuclear physics.

## Isospin
This leads to the introduction of an additional quantum number called isospin.
We can define a single-nucleon
state function in terms of the quantum numbers $n$, $j$, $m_j$, $l$, $s$, $\tau$ and $\tau_z$. Using our definitions in terms of an uncoupled basis, we had

$$
\psi_{njm_j;ls}=\sum_{m_lm_s}\langle lm_lsm_s|jm_j\rangle\phi_{nlm_lsm_s},
$$

which we can now extend to

$$
\psi_{njm_j;ls}\xi_{\tau\tau_z}=\sum_{m_lm_s}\langle lm_lsm_s|jm_j\rangle\phi_{nlm_lsm_s}\xi_{\tau\tau_z},
$$

with the isospin spinors defined as

$$
\xi_{\tau=1/2\tau_z=+1/2}=\left(\begin{array}{c} 1  \\ 0\end{array}\right),
$$

and

$$
\xi_{\tau=1/2\tau_z=-1/2}=\left(\begin{array}{c} 0  \\ 1\end{array}\right).
$$

We can then define the proton state function as

$$
\psi^p(\mathbf{r})  =\psi_{njm_j;ls}(\mathbf{r})\left(\begin{array}{c} 0  \\ 1\end{array}\right),
$$

and similarly for neutrons as

$$
\psi^n(\mathbf{r})  =\psi_{njm_j;ls}(\mathbf{r})\left(\begin{array}{c} 1  \\ 0\end{array}\right).
$$

## Isospin
We can in turn define the isospin Pauli matrices (in the same as we define the spin matrices) as

6
7

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\hat{\tau}_y =\left(\begin{array}{cc} 0 & -\imath \\ \imath & 0 \end{array}\right),
$$

and

$$
\hat{\tau}_z =\left(\begin{array}{cc} 1 & 0 \\ 0 & -1 \end{array}\right),
$$

and operating with $\hat{\tau}_z$ on the proton state function we have

$$
\hat{\tau}_z\psi^p(\mathbf{r})=-\frac{1}{2}\psi^p(\mathbf{r}),
$$

and for neutrons we have

$$
\hat{\tau}\psi^n(\mathbf{r})=\frac{1}{2}\psi^n(\mathbf{r}).
$$

## Isospin
We can now define the so-called charge operator as

$$
\frac{\hat{Q}}{e} = \frac{1}{2}\left(1-\hat{\tau}_z\right)=\begin{Bmatrix} 0 & 0 \\ 0 & 1 \end{Bmatrix},
$$

which results in

$$
\frac{\hat{Q}}{e}\psi^p(\mathbf{r})=\psi^p(\mathbf{r}),
$$

and

$$
\frac{\hat{Q}}{e}\psi^n(\mathbf{r})=0,
$$

as it should be.

## Isospin
The total isospin is defined as

$$
\hat{T}=\sum_{i=1}^A\hat{\tau}_i,
$$

and its corresponding isospin projection as

$$
\hat{T}_z=\sum_{i=1}^A\hat{\tau}_{z_i},
$$

with eigenvalues $T(T+1)$ for $\hat{T}$ and $1/2(N-Z)$ for $\hat{T}_z$, where $N$ is the number of neutrons and $Z$ the number of protons.

If charge is conserved, the Hamiltonian $\hat{H}$ commutes with $\hat{T}_z$ and all members of a given isospin multiplet
(that is the same value of $T$) have the same energy and there is no $T_z$ dependence and we say that $\hat{H}$ is a scalar in isospin space.

## Angular momentum algebra, Examples
We have till now seen the following definitions of a two-body matrix elements
with quantum numbers $p=j_pm_p$ etc we have a two-body state defined as

$$
|(pq)M\rangle  = a^{\dagger}_pa^{\dagger}_q|\Phi_0\rangle,
$$

where $|\Phi_0\rangle$ is a chosen reference state, say for example the Slater determinant which approximates
${}^{16}\mbox{O}$ with the $0s$ and the $0p$ shells being filled, and $M=m_p+m_q$. Recall that we label single-particle states above the Fermi level as $abcd\dots$ and states below the Fermi level for $ijkl\dots$.
In case of two-particles in the single-particle states $a$ and $b$ outside ${}^{16}\mbox{O}$ as a closed shell core, say ${}^{18}\mbox{O}$,
we would write the representation of the Slater determinant as

$$
|^{18}\mathrm{O}\rangle =|(ab)M\rangle  = a^{\dagger}_aa^{\dagger}_b|^{16}\mathrm{O}\rangle=|\Phi^{ab}\rangle.
$$

In case of two-particles removed from say ${}^{16}\mbox{O}$, for example two neutrons in the single-particle states $i$ and $j$, we would write this as

$$
|^{14}\mathrm{O}\rangle =|(ij)M\rangle  = a_ja_i|^{16}\mathrm{O}\rangle=|\Phi_{ij}\rangle.
$$

## Angular momentum algebra and many-body states
For a one-hole-one-particle state we have

$$
|^{16}\mathrm{O}\rangle_{1p1h} =|(ai)M\rangle  = a_a^{\dagger}a_i|^{16}\mathrm{O}\rangle=|\Phi_{i}^a\rangle,
$$

and finally for a two-particle-two-hole state we

$$
|^{16}\mathrm{O}\rangle_{2p2h} =|(abij)M\rangle  = a_a^{\dagger}a_b^{\dagger}a_ja_i|^{16}\mathrm{O}\rangle=|\Phi_{ij}^{ab}\rangle.
$$

## Angular momentum algebra, two-body state and anti-symmetrized matrix elements
Let us go back to the case of two-particles in the single-particle states $a$ and $b$ outside ${}^{16}\mbox{O}$ as a closed shell core, say ${}^{18}\mbox{O}$.
The representation of the Slater determinant is

$$
|^{18}\mathrm{O}\rangle =|(ab)M\rangle  = a^{\dagger}_aa^{\dagger}_b|^{16}\mathrm{O}\rangle=|\Phi^{ab}\rangle.
$$

The anti-symmetrized matrix element is detailed as

$$
\langle (ab) M | \hat{V} | (cd) M \rangle = \langle (j_am_aj_bm_b)M=m_a+m_b |  \hat{V} | (j_cm_cj_dm_d)M=m_a+m_b \rangle,
$$

and note that anti-symmetrization means

8
4

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\langle (ab) M | \hat{V} | (cd) M \rangle =-\langle (ab) M | \hat{V} | (dc) M \rangle.
$$

## Angular momentum algebra, Wigner-Eckart theorem, Examples
This matrix element is given by

$$
\langle ^{16}\mathrm{O}|a_ba_a\frac{1}{4}\sum_{pqrs}\langle (pq) M | \hat{V} | (rs) M' \rangle a^{\dagger}_pa^{\dagger}_qa_sa_r a^{\dagger}_ca^{\dagger}_d|^{16}\mathrm{O}\rangle.
$$

We can compute this matrix element using Wick's theorem.

## Angular momentum algebra, Wigner-Eckart theorem, Examples
We have also defined matrix elements in the coupled basis, the so-called $J$-coupled scheme.
In this case the two-body wave function for two neutrons outside ${}^{16}\mbox{O}$ is written as

$$
|^{18}\mathrm{O}\rangle_J =|(ab)JM\rangle  = \left\{a^{\dagger}_aa^{\dagger}_b\right\}^J_M|^{16}\mathrm{O}\rangle=N_{ab}\sum_{m_am_b}\langle j_am_aj_bm_b|JM\rangle|\Phi^{ab}\rangle,
$$

with

$$
|\Phi^{ab}\rangle=a^{\dagger}_aa^{\dagger}_b|^{16}\mathrm{O}\rangle.
$$

We have now an explicit coupling order, where the angular momentum $j_a$ is coupled to the angular momentum $j_b$ to yield a final two-body angular momentum $J$.
The normalization factor is

$$
N_{ab}=\frac{\sqrt{1+\delta_{ab}\times (-1)^J}}{1+\delta_{ab}}.
$$

## Angular momentum algebra
We
note that, using the anti-commuting
properties of the creation operators, we obtain

$$
N_{ab}\sum_{m_am_b}\langle j_am_aj_bm_b|JM\rangle \vert\Phi^{ab}\rangle=-N_{ab}\sum_{m_am_b}\langle j_am_aj_bm_b|JM\rangle\vert\Phi^{ba}\rangle.
$$

Furthermore, using the property of the Clebsch-Gordan coefficient

$$
\langle j_am_aj_bm_b|JM>=(-1)^{j_a+j_b-J}\langle j_bm_bj_am_a|JM\rangle,
$$

which can be used to show that

$$
|(j_bj_a)JM\rangle  = \left\{a^{\dagger}_ba^{\dagger}_a\right\}^J_M|^{16}\mathrm{O}\rangle=N_{ab}\sum_{m_am_b}\langle j_bm_bj_am_a|JM\rangle|\Phi^{ba}\rangle,
$$

is equal to

$$
|(j_bj_a)JM\rangle=(-1)^{j_a+j_b-J+1}|(j_aj_b)JM\rangle.
$$

## Angular momentum algebra, Wigner-Eckart theorem, Examples
The implementation of the Pauli principle looks different in the $J$-scheme compared with the $m$-scheme. In the latter, no two fermions or more can have the same set of quantum numbers. In the $J$-scheme, when we write a state with the shorthand

$$
|^{18}\mathrm{O}\rangle_J =|(ab)JM\rangle,
$$

we do refer to the angular momenta only. This means that another way of writing the last state is

$$
|^{18}\mathrm{O}\rangle_J =|(j_aj_b)JM\rangle.
$$

We will use this notation throughout when we refer to a two-body state in $J$-scheme. The Kronecker $\delta$ function in the normalization factor
refers thus to the values of $j_a$ and $j_b$. If two identical particles are in a state with the same $j$-value, then only even values of the total angular momentum apply.  In the notation below, when we label a state as $j_p$ it will actually represent all quantum numbers except $m_p$.

## Angular momentum algebra, two-body matrix elements
The two-body matrix element is a scalar and since it obeys rotational symmetry, it is diagonal in $J$,
meaning that the corresponding matrix element in $J$-scheme is

9
6

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\times \langle j_cm_cj_dm_d|JM\rangle\langle (j_am_aj_bm_b)M |  \hat{V} | (j_cm_cj_dm_d)M \rangle,
$$

and note that of the four $m$-values in the above sum, only three are independent due to the constraint $m_a+m_b=M=m_c+m_d$.

## Angular momentum algebra, two-body matrix element
Since

$$
|(j_bj_a)JM\rangle=(-1)^{j_a+j_b-J+1}|(j_aj_b)JM\rangle,
$$

the anti-symmetrized matrix elements need now to obey the following relations

9
9

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

1
0
0

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\langle (j_aj_b) JM | \hat{V} | (j_cj_d) JM \rangle = (-1)^{j_a+j_b+j_c+j_d}\langle (j_bj_a) JM | \hat{V} | (j_dj_c) JM \rangle=\langle (j_bj_a) JM | \hat{V} | (j_dj_c) JM \rangle,
$$

where the last relations follows from the fact that $J$ is an integer and $2J$ is always an even number.

## Angular momentum algebra, two-body matrix element
Using the orthogonality properties of the Clebsch-Gordan coefficients,

$$
\sum_{m_am_b}\langle j_am_aj_bm_b|JM\rangle\langle j_am_aj_bm_b|J'M'\rangle=\delta_{JJ'}\delta_{MM'},
$$

and

$$
\sum_{JM}\langle j_am_aj_bm_b|JM\rangle\langle j_am_a'j_bm_b'|JM\rangle=\delta_{m_am_a'}\delta_{m_bm_b'},
$$

we can also express the two-body matrix element in $m$-scheme in terms of that in $J$-scheme, that is, if we multiply with

$$
\sum_{JMJ'M'}\langle j_am_a'j_bm_b'|JM\rangle\langle j_cm_c'j_dm_d'|J'M'\rangle
$$

from left in

1
0
5

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\times \langle (j_am_aj_bm_b)M|  \hat{V} | (j_cm_cj_dm_d)M\rangle,
$$

we obtain

1
0
7

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\times \langle (j_aj_b) JM | \hat{V} | (j_cj_d) JM \rangle.
$$

## The Hartree-Fock potential
We can now use the above relations to compute the Hartre-Fock energy in $j$-scheme.
In $m$-scheme we defined the Hartree-Fock energy as

$$
\varepsilon_{pq}^{\mathrm{HF}}=\delta_{pq}\varepsilon_p+  \sum_{i\le F} \langle pi \vert \hat{V} \vert qi\rangle_{AS},
$$

where the single-particle states $pqi$ point to the quantum numbers in $m$-scheme. For a state with for example $j=5/2$, this results in six identical values for the above potential. We would obviously like to reduce this to one only by rewriting our equations in $j$-scheme.

Our Hartree-Fock basis is orthogonal by definition, meaning that we have

$$
\varepsilon_{p}^{\mathrm{HF}}=\varepsilon_p+  \sum_{i\le F} \langle pi \vert \hat{V} \vert pi\rangle_{AS},
$$

## The Hartree-Fock potential
We have

$$
\varepsilon_{p}^{\mathrm{HF}}=\varepsilon_p+  \sum_{i\le F} \langle pi \vert \hat{V} \vert pi\rangle_{AS},
$$

where the single-particle  states $p=[n_p,j_p,m_p,t_{z_{p}}]$. Let us assume that $p$ is a state above the Fermi level. The quantity $\varepsilon_p$ could represent the harmonic oscillator single-particle energies.

Let  $p\rightarrow a$.

The energies, as we have seen, are independent of $m_a$ and $m_i$.
We sum now over all $m_a$ on both sides of the above equation and divide by $2j_a+1$, recalling that $\sum_{m_a}=2j_a+1$.  This results in

$$
\varepsilon_{a}^{\mathrm{HF}}=\varepsilon_a+  \frac{1}{2j_a+1}\sum_{i\le F}\sum_{m_a} \langle ai \vert \hat{V}\vert ai\rangle_{AS},
$$

## The Hartree-Fock potential
We rewrite

$$
\varepsilon_{a}^{\mathrm{HF}}=\varepsilon_a+  \frac{1}{2j_a+1}\sum_{i\le F}\sum_{m_a} \langle ai \vert \hat{V} \vert ai\rangle_{AS},
$$

as

$$
\varepsilon_{a}^{\mathrm{HF}}=\varepsilon_a+  \frac{1}{2j_a+1}\sum_{n_i,j_i,t_{z_{i}}\le F}\sum_{m_im_a}
\langle (j_am_aj_im_i)M |  \hat{V} | (j_am_aj_im_i)M\rangle_{AS},
$$

where we have suppressed  the dependence on $n_p$ and $t_z$ in the matrix element.
Using the definition

$$
\langle (j_am_aj_bm_b)M \vert  \hat{V} \vert (j_cm_cj_dm_d)M\rangle=\frac{1}{N_{ab}N_{cd}}\sum_{JM}\langle j_am_aj_bm_b|JM\rangle\langle j_cm_cj_dm_d|JM\rangle \langle (j_aj_b)J \vert \hat{V} \vert (j_cj_d)M\rangle_{AS},
$$

with the orthogonality properties of Glebsch-Gordan coefficients and that the  $j$-coupled two-body matrix element is a scalar and independent of $M$ we arrive at

$$
\varepsilon_{a}^{\mathrm{HF}}=\varepsilon_a+  \frac{1}{2j_a+1}\sum_{j_i\le F}\sum_J (2J+1)
\langle (j_aj_i)J \vert \hat{V} \vert (j_aj_i)M\rangle_{AS},
$$

## First order in the potential energy
In a similar way it is easy to show that the potential energy contribution to the ground state energy in $m$-scheme

$$
\frac{1}{2}\sum_{ij\le F}\langle (j_im_ij_jm_j)M |  \hat{V} | (j_im_ij_jm_j)M\rangle_{AS},
$$

can be rewritten as

$$
\frac{1}{2}\sum_{j_i,j_j\le F}\sum_J(2J+1)
\langle (j_ij_j)J |  \hat{V} | (j_ij_j)J\rangle_{AS},
$$

This reduces the number of floating point operations with an order of magnitude on average.

## Angular momentum algebra
We are now going to define two-body and many-body states in an angular momentum coupled basis, the so-called $j$-scheme basis.  In this connection
* we need to define the so-called $6j$ and $9j$ symbols

* as well as the the Wigner-Eckart theorem

We will also study  some specific examples, like the calculation of the tensor force.

## Angular momentum algebra, Wigner-Eckart theorem
We define an irreducible  spherical tensor $T^{\lambda}_{\mu}$ of rank $\lambda$ as an operator with $2\lambda+1$ components $\mu$
that satisfies the commutation relations ($\hbar=1$)

$$
[J_{\pm}, T^{\lambda}_{\mu}]= \sqrt{(\lambda\mp \mu)(\lambda\pm \mu+1)}T^{\lambda}_{\mu\pm 1},
$$

and

$$
[J_{z}, T^{\lambda}_{\mu}]=\mu T^{\lambda}_{\mu}.
$$

## Angular momentum algebra, Wigner-Eckart theorem
Our angular momentum coupled two-body wave function obeys clearly this definition, namely

$$
|(ab)JM\rangle  = \left\{a^{\dagger}_aa^{\dagger}_b\right\}^J_M|\Phi_0\rangle=N_{ab}\sum_{m_am_b}\langle j_am_aj_bm_b|JM\rangle|\Phi^{ab}\rangle,
$$

is a tensor of rank $J$ with $M$ components. Another well-known example is given by the spherical harmonics (see examples during today's lecture).

The product of two irreducible tensor operators

$$
T^{\lambda_3}_{\mu_3}=\sum_{\mu_1\mu_2}\langle \lambda_1\mu_1\lambda_2\mu_2|\lambda_3\mu_3\rangle T^{\lambda_1}_{\mu_1}T^{\lambda_2}_{\mu_2}
$$

is also a tensor operator of rank $\lambda_3$.

## Angular momentum algebra, Wigner-Eckart theorem
We wish to apply the above definitions to the computations of a matrix element

$$
\langle \Phi^J_M|T^{\lambda}_{\mu}|\Phi^{J'}_{M'}\rangle,
$$

where we have skipped a reference to specific single-particle states. This is the expectation value for two specific states, labelled by angular momenta $J'$ and $J$. These states form an orthonormal basis.
Using the properties of the Clebsch-Gordan coefficients we can write

$$
T^{\lambda}_{\mu}|\Phi^{J'}_{M'}\rangle=\sum_{J''M''}\langle \lambda \mu J'M'|J''M''\rangle|\Psi^{J''}_{M''}\rangle,
$$

and assuming that states with different $J$ and $M$ are orthonormal we arrive at

$$
\langle \Phi^J_M|T^{\lambda}_{\mu}|\Phi^{J'}_{M'}\rangle= \langle \lambda \mu J'M'|JM\rangle \langle \Phi^J_M|\Psi^{J}_{M}\rangle.
$$

## Angular momentum algebra, Wigner-Eckart theorem
We need to show that

$$
\langle \Phi^J_M|\Psi^{J}_{M}\rangle,
$$

is independent of $M$.
To show that

$$
\langle \Phi^J_M|\Psi^{J}_{M}\rangle,
$$

is independent of $M$, we use the ladder operators for angular momentum.

## Angular momentum algebra, Wigner-Eckart theorem
 We have that

$$
\langle \Phi^J_{M+1}|\Psi^{J}_{M+1}\rangle=\left((J-M)(J+M+1)\right)^{-1/2}\langle \hat{J}_{+}\Phi^J_{M}|\Psi^{J}_{M+1}\rangle,
$$

but this is also equal to

$$
\langle \Phi^J_{M+1}|\Psi^{J}_{M+1}\rangle=\left((J-M)(J+M+1)\right)^{-1/2}\langle \Phi^J_{M}|\hat{J}_{-}\Psi^{J}_{M+1}\rangle,
$$

meaning that

$$
\langle \Phi^J_{M+1}|\Psi^{J}_{M+1}\rangle=\langle \Phi^J_M|\Psi^{J}_{M}\rangle\equiv\langle \Phi^J_{M}||T^{\lambda}||\Phi^{J'}_{M'}\rangle.
$$

The double bars indicate that this expectation value is independent of the projection $M$.

## Angular momentum algebra, Wigner-Eckart theorem
The Wigner-Eckart theorem for an expectation value can then be written as

$$
\langle \Phi^J_M|T^{\lambda}_{\mu}|\Phi^{J'}_{M'}\rangle\equiv\langle \lambda \mu J'M'|JM\rangle\langle \Phi^J||T^{\lambda}||\Phi^{J'}\rangle.
$$

The double bars indicate that this expectation value is independent of the projection $M$.
We can manipulate the Clebsch-Gordan coefficients using the relations

$$
\langle \lambda \mu J'M'|JM\rangle= (-1)^{\lambda+J'-J}\langle J'M'\lambda \mu |JM\rangle
$$

and

$$
\langle J'M'\lambda \mu |JM\rangle =(-1)^{J'-M'}\frac{\sqrt{2J+1}}{\sqrt{2\lambda+1}}\langle J'M'J-M |\lambda-\mu\rangle,
$$

together with the so-called $3j$ symbols.
It is then normal to encounter the Wigner-Eckart theorem in the form

$$
\langle \Phi^J_M|T^{\lambda}_{\mu}|\Phi^{J'}_{M'}\rangle\equiv(-1)^{J-M}\left(\begin{array}{ccc}  J & \lambda & J' \\ -M & \mu & M'\end{array}\right)\langle \Phi^J||T^{\lambda}||\Phi^{J'}\rangle,
$$

with the condition $\mu+M'-M=0$.

## Angular momentum algebra, Wigner-Eckart theorem
The $3j$ symbols obey the symmetry relation

$$
\left(\begin{array}{ccc}  j_1 & j_2 & j_3 \\ m_1 & m_2 & m_3\end{array}\right)=(-1)^{p}\left(\begin{array}{ccc}  j_a & j_b & j_c \\ m_a & m_b & m_c\end{array}\right),
$$

with $(-1)^p=1$ when the columns $a,b, c$ are even permutations of the columns $1,2,3$, $p=j_1+j_2+j_3$ when the columns $a,b,c$ are odd permtations of the
columns $1,2,3$ and $p=j_1+j_2+j_3$ when all the magnetic quantum numbers $m_i$ change sign. Their orthogonality is given by

$$
\sum_{j_3m_3}(2j_3+1)\left(\begin{array}{ccc}  j_1 & j_2 & j_3 \\ m_1 & m_2 & m_3\end{array}\right)\left(\begin{array}{ccc}  j_1 & j_2 & j_3 \\ m_{1'} & m_{2'} & m_3\end{array}\right)=\delta_{m_1m_{1'}}\delta_{m_2m_{2'}},
$$

and

$$
\sum_{m_1m_2}\left(\begin{array}{ccc}  j_1 & j_2 & j_3 \\ m_1 & m_2 & m_3\end{array}\right)\left(\begin{array}{ccc}  j_1 & j_2 & j_{3'} \\ m_{1} & m_{2} & m_{3'}\end{array}\right)=\frac{1}{(2j_3+1)}\delta_{j_3j_{3'}}\delta_{m_3m_{3'}}.
$$

## Angular momentum algebra, Wigner-Eckart theorem
For later use, the following special cases for the Clebsch-Gordan and $3j$ symbols are rather useful
\[
\langle JM J'M' |00\rangle =\frac{(-1)^{J-M}}{\sqrt{2J+1}}\delta_{JJ'}\delta_{MM'}.
\]
and
\[
\left(\begin{array}{ccc}  J & 1 & J \\ -M & 0 & M'\end{array}\right)=(-1)^{J-M}\frac{M}{\sqrt{(2J+1)(J+1)}}\delta_{MM'}.
\]

## Angular momentum algebra, Wigner-Eckart theorem
Using $3j$ symbols we rewrote the Wigner-Eckart theorem as

$$
\langle \Phi^J_M|T^{\lambda}_{\mu}|\Phi^{J'}_{M'}\rangle\equiv(-1)^{J-M}\left(\begin{array}{ccc}  J & \lambda & J' \\ -M & \mu & M'\end{array}\right)\langle \Phi^J||T^{\lambda}||\Phi^{J'}\rangle.
$$

Multiplying from the left with the same $3j$ symbol and summing over $M,\mu,M'$ we obtain the equivalent relation

$$
\langle \Phi^J||T^{\lambda}||\Phi^{J'}\rangle\equiv\sum_{M,\mu,M'}(-1)^{J-M}\left(\begin{array}{ccc}  J & \lambda & J' \\ -M & \mu & M'\end{array}\right)\langle \Phi^J_M|T^{\lambda}_{\mu}|\Phi^{J'}_{M'}\rangle,
$$

where we used the orthogonality properties of the $3j$ symbols from the previous page.

## Angular momentum algebra, Wigner-Eckart theorem
This relation can in turn be used to compute the expectation value of some simple reduced matrix elements like

$$
\langle \Phi^J||{\bf 1}||\Phi^{J'}\rangle=\sum_{M,M'}(-1)^{J-M}\left(\begin{array}{ccc}  J & 0 & J' \\ -M & 0 & M'\end{array}\right)\langle \Phi^J_M|1|\Phi^{J'}_{M'}\rangle=\sqrt{2J+1}\delta_{JJ'}\delta_{MM'},
$$

where we used

$$
\langle JM J'M' |00\rangle =\frac{(-1)^{J-M}}{\sqrt{2J+1}}\delta_{JJ'}\delta_{MM'}.
$$

## Angular momentum algebra, Wigner-Eckart theorem
Similarly, using

$$
\left(\begin{array}{ccc}  J & 1 & J \\ -M & 0 & M'\end{array}\right)=(-1)^{J-M}\frac{M}{\sqrt{(2J+1)(J+1)}}\delta_{MM'},
$$

we have that

$$
\langle \Phi^J||{\bf J}||\Phi^{J}\rangle=\sum_{M,M'}(-1)^{J-M}\left(\begin{array}{ccc}  J & 1 & J' \\ -M & 0 & M'\end{array}\right)\langle \Phi^J_M|j_Z|\Phi^{J'}_{M'}\rangle=\sqrt{J(J+1)(2J+1)}
$$

With the Pauli spin matrices $\sigma$ and a state with $J=1/2$, the reduced matrix element

$$
\langle \frac{1}{2}||{\bf \sigma}||\frac{1}{2}\rangle=\sqrt{6}.
$$

Before we proceed with further examples, we need some other properties of the Wigner-Eckart theorem plus some additional angular momenta relations.

## Angular momentum algebra, Wigner-Eckart theorem
The Wigner-Eckart theorem states that the  expectation value for an irreducible spherical tensor can be written as

$$
\langle \Phi^J_M|T^{\lambda}_{\mu}|\Phi^{J'}_{M'}\rangle\equiv\langle \lambda \mu J'M'|JM\rangle\langle \Phi^J||T^{\lambda}||\Phi^{J'}\rangle.
$$

Since the Clebsch-Gordan coefficients themselves are easy to evaluate, the interesting quantity is the reduced matrix element. Note also that
the Clebsch-Gordan coefficients limit via the triangular relation among $\lambda$, $J$ and $J'$ the possible non-zero values.

From the theorem we see also that

$$
\langle \Phi^J_M|T^{\lambda}_{\mu}|\Phi^{J'}_{M'}\rangle=\frac{\langle \lambda \mu J'M'|JM\rangle\langle }{\langle \lambda \mu_0 J'M'_0|JM_0\rangle\langle }\langle \Phi^J_{M_0}|T^{\lambda}_{\mu_0}|\Phi^{J'}_{M'_0}\rangle,
$$

meaning that if we know the matrix elements for say some $\mu=\mu_0$, $M'=M'_0$ and $M=M_0$ we can calculate all other.

## Angular momentum algebra, Wigner-Eckart theorem
If we look at the hermitian adjoint of the operator $T^{\lambda}_{\mu}$,
we see via the commutation relations that $(T^{\lambda}_{\mu})^{\dagger}$ is not an irreducible tensor, that is

$$
[J_{\pm}, (T^{\lambda}_{\mu})^{\dagger}]= -\sqrt{(\lambda\pm \mu)(\lambda\mp \mu+1)}(T^{\lambda}_{\mu\mp 1})^{\dagger},
$$

and

$$
[J_{z}, (T^{\lambda}_{\mu})^{\dagger}]=-\mu (T^{\lambda}_{\mu})^{\dagger}.
$$

The hermitian adjoint $(T^{\lambda}_{\mu})^{\dagger}$ is not an irreducible tensor. As an example, consider the spherical harmonics for
$l=1$ and $m_l=\pm 1$. These functions are

$$
Y^{l=1}_{m_l=1}(\theta,\phi)=-\sqrt{\frac{3}{8\pi}}\sin{(\theta)}\exp{\imath\phi},
$$

and

$$
Y^{l=1}_{m_l=-1}(\theta,\phi)=\sqrt{\frac{3}{8\pi}}\sin{(\theta)}\exp{-\imath\phi},
$$

## Angular momentum algebra, Wigner-Eckart theorem
It is easy to see that the Hermitian adjoint of these two functions

$$
\left[Y^{l=1}_{m_l=1}(\theta,\phi)\right]^{\dagger}=-\sqrt{\frac{3}{8\pi}}\sin{(\theta)}\exp{-\imath\phi},
$$

and

$$
\left[Y^{l=1}_{m_l=-1}(\theta,\phi)\right]^{\dagger}=\sqrt{\frac{3}{8\pi}}\sin{(\theta)}\exp{\imath\phi},
$$

do not behave as a spherical tensor. However, the modified quantity

$$
\tilde{T}^{\lambda}_{\mu}=(-1)^{\lambda+\mu}(T^{\lambda}_{-\mu})^{\dagger},
$$

does satisfy the above commutation relations.

## Angular momentum algebra, Wigner-Eckart theorem
With the modified quantity

$$
\tilde{T}^{\lambda}_{\mu}=(-1)^{\lambda+\mu}(T^{\lambda}_{-\mu})^{\dagger},
$$

we can then define the expectation value

$$
\langle \Phi^J_M|T^{\lambda}_{\mu}|\Phi^{J'}_{M'}\rangle^{\dagger} = \langle \lambda \mu J'M'|JM\rangle\langle \Phi^J||T^{\lambda}||\Phi^{J'}\rangle^*,
$$

since the Clebsch-Gordan coefficients are real. The rhs is equivalent with

$$
\langle \lambda \mu J'M'|JM\rangle\langle \Phi^J||T^{\lambda}||\Phi^{J'}\rangle^*=\langle \Phi^{J'}_{M'}|(T^{\lambda}_{\mu})^{\dagger}|\Phi^{J}_{M}\rangle,
$$

which is equal to

$$
\langle \Phi^{J'}_{M'}|(T^{\lambda}_{\mu})^{\dagger}|\Phi^{J}_{M}\rangle=(-1)^{-\lambda+\mu}\langle \lambda -\mu JM|J'M'\rangle\langle \Phi^{J'}||\tilde{T}^{\lambda}||\Phi^{J}\rangle.
$$

## Angular momentum algebra, Wigner-Eckart theorem
Let us now apply the theorem to some selected expectation values.
In several of the expectation values we will meet when evaluating explicit matrix elements, we will have to deal with expectation values involving spherical harmonics. A general central interaction can be expanded in a complete set of functions like the Legendre polynomials, that is, we have an interaction, with $r_{ij}=|{\bf r}_i-{\bf r}_j|$,

$$
v(r_{ij})=\sum_{\nu=0}^{\infty}v_{\nu}(r_{ij})P_{\nu}(\cos{(\theta_{ij})},
$$

with $P_{\nu}$ being a Legendre polynomials

$$
P_{\nu}(\cos{(\theta_{ij})}=\sum_{\mu}\frac{4\pi}{2\mu+1}Y_{\mu}^{\nu *}(\Omega_{i})Y_{\mu}^{\nu}(\Omega_{j}).
$$

We will come back later to how we split the above into a contribution that involves only one of the coordinates.

## Angular momentum algebra, Wigner-Eckart theorem
This means that we will need matrix elements of the type

$$
\langle Y^{l'}||Y^{\lambda}|| Y^{l}\rangle.
$$

We can rewrite the Wigner-Eckart theorem as

$$
\langle Y^{l'}||Y^{\lambda}|| Y^{l}\rangle=\sum_{m\mu}\langle \lambda\mu lm|l'm'\rangle Y^{\lambda}_{\mu}Y^l_m,
$$

This equation is true for all values of $\theta$ and $\phi$. It must also hold for $\theta=0$.

## Angular momentum algebra, Wigner-Eckart theorem
We have

$$
\langle Y^{l'}||Y^{\lambda}|| Y^{l}\rangle=\sum_{m\mu}\langle \lambda\mu lm|l'm'\rangle Y^{\lambda}_{\mu}Y^l_m,
$$

and for $\theta=0$, the spherical harmonic

$$
Y_m^l(\theta=0,\phi)=\sqrt{\frac{2l+1}{4\pi}}\delta_{m0},
$$

which results in

$$
\langle Y^{l'}||Y^{\lambda}|| Y^{l}\rangle=\left\{\frac{(2l+1)(2\lambda+1)}{4\pi(2l'+1)}\right\}^{1/2}\langle \lambda0 l0|l'0\rangle.
$$

## Angular momentum algebra, Wigner-Eckart theorem
Till now we have mainly been concerned with the coupling of two angular momenta $j_{a}$ and $j_{b}$ to a final angular momentum $J$.
If we wish to describe a three-body state with a final angular momentum $J$, we need to couple three angular momenta, say
the two momenta $j_a,j_b$ to a third one $j_c$. The coupling order is important and leads to a less trivial implementation of the
Pauli principle. With three angular momenta there are obviously $3!$ ways by which we can combine the angular momenta.
In $m$-scheme a three-body Slater determinant is represented as (say for the case of ${}^{19}\mbox{O}$, three neutrons outside the core of ${}^{16}\mbox{O}$),

$$
|^{19}\mathrm{O}\rangle =|(abc)M\rangle  = a^{\dagger}_aa^{\dagger}_ba^{\dagger}_c|^{16}\mathrm{O}\rangle=|\Phi^{abc}\rangle.
$$

The Pauli principle is automagically implemented via the anti-commutation relations.

## Angular momentum algebra, Wigner-Eckart theorem
However, when we deal the same state in an angular momentum coupled basis, we need to be a little bit more careful. We can namely couple the states
as follows

$$
\vert([j_a\rightarrow j_b]J_{ab}\rightarrow j_c) J\rangle= \sum_{m_am_bm_c}\langle j_am_aj_bm_b|J_{ab}M_{ab}\rangle \langle J_{ab}M_{ab}j_cm_c|JM\rangle|j_am_a\rangle\otimes |j_bm_b\rangle \otimes |j_cm_c\rangle \ ,
\label{eq:fabc} \tag{1}
$$

that is, we couple first $j_a$ to $j_b$ to yield an intermediate angular momentum $J_{ab}$, then to $j_c$ yielding the final angular momentum $J$.

## Angular momentum algebra, Wigner-Eckart theorem
Now, nothing hinders us from recoupling this state by coupling $j_b$ to $j_c$, yielding an intermediate angular momentum $J_{bc}$ and then couple this angular momentum to $j_a$, resulting in the final angular momentum $J'$.

That is, we can have

$$
\vert(j_a\rightarrow [j_b\rightarrow j_c]J_{bc}) J\rangle = \sum_{m_a'm_b'm_c'}\langle j_bm_b'j_cm_c'|J_{bc}M_{bc}\rangle \langle j_am_a'J_{bc}M_{bc}|J'M'\rangle|\Phi^{abc}\rangle .
$$

We will always assume that we work with orthornormal states, this means that when we compute the overlap betweem these two possible ways of coupling angular momenta, we get

$$
\begin{equation}
\langle (j_a\rightarrow [j_b\rightarrow j_c]J_{bc}) J'M'| ([j_a\rightarrow j_b]J_{ab}\rightarrow j_c) JM\rangle =
\delta_{JJ'}\delta_{MM'}\sum_{m_am_bm_c}\langle j_am_aj_bm_b|J_{ab}M_{ab}\rangle \langle J_{ab}M_{ab}j_cm_c|JM\rangle
\label{_auto1} \tag{2}
\end{equation}
$$

$$
\begin{equation}
 \times \langle j_bm_bj_cm_c|J_{bc}M_{bc}\rangle \langle j_am_aJ_{bc}M_{bc}|JM\rangle .
\label{_auto2} \tag{3}
\end{equation}
$$

## Angular momentum algebra, Wigner-Eckart theorem
We use then the latter equation to define the so-called $6j$-symbols

$$
\begin{eqnarray}
\langle (j_a\rightarrow [j_b\rightarrow j_c]J_{bc}) J'M'| ([j_a\rightarrow j_b]J_{ab}\rightarrow j_c) JM\rangle & = & \delta_{JJ'}\delta_{MM'}\sum_{m_am_bm_c}\langle j_am_aj_bm_b|J_{ab}M_{ab}\rangle \langle J_{ab}M_{ab}j_cm_c|JM\rangle \\ \nonumber
& & \times \langle j_bm_bj_cm_c|J_{bc}M_{bc}\rangle \langle j_am_aJ_{bc}M_{bc}|JM\rangle  \\ \nonumber
& =&(-1)^{j_a+j_b+j_c+J}\sqrt{(2J_{ab}+1)(2J_{bc}+1)}\left\{\begin{array}{ccc} j_a & j_b& J_{ab} \\ j_c & J & J_{bc} \end{array}\right\} ,
\end{eqnarray}
$$

where the symbol in curly brackets is the $6j$ symbol.
A specific coupling order has to be respected in the symbol, that is, the so-called triangular relations between three angular momenta needs to be respected, that is

$$
\left\{\begin{array}{ccc} x & x& x \\  &  &  \end{array}\right\}\hspace{0.1cm}\left\{\begin{array}{ccc}  & & x \\  x& x &  \end{array}\right\}\hspace{0.1cm}\left\{\begin{array}{ccc}  & x&  \\ x &  &x  \end{array}\right\}\hspace{0.1cm}\left\{\begin{array}{ccc} x & &  \\  & x &x  \end{array}\right\}\hspace{0.1cm}
$$

## Angular momentum algebra, Wigner-Eckart theorem
The $6j$ symbol is invariant under the permutation of any two columns

$$
\begin{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6 \end{Bmatrix} = \begin{Bmatrix} j_2 & j_1 & j_3\\ j_5 & j_4 & j_6 \end{Bmatrix} = \begin{Bmatrix} j_1 & j_3 & j_2\\ j_4 & j_6 & j_5 \end{Bmatrix} = \begin{Bmatrix} j_3 & j_2 & j_1\\ j_6 & j_5 & j_4 \end{Bmatrix}.
$$

The $6j$ symbol is also invariant if upper and lower arguments are interchanged in any two columns

$$
\begin{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6 \end{Bmatrix} = \begin{Bmatrix} j_4 & j_5 & j_3\\ j_1 & j_2 & j_6 \end{Bmatrix} = \begin{Bmatrix} j_1 & j_5 & j_6\\ j_4 & j_2 & j_3 \end{Bmatrix} = \begin{Bmatrix} j_4 & j_2 & j_6\\ j_1 & j_5 & j_3 \end{Bmatrix}.
$$

## Testing properties of $6j$ symbols
The above properties of $6j$ symbols can again be tested using the symbolic python package **wigner**.
Let us test the invariance

$$
\begin{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6 \end{Bmatrix} = \begin{Bmatrix} j_2 & j_1 & j_3\\ j_5 & j_4 & j_6 \end{Bmatrix}.
$$

The following program tests this relation for the case of $j_1=3/2$, $j_2=3/2$, $j_3=3$, $j_4=1/2$, $j_5=1/2$, $j_6=1$

```
from sympy import S
from sympy.physics.wigner import wigner_6j
# Twice the values of all js
j1 = 3
j2 = 5
j3 = 2
j4 = 3
j5 = 5
j6 = 1
""" The triangular relation has to be fulfilled """
print wigner_6j(S(j1)/2, S(j2)/2, j3, S(j4)/2, S(j5)/2, j6)
""" Swapping columns 1 <==> 2 """
print wigner_6j(S(j2)/2, S(j1)/2, j3, S(j5)/2, S(j4)/2, j6)
```

## Angular momentum algebra, Wigner-Eckart theorem
The $6j$ symbols satisfy this orthogonality relation

$$
\sum_{j_3} (2j_3+1) \begin{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6 \end{Bmatrix} \begin{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6' \end{Bmatrix} = \frac{\delta_{j_6^{}j_6'}}{2j_6+1} \{j_1,j_5,j_6\} \{j_4,j_2,j_6\}.
$$

The symbol $\{j_1j_2j_3\}$ (called the triangular delta) is equal to one if the triad $(j_1j_2j_3)$ satisfies the triangular conditions and zero otherwise.
A useful value is given when say one of the angular momenta are zero, say $J_{bc}=0$, then we have

$$
\left\{\begin{array}{ccc} j_a & j_b& J_{ab} \\ j_c & J & 0 \end{array}\right\}=\frac{(-1)^{j_a+j_b+J_{ab}}\delta_{Jj_a}\delta_{j_cj_b} }{\sqrt{(2j_{a}+1)(2j_{b}+1)}}
$$

## Angular momentum algebra, Wigner-Eckart theorem
With the $6j$ symbol defined, we can go back and and rewrite the overlap between the two ways of recoupling angular momenta in terms of the $6j$ symbol.
That is, we can have

$$
\vert (j_a\rightarrow [j_b\rightarrow j_c]J_{bc}) JM\rangle =\sum_{J_{ab}}(-1)^{j_a+j_b+j_c+J}\sqrt{(2J_{ab}+1)(2J_{bc}+1)}\left\{\begin{array}{ccc} j_a & j_b& J_{ab} \\ j_c & J & J_{bc} \end{array}\right\}| ([j_a\rightarrow j_b]J_{ab}\rightarrow j_c) JM\rangle.
$$

Can you find the inverse relation?
These relations can in turn be used to write out the fully anti-symmetrized three-body wave function in a $J$-scheme coupled basis.
If you opt then for a specific coupling order, say $| ([j_a\rightarrow j_b]J_{ab}\rightarrow j_c) JM\rangle$, you need to express this representation in terms of the other coupling possibilities.

## Angular momentum algebra, Wigner-Eckart theorem
Note that the two-body intermediate state is assumed to be antisymmetric but
not normalized, that is, the state which involves the quantum numbers
$j_a$ and $j_b$. Assume that the intermediate
two-body state is antisymmetric. With this coupling order, we can
rewrite ( in a schematic way) the general three-particle Slater determinant as

$$
\Phi(a,b,c) = {\cal A} | ([j_a\rightarrow j_b]J_{ab}\rightarrow j_c) J\rangle,
$$

with an implicit sum over $J_{ab}$.  The antisymmetrization operator ${\cal A}$ is used here to indicate that we need to antisymmetrize the state. **Challenge**: Use the definition of the $6j$ symbol and find an explicit
expression for the above three-body state using the coupling order $| ([j_a\rightarrow j_b]J_{ab}\rightarrow j_c) J\rangle$.

## Angular momentum algebra, Wigner-Eckart theorem
We can also coupled together four angular momenta. Consider two four-body states, with single-particle angular momenta $j_a$, $j_b$, $j_c$ and $j_d$ we can have a state with final $J$

$$
|\Phi(a,b,c,d)\rangle_1 = | ([j_a\rightarrow j_b]J_{ab}\times [j_c\rightarrow j_d]J_{cd}) JM\rangle,
$$

where we read the coupling order as $j_a$ couples with $j_b$ to given and intermediate angular momentum $J_{ab}$.
Moreover, $j_c$ couples with $j_d$ to given and intermediate angular momentum $J_{cd}$.  The two intermediate angular momenta $J_{ab}$ and $J_{cd}$
are in turn coupled to a final $J$.  These operations involved three Clebsch-Gordan coefficients.

Alternatively, we could couple in the following order

$$
|\Phi(a,b,c,d)\rangle_2 = | ([j_a\rightarrow j_c]J_{ac}\times [j_b\rightarrow j_d]J_{bd}) JM\rangle,
$$

## Angular momentum algebra, Wigner-Eckart theorem
The overlap between these two states

$$
\langle([j_a\rightarrow j_c]J_{ac}\times [j_b\rightarrow j_d]J_{bd}) JM| ([j_a\rightarrow j_b]J_{ab}\times [j_c\rightarrow j_d]J_{cd}) JM\rangle,
$$

is equal to

$$
\begin{eqnarray}
\nonumber
& & \sum_{m_iM_{ij}}\langle j_am_aj_bm_b|J_{ab}M_{ab}\rangle \langle j_cm_cj_dm_d|J_{cd}M_{cd}\rangle \langle J_{ab}M_{ab}J_{cd}M_{cd}|JM\rangle \\
& & \times\langle j_am_aj_cm_c|J_{ac}M_{ac}\rangle \langle j_bm_bj_dm_d|J_{cd}M_{bd}\rangle \langle J_{ac}M_{ac}J_{bd}M_{bd}|JM\rangle \\  \nonumber
&= & \sqrt{(2J_{ab}+1)(2J_{cd}+1)(2J_{ac}+1)(2J_{bd}+1)}\left\{\begin{array}{ccc} j_a & j_b& J_{ab} \\ j_c & j_d& J_{cd} \\J_{ac} & J_{bd}& J\end{array}\right\}
, \nonumber
\end{eqnarray}
$$

with the symbol in curly brackets $\{\}$ being the $9j$-symbol. We see  that a $6j$ symbol  involves four Clebsch-Gordan coefficients, while the $9j$ symbol
involves six.

## Angular momentum algebra, Wigner-Eckart theorem
A $9j$ symbol is invariant under reflection in either diagonal

$$
\begin{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6\\ j_7 & j_8 & j_9 \end{Bmatrix} = \begin{Bmatrix} j_1 & j_4 & j_7\\ j_2 & j_5 & j_8\\ j_3 & j_6 & j_9 \end{Bmatrix} = \begin{Bmatrix} j_9 & j_6 & j_3\\ j_8 & j_5 & j_2\\ j_7 & j_4 & j_1 \end{Bmatrix}.
$$

The permutation of any two rows or any two columns yields a phase factor $(-1)^S$, where

$$
S=\sum_{i=1}^9 j_i.
$$

As an  example we have

$$
\begin{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6\\ j_7 & j_8 & j_9 \end{Bmatrix} = (-1)^S \begin{Bmatrix} j_4 & j_5 & j_6\\ j_1 & j_2 & j_3\\ j_7 & j_8 & j_9 \end{Bmatrix} = (-1)^S \begin{Bmatrix} j_2 & j_1 & j_3\\ j_5 & j_4 & j_6\\ j_8 & j_7 & j_9 \end{Bmatrix}.
$$

## Angular momentum algebra, Wigner-Eckart theorem
A useful case is when say $J=0$ in

$$
\left\{\begin{array}{ccc} j_a & j_b& J_{ab} \\ j_c & j_d & J_{cd} \\ J_{ac} & J_{bd}& 0\end{array}\right\}=\frac{\delta_{J_{ab}J_{cd}} \delta_{J_{ac}J_{bd}}}{\sqrt{(2J_{ab}+1)(2J_{ac}+1)}} (-1)^{j_b+J_{ab}+j_c+J_{ac}} \begin{Bmatrix} j_a & j_b & J_{ab}\\ j_d & j_c & J_{ac} \end{Bmatrix}.
$$

## Angular momentum algebra, Wigner-Eckart theorem
The tensor operator in the nucleon-nucleon potential
is given by

$$
\begin{array}{ll}
&\\
\langle lSJ\vert S_{12}\vert l'S'J\rangle =&
(-)^{S+J}\sqrt{30(2l+1)(2l'+1)(2S+1)(2S'+1)}\\
&\times\left\{\begin{array}{ccc}J&S'&l'\\2&l&S\end{array}\right\}
\left(\begin{array}{ccc}l'&2&l\\0&0&0\end{array}\right)
\left\{\begin{array}{ccc}s_{1}&s_{2}&S\\s_{3}&s_{4}&S'\\
1&1&2\end{array}
\right\}\\
&\times\langle s_{1}\vert\vert \sigma_{1}\vert\vert s_{3}\rangle
\langle s_{2}\vert\vert \sigma_{2}\vert \vert s_{4}\rangle,
\end{array}
$$

and it is zero for the $^1S_0$ wave.

How do we get here?

## Angular momentum algebra, Wigner-Eckart theorem
To derive the expectation value of the nuclear tensor force, we recall that
the product of two irreducible tensor operators is

$$
W^{r}_{m_r}=\sum_{m_pm_q}\langle pm_pqm_q|rm_r\rangle T^{p}_{m_p}U^{q}_{m_q},
$$

and using the orthogonality properties of the Clebsch-Gordan coefficients we can rewrite the above as

$$
T^{p}_{m_p}U^{q}_{m_q}=\sum_{m_pm_q}\langle pm_pqm_q|rm_r\rangle W^{r}_{m_r}.
$$

Assume now that the operators $T$ and $U$ act on different parts of say a wave function. The operator $T$ could act on the spatial part only while the operator $U$ acts only on the spin part. This means also that these operators commute.
The reduced matrix element of this operator is thus, using the Wigner-Eckart theorem,

1
9
0

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\times\langle (j_aj_bJM|\left[ T^{p}_{m_p}U^{q}_{m_q} \right]^{r}_{m_r}|(j_cj_d)J'M'\rangle.
$$

## Angular momentum algebra, Wigner-Eckart theorem
Starting with

1
9
2

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\times\langle (j_aj_bJM|\left[ T^{p}_{m_p}U^{q}_{m_q} \right]^{r}_{m_r}|(j_cj_d)J'M'\rangle,
$$

we assume now that $T$ acts only on $j_a$ and $j_c$ and that $U$ acts only on $j_b$ and $j_d$.
The matrix element $\langle (j_aj_bJM|\left[ T^{p}_{m_p}U^{q}_{m_q} \right]^{r}_{m_r}|(j_cj_d)J'M'\rangle$ can be written out,
when we insert a complete set of states $|j_im_ij_jm_j\rangle\langle j_im_ij_jm_j|$ between $T$ and $U$ as

1
9
4

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\times \langle (j_am_aj_bm_b|\left[ T^{p}_{m_p}\right]^{r}_{m_r}|(j_cm_cj_bm_b)\rangle\langle (j_cm_cj_bm_b|\left[ U^{q}_{m_q}\right]^{r}_{m_r}|(j_cm_cj_dm_d)\rangle.
$$

The complete set of states that was inserted between $T$ and $U$ reduces to $|j_cm_cj_bm_b\rangle\langle j_cm_cj_bm_b|$
due to orthogonality of the states.

## Angular momentum algebra, Wigner-Eckart theorem
Combining the last two equations from the previous slide and
and applying the Wigner-Eckart theorem, we arrive at (rearranging phase factors)

1
9
6

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

1
9
7

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\times\left(\begin{array}{ccc} j_a  &j_c  &p  \\ m_a &-m_c &-m_p \end{array}\right)\left(\begin{array}{ccc} j_b  &j_d  &q  \\ m_b &-m_d &-m_q \end{array}\right)\langle j_a||T^p||j_c\rangle \times \langle j_b||U^q||j_d\rangle
$$

which can be rewritten in terms of a $9j$ symbol as

$$
\langle (j_aj_b)J||W^{r}||(j_cj_d)J'\rangle=\sqrt{(2J+1)(2r+1)(2J'+1)}\langle j_a||T^p||j_c\rangle  \langle j_b||U^q||j_d\rangle\left\{\begin{array}{ccc} j_a & j_b& J \\ j_c & j_d & J' \\ p & q& r\end{array}\right\}.
$$

## Angular momentum algebra, Wigner-Eckart theorem
From this expression we can in turn compute for example the spin-spin operator of the tensor force.

In case $r=0$, that is we two tensor operators coupled to a scalar, we can use (with $p=q$)

$$
\left\{\begin{array}{ccc} j_a & j_b& J \\ j_c & j_d & J' \\ p &p & 0\end{array}\right\}=\frac{\delta_{JJ'} \delta_{pq}}{\sqrt{(2J+1)(2J+1)}} (-1)^{j_b+j_c+2J} \begin{Bmatrix} j_a & j_b & J\\ j_d & j_c & p \end{Bmatrix},
$$

and obtain

$$
\langle (j_aj_b)J||W^{0}||(j_cj_d)J'\rangle=(-1)^{j_b+j_c+2J}\langle j_a||T^p||j_c\rangle\langle j_b||U^p||j_d\rangle \begin{Bmatrix} j_a & j_b & J\\ j_d & j_c & p \end{Bmatrix}.
$$

## Angular momentum algebra, Wigner-Eckart theorem
Another very useful expression is the case where the operators act in just one space. We state here without
showing that the reduced matrix element

2
0
2

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\times \langle j_a||T^p||j_c\rangle \langle j_c||T^q||j_b\rangle.
$$

## Angular momentum algebra, Wigner-Eckart theorem
The tensor operator in
the nucleon-nucleon potential can be written as

$$
V=\frac{3}{r^{2}}\left[ \left[ {\bf \sigma}_1 \otimes {\bf \sigma}_2\right]^
{(2)} \otimes\left[{\bf r} \otimes {\bf r} \right]^{(2)}\right]^{(0)}_0
$$

Since the irreducible tensor
$\left[{\bf r} \otimes {\bf r} \right]^{(2)}$
operates  only on the angular quantum numbers and
$\left[{\bf \sigma}_1 \otimes {\bf \sigma}_2\right]^{(2)}$
operates  only on
the spin states we can write the matrix element

$$
\begin{eqnarray*}
\langle lSJ\vert V\vert lSJ\rangle & = &
\langle lSJ \vert\left[ \left[{\bf \sigma}_1 \otimes {\bf \sigma}_2\right]^{(2)} \otimes
\left[{\bf r} \otimes {\bf r} \right]^{(2)}\right]^{(0)}_0\vert l'S'J\rangle \\
&  = &
(-1)^{J+l+S}
\left\{\begin{array}{ccc} l&S&J \\ l'&S'&2\end{array}\right\}
\langle l \vert\vert\left[{\bf r} \otimes {\bf r} \right]^{(2)} \vert \vert l'\rangle\\
& &
\times \langle S\vert\vert\left[{\bf \sigma}_1 \otimes {\bf \sigma}_2\right]^{(2)} \vert\vert S'\rangle
\end{eqnarray*}
$$

## Angular momentum algebra, Wigner-Eckart theorem
We need that
the coordinate vector ${\bf r}$ can be written in terms of spherical
components as

$$
{\bf r}_\alpha = r\sqrt{\frac{4\pi}{3}} Y_{1\alpha}
$$

Using this expression we get

$$
\begin{eqnarray*}
\left[{\bf r} \otimes {\bf r} \right]^{(2)}_\mu &=& \frac{4\pi}{3}r^2
\sum_{\alpha ,\beta}\langle 1\alpha 1\beta\vert 2\mu \rangle Y_{1\alpha} Y_{1\beta}
\end{eqnarray*}
$$

## Angular momentum algebra, Wigner-Eckart theorem
The product of two spherical harmonics can be written
as

2
0
8

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\times \left(\begin{array}{ccc} l_1&l_2&l \\ 0  &0  &0\end{array}\right)
Y_{l-m}(-1)^m.
$$

## Angular momentum algebra, Wigner-Eckart theorem
Using this relation we get

$$
\begin{eqnarray*}
\left[{\bf r} \otimes {\bf r} \right]^{(2)}_\mu &=&
\sqrt{4\pi}r^2
\sum_{lm}
\sum_{\alpha ,\beta}   \langle 1\alpha 1\beta\vert 2\mu \rangle \\
&&\times \langle 1\alpha 1\beta\vert l-m \rangle
\frac{(-1)^{1-1-m}}{\sqrt{2l+1}}
\left(\begin{array}{ccc} 1&1&l \\ 0  &0  &0\end{array}\right)Y_{l-m}(-1)^m\\
&=& \sqrt{4\pi}r^2
\left(\begin{array}{ccc} 1&1&2 \\ 0  &0  &0\end{array}\right)
Y_{2-\mu}\\
&=& \sqrt{4\pi}r^2 \sqrt{\frac{2}{15}}Y_{2-\mu}
\end{eqnarray*}
$$

## Angular momentum algebra, Wigner-Eckart theorem
We can then  use this relation to rewrite the reduced matrix element containing the
position vector as

$$
\begin{eqnarray*}
\langle l \vert\vert\left[{\bf r} \otimes {\bf r} \right]^{(2)} \vert \vert l'\rangle
& = &
\sqrt{4\pi}\sqrt{ \frac{2}{15}}r^2 \langle l \vert\vert Y_2 \vert \vert l'\rangle \\
& = &\sqrt{4\pi}\sqrt{ \frac{2}{15}}  r^2 (-1)^l
\sqrt{\frac{(2l+1)5(2l'+1)}{4\pi}}
\left(\begin{array}{ccc} l&2&l' \\ 0&0&0\end{array}\right)
\end{eqnarray*}
$$

## Angular momentum algebra, Wigner-Eckart theorem
Using the  reduced matrix element of the spin
operators defined as

$$
\begin{eqnarray*}
\langle S\vert \vert\left[{\bf \sigma}_1 \otimes {\bf \sigma}_2\right]^{(2)} \vert \vert S' \rangle
& = &
\sqrt{(2S+1)(2S'+1)5}
\left\{\begin{array}{ccc} s_1&s_2&S \\s_3&s_4&S' \\ 1&1&2\end{array}\right\}\\
&\times&
\langle s_1 \vert \vert {\bf \sigma}_1 \vert \vert s_3\rangle
\langle s_2 \vert\vert {\bf \sigma}_2 \vert \vert s_4\rangle
\end{eqnarray*}
$$

and inserting  these expressions for the two reduced matrix elements we get

$$
\begin{array}{ll}
&\\
\langle lSJ\vert V\vert l'S'J\rangle =&(-1)^{S+J}\sqrt{30(2l+1)(2l'+1)(2S+1)(2S'+1)}\\
&\times\left\{\begin{array}{ccc}l&S &J \\l'&S&2\end{array}\right\}
\left(\begin{array}{ccc}l&2&l'\\0&0&0\end{array}\right)
\left\{\begin{array}{ccc}s_{1}&s_{2}&S\\s_{3}&s_{4}&S'\\
1&1&2\end{array}
\right\}\\
&\times\langle s_{1}\vert\vert \sigma_{1}\vert\vert s_{3}\rangle
\langle s_{2}\vert\vert \sigma_{2}\vert \vert s_{4}\rangle.
\end{array}
$$

## Angular momentum algebra, Wigner-Eckart theorem
Normally, we start we a nucleon-nucleon interaction fitted to reproduce scattering data.
It is common then to represent this interaction in terms relative momenta $k$, the center-of-mass momentum $K$
and various partial wave quantum numbers like the spin $S$, the total relative angular  momentum ${\cal J}$, isospin $T$ and relative orbital momentum $l$ and finally the corresponding center-of-mass $L$.
We can then write the  free interaction matrix $V$ as

$$
\langle kKlL{\cal J}ST\vert\hat{V}\vert k'Kl'L{\cal J}S'T\rangle.
$$

Transformations from the relative and center-of-mass motion
system to the lab system will be discussed
below.

## Angular momentum algebra, Wigner-Eckart theorem
To obtain a $V$-matrix in a h.o. basis, we need
the transformation

$$
\langle nNlL{\cal J}ST\vert\hat{V}\vert n'N'l'L'{\cal J}S'T\rangle,
$$

with $n$ and $N$ the principal quantum numbers of the relative and
center-of-mass motion, respectively.

$$
\vert nlNL{\cal J}ST\rangle= \int k^{2}K^{2}dkdKR_{nl}(\sqrt{2}\alpha k)
R_{NL}(\sqrt{1/2}\alpha K)
\vert klKL{\cal J}ST\rangle.
$$

The parameter $\alpha$ is the chosen oscillator length.

## Angular momentum algebra, Wigner-Eckart theorem
The most commonly employed sp basis is the harmonic oscillator, which
in turn means that
a two-particle wave function with total angular momentum $J$
and isospin $T$
can be expressed as

$$
\begin{array}{ll}
\vert (n_{a}l_{a}j_{a})(n_{b}l_{b}j_{b})JT\rangle =&
{\displaystyle
\frac{1}{\sqrt{(1+\delta_{12})}}
\sum_{\lambda S{\cal J}}\sum_{nNlL}}
F\times \langle ab|\lambda SJ \rangle\\
&\times (-1)^{\lambda +{\cal J}-L-S}\hat{\lambda}
\left\{\begin{array}{ccc}L&l&\lambda\\S&J&{\cal J}
\end{array}\right\}\\
&\times \left\langle nlNL| n_al_an_bl_b\right\rangle
\vert nlNL{\cal J}ST\rangle ,\end{array}
\label{eq:hoho} \tag{4}
$$

where the term
$\left\langle nlNL| n_al_an_bl_b\right\rangle$
is the so-called Moshinsky-Talmi transformation coefficient (see chapter 18 of Alex Brown's notes).

## Angular momentum algebra, Wigner-Eckart theorem
The term $\langle ab|LSJ \rangle $ is a shorthand
for the $LS-jj$ transformation coefficient,

$$
\langle ab|\lambda SJ \rangle = \hat{j_{a}}\hat{j_{b}}
     \hat{\lambda}\hat{S}
     \left\{
    \begin{array}{ccc}
       l_{a}&s_a&j_{a}\\
       l_{b}&s_b&j_{b}\\
       \lambda    &S          &J
    \end{array}
    \right\}.
$$

Here
we use $\hat{x} = \sqrt{2x +1}$.
The factor $F$ is defined as $F=\frac{1-(-1)^{l+S+T}}{\sqrt{2}}$ if
$s_a = s_b$ and we .

## Angular momentum algebra, Wigner-Eckart theorem
The $\hat{V}$-matrix in terms of harmonic oscillator wave functions reads

2
1
9

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

2
2
0

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

2
2
1

<
<
<
!
!
M
A
T
H
_
B
L
O
C
K

$$
\times\langle nNlL{\cal J}ST\vert\hat{V}\vert n'N'l'L'{\cal J}S'T\rangle.
$$

The label $a$ represents here all the single particle quantum numbers
$n_{a}l_{a}j_{a}$.


# Welcome to QC Hackathon 2021!

Quantum Coputation is an up and coming field that uses quantum gates to perform operations which exploit properties of a quantum state like superposition, and entanglement to perform computations. The aim is to solve computation problems in executable time that might not be solvable using its classical analogue. In this hackathon, we will be introducing you to challenges of different difficulty levels.

A good introduction to all of these concepts can be found in the [qiskit textbook](https://qiskit.org/textbook/preface.html). We will be using qiskit in this hackathon.

# Challenge Tier - I
For this first set of challenges, we encourage you to read [Section 1.4](https://qiskit.org/textbook/ch-states/single-qubit-gates.html) and [Section 2.2](https://qiskit.org/textbook/ch-gates/multiple-qubits-entangled-states.html) to get familiar with the basics of quantum computing.

```python
#before we start, run this cell to install qiskit
!pip install qiskit
!pip install pylatexenc
```

    Requirement already satisfied: qiskit in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (0.25.1)
    Requirement already satisfied: qiskit-terra==0.17.1 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit) (0.17.1)
    Requirement already satisfied: qiskit-aer==0.8.1 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit) (0.8.1)
    Requirement already satisfied: qiskit-ibmq-provider==0.12.2 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit) (0.12.2)
    Requirement already satisfied: qiskit-ignis==0.6.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit) (0.6.0)
    Requirement already satisfied: qiskit-aqua==0.9.1 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit) (0.9.1)
    Requirement already satisfied: pybind11>=2.6 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aer==0.8.1->qiskit) (2.6.2)
    Requirement already satisfied: numpy>=1.16.3 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aer==0.8.1->qiskit) (1.19.5)
    Requirement already satisfied: scipy>=1.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aer==0.8.1->qiskit) (1.5.2)
    Requirement already satisfied: h5py<=3.1.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (3.1.0)
    Requirement already satisfied: docplex<=2.20.204 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (2.15.194)
    Requirement already satisfied: quandl<=3.6.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (3.5.2)
    Requirement already satisfied: setuptools>=40.1.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (49.2.1)
    Requirement already satisfied: fastdtw<=0.3.4 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (0.3.4)
    Requirement already satisfied: pandas<=1.2.3 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (1.1.1)
    Requirement already satisfied: sympy<=1.7.1,>=1.3 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (1.6.2)
    Requirement already satisfied: scikit-learn<=0.24.1,>=0.20.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (0.23.2)
    Requirement already satisfied: psutil<=5.8.0,>=5 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (5.7.2)
    Requirement already satisfied: dlx<=1.0.4 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (1.0.4)
    Requirement already satisfied: retworkx<=0.8.0,>=0.7.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (0.8.0)
    Requirement already satisfied: yfinance<=0.1.55 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-aqua==0.9.1->qiskit) (0.1.54)
    Requirement already satisfied: requests>=2.19 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-ibmq-provider==0.12.2->qiskit) (2.24.0)
    Requirement already satisfied: requests-ntlm>=1.1.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-ibmq-provider==0.12.2->qiskit) (1.1.0)
    Requirement already satisfied: python-dateutil>=2.8.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-ibmq-provider==0.12.2->qiskit) (2.8.1)
    Requirement already satisfied: urllib3>=1.21.1 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-ibmq-provider==0.12.2->qiskit) (1.25.10)
    Requirement already satisfied: nest-asyncio!=1.1.0,>=1.0.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-ibmq-provider==0.12.2->qiskit) (1.4.0)
    Requirement already satisfied: websockets>=8 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-ibmq-provider==0.12.2->qiskit) (8.1)
    Requirement already satisfied: dill>=0.3 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-terra==0.17.1->qiskit) (0.3.2)
    Requirement already satisfied: python-constraint>=1.4 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-terra==0.17.1->qiskit) (1.4.0)
    Requirement already satisfied: fastjsonschema>=2.10 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-terra==0.17.1->qiskit) (2.14.5)
    Requirement already satisfied: jsonschema>=2.6 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-terra==0.17.1->qiskit) (3.2.0)
    Requirement already satisfied: ply>=3.10 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from qiskit-terra==0.17.1->qiskit) (3.11)
    Requirement already satisfied: six in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from docplex<=2.20.204->qiskit-aqua==0.9.1->qiskit) (1.15.0)
    Requirement already satisfied: pyrsistent>=0.14.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from jsonschema>=2.6->qiskit-terra==0.17.1->qiskit) (0.16.0)
    Requirement already satisfied: attrs>=17.4.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from jsonschema>=2.6->qiskit-terra==0.17.1->qiskit) (20.1.0)
    Requirement already satisfied: pytz>=2017.2 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from pandas<=1.2.3->qiskit-aqua==0.9.1->qiskit) (2020.1)
    Requirement already satisfied: more-itertools in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from quandl<=3.6.0->qiskit-aqua==0.9.1->qiskit) (8.5.0)
    Requirement already satisfied: inflection>=0.3.1 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from quandl<=3.6.0->qiskit-aqua==0.9.1->qiskit) (0.5.1)
    Requirement already satisfied: certifi>=2017.4.17 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from requests>=2.19->qiskit-ibmq-provider==0.12.2->qiskit) (2020.6.20)
    Requirement already satisfied: idna<3,>=2.5 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from requests>=2.19->qiskit-ibmq-provider==0.12.2->qiskit) (2.10)
    Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from requests>=2.19->qiskit-ibmq-provider==0.12.2->qiskit) (3.0.4)
    Requirement already satisfied: cryptography>=1.3 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.12.2->qiskit) (3.1)
    Requirement already satisfied: ntlm-auth>=1.0.2 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.12.2->qiskit) (1.5.0)
    Requirement already satisfied: cffi!=1.11.3,>=1.8 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.12.2->qiskit) (1.14.2)
    Requirement already satisfied: pycparser in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from cffi!=1.11.3,>=1.8->cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.12.2->qiskit) (2.20)
    Requirement already satisfied: joblib>=0.11 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from scikit-learn<=0.24.1,>=0.20.0->qiskit-aqua==0.9.1->qiskit) (0.16.0)
    Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from scikit-learn<=0.24.1,>=0.20.0->qiskit-aqua==0.9.1->qiskit) (2.1.0)
    Requirement already satisfied: mpmath>=0.19 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from sympy<=1.7.1,>=1.3->qiskit-aqua==0.9.1->qiskit) (1.1.0)
    Requirement already satisfied: multitasking>=0.0.7 in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (from yfinance<=0.1.55->qiskit-aqua==0.9.1->qiskit) (0.0.9)
    Requirement already satisfied: pylatexenc in c:\users\naresh\appdata\local\programs\python\python38\lib\site-packages (2.9)

## Task 1
$$\newcommand{\ket}[1]{\left|{#1}\right\rangle}$$
$$\newcommand{\bra}[1]{\left\langle{#1}\right|}$$

An $H$ gate, or a Hadamard gate, is a single qubit gate which performs the following operations:

$\begin{align}
  H\ket{0} &= \dfrac{\ket{0}+\ket{1}}{\sqrt{2}}\\
  H\ket{1} &= \dfrac{\ket{0}-\ket{1}}{\sqrt{2}}
\end{align}$

A $Z$ gate, similarly, performs the following operations:

$\begin{align}
  Z\ket{0} &= \ket{0}\\
  Z\ket{1} &= -\ket{1}
\end{align}$

In this challenge, you will be given a single bit unitary operation that can either be an $H$ gate or a $Z$ gate. You can apply the unitary operation **at most twice**. Using what you learnt from [Section 1.4](https://qiskit.org/textbook/ch-states/single-qubit-gates.html), distinguish whether the given operation is an H gate or a Z gate.

**Output:** 0 if it is the $Z$ gate, 1 if it is the $H$ gate.

```python
from qiskit import *

def A1_solve(Unitary, qc):
    ##########################################
    #enter your code here
    #To apply the unitary to the qubit, use syntax: Unitary(0)

    #Expected Output: {'0': 1024} if Z gate; and
    #                 {'1': 1024} if H gate

    ###########################################
    qc.x(0)
    Unitary(0)
    qc.x(0)
    Unitary(0)
    qc.measure(0,0)
    print(qc.draw())

    backend = Aer.get_backend('qasm_simulator')
    job = execute(qc, backend)
    counts = job.result().get_counts()

    return counts

import random
qr = QuantumRegister(1)
cr = ClassicalRegister(1)
A1_qc = QuantumCircuit(qr, cr)
if __name__ == "__main__":
    if random.uniform(0,1) < 0.5:
        Unitary = A1_qc.z
    else:
        Unitary = A1_qc.h

    _output = A1_solve(Unitary, A1_qc)
    print(_output)
```

           ┌───┐┌───┐┌───┐┌───┐┌─┐
    q39_0: ┤ X ├┤ H ├┤ X ├┤ H ├┤M├
           └───┘└───┘└───┘└───┘└╥┘
     c7: 1/═════════════════════╩═
                                0
    {'1': 1024}

## Task 2
Any quantum state can be written in the form of a superposition of the $\ket{0}$ and $\ket{1}$ states in the dirac notation. So any single qubit quantum state, $\ket{\psi}$, can be written as:
$\begin{equation}\ket{\psi} = \alpha \ket{0} + \beta \ket{1} \end{equation}$ where the squares of the coefficients of $\ket{0}$ and $\ket{1}$ are equal to the respective probability of the output on measuring $\ket{\psi}$.

Similarly, two qubit states can be described by: $\displaystyle \begin{equation}\ket{\psi} = \sum_{j, k\in\{0,1\}} \alpha_{jk}\ket{j k} \end{equation}$

Using simple quantum gates like the ones you have learnt in [Section 1.4](https://qiskit.org/textbook/ch-states/single-qubit-gates.html) and [Section 2.2](https://qiskit.org/textbook/ch-gates/multiple-qubits-entangled-states.html), prepare the superposition state described by:
$\begin{align} \ket{\psi} = \dfrac{1}{2}\ket{01} + \dfrac{1}{2}\ket{10} + \dfrac{1}{\sqrt{2}}\ket{00} \end{align}$

```python
from qiskit import *
def A2_solve():

    #enter your code here, specify the qubits in QuantumCircuit
    qc = QuantumCircuit(2 , 2)
    qc.h(1)
    qc.ch(1, 0)
    qc.cx(0, 1)
    qc.measure(0, 0)
    qc.measure(1, 1)
    print(qc.draw())

    backend = Aer.get_backend('qasm_simulator')
    job = execute(qc, backend)
    counts = job.result().get_counts()

    print(counts)
    return

if __name__ == "__main__":
    A2_solve()

```

              ┌───┐     ┌─┐
    q_0: ─────┤ H ├──■──┤M├───
         ┌───┐└─┬─┘┌─┴─┐└╥┘┌─┐
    q_1: ┤ H ├──■──┤ X ├─╫─┤M├
         └───┘     └───┘ ║ └╥┘
    c: 2/════════════════╩══╩═
                         0  1
    {'00': 516, '10': 251, '01': 257}

## Task 3

A full subtractor is a combinational circuit that performs subtraction of two bits in classical computation. A thorough explanation and implementation of the circuit can be found here: [Full Subtractor Circuit in digital logic](www.geeksforgeeks.org/full-subtractor-in-digital-logic/). Throughout this challenge you may have realised that the quantum gates are very similar to classical gates, and the elementary quantum gates can be used in place of their classical analogues in a quantum circuit.

Your task is to implement a full subtractor circuit using only quantum gates.  You can take help from the resource mentioned above, and try to replace the classical gates with their quantum analogues. In more precise terms, you must reproduce the results of the truth table that can be found in the link above.

**Input:** Three values: $A$, $B$, $B_{in}$; that correspond to the truth table.

**Output:** Two values: $D$, $B_{out}$ (You must measure two qubits in your circuit)

There is a bonus point for using the minimum number of qubits.

```python
from qiskit import *

def A3_solve(inputBits):
    no_of_qubits_used = 4                     #Enter the number of qubits you require
    qc = QuantumCircuit(no_of_qubits_used, 2)
    for i in range(0, len(inputBits)):
        if inputBits[i] == 1:
            qc.x(i)
    #Enter code from here:
    qc.x(0)
    qc.ccx(0, 1, 3)
    qc.ccx(0, 2, 3)
    qc.ccx(1, 2, 3)
    qc.x(0)
    qc.cx(0, 2)
    qc.cx(1, 2)
    qc.measure(2, 0)
    qc.measure(3, 1)

  ################### Tests #####################################
    print(qc.draw())
    backend = Aer.get_backend('qasm_simulator')
    job = execute(qc, backend)
    counts = job.result().get_counts()
    outputList = list(counts.keys())
    print(counts)
    if len(outputList) != 1 or len(outputList[0][0]) > 2:
        print('Error: There are too many outputs.')
        return
    output = outputList[0]
    if len(output) != 2:
        print('Error: There are too few outputs. Please make sure you are *measuring* the appropriate qubits in your circuit. Use qc.measure() method to measure the qubits.')
        return
    return output[1], output[0]

if __name__ == "__main__":
    A = 0
    B = 1
    B_in = 1
    _D, _Bout = A3_solve([A, B, B_in])
    print(_D, _Bout)
  #You need to check whether these are consistent with the truth table yourself.
```

         ┌───┐          ┌───┐
    q_0: ┤ X ├──■────■──┤ X ├──■──────────
         ├───┤  │    │  └───┘  │
    q_1: ┤ X ├──■────┼────■────┼────■─────
         ├───┤  │    │    │  ┌─┴─┐┌─┴─┐┌─┐
    q_2: ┤ X ├──┼────■────■──┤ X ├┤ X ├┤M├
         └───┘┌─┴─┐┌─┴─┐┌─┴─┐└┬─┬┘└───┘└╥┘
    q_3: ─────┤ X ├┤ X ├┤ X ├─┤M├───────╫─
              └───┘└───┘└───┘ └╥┘       ║
    c: 2/══════════════════════╩════════╩═
                               1        0
    {'10': 1024}
    0 1

## Additional information

**Created by:** Yashee Sinha