K iRddlmZmZmZddlmZmZmZmZm Z ddl m Z dZ dZ dZy))SpiRational)hermitesqrtexp factorialAbs)hbarctt||||g\}}}}||ztz }|tz t ddzt dd|zt |zz z}|t| |dzzdz zt|t ||zzS)aJ Returns the wavefunction psi_{n} for the One-dimensional harmonic oscillator. Parameters ========== n : the "nodal" quantum number. Corresponds to the number of nodes in the wavefunction. ``n >= 0`` x : x coordinate. m : Mass of the particle. omega : Angular frequency of the oscillator. Examples ======== >>> from sympy.physics.qho_1d import psi_n >>> from sympy.abc import m, x, omega >>> psi_n(0, x, m, omega) (m*omega)**(1/4)*exp(-m*omega*x**2/(2*hbar))/(hbar**(1/4)*pi**(1/4)) ) maprr rrrr rr)nxmomeganuCs Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/physics/qho_1d.pypsi_nrs8Q1e,-NAq!U UT B B!Q$q!Q$y|*;'<"==A sB319a< 71d2hqj#9 99c<t|z|tjzzS)a Returns the Energy of the One-dimensional harmonic oscillator. Parameters ========== n : The "nodal" quantum number. omega : The harmonic oscillator angular frequency. Notes ===== The unit of the returned value matches the unit of hw, since the energy is calculated as: E_n = hbar * omega*(n + 1/2) Examples ======== >>> from sympy.physics.qho_1d import E_n >>> from sympy.abc import x, omega >>> E_n(x, omega) hbar*omega*(x + 1/2) )r rHalf)rrs rE_nr*s: %<1qvv: &&rcntt|dz dz ||zztt|z S)a Returns for the coherent states of 1D harmonic oscillator. See https://en.wikipedia.org/wiki/Coherent_states Parameters ========== n : The "nodal" quantum number. alpha : The eigen value of annihilation operator. r)rr rr )ralphas rcoherent_staterJs5 UQq !5!8 ,T)A,-? ??rN) sympy.corerrrsympy.functionsrrrr r sympy.physics.quantum.constantsr rrrrrr$s&&&>>0!:H'@@r