Fix printing on ps12-2
This commit is contained in:
parent
02fa0ab955
commit
0d7e5c9064
@ -39,13 +39,13 @@ expect_xs = []
|
||||
for i, psi in enumerate(psi_funcs):
|
||||
expect_x = np.sum(np.conjugate(psi) * x_vals * psi)
|
||||
expect_xs.append(expect_x)
|
||||
print(f'expect_x_{i} = {expect_x}')
|
||||
print(f'<x>_{i} = {expect_x}')
|
||||
|
||||
expect_x_sqrds = []
|
||||
for i, psi in enumerate(psi_funcs):
|
||||
expect_x_sqrd = np.sum(np.conjugate(psi) * x_vals ** 2 * psi)
|
||||
expect_x_sqrds.append(expect_x_sqrd)
|
||||
print(f'expect_x_{i} = {expect_x_sqrd}')
|
||||
print(f'<x^2>_{i} = {expect_x_sqrd}')
|
||||
|
||||
for i, psi in enumerate(psi_funcs):
|
||||
sigma_x = np.sqrt(expect_x_sqrds[i] - expect_xs[i] ** 2)
|
||||
|
Loading…
Reference in New Issue
Block a user