diff options
-rw-r--r-- | plotting.py | 9 | ||||
-rw-r--r-- | single_dequantify.py | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/plotting.py b/plotting.py index 9def377..57116c1 100644 --- a/plotting.py +++ b/plotting.py @@ -43,12 +43,15 @@ def kugel(historie): plt.show() def phi(phi): - fig, ax = plt.subplots() + ax = plt.axes() + plt.grid() x = mth.cos(phi[0]) y = mth.sin(phi[0]) - ax.arrow(0, 0, 1, 1) - ax.set_title('Zeitentwicklung von phi') + ax.arrow(0, 0, 0.5, 0.5, head_width=0.05, head_length=0.07) + plt.title('Zeitentwicklung von phi') + plt.xlim(-1.1,1.1) + plt.ylim(-1.1,1.1) plt.show() diff --git a/single_dequantify.py b/single_dequantify.py index fa5f017..a4a3021 100644 --- a/single_dequantify.py +++ b/single_dequantify.py @@ -5,9 +5,7 @@ import cmath as cmt import numpy as npy import scipy.linalg as sla -#alpha = 1 / npy.sqrt(2) alpha = 1 -#beta = 1 / npy.sqrt(2) beta = 1 norm = npy.linalg.norm([alpha, beta]) @@ -18,7 +16,6 @@ iterations = 61 H = npy.array([[2,0],[0,3]]) - def time_evolution(state, dt = dt): return npy.dot(state, sla.expm(-1j * dt * H)) @@ -48,4 +45,5 @@ for i in range(iterations): f.write(f"{coords[0]}; {coords[1]}; {coords[2]}; {(i + 1) / iterations}\n") f.close() + subprocess.run(["gnuplot", "gnuplot.plt"]) |