state_props.is_pure =================== .. py:module:: state_props.is_pure .. autoapi-nested-parse:: Checks if a quantum state is a pure state. Functions --------- .. autoapisummary:: state_props.is_pure.is_pure Module Contents --------------- .. py:function:: is_pure(state) Determine if a given state is pure or list of states are pure :footcite:`WikiPureSt`. A state is said to be pure if it is a density matrix with rank equal to 1. Equivalently, the state :math:`\rho` is pure if there exists a unit vector :math:`u` such that: .. math:: \rho = u u^*. .. rubric:: Examples Consider the following Bell state: .. math:: u = \frac{1}{\sqrt{2}} \left( |00 \rangle + |11 \rangle \right) \in \mathcal{X}. The corresponding density matrix of :math:`u` may be calculated by: .. math:: \rho = u u^* = \frac{1}{2} \begin{pmatrix} 1 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 1 \end{pmatrix} \in \text{D}(\mathcal{X}). Calculating the rank of :math:`\rho` yields that the :math:`\rho` is a pure state. This can be confirmed in :code:`|toqito⟩` as follows: .. jupyter-execute:: from toqito.states import bell from toqito.state_props import is_pure u = bell(0) rho = u @ u.conj().T is_pure(rho) It is also possible to determine whether a set of density matrices are pure. For instance, we can see that the density matrices corresponding to the four Bell states yield a result of :code:`True` indicating that all states provided to the function are pure. .. jupyter-execute:: from toqito.states import bell from toqito.state_props import is_pure u0, u1, u2, u3 = bell(0), bell(1), bell(2), bell(3) rho0 = u0 @ u0.conj().T rho1 = u1 @ u1.conj().T rho2 = u2 @ u2.conj().T rho3 = u3 @ u3.conj().T is_pure([rho0, rho1, rho2, rho3]) .. rubric:: References .. footbibliography:: :param state: The density matrix representing the quantum state or a list of density matrices representing quantum states. :return: :code:`True` if state is pure and :code:`False` otherwise.