Skip to content

Instantly share code, notes, and snippets.

@nelimee
Created July 20, 2018 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nelimee/31c66e6b1e5586275f82d960c3b2020a to your computer and use it in GitHub Desktop.
Save nelimee/31c66e6b1e5586275f82d960c3b2020a to your computer and use it in GitHub Desktop.
import numpy as np
import scipy.linalg as la
A = .25 * np.array([[15, 9, 5, -3],
[9, 15, 3, -5],
[5, 3, 15, -9],
[-3, -5, -9, 15]])
t0 = 2 * np.pi
expA = [la.expm(1.j*A*t0/2**(i)) for i in range(1,5)]
invexpA = [la.expm(-1.j*A*t0/2**(i)) for i in range(1,5)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment