Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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