state_props.is_separable ======================== .. py:module:: state_props.is_separable .. autoapi-nested-parse:: Checks if a quantum state is a separable state. Functions --------- .. autoapisummary:: state_props.is_separable.is_separable Module Contents --------------- .. py:function:: is_separable(state, dim = None, level = 2, tol = 1e-08) Determine if a given state (given as a density matrix) is a separable state :footcite:`WikiSepSt` . 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 :code:`IsSeparable` function :footcite:`QETLAB_link` . 1. **Input Validation**: Checks if the input :code:`state` is a square, positive semidefinite (PSD) NumPy array. Normalizes the trace to 1 if necessary. The :code:`dim` parameter specifying subsystem dimensions :math:`d_A, d_B` is processed or inferred. 2. **Trivial Cases for Separability**: - If either subsystem dimension :math:`d_A` or :math:`d_B` is 1 (i.e., :code:`min_dim_val == 1`), the state is always separable. 3. **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 :footcite:`WikiScmidtDecomp`. .. note:: QETLAB also considers a more general Operator Schmidt Rank condition from :footcite:`Cariello_2013_Weak_irreducible` 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). 4. **Gurvits-Barnum Separable Ball**: - Checks if the state lies within the "separable ball" around the maximally mixed state, as defined by Gurvits and Barnum :footcite:`Gurvits_2002_Ball`. States within this ball are guaranteed to be separable. 5. **PPT Criterion (Peres-Horodecki)** :footcite:`Peres_1996_Separability` , :footcite:`Horodecki_1996_PPT_small_dimensions`: - 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 :math:`d_A d_B \le 6`, then PPT is also a *sufficient* condition for separability :footcite:`Horodecki_1996_PPT_small_dimensions`. 6. **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., :footcite:`Breuer_2006_Optimal`, :footcite:`Chen_2013_MultipartiteRank4`). The implementation checks if a specific determinant, derived from Plücker coordinates of the state's range, is close to zero. 7. **Operational Criteria for Low-Rank PPT States (Horodecki et al. 2000)** :footcite:`Horodecki_2000_PPT_low_rank`: For PPT states (especially when :math:`d_A d_B > 6`): - If :math:`\text{rank}(\rho) \le \max(d_A, d_B)`, the state is separable. - If :math:`\text{rank}(\rho) + \text{rank}(\rho^{T_A}) \le 2 d_A d_B - d_A - d_B + 2`, the state is separable. 8. **Reduction Criterion (Horodecki & Horodecki 1999)** :footcite:`Horodecki_1998_Reduction`: - The state is entangled if :math:`I_A \otimes \rho_B - \rho \not\succeq 0` or :math:`\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). 9. **Realignment/CCNR Criteria**: - **Basic Realignment (Chen & Wu 2003)** :footcite:`Chen_2003_Matrix`: If the trace norm of the realigned matrix is greater than 1, the state is entangled. 10. **Rank-1 Perturbation of Identity for PPT States (Vidal & Tarrach 1999)** :footcite:`Vidal_1999_Robust`: - 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. 11. **2xN Specific Checks for PPT States**: For bipartite systems where one subsystem is a qubit (:math:`d_A=2`) and the other is N-dimensional (:math:`d_B=N`), several specific conditions apply: - **Johnston's Spectral Condition (2013)** :footcite:`Johnston_2013_Spectrum`: An inequality involving the largest and smallest eigenvalues of a 2xN PPT state that is sufficient for separability. - **Hildebrand's Conditions (2005, 2007, 2008)** :footcite:`Hildebrand_2005_PPT`, :footcite:`Hildebrand_2008_Semidefinite`, :footcite:`Hildebrand_2005_Cone`: - For a 2xN state written in block form :math:`\rho = [[A, B], [B^\dagger, C]]`, a check is performed based on the rank of the anti-Hermitian part of the off-diagonal block :math:`B` (i.e., :math:`\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 :math:`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 :math:`B` compared to eigenvalues of blocks :math:`A` and :math:`C`. 12. **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. - **Ha-Kye Maps (3x3 systems)** :footcite:`HaKye_2011_Positive`: Specific maps for qutrit-qutrit systems. - **Breuer-Hall Maps (even dimensions)** :footcite:`Breuer_2006_Mixed`, :footcite:`Hall_2006_Indecomposable`: Maps based on antisymmetric unitary matrices, applicable when a subsystem has even dimension. 13. **Symmetric Extension Hierarchy (DPS)** :footcite:`Doherty_2004_CompleteFamily`: - A state is separable if and only if it has a k-symmetric extension for all :math:`k \ge 1`. - This function checks for k-extendibility up to the specified :code:`level`. - If :code:`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 :code:`level >= 2`, if a k-symmetric extension exists for all k up to :code:`level` (specifically, if :code:`has_symmetric_extension` returns :code:`True` for the highest :code:`k_actual_level_check` in the loop, which is :code:`level`), the current implementation returns :code:`True`. .. 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 :code:`SymmetricExtension` typically tests k-PPT-extendibility, where failure means entangled. It also has :code:`SymmetricInnerExtension`, which can prove separability. .. rubric:: Examples Consider the following separable (by construction) state: .. math:: \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) The resulting density matrix will be: .. math:: \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}). We provide the input as a density matrix :math:`\rho`. On the other hand, a random density matrix will be an entangled state (a separable state). .. jupyter-execute:: 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) .. jupyter-execute:: 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) We can also detect certain PPT-entangled states. For example, a state constructed from a Breuer-Hall map is entangled but PPT. .. jupyter-execute:: 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 .. rubric:: References .. footbibliography:: :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: :code:`True` if separable, :code:`False` if entangled or inconclusive by implemented checks.