Skip to content

dq.sgate

sgate() -> QArray

Returns the \(\text{S}\) gate.

It is defined by \(\text{S} = \begin{pmatrix} 1 & 0 \\ 0 & i \end{pmatrix}\).

Returns

(qarray of shape (2, 2)) \(\text{S}\) gate.

Examples

>>> dq.sgate()
QArray: shape=(2, 2), dims=(2,), dtype=complex64, layout=dense
[[1.+0.j 0.+0.j]
 [0.+0.j 0.+1.j]]