# CNOT gate output with both inputs in superposition

What is the output of a CNOT gate if both inputs are in superposition?

For example, what happens if: $\left|x\right>=\alpha_x\left|0\right>+\beta_x\left|1\right>$ and $\left|y\right>=\alpha_y\left|0\right>+\beta_y\left|1\right>$. Note that the $\alpha$s and $\beta$s can have imaginary parts.

For another example, if:

$$\begin{gather} \alpha_x=0.6\times e^{i\theta_1} \\ \beta_x=0.8\times e^{i\theta_2} \\ \alpha_y = \frac{\sqrt3}{3}\times e^{i\theta_3} \\ \beta_y = \frac{\sqrt6}{3}\times e^{i\theta_4} \end{gather}$$

then what is $\left|x\oplus y\right>$?

• You have to express $|x⟩|y⟩$ in the basis $|0⟩|0⟩, |0⟩|1⟩, |1⟩|0⟩, |1⟩|1⟩$, then apply the matrix C, and you got the output result in the same basis. You have to see then if it is a separable state or not (it seems not) Jun 11, 2013 at 19:26

${\text{CNOT[ }}$
$\alpha_x \alpha_y \mid\!0, 0\rangle + \alpha_x \beta_y \mid\!0, 1\rangle + \beta_x \alpha_y \mid\!1, 0\rangle + \beta_x \beta_y \mid\!1, 1\rangle$
${\text{ ]}} :=$
$\alpha_x \alpha_y \mid\!0, 0\rangle + \alpha_x \beta_y \mid\!0, 1\rangle + \beta_x \beta_y \mid\!1, 0\rangle + \beta_x \alpha_y \mid\!1, 1\rangle$.