Quantum Computing, Science, Programming.
q[0] = !q[0] (for C++) or q[0] = not q[0] (for Python). In QISKit it can be done in multiple ways. The simplest is to use operations called x and y. Here are some examples of how to use them, with the equivalent C++ and Python lines for comparison. q[0] = !q[0]; \\ A C++ style NOT q[0] = not q[0] #