state_props.entanglement_of_formation¶
Computes the entanglement of formation of a bipartite quantum state.
Functions¶
|
Compute entanglement-of-formation of a bipartite quantum state [1]. |
Module Contents¶
- state_props.entanglement_of_formation.entanglement_of_formation(rho, dim=None)¶
Compute entanglement-of-formation of a bipartite quantum state [1].
Entanglement-of-formation is the entropy of formation of the bipartite quantum state
rho
. Note that this function currently only supportsrho
being a pure state or a 2-qubit state: it is not known how to compute the entanglement-of-formation of higher-dimensional mixed states.This function was adapted from QETLAB.
Examples
Compute the entanglement-of-formation of a Bell state.
Let \(u = \frac{1}{\sqrt{2}} \left(|00\rangle + |11\rangle \right)\) and let
\[\begin{split}\rho = uu^* = \frac{1}{2}\begin{pmatrix} 1 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 1 \end{pmatrix}.\end{split}\]The entanglement-of-formation of \(\rho\) is equal to 1.
>>> import numpy as np >>> from toqito.state_props import entanglement_of_formation >>> from toqito.states import bell >>> >>> u_vec = bell(0) >>> rho = u_vec @ u_vec.conj().T >>> np.around(entanglement_of_formation(rho), decimals=3) np.float64(1.0)
References
[1] (1,2)Quantiki. Entanglement of formation. URL: https://www.quantiki.org/wiki/entanglement-formation.
- Raises:
ValueError – If matrices have improper dimension.
- Parameters:
rho (numpy.ndarray) – A matrix or vector.
dim (list[int] | int) – The default has both subsystems of equal dimension.
- Returns:
A value between 0 and 1 that corresponds to the entanglement-of-formation of
rho
.- Return type:
float