Controlled-Z gate (source code)

= Controlled-Z gate
{c}
{title2=$CZ$}
{wiki}

The controlled-Z gate is $CP(\pi)=\operatorname{diag}(1,1,1,-1)$. Conjugating the target of a <controlled-NOT gate> by <Hadamard gate>[Hadamard gates] turns controlled-NOT into controlled-Z.