Quantum Mechanics Crash Course (Part 2): Mathematical Formalism

Author: Julie Butler

Date Created: August 19, 2024

Last Modified: August 19, 2024

Back to course page.

Mathematical Methods for Quantum Mechanics

There are two methods (different formalism) to perform calculations in quantum mechanics. The first is called wave mechanics, so called because we describe particles using a wavefunction. In wave mechanics, the wavefunctions are, well, functions. They have to have some special properties but they are just exponential or trigonometric functions that describe everything we need to know about a particle. And most of the functions, at least those you will encounter at an undergraduate level, are quite simple. Operators in this formalism are differential equations that the wavefunction is inserted into and observables are found by solving these differential equations, usually through integration. If you take Modern and Medical Physics here at UMU this is the formalism of quantum mechanics you will use exclusively. If you take Quantum Mechanics at UMU you will mostly be using wave mechanics.

The second formalism is called matrix mechanics, so called because it is entirely linear algebra based. Wavefunctions are represented by vectors, operators are represented by matrices, and obervables are calculated through matrix-vector multiplication. This is the formalism that is used in the rest of the Quantum Mechanics course and is exclusively what we will be using in this course.

The two formalisms of quantum mechanics are equivalent (this can be mathematically proven) BUT one of the formalisms is typically easier in a given circumstance. The reason we use wave mechanics in introductions quantum mechanics courses is that the mathematics is relatively easy, not repetitive, and does not take too long (usually). With matrix mechanics the vector and matrices can be quite large, meaning that solving the problems by hand can be long and tedious. However, computers excel at linear algebra, making matrix mechanics the preferred method for performing quantum mechanical calculations through programming.

Wavefunctions (Quantum Mechanical States) Are Vectors

In matrix mechanics wavefunctions, or quantum mechanical states, are represented by vectors using the bra-ket notation: \(|\psi\rangle\). Note that we will usually, but not always represent states with Greek letters. Sometimes we will use numbers (\(|0\rangle\) and \(|1\rangle\) are used a lot later in these notes) and sometimes we will use symbols (\(|\uparrow\rangle\) and \(|\downarrow\rangle\) were used in Lecture 3).

Vectors that we use to represent quantum mechanical states must be normalized before we can use them in calculations. Normalized means that the vectors must have a magnitude of 1. Using our bra-ket notation developed last week:

\[\sqrt{\langle \psi | \psi \rangle} = 1.\]

Remember that \(\langle\psi|\psi\rangle\) represented an inner product (also known as a scalar product or a dot product). Please review the notes from last week if you need a refresher.

Example: For each of the states: (a) find the corresponding bra vector, (b) normalize the state if it us not already normalized. \[|\alpha\rangle = \begin{bmatrix}i \\ 0 \end{bmatrix}\] \[|\psi\rangle = \begin{bmatrix} 3 \\ 4 \end{bmatrix}\]

Answer:

For the first state:

  1. The bra vector for the \(|\alpha\rangle\) ket is \(\langle\alpha |\) and it is found by converting the column vector to a row vector and taking the complex conjugate of each of the elements of the vector. \[\langle\alpha | = \begin{bmatrix} i^* & 0^* \end{bmatrix} = \begin{bmatrix} -i & 0 \end{bmatrix} \]
  2. To determine if the vector is normalized, we need to find the magnitude: \[\sqrt{\langle \alpha | \alpha \rangle} = \sqrt{\begin{bmatrix}-i & 0 \end{bmatrix}\begin{bmatrix}i \\ 0 \end{bmatrix}} = \sqrt{-i(i) + 0(0)} = \sqrt{-(-1)} = \sqrt{1} = 1\] So the vector is already normalized and we do not need to do anything else.

For the second state:

  1. Since \(|\psi\rangle\) is made of all real numbers we do not need to worry about the complex conjugates. Thus, we just need to convert the column vector into a row vector.

\[\langle \psi | = \begin{bmatrix} 3 & 4 \end{bmatrix}\]

  1. To determine if the vector is normalized, we need to find the magnitude: \[\sqrt{\langle\psi | \psi\rangle} = \sqrt{\begin{bmatrix} 3 & 4 \end{bmatrix}\begin{bmatrix} 3 \\ 4 \end{bmatrix}} = \sqrt{3^2 + 4^2} = \sqrt{25} = 5\]

