Matrix for Control-Z gate

602 Views Asked by At

Can someone help me to prove that this Matrix:

I - 2|11...1><11...1|

represent (n-1) Control-Z gate (Z operator is applied to n-th qubit only if all remaining qubits are state |1>)