Pauli-Z gate

The Pauli-Z gate is a single-qubit rotation through π\pi radians around the z-axis.

 Z=σz=σ3=(1001)\ Z = \sigma_z = \sigma_3 = \begin{pmatrix} 1 & 0 \ 0 & -1 \end{pmatrix}

Examples:

        
          z q[0] # execute Z-gate on qubit 0
Z q[0,2:3] # execute Z-gate on qubits 0,2 and 3