Deriving the Controlled-X (CX) Gate Using Tensor Products
To show that Cx = |0'ih 0| ⊗ I + |1'ih 1| ⊗ X, we can start by expanding the tensor product on the right side of the equation.
|0'ih 0| ⊗ I = (|0'ih ⊗ I) ⊗ |0> + (|0'ih ⊗ I) ⊗ |1> = |0'ih 0> ⊗ |0> + |0'ih 1> ⊗ |1>
|1'ih 1| ⊗ X = (|1'ih ⊗ X) ⊗ |0> + (|1'ih ⊗ X) ⊗ |1> = |1'ih 0> ⊗ |0> + |1'ih 1> ⊗ |1>
Now we can combine the two expressions:
|0'ih 0| ⊗ I + |1'ih 1| ⊗ X = |0'ih 0> ⊗ |0> + |0'ih 1> ⊗ |1> + |1'ih 0> ⊗ |0> + |1'ih 1> ⊗ |1>
We can rearrange the terms:
= (|0'ih 0> + |1'ih 1>) ⊗ |0> + (|0'ih 1> + |1'ih 0>) ⊗ |1>
Now, notice that (|0'ih 0> + |1'ih 1>) is simply the identity matrix I. Similarly, (|0'ih 1> + |1'ih 0>) is the Pauli-X matrix X. Therefore, we can rewrite the expression as:
= I ⊗ |0> + X ⊗ |1>
And this is equivalent to Cx. Therefore, we have shown that Cx = |0'ih 0| ⊗ I + |1'ih 1| ⊗ X.
原文地址: https://www.cveoy.top/t/topic/qitI 著作权归作者所有。请勿转载和采集!