Skip to content

singlet

Generalized singlet state is a singlet state of n qubits in the invariant space of alternating representation.

singlet

singlet(dim: int) -> ndarray

Produce a generalized singlet state acting on two n-dimensional systems 1.

Parameters:

  • dim (int) –

    The dimension of the generalized singlet state.

Returns:

  • ndarray

    The singlet state of dimension dim.

Examples:

For \(n = 2\) this generates the following matrix

\[ S = \frac{1}{2} \begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & 1 & -1 & 0 \\ 0 & -1 & 1 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix} \]

which is equivalent to \(|\phi_s \rangle \langle \phi_s |\) where

\[ |\phi_s\rangle = \frac{1}{\sqrt{2}} \left( |01 \rangle - |10 \rangle \right) \]

is the singlet state. This can be computed via |toqito⟩ as follows:

from toqito.states import singlet
dim = 2
print(singlet(dim))
[[ 0.   0.   0.   0. ]
 [ 0.   0.5 -0.5  0. ]
 [ 0.  -0.5  0.5  0. ]
 [ 0.   0.   0.   0. ]]

It is possible for us to consider higher dimensional singlet states. For instance, we can consider the \(3\)-dimensional Singlet state as follows:

from toqito.states import singlet
dim = 3
print(singlet(dim))
[[ 0.          0.          0.          0.          0.          0.          0.          0.          0.        ]
 [ 0.          0.16666667  0.         -0.16666667  0.          0.          0.          0.          0.        ]
 [ 0.          0.          0.16666667  0.          0.          0.         -0.16666667  0.          0.        ]
 [ 0.         -0.16666667  0.          0.16666667  0.          0.          0.          0.          0.        ]
 [ 0.          0.          0.          0.          0.          0.          0.          0.          0.        ]
 [ 0.          0.          0.          0.          0.          0.16666667  0.         -0.16666667  0.        ]
 [ 0.          0.         -0.16666667  0.          0.          0.          0.16666667  0.          0.        ]
 [ 0.          0.          0.          0.          0.         -0.16666667  0.          0.16666667  0.        ]
 [ 0.          0.          0.          0.          0.          0.          0.          0.          0.        ]]

References

1 Cabello, Ad\'an. \(N\)-Particle \(N\)-Level Singlet States: Some Properties and Applications. Phys. Rev. Lett.. vol. 89. (2002). link.

Source code in toqito/states/singlet.py
def singlet(dim: int) -> np.ndarray:
    r"""Produce a generalized singlet state acting on two n-dimensional systems [@cabello2002nparticle].

    Args:
        dim: The dimension of the generalized singlet state.

    Returns:
        The singlet state of dimension `dim`.

    Examples:
        For \(n = 2\) this generates the following matrix

        \[
            S = \frac{1}{2} \begin{pmatrix}
                            0 & 0 & 0 & 0 \\
                            0 & 1 & -1 & 0 \\
                            0 & -1 & 1 & 0 \\
                            0 & 0 & 0 & 0
                        \end{pmatrix}
        \]

        which is equivalent to \(|\phi_s \rangle \langle \phi_s |\) where

        \[
            |\phi_s\rangle = \frac{1}{\sqrt{2}} \left( |01 \rangle - |10 \rangle \right)
        \]

        is the singlet state. This can be computed via `|toqito⟩` as follows:

        ```python exec="1" source="above" result="text"
        from toqito.states import singlet
        dim = 2
        print(singlet(dim))
        ```


        It is possible for us to consider higher dimensional singlet states. For instance, we can consider the
        \(3\)-dimensional Singlet state as follows:

        ```python exec="1" source="above" result="text"
        from toqito.states import singlet
        dim = 3
        print(singlet(dim))
        ```

    """
    return (np.identity(dim**2) - swap_operator([dim, dim])) / ((dim**2) - dim)