Introduction to Quantum Mechanics with Cats
Don’t Be Afraid
Quantum mechanics might seem scary, but the parts you need to understand quantum algorithms are surprisingly manageable. In this article, I’ll walk you through the basics of quantum mechanics that are essential for getting what quantum algorithms are all about.
I’m going to assume you know a bit about linear algebra. But even if you don’t, no big deal. You can follow along and Google the unfamiliar bits as we go. Let’s get started.
Getting the Basics: Notations
In quantum mechanics, we use something called bra-ket notation (or Dirac notation) to write things out. It looks fancy, but it’s just a shorthand for talking about quantum state and operations. For example, take a look at this little equation:
\[i\hbar\frac{\partial}{\partial t}\ket{\psi} = \mathcal{H}\ket{\psi}\]Looks intimidating, right? Don’t worry; it’s not as bad as it seems. Let’s break down step by step.
- $i$: This is the imaginary unit. It’s defined as $\sqrt{-1}$. If you’re not familiar with imaginary numbers, just think of $i$ as a special kind of number used in quantum mechanics.
- $\hbar$: This is the reduced Planck constant, a tiny number about $1.05 \times 10^{-34} J\cdot s$. Don’t stress about it, just know it’s a constant that shows up a lot in quantum mechanics.
- $\frac{\partial}{\partial t}$: This means the partial derivative with respect to time. If you’re never heard of a partial derivative, that’s okay. For now, just think of it as a fancy way of describing how things change over time.
- $\ket{\psi}$: This is a quantum state vector (super important). In the classical world, everything has a state, like a cat being either alive or dead. A quantum state is similar but in a quantum way, represented as a vector. People often call it a quantum state or state vector for short.
- $\mathcal{H}$: This is a quantum operator (also super important). It’s like a function that does something to the quantum state.
Throughout this article, we’ll dive into these two super important terms and see how they help describe the world of quantum mechanics.
Quantum State Vector
Schrödinger’s Cat
Let’s dive deeper into the concept of a quantum state vector. Remember how I mentioned it’s like a state of a cat being alive or dead? That analogy comes straight from the famous Schrödinger’s cat thought experiment: the cat could be alive, dead or even in a strange in-between state where it’s simultaneously both. These states are represented as quantum state vectors.
Suppose there are two quantum state vectors: $\ket{\text{alive}}$ and $\ket{\text{dead}}$, which represent the cat being alive and dead, respectively. In classical terms, the cat can’t be alive and dead at the same time, which means these two states are orthogonal to each other–essentially, they’re perpendicular in the quantum world. This quantum world is represented mathematically as a Hilbert space (a fancy name for a space where quantum states live).
The vectors in this space can have complex numbers as their elements. Don’t worry if this sounds “complex”–complex numbers are just numbers with a real part and an imaginary part (like $1+i$). These complex elements play a crucial role in quantum mechanics, especially when we calculate probabilities or do operations like the conjugate transpose (more on that later).
Mathematically, we can write the states like this:
\[\ket{\text{alive}} = \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \quad \ket{\text{dead}} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}\]These two vectors are the basis vectors of the Hilbert space. Since this Hilbert space is two-dimensional, any quantum state in this space can be represented as a combination of these two basis vectors. If it helps, imagine a 2D plane where any point can be described $x$- and $y$-coordinates.
Bra and Ket Vectors
You might be wondering why we call this bra-ket notation. It’s because there are two types of vectors involved: ket vectors and bra vectors.
Ket vectors are the quantum state vectors we’ve been discussing, like $\ket{\text{alive}}$ or $\ket{\text{dead}}$.
Bra vectors are the conjugate transpose (denoted by $\dagger$) of ket vectors. They are written as $\bra{\text{alive}}$ or $\bra{\text{dead}}$. To get a bra vector, you flip the ket vector and take the complex conjugate of each element (note that the elements of the vectors are complex numbers).
Here’s how they look mathematically:
\[\begin{align*} \bra{\text{alive}} &\defeq \prths{\ket{\text{alive}}}^\dagger = \begin{pmatrix} 1 & 0 \end{pmatrix} \\ \bra{\text{dead}} &\defeq \prths{\ket{\text{dead}}}^\dagger = \begin{pmatrix} 0 & 1 \end{pmatrix} \end{align*}\]This notation allows us to write operations like inner products in a compact way:
\[\braket{\text{alive}}{\text{alive}} = \begin{pmatrix} 1 & 0 \end{pmatrix}\cdot\begin{pmatrix} 1 \\ 0 \end{pmatrix} = 1\]Similarly, outer products can be expressed like this:
\[\ket{\text{alive}}\bra{\text{alive}} = \begin{pmatrix} 1 \\ 0 \end{pmatrix}\begin{pmatrix} 1 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}\]Norm of a Vector
Note that, in general, the square root of inner product of a vector with itself is called the norm of the vector. For example, the norm of $\ket{\text{alive}}$ is:
\[\sqrt{\braket{\text{alive}}{\text{alive}}} = \sqrt{1} = 1\]The norm of a vector is crucial for normalization, as it tells us the magnitude of the vector. We’ll see how this is applied in the superposition section.
Any other way to represent quantum states?
Yes, there are other ways! For example, quantum states can be represented using wave functions. However, bra-ket notation is more common and much simpler when dealing with quantum algorithms, so we’ll stick with it for now.
Just for fun, here’s a rough idea of how wave functions work. You might see something like this:
\[\ket{\text{alive}} \rightarrow \cos x, \quad \ket{\text{dead}} \rightarrow \sin x\]These two functions are orthogonal, mathematically:
\[\int \cos x \sin x \, dx = 0\]This works similarly to how the inner product of orthogonal quantum states is zero.
Superposition
One of the coolest things about quantum mechanics is superposition. This is where Schrödinger’s cat can be in a state that is a mix of alive and dead at the same time.
Mathematically, we write this superposition state, say $\ket{\psi}$, as:
\[\ket{\psi} = \ket{\text{alive}} + \ket{\text{dead}} = \begin{pmatrix} 1 \\ 1 \end{pmatrix}\]To calculate a probability of the cat being in either state (alive or dead), we square the inner product of the state $\ket{\psi}$ with the basis states ($\ket{\text{alive}}$ and $\ket{\text{dead}}$):
\[\begin{align*} P(\text{alive}) &= \abs{\braket{\text{alive}}{\psi}}^2 = \abs{\begin{pmatrix} 1 & 0 \end{pmatrix}\cdot\begin{pmatrix} 1 \\ 1 \end{pmatrix}}^2 = \abs{1}^2 = 1 \\ P(\text{dead}) &= \abs{\braket{\text{dead}}{\psi}}^2 = \abs{\begin{pmatrix} 0 & 1 \end{pmatrix}\cdot\begin{pmatrix} 1 \\ 1 \end{pmatrix}}^2 = \abs{1}^2 = 1 \end{align*}\]However, there’s a problem: the sum of these probabilities is $1+1=2$, which violates the fundamental rule that probabilities must add up to 1. To fix this, we need to normalize the state vector. Normalization ensures that the total probability is $1$ by dividing the state vector by its magnitude ($\sqrt{\braket{\psi}{\psi}} = \sqrt{2}$ in this case):
\[\ket{\psi} = \pmatrix{1 \\ 1} \, \rightarrow \, \frac{1}{\sqrt{2}}\pmatrix{1 \\ 1}\]Now when we calculate the probabilities, they add up correctly:
\[\begin{align*} P(\text{alive}) &= \abs{\braket{\text{alive}}{\psi}}^2 = \abs{\begin{pmatrix} 1 & 0 \end{pmatrix}\cdot\frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 1 \end{pmatrix}}^2 = \abs{\frac{1}{\sqrt{2}}}^2 = \frac{1}{2} \\ P(\text{dead}) &= \abs{\braket{\text{dead}}{\psi}}^2 = \abs{\begin{pmatrix} 0 & 1 \end{pmatrix}\cdot\frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 1 \end{pmatrix}}^2 = \abs{\frac{1}{\sqrt{2}}}^2 = \frac{1}{2} \end{align*}\]With normalization, the cat is now equally likely to be alive or dead, and the total probability adds up to $1$, as it should.
Quantum Operators
Operators as Matrices
As mentioned earlier, quantum operators are like functions that act on quantum states. For readers familiar with linear algebra, these operators can be thought of as matrices acting on vectors.
For example, consider an operator $U$ that acts on the state $\ket{\text{alive}}$. This operator can be represented as a matrix, and its action is applied to the state vector using matrix multiplication:
\[U \ket{\text{alive}} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} a \\ c \end{pmatrix}\]This illustrates how operators transform quantum states into other vectors within the same Hilbert space.
Unitary Operators
Some quantum operators describe transitions between quantum states. For instance, an operator $U_\text{res}$ (“res” for resurrection) might act on a state $\ket{\text{dead}}$ and transform it into another quantum state, say $\ket{\text{alive}}$.
However, not all vectors resulting from such transformations are valid quantum states. To ensure $U_\text{res}\ket{\text{dead}}$ is a valid quantum state, it must satisfy the normalization condition. In other words, the operator $U$ must preserve the norm of the state vector. This requirement is satisfied when $U_\text{res}$ is a unitary operator.
A matrix $U$ is unitary if it satisfies the condition:
\[U^\dagger U = UU^\dagger = I,\]where $I$ is the identity matrix. This ensures that applying $U$ does not change the total probability of the quantum state.
Let’s verify that a unitary operator preserves normalization:
\[\begin{align*} \text{Norm}(U_\text{res}\ket{\text{dead}}) &= \sqrt{\bra{\text{dead}}U_\text{res}^\dagger U_\text{res}\ket{\text{dead}}} \\ &= \sqrt{\bra{\text{dead}}I\ket{\text{dead}}} \\ &= \sqrt{\braket{\text{dead}}{\text{dead}}} \\ &= 1 \end{align*}\]This shows that the norm of the state vector is preserved after applying the unitary operator.
Hermitian Operators
Another important class of operators, Hermitian operators corresponds to measurable physical quantities, such as energy or position. These operators, also called observables, produce real values when applied to quantum states—values we can interpret as measurements.
For example, consider an operator $\mathcal{H}_\text{lives}$ that measures the number of “lives” in a quantum state. When applied to $\ket{\text{alive}}$ or $\ket{\text{dead}}$, it assigns $1$ or $0$ lives, respectively:
\[\mathcal{H}_\text{lives} = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}.\]Hermitian operators satisfy the condition:
\[\mathcal{H}^\dagger = \mathcal{H}\]This guarantees that the eigenvalues of $\mathcal{H}$ (the measurable outcomes) are real, which is crucial since measurements in the physical world are real values.
Note: At this stage, you don’t need to worry about the details of eigenvalues and eigenvectors. Just remember that Hermitian operators are designed to ensure measurements correspond to real-world values.
To calculate the expected number of lives for a quantum state, we use the Hermitian operator $\mathcal{H}_\text{lives}$. Let’s see how this works for different states:
- For $\ket{\text{alive}}$:
- For $\ket{\text{dead}}$:
- For the superposition state $\ket{\psi} = \frac{1}{\sqrt{2}}\ket{\text{alive}} + \frac{1}{\sqrt{2}}\ket{\text{dead}}$:
The expected number of lives for the superposition state $\ket{\psi}$ is $0.5$, which makes sense because the cat is equally likely to be alive or dead.
Measurement
We can calculate the expected value of observables with Hermitian operators and quantum state vectors. But what actually happens when we measure an observable (e.g., opening a box containing a Schrödinger’s cat to measure the number of lives)?
When a quantum state is measured, the system collapses into one of its possible outcomes. In other words, the superposition state $\ket{\psi}$ collapses into a definite state, such as $\ket{\text{alive}}$ or $\ket{\text{dead}}$, with probabilities determined by the coefficients of the superposition.
For example, consider the quantum state:
\[\ket{\psi} = \frac{1}{\sqrt{2}}\ket{\text{alive}} + \frac{1}{\sqrt{2}}\ket{\text{dead}},\]If we measure this state:
- The probability of observing the cat alive is given by the square of the amplitude of $\ket{\text{alive}}$: \(P(\text{alive}) = \abs{\braket{\text{alive}}{\psi}}^2 = \abs{\frac{1}{\sqrt{2}}}^2 = \frac{1}{2}\)
- Similarly, the probability of observing the cat dead is: \(P(\text{dead}) = \abs{\braket{\text{dead}}{\psi}}^2 = \abs{\frac{1}{\sqrt{2}}}^2 = \frac{1}{2}\)
After the measurement, the quantum state collapses to the corresponding state of the measurement outcome:
- If the cat is observed alive, the quantum state collapses to $\ket{\text{alive}}$.
- If the cat is observed dead, the quantum state collapses to $\ket{\text{dead}}$.
Measurement and Hermitian Operators (Optional)
The result of a measurement corresponds to the eigenvalue of the Hermitian operator associated with the observable. The state of the system after measurement is corresponding eigenstate (or eigenvector).
To recap, in our example, the observable “number of lives” is represented by the Hermitian operator $\mathcal{H}_\text{lives}$:
\[\mathcal{H}_\text{lives} = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}.\]The eigenvalues of $\mathcal{H}_\text{lives}$ are $1$ and $0$, corresponding to the states $\ket{\text{alive}}$ and $\ket{\text{dead}}$, respectively. This is why Hermitian operators must have real eigenvalues—they represent possible measurement outcomes, which must be real-world values.
Note: If you’re unfamiliar with eigenvalues and eigenvectors, don’t worry about this part for now.
Recall: The Little Equation
Let’s revisit the little equation we started with:
\[i\hbar\frac{\partial}{\partial t}\ket{\psi} = \mathcal{H}\ket{\psi}\]In this equation, the operator $\mathcal{H}$ is a Hermitian operator that describes the energy of a quantum system. Now that we’ve unpacked some of its components, here’s what it’s really saying:
The rate of change of a quantum state $\ket{\psi}$ (that’s the $\frac{\partial}{\partial t}$) is proportional (by a constant $i\hbar$) to the Hermitian operator $\mathcal{H}$ acting on the state $\ket{\psi}$.
This equation is called Schrödinger’s equation, and it’s the foundation of quantum mechanics. It describes how quantum states evolve over time.
You don’t need to dive any deeper into the details right now, but it’s worth keeping in mind as we explore more about quantum states and operators.
Leave a comment