diff options
Diffstat (limited to 'single_dequantify.py')
-rw-r--r-- | single_dequantify.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/single_dequantify.py b/single_dequantify.py index 43c256d..0d38fc7 100644 --- a/single_dequantify.py +++ b/single_dequantify.py @@ -10,9 +10,9 @@ beta = 1 / npy.sqrt(2) state = npy.array([alpha, beta]) dt = 0.2 -iterations = 20 +iterations = 200 -H = npy.array([[2,-2j],[2j,3]]) +H = npy.array([[2,0],[0,3]]) def time_evolution(state, dt = dt): @@ -32,7 +32,7 @@ def sphere2cart(phi, theta): ] historie = npy.array([bloch_map(state)]) -f = open("data", "a") +f = open("data", "w") for i in range(iterations): state = time_evolution(state) @@ -43,4 +43,7 @@ for i in range(iterations): f.write(f"{coords[0]}; {coords[1]}; {coords[2]}\n") f.close() -subprocess.run(["gnuplot", "gnuplot.plt"]) +import plotting +#plotting.phi(historie[:,0]) +plotting.kugel(historie) +#subprocess.run(["gnuplot", "gnuplot.plt"]) |