Skip to content

state

numqi.state.W(n)

get the W-state wiki-link

\[ |W\rangle=\frac{1}{\sqrt{n}}\left( |100\cdots 0\rangle + |010\cdots 0\rangle + |000\cdots 1\rangle \right) \]

Parameters:

Name Type Description Default
n int

the number of qubits

required

Returns:

Name Type Description
ret ndarray

the W-state, ret.ndim=1

numqi.state.Wtype(coeff)

get the W-type state

\[ |W\rangle=\sum_{wt(x)=1} c_i|x\rangle \]

Parameters:

Name Type Description Default
coeff ndarray

the coefficients of the W-type state, coeff.ndim=1

required

Returns:

Name Type Description
ret ndarray

the W-type state, ret.ndim=1

numqi.state.get_Wtype_state_GME(a, b, c)

get the geometric measure of the W-type state arxiv-link

Analytic Expressions for Geometric Measure of Three Qubit States

Parameters:

Name Type Description Default
a float

the coefficient of |100>

required
b float

the coefficient of |010>

required
c float

the coefficient of |001>

required

Returns:

Name Type Description
ret float

the geometric measure of the W-type state

numqi.state.GHZ(n=2)

get the GHZ state wiki-link

Parameters:

Name Type Description Default
n int

the number of qubits

2

Returns:

Name Type Description
ret ndarray

the GHZ state, ret.ndim=1

numqi.state.Bell(i=0)

get the Bell state

Parameters:

Name Type Description Default
i int

the index of the Bell state, \(i\in[0,3]\)

0

Returns:

Name Type Description
ret ndarray

the Bell state, ret.ndim=1

numqi.state.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.state.get_qubit_dicke_state_GME(n, k)

get the geometric measure of entanglement for the Dicke state

Matrix permanent and quantum entanglement of permutation invariant states doi-link

Parameters:

Name Type Description Default
n int

the number of qubits

required
k int

the number of excitations

required

numqi.state.Werner(d, alpha)

get the Werner state wiki-link quantiki-link

alpha: \([-1,1]\)

SEP: \(\left[-1,\frac{1}{d} \right]\)

(1,k)-ext: \(\left[-1, \frac{k+d^2-d}{kd+d-1} \right]\)

(1,k)-ext boundary: Compatible quantum correlations: Extension problems for Werner and isotropic states doi-link

Parameters:

Name Type Description Default
d int

the dimension of the Hilbert space

required
alpha float

the parameter of the Werner state

required

Returns:

Name Type Description
ret ndarray

the density matrix of the Werner state

numqi.state.get_Werner_ree(d, alpha)

get the relative entropy of entanglement (REE) of the Werner state

Parameters:

Name Type Description Default
d int

the dimension of the Hilbert space

required
alpha float

the parameter of the Werner state

required

Returns:

Name Type Description
ret float

the relative entropy of entanglement of the Werner state

numqi.state.get_Werner_eof(dim, alpha)

get the entanglement of formation (EOF) of the Werner state

reference: Entanglement of formation and concurrence for mixed states doi-link

Parameters:

Name Type Description Default
dim int

the dimension of the Hilbert space

required
alpha (ndarray, float)

the parameter of the Werner state

required

Returns:

Name Type Description
ret (ndarray, float)

the entanglement of formation of the Werner state

numqi.state.get_Werner_GME(d, alpha)

get the geometric measure of entanglement (GME) of the Werner state

Geometric measure of entanglement and applications to bipartite and multipartite quantum states doi-link (eq-51)

Parameters:

Name Type Description Default
d int

the dimension of the Hilbert space

required
alpha (float, ndarray)

the parameter of the Werner state

required

Returns:

Name Type Description
ret (float, ndarray)

the geometric measure of entanglement of the Werner state

numqi.state.Isotropic(d, alpha)

get the isotropic state quantiki-link

alpha: \(\left[-\frac{1}{d^2-1}, 1\right]\)

SEP: \(\left[-\frac{1}{d^2-1}, \frac{1}{d+1}\right]\)

(1,k)-ext: \(\left[-\frac{1}{d^2-1}, \frac{kd+d^2-d-k}{k(d^2-1)}\right]\)

Compatible quantum correlations: Extension problems for Werner and isotropic states doi-link

Parameters:

Name Type Description Default
d int

the dimension of the Hilbert space

required
alpha float

