Excercises#
Excercise 1: Energy Levels of Hydrogen#
h = 6.62607015e-34
c = 299792458
pi = 3.14159265359
hbar = h/(2 * pi)
e = 1.602176634e-19
me = 9.10938370e-31
ep0 = 8.85418781e-12
Use these to calculate the Bohr radius,
The energy of the \(n\)-th is given by
Make a variable for the \(n=1\) energy level.
Change to electron volts (eV) by deviding by \(e\).
Make a list with this as the only element to store the energy levels.
Append this list with the next 5 values for \(n\).
Cast this list into a set to remove any duplicates you may have created.
Now cast back into a list.
Sort the list.
This is however in the reverse order to what we want so reverse it.
Now calculate the first two wavelengths (i=3,4 f=2) of photons emitted in the visible Balmer series of transitions.
where
the final energy state for the Balmer series is

We are in eV, to convert back to S.I, divide the wavelengths by \(e\) and print.
Exercise 2: Quantum Qubit Gates & Nested Lists#
It turns out we can contain lists within lists i.e. [4.0,[1,5]]. Using nested lists for each row, represent the following single quibit gates X,Y, and Z and print them.
Now, extract and print the element from the first row and second column of the Y gate.
Now attempt to multiply two of the matrices
As we can see, lists(on their own atleast) cannot be used in basic matrix operations. We will see how we can handle this matrix multiplication in the coming weeks.