Narration / Transcript
Quantum Information Processing: Foundations - Part 2
This is what the narrator says, not what the page shows: equations are read as sentences, code blocks are described, and citations are spoken as citations.
- 0:00
Introduction
- 0:02
Previously, we had a brief introduction to the idea of geometrically visualizing a q u b i t 's quantum state in a 3D sphere called the Bloch Sphere, see Bloch, 1946 — named after Felix Bloch, the Swiss-American physicist. Being able to represent an arbitrary q u b i t state in space visually simplifies its complexity, and the Bloch Sphere does this. We will go a bit mathematical (with a touch of physics) in this part, primarily to bring into perspective how some expressions came about. Then, we'll pick some problems in, see Rieffel and Polak, 2014 and work through solving them step-by-step to solidify our understanding better.
- 0:37
Prerequisite
- 0:39
Quantum computing relies on mathematical (and, briefly in this article, physics) principles, but you can learn the essentials without being a math whiz. A working knowledge of high school math will equip you to understand the applications and fundamental ideas. Familiarity with the Python programming language will help you understand qiskit and/or cirq code.
- 1:02
Qubit Visualization on the Bloch sphere
- 1:05
Consider the Bloch sphere below:
- 1:08
where:
- 1:09
ket 0 represents the z -axis;
- 1:13
ket plus is the x -axis;
- 1:15
ket i depicts the y -axis;
- 1:18
ket psi is an arbitrary state on the sphere;
- 1:21
theta is the angle the state makes with z -axis; and
- 1:26
phi, the azimuthal angle, is the angle that the state's projection makes with the x -axis.
- 1:32
This arbitrary state can be expressed, verbosely, using the state function: Equation: ket psi equals e to the power i gamma (cos of theta over 2 ket 0 plus e to the power i phi sin of theta over 2 ket 1).
- 1:48
However, e raised to the i gamma power, regarded as a global phase, does not pose observable effects to the measurement obtained with or without its presence, see Glendinning, 2005. This is because when a unitary operator, say U, operates on ket psi, its k e t -side remains unchanged whereas its b r a -side negates it (due to complex conjugation), which effectively eliminates e raised to the i gamma power, see UV Physics., 2023: Equation: the inner product of e to the power i gamma psi and U equals e to the power i gamma times e to the power minus i gamma the inner product of psi and U equals the inner product of psi and U.
- 2:32
Effectively, the Bloch state function can be simplified to: Equation: equation ket psi equals cos of theta over 2 ket 0 plus e to the power i phi sin of theta over 2 ket 1.
- 2:46
How did they come about (1)? A curious mind would like to know. The following subsection unravels it! Note: Physics Territory
- 2:54
We are delving into some concepts in Physics, such as Spin Angular Momentum. Reader's discretion is advised.
- 3:02
Derivation of Bloch Sphere state function
- 3:05
I will skip some details here for brevity. If you need a more detailed coverage and preliminaries, I recommend taking a look at, see UV Physics., 2023 and Zettili, 2009.
- 3:18
Recall that the cartesian coordinates (x, y, z) of a position vector r right arrow relate to its polar coordinates (r, theta, phi) in the following fashion, see Zettili, 2009: Equation: 1 lines Line 1: blank x equals r sine theta cosine phi comma y equals r sine theta sine phi comma z equals r cosine theta blank blank.
- 3:43
Now, for a u n i t position vector n hat (shown in the diagram above), these coordinates become: Equation: 1 lines Line 1: blank x equals sine theta cosine phi comma y equals sine theta sine phi comma z equals cosine theta blank blank.
- 4:01
since r equals 1 (hence the word u n i t).
- 4:05
Measuring the angular spin operator S right arrow in n hat direction produces an operator, say A hat which is: Equation: 1 lines Line 1: blank A hat equals S right arrow times n hat equals S sub x times n sub x plus S sub y times n sub y plus S sub z times n sub z blank blank.
- 4:27
From, see Zettili, 2009, the Pauli matrice — sigma sub x comma sigma sub y comma sigma sub z — are defined as: Equation: 1 lines Line 1: blank sigma sub x equals the 2 by 2 matrix Row 1: 0 1 Row 2: 1 0 comma sigma sub y equals the 2 by 2 matrix Row 1: 0 negative i Row 2: i 0 comma sigma sub z equals the 2 by 2 matrix Row 1: 1 0 Row 2: 0 negative 1 blank blank.
- 4:54
For a spin- one half particle, the spin operators are 2x2 matrices which relate to Pauli matrices by normal h bar over 2 so that: Equation: 1 lines Line 1: blank S sub x equals normal h bar over 2 times sigma sub x comma S sub y equals normal h bar over 2 times sigma sub y comma S sub z equals normal h bar over 2 times sigma sub z blank blank.
- 5:20
where normal h bar is the reduced Plank constant equalling h over 2 pi.
- 5:26
Substituting (p2), (p4) and (p5) into (p3), we have: Equation: 3 lines Line 1: A hat equals the set normal h bar over 2 times the 2 by 2 matrix Row 1: 0 1 Row 2: 1 0 times sine theta cosine phi Line 2: blank positive the set normal h bar over 2 times the 2 by 2 matrix Row 1: 0 negative i Row 2: i 0 times sine theta sine phi Line 3: blank positive the set normal h bar over 2 times the 2 by 2 matrix Row 1: 1 0 Row 2: 0 negative 1 times cosine theta. Equation: A hat equals normal h bar over 2 times open bracket the 2 by 2 matrix Row 1: Column 1, 0 Column 2, sine theta cosine phi Row 2: Column 1, sine theta cosine phi Column 2, 0 plus the 2 by 2 matrix Row 1: Column 1, 0 Column 2, negative i sine theta sine phi Row 2: Column 1, i sine theta sine phi Column 2, 0 plus the 2 by 2 matrix Row 1: Column 1, cosine theta Column 2, 0 Row 2: Column 1, 0 Column 2, negative cosine theta close bracket.
- 6:21
When the matrices are added, we have: Equation: 3 lines Line 1: A hat equals normal h bar over 2 times the 2 by 2 matrix Row 1: Column 1, cosine theta Column 2, sine theta cosine phi minus i sine theta sine phi Row 2: Column 1, sine theta cosine phi plus i sine theta sine phi Column 2, negative cosine theta Line 2: blank equals normal h bar over 2 times the 2 by 2 matrix Row 1: Column 1, cosine theta Column 2, the sine of theta times open paren cosine phi minus i sine phi close paren Row 2: Column 1, the sine of theta times open paren cosine phi plus i sine phi close paren Column 2, negative cosine theta Line 3: blank equals normal h bar over 2 times the 2 by 2 matrix Row 1: Column 1, cosine theta Column 2, e raised to the negative i phi power sine theta Row 2: Column 1, e raised to the i phi power sine theta Column 2, negative cosine theta comma Since e raised to the i phi power equals cosine phi plus i sine phi.
- 6:49
Now, we need to obtain the eigenvector of this since its eigenvalue, lamda, is plus or minus normal h bar over 2, see UV Physics., 2023 and Zettili, 2009 (this value remains the same irrespective of direction). To do this, we use the eigenvalue equation, see Zettili, 2009: Equation: A hat psi sub plus or minus equals lamda psi sub plus or minus.
- 7:15
Since we are trying to obtain values for psi sub plus or minus, the unknown, we are at liberty to choose any symbol to represent it as long as it tallies with the dimension of A hat. So, Equation: normal h bar over 2 times the 2 by 2 matrix Row 1: Column 1, cosine theta Column 2, e raised to the negative i phi power sine theta Row 2: Column 1, e raised to the i phi power sine theta Column 2, negative cosine theta times the 2 by 1 column matrix a b equals normal h bar over 2 times the 2 by 1 column matrix a b. Equation: the 2 by 2 matrix Row 1: Column 1, cosine theta Column 2, e raised to the negative i phi power sine theta Row 2: Column 1, e raised to the i phi power sine theta Column 2, negative cosine theta times the 2 by 1 column matrix a b equals the 2 by 1 column matrix a b.
- 8:14
Multiplying out, we have: Equation: 2 lines Line 1: blank a times cosine theta plus b times e raised to the negative i phi power sine theta equals a blank blank Line 2: blank a times e raised to the i phi power sine theta minus b times cosine theta equals b blank blank.
- 8:35
To solve the simultaneous equations, we can express b in terms of a in (p6): Equation: a times cosine theta plus b times e raised to the negative i phi power sine theta equals a. Equation: 2 lines Line 1: b equals a times open paren 1 minus cosine theta close paren over e raised to the negative i phi power sine theta Line 2: blank equals a times open paren 1 minus cosine theta close paren over sine theta e raised to the i phi power.
- 9:03
From, see Wikipedia., 2025, 1 minus cosine theta equals 2 the sine squared of theta over 2 which is the half-angle formula for sine and sine theta equals 2 the sine of theta over 2 the cosine of theta over 2 (sine's double-angle formula). Therefore, Equation: 2 lines Line 1: b equals the fraction with numerator a of open paren 2 the sine squared of theta over 2 close paren and denominator 2 the sine of theta over 2 the cosine of theta over 2 e raised to the i phi power Line 2: blank equals the fraction with numerator a times the sine of theta over 2 and denominator the cosine of theta over 2 e raised to the i phi power. therefore Equation: psi sub plus or minus equals the 2 by 1 column matrix Row 1: a Row 2: the fraction with numerator a times the sine of theta over 2 and denominator the cosine of theta over 2 e raised to the i phi power.
- 10:06
If we eliminate fractions, the recommended practices with eigenvector, we have: Equation: psi sub plus or minus equals the 2 by 1 column matrix Row 1: a the cosine of theta over 2 Row 2: a times the sine of theta over 2 e raised to the i phi power.
- 10:25
When we eliminate the common terms, a, it becomes: Equation: psi sub plus or minus equals the 2 by 1 column matrix Row 1: the cosine of theta over 2 Row 2: the sine of theta over 2 e raised to the i phi power.
- 10:42
Linearly transforming the vector, we have: Equation: boxed psi equals cos of theta over 2 ket 0 plus e to the power i phi sin of theta over 2 ket 1.
- 10:54
which represents the q u b i t state on the Bloch sphere.
- 10:58
Worked examples
- 11:00
Q1:
- 11:02
Give the set of all values theta for which the following pairs of states are equivalent:
- 11:08
a. ket 1 and 1 over the square root of 2 (ket plus plus e to the power i theta ket minus)
- 11:15
b. 1 over the square root of 2 (ket i plus e to the power i theta ket minus i) and 1 over the square root of 2 (ket minus i plus e to the power minus i theta ket i)
- 11:28
c. 1 over 2 ket 0 minus the square root of 3 over 2 ket 1 and e to the power i theta (1 over 2 ket 0 minus the square root of 3 over 2 ket 1)
- 11:41
Solution
- 11:43
(a) Given: Equation: ket 1, 1 over the square root of 2 (ket plus plus e to the power i theta ket minus).
- 11:51
To solve this problem, we need to ensure that both states are in the same measurement basis. The first state is in the computational basis while the second is in Hadamard basis. It will be simpler to have both in the computational basis (or, if you want, Hadamard basis). We will transform the state in the Hadamard basis to computational basis in this solution.
- 12:14
From previous article, we know that: Equation: ket plus equals 1 over the square root of 2 (ket 0 plus ket 1), ket minus equals 1 over the square root of 2 (ket 0 minus ket 1).
- 12:28
Therefore, substitute these into the second state: Equation: align 1 over the square root of 2 (ket plus plus e to the power i theta ket minus) equals 1 over the square root of 2 (1 over the square root of 2 (ket 0 plus ket 1) plus e to the power i theta 1 over the square root of 2 (ket 0 minus ket 1)) equals 1 over 2 ket 0 plus 1 over 2 ket 1 plus e to the power i theta over 2 ket 0 minus e to the power i theta over 2 ket 1 equals 1 plus e to the power i theta over 2 ket 0 plus 1 minus e to the power i theta over 2 ket 1.
- 12:54
Now, we can compare both states since we want angles with which they are equivalent: Equation: ket 1 is equivalent to 1 plus e to the power i theta over 2 ket 0 plus 1 minus e to the power i theta over 2 ket 1.
- 13:11
Here, we see that for both states to be equivalent, the coefficient of ket 0, in the left hand side, must be 0 and that of ket 1 must be 1. So, going by the second option: Equation: 3 lines Line 1: 1 equals the fraction with numerator 1 minus e raised to the i theta power and denominator 2 Line 2: 2 equals 1 minus e raised to the i theta power Line 3: e raised to the i theta power equals 1 minus 2 equals negative 1.
- 13:38
From Euler's formula, e raised to the i theta power equals cosine theta plus i sine theta. therefore Equation: cosine theta plus i sine theta equals negative 1.
- 13:50
Looking at this equation, we can identify that it's complex where cosine theta and negative 1 are real while sine theta and 0 are imaginary. An important property of complex numbers is that:
- 14:04
For two complex numbers to be equal, their real and imaginary parts must be equal.
- 14:10
So, Equation: cosine theta equals negative 1 comma sine theta equals 0.
- 14:17
Let's take a look at a sample sine and cosine graph.
- 14:21
We can clearly deduce that: Equation: cosine theta equals negative 1 when theta equals the set open bracket negative pi comma pi close bracket comma open bracket negative 3 pi comma 3 pi close bracket comma open bracket negative 5 pi comma 5 pi close bracket comma period period period.
- 14:43
Generally, if n is any integer, then: Equation: cosine theta equals negative 1 when theta equals open paren 2 n plus 1 close paren times pi equals pi plus 2 pi n.
- 14:57
For sine, Equation: sine theta equals 0 when theta equals the set 0 comma open bracket negative pi comma pi close bracket comma open bracket negative 2 pi comma 2 pi close bracket comma open bracket negative 3 pi comma 3 pi close bracket comma open bracket negative 4 pi comma 4 pi close bracket comma open bracket negative 5 pi comma 5 pi close bracket period period period.
- 15:26
Generally, Equation: sine theta equals 0 when theta equals 0 plus pi n or theta equals pi n.
- 15:34
To account for both cases, pi plus 2 pi n is chosen as this satisfies sine theta too (albeit forfeiting some values). Hence, both states will be equivalent when: Equation: theta equals pi plus 2 pi n.
- 15:50
(b) We want to find the values of theta for which the following pair of states are strictly equal: Equation: 1 over the square root of 2 (ket i plus e to the power i theta ket minus i) and 1 over the square root of 2 (ket minus i plus e to the power minus i theta ket i).
- 16:09
To do this, we transform both states to the computational basis — in ket 0 and ket 1. We recall that: Equation: equation tag 1 ket i equals 1 over the square root of 2(ket 0 plus i ket 1), ket minus i equals 1 over the square root of 2(ket 0 minus i ket 1).
- 16:31
Substituting (1) into the state expressions, we get: Equation: 1 over the square root of 2 (ket i plus e to the power i theta ket minus i) equals 1 over the square root of 2 (1 over the square root of 2(ket 0 plus i ket 1) plus e to the power i theta 1 over the square root of 2(ket 0 minus i ket 1)) equals 1 over 2 [(1 plus e to the power i theta) ket 0 plus i(1 minus e to the power i theta) ket 1 ]. Equation: 1 over the square root of 2 (ket minus i plus e to the power minus i theta ket i) equals 1 over the square root of 2 (1 over the square root of 2(ket 0 minus i ket 1) plus e to the power minus i theta 1 over the square root of 2(ket 0 plus i ket 1)) equals 1 over 2 [(1 plus e to the power minus i theta) ket 0 plus i(minus 1 plus e to the power minus i theta) ket 1 ].
- 17:25
For the two states to be strictly equal, their coefficients in the computational basis must be equal: Equation: 1 over 2 [(1 plus e to the power i theta) ket 0 plus i(1 minus e to the power i theta) ket 1 ] equals 1 over 2 [(1 plus e to the power minus i theta) ket 0 plus i(minus 1 plus e to the power minus i theta) ket 1 ].
- 17:49
Multiplying by 2: Equation: (1 plus e to the power i theta) ket 0 plus i(1 minus e to the power i theta) ket 1 equals (1 plus e to the power minus i theta) ket 0 plus i(minus 1 plus e to the power minus i theta) ket 1.
- 18:07
Equating the coefficients of ket 0: Equation: 1 plus e raised to the i theta power equals 1 plus e raised to the negative i theta power. Equation: e raised to the i theta power equals e raised to the negative i theta power.
- 18:25
Using Euler's formula e raised to the i x power equals cosine x plus i sine x: Equation: 4 lines Line 1: cosine theta plus i sine theta equals cosine theta minus i sine theta Line 2: i sine theta equals negative i sine theta Line 3: 2 i sine theta equals 0 Line 4: sine theta equals 0.
- 18:49
From the previous solution, we know that: Equation: sine theta equals 0 when theta equals 0 plus pi n or theta equals pi n.
- 19:00
Now to ket 1, let's equate its coefficients: Equation: 7 lines Line 1: i times open paren 1 minus e raised to the i theta power close paren equals i times open paren negative 1 plus e raised to the negative i theta power close paren Line 2: 1 minus e raised to the i theta power equals negative 1 plus e raised to the negative i theta power Line 3: 1 plus 1 equals e raised to the i theta power plus e raised to the negative i theta power Line 4: 2 equals e raised to the i theta power plus e raised to the negative i theta power Line 5: 2 equals open paren cosine theta plus i sine theta close paren plus open paren cosine theta minus i sine theta close paren Line 6: 2 equals 2 cosine theta Line 7: cosine theta equals 1.
- 19:28
For the two states to be strictly equal, both conditions must be met simultaneously: Equation: sine theta equals 0 and cosine theta equals 1.
- 19:39
The values of theta for which sine theta equals 0 are theta equals n pi, and the values of theta for which cosine theta equals 1 are theta equals 2 pi n, where n is an integer (n is a member of the integers).
- 19:55
For both conditions to be true, theta must be an integer multiple of 2 pi. Equation: theta equals 2 pi n comma where n is a member of the integers.
- 20:06
If we restrict n to non-negative integers (K is a member of the set 0 comma 1 comma 2 comma period period period), the solution is: Equation: theta equals 2 pi n comma where n is a member of the natural numbers.
- 20:22
(c) Given: Equation: ket psi sub 1 equals 1 over 2 ket 0 minus the square root of 3 over 2 ket 1, ket psi sub 2 equals e to the power i theta (1 over 2 ket 0 minus the square root of 3 over 2 ket 1).
- 20:40
Directly, we can deduce that: Equation: ket psi sub 2 equals e to the power i theta ket psi sub 1.
- 20:48
This is regarded as global phase equivalence, see Viamontes and colleagues, 2007. This is the case since both states only differ in phase. It means that for all values theta, both states remain the same.
- 21:03
Q2:
- 21:05
What are theta and phi for each of the states ket plus, ket minus, ket i, and ket minus i?
- 21:12
Solution
- 21:13
Before going into specifics, let's lay out some foundations.
- 21:18
We can recall that a single q u b i t state in the computational basis is of the form: Equation: ket psi equals alpha ket 0 plus beta ket 1.
- 21:30
It has this Bloch sphere state function: Equation: ket psi equals cos of theta over 2 ket 0 plus e to the power i phi sin of theta over 2 ket 1.
- 21:42
Equating both, we have: Equation: alpha ket 0 plus beta ket 1 equals cos of theta over 2 ket 0 plus e to the power i phi sin of theta over 2 ket 1.
- 21:55
For both sides to be equal, it means: Equation: 1 lines Line 1: blank the cosine of theta over 2 equals alpha comma and e raised to the i phi power the sine of theta over 2 equals beta blank blank.
- 22:10
where theta is a member of open bracket 0 comma pi close bracket and phi is a member of open bracket 0 comma 2 pi close bracket.
- 22:20
Now to the specifics.
- 22:23
(i) ket plus can be expressed in computational basis as: Equation: ket plus equals 1 over the square root of 2 ket 0 plus 1 over the square root of 2 ket 1.
- 22:35
Here, alpha equals beta equals the fraction with numerator 1 and denominator the square root of 2. Substituting into (f of 1), we have: Equation: 4 lines Line 1: the cosine of theta over 2 equals the fraction with numerator 1 and denominator the square root of 2 Line 2: theta equals 2 times the inverse cosine of open paren the fraction with numerator 1 and denominator the square root of 2 close paren Line 3: theta equals 2 times pi over 4 Line 4: theta equals pi over 2.
- 23:02
To solve for phi: Equation: 5 lines Line 1: e raised to the i phi power the sine of theta over 2 equals the fraction with numerator 1 and denominator the square root of 2 Line 2: open paren cosine phi plus i sine phi close paren times the sine of the fraction with numerator pi over 2 and denominator 2 equals the fraction with numerator 1 and denominator the square root of 2 Line 3: open paren cosine phi plus i sine phi close paren times the sine of pi over 4 equals the fraction with numerator 1 and denominator the square root of 2 Line 4: open paren cosine phi plus i sine phi close paren times the fraction with numerator 1 and denominator the square root of 2 equals the fraction with numerator 1 and denominator the square root of 2 Line 5: cosine phi plus i sine phi equals 1.
- 23:29
We can now equate both real and imaginary parts: Equation: 3 lines Line 1: cosine phi equals 1 and sine phi equals 0 Line 2: phi equals the inverse cosine of 1 and phi equals the inverse sine of 0 Line 3: phi equals 0 and phi equals 0. therefore
- 23:49
ket plus will be represented on the Bloch sphere with theta equals pi over 2 comma phi equals 0.
- 23:56
With this, I will leave those of ket minus, ket i, and ket minus i as exercise. It'll be fun! Note: Hint
- 24:04
In all, theta equals pi over 2 while phi varies.
- 24:08
Outro
- 24:10
Enjoyed this article? I'm a Software Engineer and Technical Writer actively seeking new opportunities to impact and learn, particularly in areas related to web security, finance, healthcare, and education. If you think my expertise aligns with your team's needs, let's chat! You can find me on LinkedIn and X. I am also an email away.