the parameter of the isotropic state

required

Returns:

Name Type Description
ret ndarray

the density matrix of the isotropic state

numqi.state.get_Isotropic_ree(d, alpha)

get the relative entropy of entanglement (REE) of the isotropic state

Parameters:

Name Type Description Default
d int

the dimension of the Hilbert space

required
alpha float

the parameter of the isotropic state

required

Returns:

Name Type Description
ret float

the relative entropy of entanglement of the isotropic state

numqi.state.get_Isotropic_eof(dim, alpha)

get the entanglement of formation (EOF) of the isotropic state

reference: Entanglement of formation and concurrence for mixed states doi-link

Parameters:

Name Type Description Default
dim int

the dimension of the Hilbert space

required
alpha (ndarray, float)

the parameter of the isotropic state

required

Returns:

Name Type Description
ret (ndarray, float)

the entanglement of formation of the isotropic state

numqi.state.get_Isotropic_GME(d, alpha)

get the geometric measure of entanglement (GME) of the isotropic state

Geometric measure of entanglement and applications to bipartite and multipartite quantum states doi-link (eq-54)

Parameters:

Name Type Description Default
d int

the dimension of the Hilbert space

required
alpha (float, ndarray)

the parameter of the isotropic state

required

Returns:

Name Type Description
ret (float, ndarray)

the geometric measure of entanglement of the isotropic state

numqi.state.maximally_entangled_state(d)

get the maximally entangled state quantiki-link

Parameters:

Name Type Description Default
d int

the dimension of the Hilbert space

required

Returns:

Name Type Description
ret ndarray

the maximally entangled state, ret.ndim=1

numqi.state.maximally_coherent_state(dim, alpha=None)

get the interpolation between the maximally coherent state and the maximally mixed state

reference: Maximally coherent states and coherence-preserving operations arxiv-link

Parameters:

Name Type Description Default
dim int

the dimension of the state

required
alpha (None, float)

the interpolation parameter, None for the maximally coherent state

None

Returns:

Name Type Description
ret ndarray

the maximally coherent state. when alpha=None, pure state shape=(dim,) is returned, otherwise density matrix shape=(dim,dim) is returned

numqi.state.get_2qutrit_Antoine2022(q)

an example of SEP-PPT-NPT states in 2-qutrit system

reference: Building separable approximations for quantum states via neural networks doi-link

(0.5,1.5]: PPT (1.5,2.5]: NPT

Parameters:

Name Type Description Default
q float

q in [-2.5,2.5]

required

Returns:

Name Type Description
rho ndarray

9x9 density matrix

numqi.state.get_bes2x4_Horodecki1997(b)

get the 2x4 bound entangled state proposed by Horodecki et al. in 1997

reference: Separability criterion and inseparable mixed states with positive partial transposition doi-link

reference: Certifying Quantum Separability with Adaptive Polytopes arxiv-link

b in [0,1]

PPT range of b: [0, 1]

SEP: b=0 or b=1

Parameters:

Name Type Description Default
b float

the parameter of the state

required

Returns:

Name Type Description
ret ndarray

the density matrix of the state, shape=(8,8)

numqi.state.get_bes3x3_Horodecki1997(a)

get the 3x3 bound entangled state proposed by Horodecki et al. in 1997

reference: Separability criterion and inseparable mixed states with positive partial transposition doi-link

reference: Certifying Quantum Separability with Adaptive Polytopes arxiv-link

a in [0,1]

PPT range of a: [0, 1]

SEP: a=0 or a=1

Parameters:

Name Type Description Default
a float

the parameter of the state

required

Returns:

Name Type Description
ret ndarray

the density matrix of the state, shape=(9,9)

numqi.state.get_4qubit_special_state_gme(key, plist)

get the geometric measure of entanglement (GME) for some special 4-qubit states

reference: Multiparticle entanglement under the influence of decoherence doi-link

Parameters:

Name Type Description Default
key str

the type of the special state, one of {'cluster','ghz','w','dicke'}

required
plist (float, ndarray)

the decoherence parameter, \(p\in[0,1]\). For \(p=0\), the state is incoherent (diagonal only)

required

Returns:

Name Type Description
rho ndarray

the density matrix of the special state, shape=(16,16), or (n,16,16) if plist.ndim=1

gme (float, ndarray)

GME of the special state, or (n,) if plist.ndim=1