Vectors - RPIQuantumComputing/QuantumCircuits GitHub Wiki

Vector Notation

Vector notation: The vector notation for qubit states allows us to represent the component of |0> and |1> in a superposition state mathematically. The vector for a single-qubit state contains two numbers in a column - the top number is the contribution of |0>, and the bottom number is the contribution of |1>.

Equal vs unequal superpositions: In an equal superposition, the contributions of |0> and |1> are equal up to something called a global phase, more on that later. One can think of this as the two numbers in the vector for that quantum state being equal. In an unequal superposition, either |0> or |1> contributes more to the superposition state. Therefore, the number corresponding to the state that contributes more is greater in the vector representation of the superposition state.

Vector addition: To get the corresponding vector form of a superposition state, we can add the vectors for the |0> and |1> state, scaled by their contributions in a process called normalization which is important to ensure the probability does not go above 100%. For example, to get the vector form of the |+> state, we just add the vectors for |0> and |1>, since their contributions are equal:

Rules for vector addition: To add vectors, we add the numbers in each row of the vector. The two vectors must have the same number of rows; if they have different numbers of rows, they cannot be added.

Normalizing a Vector

Vector normalization: The Bloch sphere has a radius of 1 unit. Since all quantum states lie on the Bloch sphere, they must have a length of 1 unit as well. Therefore, we must ensure that the vector for any quantum state we write down has a length of 1. This process is known as normalization. Here are the steps for normalizing quantum states:

Normalization

Phase: To obtain the |+> state, we added the contributions of the |0> and |1> states together. Another way to make an equal superposition is to subtract these contributions. This process leads to the |-> state