CZ

Module: pennylane

class CZ(wires)[source]

The controlled-Z operator

\[\begin{split}CZ = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & -1 \end{bmatrix}.\end{split}\]

Note

The first wire provided corresponds to the control qubit.

Details:

  • Number of wires: 2
  • Number of parameters: 0
Parameters:wires (Sequence[int] or int) – the wires the operation acts on