Since the magnitude of the vector is not 1 then the state is not normalized. Normalizing the state is easy, simply divide each element of the vector by the magnitude of the vector. Due to reasons that we will discuss later, multiplying or dividing a state by a constant does not change how it will work in quantum mechanical states. So the normalized form of \(|\psi\rangle\) is:

\[|\psi\rangle = \begin{bmatrix} 3/5 \\ 4/5 \end{bmatrix}\]

Computational Basis States

For vectors of length n, the computational basis states are a set of n vectors of length n that can be used to construct all other possible vectors. These vectors are called computational basis states in quantum mechanics because they can be used to create all other quantum mechanical states.

Example: For vectors of length 2 one possible computational basis is \(|0\rangle = \begin{bmatrix} 1 \\ 0 \end{bmatrix}\) and \(|1\rangle = \begin{bmatrix} 0 \\ 1 \end{bmatrix}\). You will explore this basis in HW1 but note that this is not the only possible basis for vectors of length 2.

A set of computational basis states must have two properties. First, every pair of states in the basis must be orthogonal. This means that if \(|i\rangle\) and \(|j\rangle\) states in a basis then \(\langle i | j \rangle = \langle j | i \rangle = 0\). Geometrically this means that the vectors are perpendicular to each other (they form right angles). Physically, this means that the system can be either in state \(|i\rangle\) or in state \(|j\rangle\), but it cannot be in both. Remember on Friday when we discussed wavefunctions collapsing upon measurement into only one state. This is why orthogonality is important. Second, all states in a basis must be normalized, meaning that \(\langle i | i \rangle = 1\) (since \(\sqrt{1} = 1\)). The physical reason for is to ensure that probabilities for a measurement never add up to more than 1. In HW1 you will prove both of these properties for the length 2 basis defined above.

Note that there can also be a computational basis for matrices as well. We will encounter an example of this later.

Create Any State with a Basis and Superposition

With a given computational basis, you can create any quantum mechanical state (of the same length as the basis states) through superposition.

Example: Consider the normalized version of \(|\psi\rangle\) we had above and the length 2 basis defined in the previous section. \[|\psi\rangle = \begin{bmatrix} 3/5 \\ 4/5 \end{bmatrix} = \begin{bmatrix} 3/5 \\ 0 \end{bmatrix} + \begin{bmatrix} 0 \\ 4/5 \end{bmatrix} = \frac{3}{5}\begin{bmatrix}1 \\ 0 \end{bmatrix} + \frac{4}{5}\begin{bmatrix} 0 \\ 1 \end{bmatrix} = \frac{3}{5}|0\rangle + \frac{4}{5}|1\rangle\]

So our state \(|\psi\rangle\) is actually a superposition of the states \(|0\rangle\) and \(|1\rangle\). Note that the coefficients of the basis states follow the rules of probability we developed on Friday (\(P(|0\rangle) = |\frac{3}{5}|^2\), \(P(|1\rangle) = |\frac{4}{5}|^2\), \(|\frac{3}{5}|^2 + |\frac{4}{5}|^2 = 1\)). This will automatically apply as long as you are always using normalized quantum mechanical states.

Based on our discussions on Friday, when \(|\psi\rangle\) is measured we will either get a result that corresponds to the state \(|0\rangle\) (with a probability of \(\frac{3}{5}\)) or we will get a result that corresponds to the state \(|1\rangle\) (with a probability of \(\frac{4}{5}\)). These are the only possible outcomes. You will not measure a result that corresponds to another state (because other states are not in the superposition) nor will you get a result that is a combination of the two states (\(|0\rangle\) and \(|1\rangle\) are orthogonal and thus mutually exclusive).

Operators are Hermitian Matrices

Operators, which are used to mathematically represent measuring a system, are represented by Hermitian, square matrices. The width and height of the matrix must be the same as the length of the quantum mechanical states being measured (for example, to measure a property of the above \(|\psi\rangle\) you need to use a 2x2 matrix). The matrices must be Hermitian, meaning that the matrix is equal to its adjoint, which is its complex conjugate transposed:

\[A^\dagger = (A^*)^T = A\]

The fact that operators are Hermitian is important because Hermitian matrices have real eigenvalues, a fact that will be important in the next section.

