Scientia sine finibus

Linear Algebra / Unit 9, The Mathematics of Quantum Mechanics / Topic 9.1

Units and Topics

Unit 9. The Mathematics of Quantum Mechanics

9.1 Dirac Notation

Quantum mechanics writes vectors, inner products, and matrices in a notation that Paul Dirac introduced. This topic translates the notation of Unit 8 into Dirac notation. The topic contains no new mathematics. Each formula is one that you already know, written in a new way.

You need Topics 8.2, 8.3, and 8.5 for this topic.

1. Kets

In Dirac notation a vector is written |v⟩ and is called a ket. The symbol between the bar and the angle bracket is only a label. It can be a letter, a number, a word, or an arrow. The state of a quantum system is usually written |ψ⟩. In Cⁿ a ket is a column of n complex numbers.

|v⟩ = v₁v₂ |0⟩ = 10 |1⟩ = 01

The kets |0⟩ and |1⟩ are the standard basis of C². Kets are added and multiplied by numbers in the same way as columns, so a|u⟩ + b|v⟩ is a linear combination of two kets.

The label is a name and not a quantity. The ket |0⟩ is the first basis vector, and it is not the zero vector. In the same way, |2⟩ is not 2 times |1⟩.

This topic uses two more kets of C² many times.

|+⟩ = 1/√2 11 |−⟩ = 1/√2 1−1

2. Bras

Each ket |u⟩ has a partner ⟨u| that is called a bra. The bra is the conjugate transpose of the ket: it is a row, and its entries are the complex conjugates of the entries of the ket.

|u⟩ = 1 + i2 ⟨u| = |u⟩† = 1 − i2

The numbers in a linear combination are conjugated when a ket is turned into a bra. The bra of a|u⟩ + b|v⟩ is a*⟨u| + b*⟨v|.

3. Brackets

A bra times a ket is a row times a column, which is one number. The two bars are written as one, and the result is called a bracket.

⟨u|v⟩ = u₁*v₁ + u₂*v₂ + … + uₙ*vₙ

This is the inner product ⟨u, v⟩ of Topic 8.2, with the conjugates on the first vector. The words bra and ket are the two halves of the word bracket.

An example

Let |u⟩ = (1 + i, 2) and |v⟩ = (3, i). The bra ⟨u| has the entries 1 − i and 2.

⟨u|v⟩ = (1 − i)(3) + (2)(i)the entries of the bra times the entries of the ket⟨u|v⟩ = 3 − 3i + 2i = 3 − i

In the other order, the bra ⟨v| has the entries 3 and −i.

⟨v|u⟩ = (3)(1 + i) + (−i)(2)the entries of the bra ⟨v| times the entries of the ket |u⟩⟨v|u⟩ = 3 + 3i − 2i = 3 + i

The rules of the bracket

RuleMeaning
⟨v|u⟩ = ⟨u|v⟩*Exchanging the two vectors conjugates the bracket
⟨v|v⟩ is real and is not negativeIt is the square of the length of |v⟩, and it is zero only for the zero vector
⟨u|(a|v⟩ + b|w⟩) = a⟨u|v⟩ + b⟨u|w⟩The bracket is linear in the ket
⟨u|v⟩ = 0The two kets are orthogonal

A ket with ⟨v|v⟩ = 1 is called normalized. A ket that is not the zero vector is normalized by dividing it by its length √⟨v|v⟩.

4. Bases and Components

An orthonormal basis |1⟩, |2⟩, …, |n⟩ satisfies ⟨i|j⟩ = 1 when i = j and ⟨i|j⟩ = 0 when i ≠ j. These two cases are written with one symbol, the Kronecker delta δij, which is 1 when the two indexes are equal and 0 when they are different.

⟨i|j⟩ = δij

From Topic 8.2, the component of a vector along a basis vector is an inner product with the basis vector in the first place. In Dirac notation the component of |v⟩ along |i⟩ is the bracket ⟨i|v⟩.

|v⟩ = c₁|1⟩ + c₂|2⟩ + … + cₙ|n⟩ with ci = ⟨i|v⟩

The kets |+⟩ and |−⟩ are an orthonormal basis of C²: ⟨+|+⟩ = 1, ⟨−|−⟩ = 1, and ⟨+|−⟩ = (1/2)(1 − 1) = 0. The components of |v⟩ = (3, 1) in this basis are

⟨+|v⟩ = (3 + 1)/√2 = 2√2the component along |+⟩⟨−|v⟩ = (3 − 1)/√2 = √2the component along |−⟩

So |v⟩ = 2√2 |+⟩ + √2 |−⟩.

