A 2- qubits pure state | ψ ψ ⟩ ⟩ A B ∈ ∈ H A ⊗ ⊗ H B can be written (using Schmidt decomposition) as | ψ ψ ⟩ ⟩ A B = ∑ ∑ j λ λ j | j ⟩ ⟩ A | j ⟩ ⟩ B , where { | j ⟩ ⟩ A } , { | j ⟩ ⟩ B } are the bases of H A , H B respectively, and ∑ ∑ j λ λ j 2 = 1 , λ λ j ≥ ≥ 0 . Its density matrix is ρ ρ A B = ∑ ∑ i , j λ λ i λ λ j | i ⟩ ⟩ A ⟨ ⟨ j | A ⊗ ⊗ | i ⟩ ⟩ B ⟨ ⟨ j | B . The degree in which it is entangled is related to the purity of the states of its subsystems, ρ ρ A = tr B ⁡ ⁡ ( ρ ρ A B ) = ∑ ∑ j λ λ j 2 | j ⟩ ⟩ A ⟨ ⟨ j | A , and similarly for ρ ρ B (see partial trace). If this initial state is separable (i.e. there's only a single λ λ j ≠ ≠ 0 ), then ρ ρ A , ρ ρ B are both pure. Otherwise, this state is entangled and ρ ρ A , ρ ρ B are both mixed. For example, if | ψ ψ ⟩ ⟩ A B = | Φ Φ + ⟩ ⟩ = 1 2 ( | 0 ⟩ ⟩ A ⊗ ⊗ | 0 ⟩ ⟩ B + | 1 ⟩ ⟩ A ⊗ ⊗ | 1 ⟩ ⟩ B ) which is a maximally entangled state, then ρ ρ A , ρ ρ B are both completely mixed.