# Quantum Operations notes

Posted by Erika Tynn on July 05, 2020 · Updated on July 18, 2020 · 4 mins read

This are some notes to help me remember quantum operations

$\newcommand\ket[1]{\lvert #1 \rangle}$ $\newcommand\boldket[1]{\mathbf{\ket{#1}}}$

# Basics

• Classical computing is based on bits. A bit can have 2 possible states (or values), often denoted as 0 and 1. Physically, a bit is stored as one of two distinct (but arbitrarily selected) physical attributes like voltage, magnetic charge, etc.
• Quantum computing is based on qubits. A qubit still has 2 possible values, based on two selected quantum states, often denoted as $\boldket{0}$ and $\boldket{1}$, the two most popular standard basis vectors. Physically, a qubit is based on a quantum particle.
• A quantum particle, thereotically, has an infinite number of states. This is because the quantum particleâ€™s state is represented by a 2-dimensional complex vector $\left(\begin{array}{c}\alpha\\\beta\end{array}\right)$. And to makes matters worse, a quantum paticle has probabilities of being in all of these states at the same time. This is due to a phenomenon known as superposition.
• However, if one tries to measure or observe the instantaneous state of a quantum particle, the probability of being in the state being measured or observed collapses to a definite 100% or 0%. One interesting phenomenon is that after this measurement or observation, the quantum particle retains this collapsed probability, and thus its state.
• Luckily, for quantum computing, we can only access (or measure) these two collapsed states, as there is currently no way to measure the probabilities of these states. We only need to find a way to use and manipulate the probabilities to solve our computational problems.
• Another interesting physical phenomenon of quantum particles is entanglement. If two quantum particles are entangled, the states of these particles are no longer independent, but are instead correlated. For example, if two qubits are entangled, then if the measurement of the first qubit shows $\boldket{0}$, then the measurement of the second qubit will also show $\boldket{0}$.

• A quantum state has an infinite number of states, and can be represented using the ket notation. So a state of $\psi$ is written as $\ket{\psi}$.
• For mathematical representation purposes, the basis vectors of $\ket{0}$ and $\ket{1}$ are used and formulated as a 2-column vector.
• $\ket{0}$ = $\begin{bmatrix}1\\0\end{bmatrix}$
• $\ket{1}$ = $\begin{bmatrix}0\\1\end{bmatrix}$
• So, in general, $\ket{\psi}$ = $\begin{bmatrix}\alpha\\\beta\end{bmatrix}$ = $\alpha\ket{0}+\beta\ket{1}$

# Bloch Sphere

• x-axis gives $\boldket{+}$ and $\boldket{-}$
• $\boldket{+}$ = $\begin{bmatrix}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\end{bmatrix}$ = $\frac{1}{\sqrt{2}} \left( \ket{0} + \ket{1} \right)$
• $\boldket{-}$ = $\begin{bmatrix}\frac{1}{\sqrt{2}}\\-\frac{1}{\sqrt{2}}\end{bmatrix}$ = $\frac{1}{\sqrt{2}} \left( \ket{0} - \ket{1} \right)$
• y-axis gives $\boldket{i+}$ and $\boldket{i-}$
• $\boldket{i+}$ = $\begin{bmatrix}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}i\end{bmatrix}$ = $\frac{1}{\sqrt{2}} \left( \ket{0} + i \ket{1} \right)$
• $\boldket{i-}$ = $\begin{bmatrix}\frac{1}{\sqrt{2}}\\-\frac{1}{\sqrt{2}}i\end{bmatrix}$ = $\frac{1}{\sqrt{2}} \left( \ket{0} - i \ket{1} \right)$
• z-axis gives $\boldket{0}$ and $\boldket{1}$

# Operations

If a qubit is in a collapsed state of $\boldket{0}$ or $\boldket{1}$, the Hadamard or H operator will reset the qubit back into a superposition state with 50% probability for each qubit states. Specifically: