Dicke basis¶
See paper "Deterministic Preparation of Dicke States" arxiv-link for details.
Dicke basis is a basis for symmetric subspace. A more well-known name is the basis for Bosons. They are useful in quantum entanglement detection and quantum many-body physics.
TODO, the strucutre of this tutorial
import numpy as np
try:
import numqi
except ImportError:
%pip install numqi
import numqi
Qubit case¶
For $2$ qubits, the Dicke basis are just three of the Bell states:
$$ \left\{ |00\rangle,|01\rangle+|10\rangle, |11\rangle \right\} $$
where we omit the normalization factor for simplicity. One should notice that exchanging two qubits will not change the basis, so it's call symmetrical basis. The only left Bell state $(|01\rangle-|10\rangle)$ is in the Fermionic subspace which is orthogonal to the Bosonic subspace (space spanned by Dicke basis).
basis_2_2 = numqi.dicke.get_dicke_basis(num_qudit=2, dim=2)
print(f'Dicke-basis(2,2):\n{basis_2_2}')
# exchange 2 qubits
basis_2_2_exchange = basis_2_2.reshape(-1, 2, 2).transpose(0,2,1).reshape(-1, 4)
print(f'Dicke-basis(2,2) exchange q0 and q1:\n{basis_2_2_exchange}')
Dicke-basis(2,2): [[0. 0. 0. 1. ] [0. 0.70710678 0.70710678 0. ] [1. 0. 0. 0. ]] Dicke-basis(2,2) exchange q0 and q1: [[0. 0. 0. 1. ] [0. 0.70710678 0.70710678 0. ] [1. 0. 0. 0. ]]
As printout, the basis remains the same after exchanging two qubits. In math, we can write it as:
$$ P_{12} |\psi\rangle=|\psi\rangle $$
where $P_{12}$ denotes the permutation operator exchanging the first and the seconds qubits, and $|\psi\rangle$ is any state in the Dicke basis.
More generally, think about $n$ qubits, there are $n+1$ Dicke states which we can label them by the number of $1$ in the bitstring
$$ \left|D_{n,k_0k_1}\right\rangle =\left(\frac{n!}{k_{0}!k_{1}!}\right)^{-1/2}\sum_{wt_{i}\left(x\right)=k_{i}}\left|x\right\rangle $$
where $k_0$ is the number of the zero in the bitstring, and $k_1$ counts the number of $1$ in the bitstring. We use $wt_i(x)$ for the nubmer of the character $i$ in the bitstring $x$. For example, $wt_1(01010)=2$. In this notation, the Dicke basis for $2$ qubits can be re-written as:
$$ \left|D_{2,20}\right\rangle =\left|00\right\rangle ,\sqrt{2}\left|D_{2,11}\right\rangle =\left|01\right\rangle +\left|10\right\rangle ,\left|D_{2,02}\right\rangle =\left|11\right\rangle $$
Below, let's check the Dicke basis for $3$ qubits.
basis_3_2 = numqi.dicke.get_dicke_basis(num_qudit=3, dim=2)
print('Dicke-basis(3,2):')
for x in basis_3_2:
print(x.tolist())
Dicke-basis(3,2): [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0] [0.0, 0.0, 0.0, 0.5773502691896258, 0.0, 0.5773502691896258, 0.5773502691896258, 0.0] [0.0, 0.5773502691896258, 0.5773502691896258, 0.0, 0.5773502691896258, 0.0, 0.0, 0.0] [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
Qudit case¶
For $n$ qudits with local dimension $d$, the Dicke basis are defined as:
$$ \left|D_{n,\vec{k}}\right\rangle =\left(\frac{n!}{k_{0}!k_{1}!\cdots k_{d-1}!}\right)^{-1/2}\sum_{wt_{i}\left(x\right)=k_{i}}\left|x\right\rangle $$
where we need a vector $\vec{k}$ of length $d$ to count the number of characters $i$ in the bitstring $x$. For example, $\vec{k}=(2,1,0)$ means the bitstring has two $0$, one $1$ and zero $2$. The number of Dicke states is given by $\binom{n+d-1}{d-1}$. The dimensions for some specific values are listed below
$n$ | 8 | 16 | 32 | 64 | 128 |
---|---|---|---|---|---|
$d=3$ | 45 | 153 | 561 | 2145 | 8384 |
$d=4$ | 165 | 969 | 6545 | 47905 | 366145 |
$d=5$ | 495 | 4845 | 58904 | 814385 | 12082785 |
Mathematically, one can say that the Dicke basis has permutation symmetry
$$ P_{rs} \psi=\psi,\forall r,s=1,2,\cdots,n $$
where $P_{rs}$ denotes the permutation operator exchanging the $r$-th and the $s$-th qudits, and $\psi$ is any state in the Dicke basis. If take $\psi$ as a high-dimensioanl array (tensor), it's equivalent to say
$$ \left[P_{rs}\psi\right]_{i_{1}\cdots i_{r-1}i_{r}i_{r+1}\cdots i_{s-1}i_{s}i_{s+1}\cdots i_{n}}=\psi_{i_{1}\cdots i_{r-1}i_{s}i_{r+1}\cdots i_{s-1}i_{r}i_{s+1}\cdots i_{n}} $$
The Dicke basis is orthogonal to each other and all real (no imaginary part).
$$ \left\langle D_{n,\vec{k}'}\right.\left|D_{n,\vec{k}}\right\rangle =\delta_{\vec{k}\vec{k}'} $$
We can numerically verify its orthogonality by comparing the inner product of them with the the identity matrix.
num_qudit = 5
dim = 3
basis = numqi.dicke.get_dicke_basis(num_qudit=num_qudit, dim=dim)
print(f'Dicke-basis({num_qudit},{dim}) shape: {basis.shape}')
## orthonormality
print(np.abs(basis @ basis.T - np.eye(basis.shape[0])).max())
Dicke-basis(5,3) shape: (21, 243) 2.220446049250313e-16
Partial trace¶
When doing Bosonic extension in entaglement detection task, it's common to take partial trace of Dicke states. For example, given a pure state $|\psi_{AB^n}\rangle$ in (k+1) partite Hilbert space $A,B_0,B_1,B_2,\cdots,B_{k-1}$ and it's symmetric in $B_i$s' subspace
$$ P_{B_rB_s}|\psi_{AB^n}\rangle=|\psi_{AB^n}\rangle $$
So we can write it in Dicke basis
$$ |\psi_{AB^{n}}\rangle=\sum_{i\vec{k}}p_{i\vec{k}}|i\rangle\otimes|D_{n,\vec{k}}\rangle $$
with $|i\rangle$ belongs to $A$'s Hilbert space. Then its reduced density matrix of $AB$ is
$$ \mathrm{Tr}_{B^{n-1}}\left[|\psi_{AB^{n}}\rangle\left\langle \psi_{AB^{n}}\right|\right]=\sum_{ij\vec{k}\vec{k}'}p_{i\vec{k}}p_{j\vec{k}'}^{*}\mathcal{B}_{rs\vec{k}\vec{k}'}|ir\rangle\left\langle js\right| $$
with $|r \rangle,|s\rangle$ belongs to $B_i$'s Hilbert space. The $\mathcal{B}_{rs\vec{k}\vec{k}'}$ can be calculated by
$$ \begin{aligned} \mathcal{B}_{rs\vec{k}\vec{k}'}&=\left\langle r\right|\mathrm{Tr}_{B^{n-1}}\left[\left|D_{n,\vec{k}}\right\rangle \left\langle D_{n,\vec{k}'}\right|\right]\left|s\right\rangle \\&=\frac{1}{n}\sqrt{k_{r}k_{s}^{\prime}}\delta_{k_{0}k_{0}^{\prime}}\cdots\delta_{k_{r}-1,k_{r}^{\prime}}\cdots\delta_{k_{s}+1,k_{s}^{\prime}}\cdots\delta_{k_{d-1},k_{d-1}^{\prime}} \end{aligned} $$
For $n$ qubits, the tensor $\mathcal{B}$ can be explicitly written down.
$$ |D_{n,0}\rangle=|D_{n,0n}\rangle=|1^{\otimes n}\rangle,|D_{n,n}\rangle=|D_{n,n0}\rangle=|0^{\otimes n}\rangle $$
$$ n\mathcal{B}_{00,\alpha\beta}=\alpha\delta_{\alpha\beta},n\mathcal{B}_{11,\alpha\beta}=\left(n-\alpha\right)\delta_{\alpha\beta},n\mathcal{B}_{01,\alpha\beta}=n\mathcal{B}_{10,\beta\alpha}=\sqrt{\left(\alpha+1\right)\left(n-\alpha\right)}\delta_{\alpha+1,\beta} $$
num_qudit = 3
dim = 2
Brsab = numqi.dicke.get_partial_trace_ABk_to_AB_index(num_qudit, dim, return_tensor=True)
print('B_{00 alpha beta}:')
print(Brsab[0,0])
print('B_{01 alpha beta}:')
print(Brsab[0,1])
print('B_{10 alpha beta}:')
print(Brsab[1,0])
print('B_{11 alpha beta}:')
print(Brsab[1,1])
B_{00 alpha beta}: [[0. +0.j 0. +0.j 0. +0.j 0. +0.j] [0. +0.j 0.33333333+0.j 0. +0.j 0. +0.j] [0. +0.j 0. +0.j 0.66666667+0.j 0. +0.j] [0. +0.j 0. +0.j 0. +0.j 1. +0.j]] B_{01 alpha beta}: [[0. +0.j 0. +0.j 0. +0.j 0. +0.j] [0.57735027+0.j 0. +0.j 0. +0.j 0. +0.j] [0. +0.j 0.66666667+0.j 0. +0.j 0. +0.j] [0. +0.j 0. +0.j 0.57735027+0.j 0. +0.j]] B_{10 alpha beta}: [[0. +0.j 0.57735027+0.j 0. +0.j 0. +0.j] [0. +0.j 0. +0.j 0.66666667+0.j 0. +0.j] [0. +0.j 0. +0.j 0. +0.j 0.57735027+0.j] [0. +0.j 0. +0.j 0. +0.j 0. +0.j]] B_{11 alpha beta}: [[1. +0.j 0. +0.j 0. +0.j 0. +0.j] [0. +0.j 0.66666667+0.j 0. +0.j 0. +0.j] [0. +0.j 0. +0.j 0.33333333+0.j 0. +0.j] [0. +0.j 0. +0.j 0. +0.j 0. +0.j]]
num_qudit = 8
dim = 3
Brsab = numqi.dicke.get_partial_trace_ABk_to_AB_index(num_qudit, dim, return_tensor=True)
print('Brsab.shape:', Brsab.shape)
Brsab.shape: (3, 3, 45, 45)
Quantum gates in qubit symmetric subspace¶
This part can be used in variational quantum circuit. The following results are obtained numerically and it seems to be correct.
X-rotation gate¶
$$ R_{x}\left(\theta\right)=e^{-i\sigma_{x}/2} $$
$$ \langle D_{n,\alpha}|\bigotimes_{i=0}^{n-1}R_{x}^{\left(i\right)}\left(\theta\right)|D_{n,\beta}\rangle=\left[\mathrm{e}^{-iA^{\left(n\right)}\theta/2}\right]_{\alpha\beta} $$
$$ A^{\left(1\right)}=\sigma_{x} $$
$$ A^{\left(2\right)}=\sqrt{2}\left[\begin{matrix} & 1\\ 1 & & 1\\ & 1 \end{matrix}\right] $$
$$ A^{\left(3\right)}=\left[\begin{matrix} & \sqrt{3}\\ \sqrt{3} & & \sqrt{4}\\ & \sqrt{4} & & \sqrt{3}\\ & & \sqrt{3} \end{matrix}\right] $$
$$ \left[A^{\left(n\right)}\right]_{ij}=\delta_{i,j+1}\sqrt{j\left(n-j\right)}+\delta_{i+1,j}\sqrt{i\left(n-i\right)} $$
Z-rotation gate¶
$$ R_{z}\left(\theta\right)=e^{-i\sigma_{z}/2} $$
$$ \langle D_{n,\alpha}|\bigotimes_{i=0}^{n-1}R_{z}^{\left(i\right)}\left(\theta\right)|D_{n,\beta}\rangle=\left[\mathrm{e}^{-iB^{\left(n\right)}\theta/2}\right]_{\alpha\beta} $$
$$ B^{\left(1\right)}=\sigma_{z}=\mathrm{diag}\left\{ 1,-1\right\} $$
$$ B^{\left(2\right)}=\mathrm{diag}\left\{ 2,0,-2\right\} $$
$$ B^{\left(3\right)}=\mathrm{diag}\left\{ 3,1,-1,3\right\} $$
$$ \left[B^{\left(n\right)}\right]_{ij}=\delta_{ij}\left(n+2-2i\right) $$
ZZ double qubit rotation gate¶
$$ R_{zz}^{\left(ij\right)}\left(\theta\right)=e^{-i\sigma_{z}^{\left(i\right)}\sigma_{z}^{\left(j\right)}/2} $$
$$ \bigotimes_{i=0}^{n-1}R_{zz}^{\left(AB_{i}\right)}\left(\theta\right)\in\mathbb{C}^{2^{n+1}\times2^{n+1}} $$
$$ \langle x,D_{n,\alpha}|\bigotimes_{i=0}^{n-1}R_{zz}^{\left(AB_{i}\right)}\left(\theta\right)|y,D_{n,\beta}\rangle=\left[\mathrm{e}^{-iC^{\left(n\right)}\theta/2}\right]_{xk,\alpha\beta} $$
$$ C^{\left(n\right)}=\sigma_{z}\otimes B^{\left(n\right)} $$