Try it: a bracket as a complex number

The ket is |v⟩ = cos(α/2)|0⟩ + eiφ sin(α/2)|1⟩, which has the length 1. The sliders set α and φ, and the menu chooses the ket |u⟩ of the bra. The last ket in the menu is |y⟩ = (|0⟩ + i|1⟩)/√2, the eigenket of σy for the eigenvalue 1. The green arrow shows the bracket ⟨u|v⟩ in the complex plane. The gray circle has the radius 1.

5. Operators

A matrix is called an operator in quantum mechanics. An operator A acts on a ket from the left, and the result A|v⟩ is another ket. The bra of the ket A|v⟩ is ⟨v|A†, because the conjugate transpose of a product reverses the order of the factors.

The expression ⟨u|A|v⟩ is the bra ⟨u| times the ket A|v⟩. It is a number, and it is the same as ⟨u, Av⟩ in the notation of Unit 8. Conjugating it gives

⟨u|A|v⟩* = ⟨v|A†|u⟩

For a Hermitian operator, A† = A, so ⟨v|A|v⟩ is equal to its own conjugate and is a real number. This is the result of Topic 8.3.

Matrix elements

For the kets of an orthonormal basis, the number ⟨i|A|j⟩ is the entry of the matrix A in row i and column j. The ket A|j⟩ is column j of the matrix, and the bra ⟨i| selects its entry in row i. The numbers ⟨i|A|j⟩ are called the matrix elements of A.

For example, σy|1⟩ is the second column of σy, which is (−i, 0). So ⟨0|σy|1⟩ = −i, the entry in row 1 and column 2.

Eigenvalue equations

Physicists often label an eigenvector with its eigenvalue. The equation A|a⟩ = a|a⟩ says that |a⟩ is an eigenket of A with the eigenvalue a. For example, σx|+⟩ = |+⟩ and σx|−⟩ = −|−⟩.

6. Outer Products

A ket times a bra is a column times a row, which is a matrix. It is called an outer product.

|0⟩⟨1| = 10 01a column times a row|0⟩⟨1| = 0100

The outer product |u⟩⟨v| acts on a ket |w⟩ in two steps. The bra and the ket close into a bracket, which is a number, and the number multiplies |u⟩.

(|u⟩⟨v|) |w⟩ = |u⟩ ⟨v|w⟩the bra and the ket close into a number(|u⟩⟨v|) |w⟩ = ⟨v|w⟩ |u⟩a number can be written in front

The conjugate transpose of |u⟩⟨v| is |v⟩⟨u|. Topic 9.2 studies the outer product |u⟩⟨u| of a ket with its own bra, which is the projection matrix uu† of Topic 8.5.

How to read an expression. A bra followed by a ket closes into a number. A ket followed by a bra is an operator. An operator followed by a ket is a ket, and a bra followed by an operator is a bra. To take the conjugate transpose of any expression, reverse the order of the factors, conjugate the numbers, exchange kets and bras, and replace each operator by its conjugate transpose.

7. A Dictionary

Unit 8Dirac notationKind of object
v|v⟩Column
u†⟨u|Row
⟨u, v⟩⟨u|v⟩Number
AvA|v⟩Column
⟨u, Av⟩⟨u|A|v⟩Number
uv†|u⟩⟨v|Matrix
(Av)† = v†A†⟨v|A†Row

Common Mistakes

  • Reading |0⟩ as the zero vector. The 0 is a label, and |0⟩ has the length 1.
  • Copying the entries of a ket into its bra without conjugating them.
  • Writing ⟨u|v⟩ = ⟨v|u⟩. The two brackets are complex conjugates of each other.
  • Treating |u⟩⟨v| as a number. A ket followed by a bra is a matrix.
  • Writing the bra of A|v⟩ as ⟨v|A. The operator becomes A†.
  • Writing an operator to the right of a ket. An operator acts on a ket from the left.

Summary

ObjectStatement
Ket|v⟩ is a column vector
Bra⟨v| = |v⟩†, a row with conjugated entries
Bracket⟨u|v⟩ is the inner product, and ⟨v|u⟩ = ⟨u|v⟩*
Orthonormal basis⟨i|j⟩ = δij, and the component of |v⟩ along |i⟩ is ⟨i|v⟩
Matrix element⟨i|A|j⟩ is the entry of A in row i and column j
Outer product|u⟩⟨v| is a matrix, and (|u⟩⟨v|)|w⟩ = ⟨v|w⟩|u⟩

Practice

Work each problem on paper first. Then open the answer to check your work.

