diff options
Diffstat (limited to 'single_dequantify.py')
-rw-r--r-- | single_dequantify.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/single_dequantify.py b/single_dequantify.py index 96f76ed..3cf7d3a 100644 --- a/single_dequantify.py +++ b/single_dequantify.py @@ -39,13 +39,12 @@ def sphere2cart(phi, theta): historie = npy.array([bloch_map(state)]) f = open("data", "w") -for i in range(iterations): - state = time_evolution(state) - h = npy.dot(state, state) +for i in range(iterations + 1): historie = npy.vstack([historie,bloch_map(state)]) (phi, theta) = bloch_map(state) coords = sphere2cart(phi, theta) - f.write(f"{coords[0]}; {coords[1]}; {coords[2]}; {(i + 1) / iterations}\n") + f.write(f"{coords[0]}; {coords[1]}; {coords[2]}; {(i + 1) / (iterations + 1)}\n") + state = time_evolution(state) f.close() |