Example: \(S_z\) measures the spin in the z-direction of a particle. The matrix is generally left in terms of \(\hbar\), which is a constant known as Planck’s constant. \(S_z\) can be applied to any quantum mechanical state of length 2 to determine the z spin of the particle. \[S_z = \frac{\hbar}{2}\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}\]

Observables, the outcomes of measurements, are determined through expectation values. From Friday’s notes we know that we can represent the expectation value for the spin in the z-direction as \(\langle S_z \rangle\), but this is actually shorthand for a slightly longer bra-ket notation. Using the state \(|\psi\rangle\) from above we can represent its expected spin in the z-direction as \(\langle\psi|S_z|\psi\rangle\), which is simply a vector, multiplied by a matrix, multiplied by a vector. Let’s do the calculation:

\[\langle\psi|S_z|\psi\rangle = \begin{bmatrix} 3/5 & 4/5 \end{bmatrix}\frac{\hbar}{2}\begin{bmatrix}1 & 0 \\ 0 & -1 \end{bmatrix}\begin{bmatrix} 3/5 \\ 4/5\end{bmatrix} = \frac{\hbar}{2}\begin{bmatrix} 3/5 & 4/5 \end{bmatrix}\begin{bmatrix}1 & 0 \\ 0 & -1 \end{bmatrix}\begin{bmatrix} 3/5 \\ 4/5\end{bmatrix} = \frac{\hbar}{2}\begin{bmatrix} 3/5 & 4/5 \end{bmatrix}\begin{bmatrix}3/5 \\ -4/5 \end{bmatrix} = \frac{\hbar}{2}\frac{-7}{25} = \frac{-7\hbar}{50}\]

Obervables are Eigenvalues of the Operator

Given a matrix which describes a certain measurement of a system, there are only a finite number of observables that can be returned, i.e. there are only certain values that can be measured. For example, considering the spin in the z-direction, represented by the matrix S\(_z\), the only possible measurements are spin up (\(+\frac{\hbar}{2}\)) or spin down (\(-\frac{\hbar}{2}\)). It turns out that these possible observables are the eigenvalues of the operator matrix!

Example: Consider the operators \(S_x\), \(S_y\), and \(S_z\), which measure the spin of a particle in the x-direction, y-direction, and z-direction respectfully. These operators are defined as:

\[S_x = \frac{\hbar}{2}\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \quad S_y = \frac{\hbar}{2}\begin{bmatrix} 0 & -i \\ i & 0 \end{bmatrix} \quad S_z = \frac{\hbar}{2}\begin{bmatrix}1 & 0 \\ 0 & -1 \end{bmatrix}\]

Each matrix has the same eigenvalues, \(\pm\frac{\hbar}{2}\), corresponding to spin-up and spin-down in each of the three directions. These are the only possible outcomes when measuring the spin of a particle. Note that since \(S_x\), \(S_y\), and \(S_z\) are Hermitian, they have real eigenvalues. This is important if the eigenvalues are to represent real measurements that can be made on the system.

Note that the expectation value of a system may be different than the eigenvalues of the operator (see the example in the previous section) because the expectation value is an average measurement, but a representation of a real result.

Secondly, note that the spin matrices (\(S_x\), \(S_y\), and \(S_z\)) without the factor of \(\frac{\hbar}{2}\) form the so called Pauli matrices, denoted as \(\sigma_x\), \(\sigma_y\), and \(\sigma_z\), which are a computational basis for all 2x2 matrices. These three matrices will appear many times throughout this course.

The Role of Eigenvectors

If you measure a system and get an observables (one of the eigenvalues of the operator matrix) then you know that the system has collapsed into the state represented by the corresponding eigenvector. Remember that eigenvalues and eigenvectors come in pairs. For a matrix, A, an eigenvalue-eigenvector pair is the solution to this equation: \[A\vec{x} = \lambda\vec{x} \longrightarrow A\vec{x} - \lambda\vec{x} = 0,\]

where \(\vec{x}\) represents the eigenvector and \(\lambda\) represents the eigenvalue.

Example: Consider the operator to determine the spin of a particle in the z-direction: \[S_z = \frac{\hbar}{2}\begin{bmatrix}1 & 0\\ 0 & -1\end{bmatrix}\] It has two eigenvalues: \(\pm\frac{\hbar}{2}\). The positive eigenvalue corresponds to the eigenvector \(|0\rangle = \begin{bmatrix}1 \\ 0 \end{bmatrix}\) and the negative eigenvalue corresponds to the eigenvector \(|1\rangle = \begin{bmatrix}0\\1\end{bmatrix}\).If you measure the spin in the z direction and get \(+\frac{\hbar}{2}\) as your observable, then you can be certain you collapsed your state into \(|0\rangle\).

