Controlled-NOT (CNOT) Gate: Matrix Form, Simulation Circuit, and Output State
The matrix form of the controlled-NOT (CNOT) gate is: \n\nCNOT = [[1, 0, 0, 0], \n [0, 1, 0, 0], \n [0, 0, 0, 1], \n [0, 0, 1, 0]] \n\nTo show the simulation circuit with the CNOT gate, we can represent the initial state of |0i as: \n\n|0i = [1, 0] \n\nThe circuit with the CNOT gate can be represented as: \n\n|0i --[CNOT]-- |0i \n\nApplying the CNOT gate to the initial state, we get: \n\nCNOT * |0i = [[1, 0, 0, 0], \n [0, 1, 0, 0], \n [0, 0, 0, 1], \n [0, 0, 1, 0]] * [1, 0] \n\nSimplifying the matrix multiplication, we get the output state as: \n\n[1, 0, 0, 0] \n\nTherefore, the output state after applying the CNOT gate to the initial state of |0i is still |0i.
原文地址: https://www.cveoy.top/t/topic/qis4 著作权归作者所有。请勿转载和采集!