This work is devoted to the construction and study of commutative gates for a two-qubit quantum system. Using four-dimensional algebra developed by the Kazakh mathematician Abenov M.M. all groups of commutative gates have been constructed, and among all states of a two-qubit quantum system, unitary states with which a specific gate is connected have been identified. An explicit type of gate is described that transfers a quantum system from one unitary state to another unitary state. The proposed approach opens up new possibilities for the design of quantum algorithms not only for two-qubit quantum systems, but also for $n$-qubit quantum systems.