import numpy as np a1 = 1.0 + 0.0j a2 = 0.0 + 0.0j T = 0.9 K = 0.1 t = np.sqrt(T) + 0.0j k = 0.0 - 1j * np.sqrt(K) Coupler = np.array([[t, k], [k.conjugate(), -t.conjugate()]]) num_cycle = 1000 a = np.zeros((num_cycle, 2), dtype=complex) b = np.zeros((num_cycle, 2), dtype=complex) a[0, 0] = a1 a[0, 1] = a2 for n in range(num_cycle): pass