Evolve any unitary using solve_ivp.
Steps:
- Determines Shape of U0.
- Determines Shape of H (at any random time t).
- If anyone of U, H are non square exit.
- If shapes match proceed else exit.
- make sure Output of H is Hermitian (by trying it out at 3 different times)
- Initialize inputs T, Nt
- Flatten u0 to get y0
- calculate dt = T/ Nt
- make y_der
- evolve y
- collect results
- y_series to u_series
- print messages
- return stuff + u_series
Call syntax
u_series, result = ihu(ham_func, u0, T, no_time_step_for_eval, **kwargs)
linspace(1, 10, 10)
linspace(1, 10, 100)
sqrt(9)