From 16d91483264b367b81281143be44b123694fba59 Mon Sep 17 00:00:00 2001 From: teajay Date: Tue, 28 Jul 2020 12:04:17 +0200 Subject: [PATCH] Hydrogen Done --- Harmonic-Oscillator-Integrals.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Harmonic-Oscillator-Integrals.py b/Harmonic-Oscillator-Integrals.py index 2b5bb0a..80d84f0 100755 --- a/Harmonic-Oscillator-Integrals.py +++ b/Harmonic-Oscillator-Integrals.py @@ -6,7 +6,7 @@ from sympy.physics.quantum.operator import DifferentialOperator from sympy.physics.quantum.qapply import qapply from sympy.physics.quantum.state import Wavefunction -from sympy.physics.qho_1d import psi_n +#from sympy.physics.qho_1d import psi_n #Some general definitions m = Symbol('m', nonzero=True, positive=True) @@ -19,7 +19,7 @@ f = Function('f') # for the harmonic 1d Oscillator with potential V(x) = 1/2 omega^2 x^2 # ######################################################################## -def ho1dExpectaion(op, n1, n2): +def ho1dExpectaion(n1, op, n2): def H(n,y): yDiff = Symbol('yp') @@ -79,7 +79,7 @@ ad = DifferentialOperator(sqrt((m * omega)/(2 * hbar))*(x_var*f(x_var) - (hbar * #Calculate for example <0| H |0> -pprint(ho1dExpectaion(H,0,0)) +pprint(ho1dExpectaion(1,E_kin,1))