diff options
Diffstat (limited to 'twoqbit_dequantify.py')
-rw-r--r-- | twoqbit_dequantify.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/twoqbit_dequantify.py b/twoqbit_dequantify.py index 9165a12..b6e0abb 100644 --- a/twoqbit_dequantify.py +++ b/twoqbit_dequantify.py @@ -4,18 +4,18 @@ import cmath as cmt import numpy as npy import scipy.linalg as sla -alpha = 1 -beta = 1 +alpha = 2 +beta = 0 gamma = 1 -delta = 1 +delta = 1+1j norm = npy.linalg.norm([alpha, beta, gamma, delta]) state = npy.array([alpha / norm, beta / norm, gamma / norm, delta / norm]) -dt = 0.1 -iterations = 5 +dt = 0.05 +iterations = 20 -H = npy.array([[1,0,0,0],[0,2,0,0],[0,0,3,0],[0,0,0,4]]) +H = npy.array([[1,0,0,1j],[0,2,0,0],[0,0,3,0],[-1j,0,0,4]]) M0 = [[1,0,0,0],[0,1,0,0],[0,0,-1,0],[0,0,0,-1]] M1 = [[0,0,1,0],[0,0,0,1],[1,0,0,0],[0,1,0,0]] @@ -37,13 +37,14 @@ def fibration(state): return ([x0.real,x1.real,x2.real,x3,x4]) -f = open("data2q", "w") +f = open("data", "w") for i in range(iterations + 1): hopf_state = fibration(state) - f.write(f"{hopf_state[0]}; {hopf_state[1]}; {hopf_state[2]}; {(i + 1) / (iterations + 1)}\n") + f.write(f"{hopf_state[3]}; {hopf_state[4]}; {(i + 1) / (iterations + 1)}\n") + print(hopf_state) state = time_evolution(state) f.close() -subprocess.run(["gnuplot", "gnuplot_2q.plt"]) +subprocess.run(["gnuplot", "gnuplot_2d.plt"]) |