1. Let |u⟩ = (2, i) and |v⟩ = (1 − i, 3). Write the bra ⟨u| and calculate ⟨u|v⟩.

The bra ⟨u| is the row with the entries 2 and −i.

⟨u|v⟩ = (2)(1 − i) + (−i)(3)⟨u|v⟩ = 2 − 2i − 3i = 2 − 5i

2. For the kets of Problem 1, find ⟨v|u⟩ without a new calculation.

⟨v|u⟩ is the conjugate of ⟨u|v⟩, so ⟨v|u⟩ = 2 + 5i.

3. Normalize the ket |w⟩ = (3, 4i).

⟨w|w⟩ = (3)(3) + (−4i)(4i) = 9 + 16 = 25length = √25 = 5normalized ket = (3/5, 4i/5)

4. Write the outer product |+⟩⟨−| as a matrix.

|+⟩ is the column (1, 1)/√2, and ⟨−| is the row (1, −1)/√2.

|+⟩⟨−| = (1/2) 1−11−1.

5. Calculate ⟨+|σz|+⟩ and ⟨+|σz|−⟩.

σz changes the sign of the second component, so σz|+⟩ = |−⟩ and σz|−⟩ = |+⟩.

⟨+|σz|+⟩ = ⟨+|−⟩ = 0, and ⟨+|σz|−⟩ = ⟨+|+⟩ = 1.

6. Simplify the product of the two outer products |u⟩⟨v| and |w⟩⟨x|.

The bra ⟨v| and the ket |w⟩ in the middle close into the number ⟨v|w⟩.

(|u⟩⟨v|)(|w⟩⟨x|) = ⟨v|w⟩ |u⟩⟨x|, which is a number times an outer product.

Python Practice

Step 1. A ket as a column

Until now, the code of this course stored a vector as a list of numbers in one pair of square brackets. To follow Dirac notation exactly, the code below stores a ket as a matrix with one column. Each entry is placed in its own pair of square brackets, so each entry is a row of the matrix. The property shape gives the number of rows and the number of columns.

Python

The shape is (2, 1): two rows and one column.

Step 2. The bra of a ket

The bra is the conjugate transpose of the ket. Topic 8.2 introduced the expression .conj().T for it.

Python

The bra is a row with the entries 1 − i and 2, and its shape is (1, 2). Now change the ket to |v⟩ = (3, i) and run the code again. The bra should have the entries 3 and −i.

Python

Step 3. A bracket

A bra times a ket is a matrix product, which is typed with the @ sign. The result is a matrix with one row and one column. The expression [0, 0] takes the single number out of it. The code below calculates ⟨u|v⟩ for the example of Part 3.

Python

The result is 3 − i, written as (3-1j). Now calculate the bracket in the other order, ⟨v|u⟩. The result should be the conjugate, 3 + i.

Python

Step 4. An outer product

A ket times a bra is also typed with the @ sign. The result is a square matrix. The code below builds |0⟩⟨1|.

Python

The result has the rows 0, 1 and 0, 0, as in Part 6. Now build the outer product |+⟩⟨−| of Practice Problem 4. The two kets are already defined in the code.

Python

Step 5. A matrix element

The number ⟨u|A|v⟩ is a product of three factors: a bra, a matrix, and a ket. The code below calculates ⟨0|σy|1⟩.

Python

The result is −i, the entry of σy in row 1 and column 2. Python prints it as -1j. Now calculate ⟨+|σz|−⟩ of Practice Problem 5. The result should be 1.

Python

The topics that follow store a ket as a list in one pair of square brackets again, as in Unit 8, because the code is shorter. The instruction np.vdot(u, v) then calculates the bracket ⟨u|v⟩, and np.outer(u, v.conj()) calculates the outer product |u⟩⟨v|.

Quiz

This quiz has 5 questions on this topic. A question asks you either to choose one answer or to type numbers. The page grades your answers and explains each one. A number can be typed as a whole number, a decimal, a fraction such as 1/3, or a calculation such as sqrt(18)/2 or arccos(1/2). The page shows the value of a calculation next to the box. Angles in a calculation are in degrees. The Calculator button under each question opens a calculator. Your answers are saved in your browser, so they are still on the page when you come back to it.

Choose how your answers are checked

1. Which of these expressions is a number?

2. Let |u⟩ = (1, i) and |v⟩ = (2, 1 + i). Calculate the bracket ⟨u|v⟩.

3. Which expression is the bra of the ket A|v⟩?

4. For two kets, ⟨u|v⟩ = 2 − 3i. Find ⟨v|u⟩.

5. Find the length of the ket (3, 4i).

Next: Topic 9.2, Projection Operators and the Completeness Relation