|
|
@ -2,22 +2,26 @@ |
|
|
|
import matplotlib.pyplot as plt |
|
|
|
import matplotlib.pyplot as plt |
|
|
|
import numpy as np |
|
|
|
import numpy as np |
|
|
|
from phys import * |
|
|
|
from phys import * |
|
|
|
|
|
|
|
from scipy.constants import electron_mass |
|
|
|
|
|
|
|
|
|
|
|
quantum_system = box(0.001) # box with inf walls |
|
|
|
system = infbox(0.001) # box with inf walls |
|
|
|
|
|
|
|
|
|
|
|
# x = np.arange(0, BOX_LENGTH, 0.00001) |
|
|
|
p1 = particle(electron_mass, system, 1) |
|
|
|
# n = np.arange(1, 10, 1) |
|
|
|
p2 = particle(electron_mass, system, 2) |
|
|
|
# |
|
|
|
|
|
|
|
# X, N = np.meshgrid(x, n) |
|
|
|
x = np.arange(0, BOX_LENGTH, 0.00001) |
|
|
|
# P = prob(X, N) |
|
|
|
t = np.arange(0, 1, 0.01) |
|
|
|
# |
|
|
|
|
|
|
|
# fig = plt.figure() |
|
|
|
|
|
|
|
# ax = plt.axes(projection='3d') |
|
|
|
|
|
|
|
# ax.plot_surface(X, N, P, rstride=1, cstride=1, cmap='viridis', edgecolor='none') |
|
|
|
|
|
|
|
# ax.set_xlabel('x [m]') |
|
|
|
|
|
|
|
# ax.set_ylabel('n [int]') |
|
|
|
|
|
|
|
# ax.set_zlabel('probability [frac]'); |
|
|
|
|
|
|
|
# |
|
|
|
# |
|
|
|
# plt.show() |
|
|
|
X, T = np.meshgrid(x, t) |
|
|
|
|
|
|
|
P = system.get_superpos(X, T) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fig = plt.figure() |
|
|
|
|
|
|
|
ax = plt.axes(projection='3d') |
|
|
|
|
|
|
|
ax.plot_surface(X, N, P, rstride=1, cstride=1, cmap='viridis', edgecolor='none') |
|
|
|
|
|
|
|
ax.set_xlabel('x [m]') |
|
|
|
|
|
|
|
ax.set_ylabel('time [s]') |
|
|
|
|
|
|
|
ax.set_zlabel('probability [frac]'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plt.show() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|