From 56438ced53990b8295f7b282758561ac39947ca0 Mon Sep 17 00:00:00 2001 From: Ruben Erlenstedt Date: Sat, 30 Nov 2019 13:13:48 +0100 Subject: work on 2d plot of phi --- single_dequantify.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'single_dequantify.py') 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"]) -- cgit v1.2.3-70-g09d2