# Does the X (NOT) gate affect superpositions at all?

Does "NOT" gate have any effect on qubit in superposition state? After applying Hadamard gate on qubit seems like the "NOT" gate doesn't have any effect on it. Could somebody describe this behavior?

This depends on what superposition you're in. Recall that the not gate can be written in the form $$\left(\begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array}\right)$$ so it has eigenvectors $$(1,\pm 1)$$. The whole point of an eigenvector is that when the matrix acts on it, it's unchanged.
So, the state $$H|0\rangle$$ (Hadamard acting on a 0 input state) is $$(|0\rangle+|1\rangle)/\sqrt{2}$$, which is exactly this eigenstate of the NOT operator. When we act the NOT operator on this state, nothing changes.
Seen in terms of dirac notation, $$|0\rangle+|1\rangle\xrightarrow{not}|1\rangle+|0\rangle=|0\rangle+|1\rangle.$$ Of course, if the superposition is different, the not gate does do something: $$2|0\rangle+|1\rangle\xrightarrow{not}2|1\rangle+|0\rangle\neq2|0\rangle+|1\rangle.$$
• Sorry for my unclear question :(. This one: $$2|0\rangle+|1\rangle\xrightarrow{not}2|1\rangle+|0\rangle\neq2|0\rangle+|1\rangle.$$ , the amplitude of $|0\rangle$ is 2.. how to create a quantum circuit that can gives that state? Thank you. Dec 24, 2021 at 1:33
• @prairie99 You could use a Y rotation of a suitable angle (to be determined) acting on a $|0\rangle$. Dec 24, 2021 at 6:06
It's true that the $$|\pm\rangle=\tfrac{1}{\sqrt{2}}(|0\rangle\pm|1\rangle$$ states are orthonormal eigenvectors of the $$X$$ gate (meaning they are "unneffected" by $$X$$), but this does not mean that $$X$$ doesn't have any effect on states in other superpositions. For instance, consider the state $$|\psi\rangle=\frac{1}{\sqrt{4}}|0\rangle+\frac{\sqrt{3}}{2}|1\rangle$$, the NOT gate $$X$$ transforms $$|\psi\rangle$$ to $$X|\psi\rangle=\frac{1}{\sqrt{4}}X|0\rangle+\frac{\sqrt{3}}{2}X|1\rangle=\frac{1}{\sqrt{4}}|1\rangle+\frac{\sqrt{3}}{2}|0\rangle\neq |\psi\rangle.$$