Concurrence and Entanglement of Formation
Accessible in both numqi.entangle
(recommended) and numqi.entangle.eof
numqi.entangle.get_concurrence_pure(psi)
get the concurrence of a bipartite pure state
Parameters:
Name | Type | Description | Default |
---|---|---|---|
psi
|
ndarray
|
a pure state, shape=(dimA,dimB) |
required |
Returns:
Name | Type | Description |
---|---|---|
ret |
float
|
the concurrence of the bipartite pure state |
numqi.entangle.get_concurrence_2qubit(rho)
get the concurrence of a 2-qubit density matrix wiki-link
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho
|
ndarray
|
a 2-qubit density matrix, shape=(4,4) |
required |
Returns:
Name | Type | Description |
---|---|---|
ret |
float
|
the concurrence of the 2-qubit density matrix |
numqi.entangle.get_eof_pure(psi, eps=1e-10)
get the entanglement of formation (EOF) of a bipartite pure state
Parameters:
Name | Type | Description | Default |
---|---|---|---|
psi
|
ndarray
|
a pure state, shape=(dimA,dimB) |
required |
eps
|
float
|
a small number to avoid log(0) |
1e-10
|
Returns:
Name | Type | Description |
---|---|---|
ret |
float
|
the EOF of the bipartite pure state |
numqi.entangle.get_eof_2qubit(rho)
get the entanglement of formation (EOF) of a 2-qubit density matrix wiki-link
Entanglement of Formation of an Arbitrary State of Two Qubits, William K. Wootters doi-link
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho
|
ndarray
|
a 2-qubit density matrix, shape=(4,4) |
required |
Returns:
Name | Type | Description |
---|---|---|
ret |
float
|
the EOF of the 2-qubit density matrix |
numqi.entangle.EntanglementFormationModel
Bases: Module
Calculate the entanglement of formation (EOF) of a bipartite pure state via optimization
Variational characterizations of separability and entanglement of formation doi-link
__init__(dimA, dimB, num_term, rank=None, method='polar', euler_with_phase=False)
Initialize the model
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dimA
|
int
|
the dimension of the first subsystem |
required |
dimB
|
int
|
the dimension of the second subsystem |
required |
num_term
|
int
|
the number of terms in the variational ansatz, |
required |
rank
|
(int, None)
|
the rank of the density matrix |
None
|
method
|
str
|
the method to parameterize the manifold |
'polar'
|
euler_with_phase
|
bool
|
whether to include the phase in the Euler angles |
False
|
set_density_matrix(rho)
Set the density matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho
|
ndarray
|
the density matrix, shape=(dimAdimB,dimAdimB) |
required |
numqi.entangle.ConcurrenceModel
Bases: Module
Calculate the concurrence of a 2-qubit density matrix via optimization
What is the motivation for the definition of concurrence in quantum information? stackexchange-link
__init__(dimA, dimB, num_term, rank=None)
Initialize the model
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dimA
|
int
|
the dimension of the first subsystem |
required |
dimB
|
int
|
the dimension of the second subsystem |
required |
num_term
|
int
|
the number of terms in the variational ansatz, |
required |
rank
|
int
|
the rank of the density matrix |
None
|
set_density_matrix(rho)
Set the density matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho
|
ndarray
|
the density matrix, shape=(dimAdimB,dimAdimB) |
required |