state_props.is_separable¶
Checks if a quantum state is a separable state.
Functions¶
|
Determine if a given state (given as a density matrix) is a separable state [1] . |
Module Contents¶
- state_props.is_separable.is_separable(state, dim=None, level=2, tol=1e-08)¶
Determine if a given state (given as a density matrix) is a separable state [1] .
A multipartite quantum state: :math:rho in text{D}(mathcal{H}_1 otimes mathcal{H}_2 otimes dots otimes mathcal{H}_N) is defined as fully separable if it can be written as a convex combination of product states.
Overview¶
This function implements several criteria to determine separability, broadly following a similar order of checks as seen in tools like QETLAB’s
IsSeparable
function [2] .Input Validation: Checks if the input
state
is a square, positive semidefinite (PSD) NumPy array. Normalizes the trace to 1 if necessary. Thedim
parameter specifying subsystem dimensions \(d_A, d_B\) is processed or inferred.Trivial Cases for Separability:
If either subsystem dimension \(d_A\) or \(d_B\) is 1 (i.e.,
min_dim_val == 1
), the state is always separable.
Pure State Check (Schmidt Rank):
If the input state has rank 1 (i.e., it’s a pure state), its Schmidt rank is computed. A pure state is separable if and only if its Schmidt rank is 1 [3].
Note
QETLAB also considers a more general Operator Schmidt Rank condition from [4] for weak irreducible matrices. This is not explicitly separated in this function but might be covered if such matrices are rank 1 (see issue #1245).
Gurvits-Barnum Separable Ball:
Checks if the state lies within the “separable ball” around the maximally mixed state, as defined by Gurvits and Barnum [5]. States within this ball are guaranteed to be separable.
PPT Criterion (Peres-Horodecki) [6] , [7]:
The Positive Partial Transpose (PPT) criterion is a necessary condition for separability.
If the state is NPT (Not PPT), it is definitively entangled.
If the state is PPT and the total dimension \(d_A d_B \le 6\), then PPT is also a sufficient condition for separability [7].
3x3 Rank-4 PPT N&S Check (Plücker Coordinates / Breuer / Chen & Djokovic):
For 3x3 systems, if a PPT state has rank 4, there are known necessary and sufficient conditions for separability. These are often related to the vanishing of the “Chow form” or determinants of matrices constructed from Plücker coordinates of the state’s range (e.g., [8], [9]). The implementation checks if a specific determinant, derived from Plücker coordinates of the state’s range, is close to zero.
Operational Criteria for Low-Rank PPT States (Horodecki et al. 2000) [10]:
For PPT states (especially when \(d_A d_B > 6\)):
If \(\text{rank}(\rho) \le \max(d_A, d_B)\), the state is separable.
If \(\text{rank}(\rho) + \text{rank}(\rho^{T_A}) \le 2 d_A d_B - d_A - d_B + 2\), the state is separable.
Reduction Criterion (Horodecki & Horodecki 1999) [11]:
The state is entangled if \(I_A \otimes \rho_B - \rho \not\succeq 0\) or \(\rho_A \otimes I_B - \rho \not\succeq 0\). This is a check for positive semidefiniteness based on the Loewner partial order, not a check for majorization.
For PPT states (which is the case if this part of the function is reached), this criterion is always satisfied, so its primary strength is for NPT states (already handled).
Realignment/CCNR Criteria:
Basic Realignment (Chen & Wu 2003) [12]: If the trace norm of the realigned matrix is greater than 1, the state is entangled.
Rank-1 Perturbation of Identity for PPT States (Vidal & Tarrach 1999) [13]:
PPT states that are very close to a specific type of rank-1 perturbation of the identity matrix are separable. This is checked by examining the eigenvalue spectrum: if the gap between the second largest and smallest eigenvalues is small, the state is determined to be separable.
2xN Specific Checks for PPT States: For bipartite systems where one subsystem is a qubit (\(d_A=2\)) and the other is N-dimensional (\(d_B=N\)), several specific conditions apply:
Johnston’s Spectral Condition (2013) [14]: An inequality involving the largest and smallest eigenvalues of a 2xN PPT state that is sufficient for separability.
- Hildebrand’s Conditions (2005, 2007, 2008)
-
For a 2xN state written in block form \(\rho = [[A, B], [B^\dagger, C]]\), a check is performed based on the rank of the anti-Hermitian part of the off-diagonal block \(B\) (i.e., \(\text{rank}(B - B^\dagger) \le 1\)). (Note: QETLAB refers to this property in relation to “perturbed block Hankel” matrices).
A check involving a transformed matrix \(X_{2n\_ppt\_check}\) derived from blocks A, B, C, requiring it and its partial transpose to be PSD (related to homothetic images).
A condition based on the Frobenius norm of block \(B\) compared to eigenvalues of blocks \(A\) and \(C\).
Decomposable Maps / Entanglement Witnesses: These tests apply positive but not completely positive (NCP) maps. If the resulting state is not PSD, the original state is entangled.
Symmetric Extension Hierarchy (DPS) [21]:
A state is separable if and only if it has a k-symmetric extension for all \(k \ge 1\).
This function checks for k-extendibility up to the specified
level
.If
level=1
and the state is PPT (which it is at this stage), it’s 1-extendible and thus considered separable by this specific test level.For
level >= 2
, if a k-symmetric extension exists for all k up tolevel
(specifically, ifhas_symmetric_extension
returnsTrue
for the highestk_actual_level_check
in the loop, which islevel
), the current implementation returnsTrue
.
Note
The symmetric extension check requires CVXPY and a suitable solver. If these are not installed, or if the solver fails, a warning is printed to the console and this check is skipped.
Note
QETLAB’s
SymmetricExtension
typically tests k-PPT-extendibility, where failure means entangled. It also hasSymmetricInnerExtension
, which can prove separability.
Examples
Consider the following separable (by construction) state:
\[ \begin{align}\begin{aligned}\rho = \rho_1 \otimes \rho_2.\\\rho_1 = \frac{1}{2} \left( |0 \rangle \langle 0| + |0 \rangle \langle 1| + |1 \rangle \langle 0| + |1 \rangle \langle 1| \right)\\\rho_2 = \frac{1}{2} \left( |0 \rangle \langle 0| + |1 \rangle \langle 1| \right)\end{aligned}\end{align} \]The resulting density matrix will be:
\[\begin{split}\rho = \frac{1}{4} \begin{pmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \end{pmatrix} \in \text{D}(\mathcal{X}).\end{split}\]We provide the input as a density matrix \(\rho\).
On the other hand, a random density matrix will be an entangled state (a separable state).
import numpy as np from toqito.rand.random_density_matrix import random_density_matrix from toqito.state_props.is_separable import is_separable rho_separable = np.array([[1, 0, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0], [0, 1, 0, 1]]) is_separable(rho_separable)
True
rho_not_separable = np.array([[ 0.13407875+0.j , -0.08263926-0.17760437j, -0.0135111 -0.12352182j, 0.0368423 -0.05563985j], [-0.08263926+0.17760437j, 0.53338542+0.j , 0.19782968-0.04549732j, 0.11287093+0.17024249j], [-0.0135111 +0.12352182j, 0.19782968+0.04549732j, 0.21254612+0.j , -0.00875865+0.11144344j], [ 0.0368423 +0.05563985j, 0.11287093-0.17024249j, -0.00875865-0.11144344j, 0.11998971+0.j ]]) is_separable(rho_not_separable)
False
We can also detect certain PPT-entangled states. For example, a state constructed from a Breuer-Hall map is entangled but PPT.
from toqito.state_props.is_ppt import is_ppt # Construct a 2x3 separable PPT state of rank 2 # |ψ₁⟩ = |0⟩⊗|0⟩, |ψ₂⟩ = |1⟩⊗|1⟩ psi1 = np.kron([1, 0], [1, 0, 0]) psi2 = np.kron([0, 1], [0, 1, 0]) rho = 0.5 * (np.outer(psi1, psi1.conj()) + np.outer(psi2, psi2.conj())) print("Is the state PPT?", is_ppt(rho, dim=[2, 3])) # True print("Is the state separable?", is_separable(rho, dim=[2, 3])) # True
Is the state PPT? True Is the state separable? True
References
- raises Warning:
If the symmetric extension check is attempted but CVXPY or a suitable solver is not available.
- raises TypeError:
If the input state is not a NumPy array.
- raises RuntimeError:
If the symmetric extension check is attempted but fails due to CVXPY solver issues.
- raises NotImplementedError:
If the symmetric extension check is attempted but the level is not implemented (e.g., level < 1).
- raises ValueError:
If the input state is not a square matrix.
If the input state is not positive semidefinite.
If the input state has a trace close to zero but contains significant non-zero elements.
If the input state has a numerically insignificant trace but significant elements; cannot normalize reliably.
If the dim parameter has an invalid type (not None, int, or list).
If dim is provided as an integer that does not evenly divide the state’s dimension.
If dim is provided as a list with a number of elements other than two.
If dim is provided as a list with non-integer or negative elements.
If the product of the dimensions in the dim list does not match the state’s dimension.
If a dimension of zero is provided for a non-empty state (or vice-versa).
- param state:
The density matrix to check.
- param dim:
The dimension of the input state, e.g., [dim_A, dim_B]. Optional; inferred if None.
- param level:
The level for symmetric extension (DPS) hierarchy (default: 2).
If 1, only PPT is checked.
If >=2, checks for k-symmetric extension up to this level.
If -1, attempts all implemented checks exhaustively (not all possible checks are implemented).
- param tol:
Numerical tolerance (default: 1e-8).
- return:
True
if separable,False
if entangled or inconclusive by implemented checks.
- Parameters:
state (numpy.ndarray)
dim (None | int | list[int])
level (int)
tol (float)
- Return type:
bool