What you will learn
We show how to compute the harmonic oscillator in the number basis. We use the quantum toolbox in Python, qutip.
The plot of the phase states.
Visualization of quantum states from qutip import * from qutip.distributions import * import numpy as np import matplotlib.pyplot as plt Any photonic state or ensemble can be expressed in the fock basis.