summaryrefslogtreecommitdiff
path: root/single_dequantify.py
diff options
context:
space:
mode:
authorRuben Erlenstedt <rxy626@gmail.com>2019-11-30 13:13:48 +0100
committerRuben Erlenstedt <rxy626@gmail.com>2019-11-30 13:13:48 +0100
commit56438ced53990b8295f7b282758561ac39947ca0 (patch)
tree6d8e9a0a9b0bbb056e1410c2006e93187a158e66 /single_dequantify.py
parentcae4a514f6b8414ac4f78c706202f65a819bc5cf (diff)
work on 2d plot of phi
Diffstat (limited to 'single_dequantify.py')
-rw-r--r--single_dequantify.py11
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"])