Skip to content

dicke

numqi.dicke.Dicke(*klist)

return Dicke state for n qudits

see arxiv-link for more information

Parameters:

Name Type Description Default
klist tuple[int]

list of int, each int is the number of qudit in each level, dim=len(klist), num_qudit=sum(klist)

()

Returns:

Name Type Description
ret ndarray

shape (dim**num_qudit)

numqi.dicke.get_dicke_basis(num_qudit, dim)

return Dicke basis for n qudits

see arxiv-link for more information

Parameters:

Name Type Description Default
num_qudit int

number of qudits

required
dim int

dimension of each qudit

required

Returns:

Name Type Description
ret ndarray

shape (binom{num_qudit+dim-1}{num_qudit}, dim**num_qudit) float64

numqi.dicke.get_dicke_klist(num_qudit, dim)

return klist for n qudit Dicke state

Parameters:

Name Type Description Default
num_qudit int

number of qudit

required
dim int

dimension of qudit

required

Returns:

Name Type Description
ret list

list of klist, each element is a tuple of int. the list is of length scipy.special.binom(n+d-1, d-1). the tuple is of length dim and the sum of each tuple is num_qudit

numqi.dicke.get_qubit_dicke_partial_trace(num_qubit)

return partial trace of qubit Dicke state

Parameters:

Name Type Description Default
num_qubit int

number of qubit

required

Returns:

Name Type Description
a00 ndarray

shape (num_qubit+1,) float64

a01 ndarray

shape (num_qubit,) float64 a01=a10

a11 ndarray

shape (num_qubit+1,) float64

numqi.dicke.get_partial_trace_ABk_to_AB_index(num_qudit, dim, return_tensor=False)

return index for partial trace of qudit Dicke state numqi.dicke.partial_trace_ABk_to_AB

\[ B_{rsab} = \mathrm{Tr}_{A^{n-1}} \left[ \langle r|D_{na}\rangle\langle D_{nb}| s\rangle \right] \]

Parameters:

Name Type Description Default
num_qudit int

number of qudit

required
dim int

dimension of qudit

required
return_tensor bool

if True, return \(B_{rsab}\), otherwise return indexing used for \(B_{rsab}\). return_tensor=True is useful for unittest. return_tensor=False use less memory

False

Returns:

Name Type Description
ret (list, ndarray)

if return_tensor=False, list of tuple, each tuple is of length 3, and the first two elements are list of int, the third element is np.ndarray of float64. if return_tensor=True, return \(B_{rsab}\), shape (dim, dim, #klist, #klist)