dq.sigmax
sigmax(*, layout: Layout | None = None) -> QArray
Returns the Pauli \(\sigma_x\) operator.
It is defined by \(\sigma_x = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\).
Parameters
-
layout
–
Matrix layout (
dq.dense
,dq.dia
orNone
).
Returns
(qarray of shape (2, 2)) Pauli \(\sigma_x\) operator.
Examples
>>> dq.sigmax()
QArray: shape=(2, 2), dims=(2,), dtype=complex64, layout=dia, ndiags=2
[[ â‹… 1.+0.j]
[1.+0.j â‹… ]]