toqito.matrices.gen_gell_mann ============================= .. py:module:: toqito.matrices.gen_gell_mann .. autoapi-nested-parse:: Produces the generalized Gell-Mann operator matrices. Module Contents --------------- .. py:function:: gen_gell_mann(ind_1, ind_2, dim) Produce a generalized Gell-Mann operator [@WikiGellMann]. Construct a `dim`-by-`dim` Hermitian operator. These matrices span the entire space of `dim`-by-`dim` matrices as `ind_1` and `ind_2` range from 0 to `dim-1`, inclusive, and they generalize the Pauli operators when `dim = 2` and the Gell-Mann operators when `dim = 3`. .. rubric:: Examples The generalized Gell-Mann matrix for `ind_1 = 0`, `ind_2 = 1` and `dim = 2` is given as \[ G_{0, 1, 2} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}. \] This can be obtained in `|toqito⟩` as follows. ```python exec="1" source="above" from toqito.matrices import gen_gell_mann print(gen_gell_mann(ind_1=0, ind_2=1, dim=2)) ``` The generalized Gell-Mann matrix `ind_1 = 2`, `ind_2 = 3`, and `dim = 4` is given as \[ G_{2, 3, 4} = \begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}. \] This can be obtained in `|toqito⟩` as follows. ```python exec="1" source="above" from toqito.matrices import gen_gell_mann gen_gell_mann(ind_1=2, ind_2=3, dim=4) ``` :param ind_1: A non-negative integer from 0 to `dim-1` (inclusive). :param ind_2: A non-negative integer from 0 to `dim-1` (inclusive). :param dim: The dimension of the Gell-Mann operator. :returns: The generalized Gell-Mann operator as an array.