Quantum, Qiskit, Quantum Mechanics, Python, Programming.
line, = ax.plot([], [], lw=2) lineV, = ax.plot([], [], lw=2) # initialization function: plot the background of each frame def init(): line.set_data([], []) lineV.set_data([], []) return (line, lineV,) def animate(i): global psi psi=splitOperator(psi) line.set_data(x, np.conj(psi)*psi)