Outer Products

An outer product takes two vectors and creates a matrix (this is in opposition to an inner product (scalar or dot product) which takes two vectors and creates a scalar). Consider the following two vectors of length 3: \[|x\rangle = \begin{bmatrix}x_0 \\ x_1 \\ x_2 \end{bmatrix} \quad |y\rangle = \begin{bmatrix} y_0 \\ y_1 \\ y_2 \end{bmatrix}\] The outer product between these two vectors, represented as \(|x\rangle\langle y|\) is \[|x\rangle\langle y| = \begin{bmatrix} x_0y_0^* & x_0y_1^* & x_0y_2^* \\ x_1y_0^* & x_1y_1^* & x_1y_2^* \\ x_2y_0^* & x_2y_1^* & x_2y_2^* \end{bmatrix}\]

We will not use outer products very much in this class, but they do have one important application and that is to projection operators.

Projection Operators

A useful application of the outer product is in the construction of projection operators. Consider the computational basis states for vectors of length 2 defined in previous slides. We can construct the following projection operators, typically denoted as \(\hat{P}\) and \(\hat{Q}\): \[\hat{P} = |0\rangle\langle 0 | = \begin{bmatrix}1 & 0 \\ 0 & 0 \end{bmatrix} \quad \hat{Q} = |1\rangle\langle 1 | = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}\] The projection operator projects out a specific component of a of a state related to the basis state that was used to the projection operator.

Example: Using \(|\psi\rangle\) define previously, find \(\hat{P}|\psi\rangle\) and \(\hat{Q}|\psi\rangle\).

Answer: \[\hat{P}|\psi\rangle = \begin{bmatrix}1 & 0 \\ 0 & 0 \end{bmatrix}\begin{bmatrix}3/5 \\ 4/5 \end{bmatrix} = \begin{bmatrix} 3/5 \\ 0 \end{bmatrix}\] This is the component of \(|\psi\rangle\) which corresponds to the basis state \(|0\rangle\), it was extracted by the projection operator

\[\hat{Q}|\psi\rangle = \begin{bmatrix}0 & 0 \\ 0 & 1 \end{bmatrix}\begin{bmatrix}3/5 \\ 4/5 \end{bmatrix} = \begin{bmatrix} 0 \\ 4/5 \end{bmatrix}\]

Further Generalizations to Extract Probabilities

Consider a generic state \(|\psi_0\rangle = \begin{bmatrix}c_0\\c_1\end{bmatrix}\): \[\hat{P}|\psi_0\rangle = \hat{P}\begin{bmatrix}c_0 \\ c_1 \end{bmatrix} = \hat{P}(\begin{bmatrix}c_0 \\ 0\end{bmatrix} + \begin{bmatrix}0\\c_1\end{bmatrix})\] \[\quad = \hat{P}(c_0\begin{bmatrix}1\\0\end{bmatrix} + c_1\begin{bmatrix}0\\1\end{bmatrix}) = \hat{P}(c_0|0\rangle + c_1|1\rangle) \] \[\quad = c_0\hat{P}|0\rangle + c_1\hat{P}\rangle = c_0\hat{P}|0\rangle = c_0|0\rangle\]

Now consider that \[\langle 0 | \hat{P} | \psi_0 \rangle = \langle 0 | c_0 |0\rangle = c_0 \langle 0 | 0 \rangle = c_0\] and \[\langle 0 | \hat{P} | \psi_0 \rangle = \langle 0 | 0 \rangle \langle 0 | \psi_0 = \langle 0 | \psi_0 \rangle = c_0\]

Also, note that P(\(|0\rangle\)) = \(|c_0|^2\). This by creating an inner product with our state and a computational basis state, we determined the probability that our state would collapse into that basis state upon measurement.

The probability of obtaining an observable corresponding to basis state \(|i\rangle\) when measuring \(|\psi\rangle\) is \(|\langle i | \psi \rangle|^2\).

Time Independent Schrodinger’s Equation

