Amit Nikhade, Quantum, Quantum Computing, Artificial Intelligence, Quantum Gate.
0 0 0| |0 1 0 0| |0 0 1 0| |0 0 0 -1| In other words, when the first qubit is in state |0⟩, the CZ gate does not affect the second qubit, and when the first qubit is in state |1⟩, the CZ gate applies a Z-rotation to the second qubit. This makes the CZ gate a useful tool for creating entanglement