An important equation in quantum mechanics is known as the time-independent Schrodinger’s equation which gives the energy of a system, E, using the Hamiltonian operator, H. \[\hat{H}|\psi\rangle = E|\psi\rangle\]

Note that the time-independent Schrodinger’s equation is an eigenvalue problem, where the energy of the system is an eigenvalue of the Hamiltonian operator and the state is an eigenvector of the Hamiltonian.

An important consequence of Schrodinger’s equation is that if \(|\psi\rangle\) is a solution then so is \(a|\psi\rangle\) is a is a complex constant. Normalizing a state does not change the system. Always normalize states before using them!

Entanglement is Represented as a Tensor Product

Entanglement between two states is represented with a tensor product, which will result in a vector longer than the vectors of the entangled states. Consider the two states: \[|x\rangle = \begin{bmatrix}x_0 \\ x_1 \end{bmatrix} \quad |y\rangle = \begin{bmatrix}y_0 \\ y_1 \end{bmatrix}\]

If \(|x\rangle\) and \(|y\rangle\) become entangled, then we can represent the entangled state as the tensor product between the two states: \[|x\rangle \otimes |y\rangle = \begin{bmatrix} x_0y_0 \\ x_oy_1 \\ x_1y_0 \\ x_1y_1 \end{bmatrix}\]

Note that order is important for calculating tensor products. These will become more important as we learn about qubits next week.

Example 1

You may solve the following example by hand or use an online linear algebra calculator like Wolfram Alpha.

Consider a three-dimensional vector space spanned by an orthonormal basis \(|1\rangle\), \(|2\rangle\), and \(|3\rangle\). States \(|\alpha\rangle\) and \(|\beta\rangle\) are given by:

\[|\alpha\rangle = i|1\rangle - 2|2\rangle - i |3\rangle, \quad |\beta\rangle = i|1\rangle + 2|3\rangle\]

  • Construct \(\langle\alpha|\) and \(\langle\beta|\) in terms of \(\langle 1|\), \(\langle 2|\), and \(\langle 3|\).
  • Find \(\langle\alpha|\beta\rangle\) and \(\langle\beta|\alpha\rangle\) and confirm that \(\langle\beta|\alpha\rangle = \langle\alpha|\beta\rangle^*\). Hints: What property should the coefficients of \(|\alpha\rangle\) and \(|\beta\rangle\) have before you start this problem? You do not need to know \(|1\rangle\), \(|2\rangle\), or \(|3\rangle\) but you do need to know the properties of an orthonormal basis.

Answers will be posted after class.

Example 2

You may solve the following example by hand or use an online linear algebra calculator like Wolfram Alpha.

The Hamiltonian for a certain three-level system is represented by the matrix \[H = \hbar\omega\begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 2 \end{bmatrix}.\] Two other observables, A and B, are represented by the matrices \[A = \lambda\begin{bmatrix}0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 2 \end{bmatrix} \quad B = \mu\begin{bmatrix} 2 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0\end{bmatrix},\] where \(\omega\), \(\lambda\), and \(\mu\) are positive, real numbers.

  • What are the possible energies of this three-level system. Consider the following state: \[|\psi\rangle = a\begin{bmatrix}-i \\ 3 \\ 2i\end{bmatrix}.\]
  • Find a (i.e. normalize the state).
  • Compute \(\langle \psi | A | \psi \rangle\) and \(\langle \psi | B | \psi \rangle\). Are these numbers observables or averages?
  • What is the probability that, when measuring the energy of \(|\psi\rangle\), you obtain \(\hbar\omega\)?

Answers will be posted after class.

Example 3

You may solve the following example by hand or use an online linear algebra calculator like Wolfram Alpha.

Suppose a particle is in the state \[|\psi\rangle = \frac{1}{\sqrt{6}}\begin{bmatrix}1+i\\2\end{bmatrix}\] What are the probabilities of getting \(+\frac{\hbar}{2}\) and \(-\frac{\hbar}{2}\), if you measure \(S_z\) and \(S_x\)?

Answers will be posted after class.

Example 4

You may solve the following example by hand or use an online linear algebra calculator like Wolfram Alpha

An electron is in the state \[|\psi\rangle = A\begin{bmatrix}3i\\4\end{bmatrix}\]

  • Determine the normalization constant A.
  • Find the expectation values of \(S_x\), \(S_y\), and \(S_z\).

Answers will be posted after class.