ó
¡¼™\c           @   sã   d  d l  m Z m Z m Z m Z m Z m Z m Z m Z m	 Z	 d  d l
 m Z d  d l m Z m Z m Z d  d l m Z m Z m Z d  d l m Z e e e Z d „  Z d d „ Z d d	 „ Z d d
 „ Z d d „ Z d S(   iÿÿÿÿ(	   t   expt	   integratet   oot   Rationalt   pit   St   simplifyt   sqrtt   Symbol(   t   range(   t   omegat   mt   x(   t   psi_nt   E_nt   coherent_state(   t   hbarc          C   s`  i t  t t d ƒ d t t  t d d ƒ d 6t  t t d ƒ d t d t  ƒ t t t  t d d ƒ d 6t  t t d ƒ d d t  t d d t d ƒ t t  t d d ƒ d 6t  t t d ƒ d t t  d ƒ d t  t d d t t t  t d d ƒ d 6}  x= |  D]5 } t t | t t t	 ƒ |  | ƒ d k s#t
 ‚ q#Wd  S(   Ni   i   i   i    i   (   t   nuR   R   R    R   R   R   R   R   R
   t   AssertionError(   t   Psit   n(    (    s>   lib/python2.7/site-packages/sympy/physics/tests/test_qho_1d.pyt   test_wavefunction
   s    0BNYi   c         C   sW   xP t  |  d ƒ D]> } t t | t d d ƒ d t t t f ƒ d k s t ‚ q Wd  S(   Ni   i   (   R	   R   R   R   R   R   (   R   t   i(    (    s>   lib/python2.7/site-packages/sympy/physics/tests/test_qho_1d.pyt	   test_norm   s    c      	   C   sˆ   x t  |  d ƒ D]o } xf t  | d |  d ƒ D]M } t t | t d d ƒ t | t d d ƒ t t t f ƒ d k s/ t ‚ q/ Wq Wd  S(   Ni   i    (   R	   R   R   R   R   R   (   R   R   t   j(    (    s>   lib/python2.7/site-packages/sympy/physics/tests/test_qho_1d.pyt   test_orthogonality   s    c         C   sO   xH t  |  d ƒ D]6 } t | t ƒ t t | t d d ƒ k s t ‚ q Wd  S(   Ni   i   (   R	   R   R
   R   R   R   (   R   R   (    (    s>   lib/python2.7/site-packages/sympy/physics/tests/test_qho_1d.pyt   test_energies#   s    i
   c         C   sq   t  d ƒ } x^ t |  d ƒ D]L } t t |  d ƒ t |  d | ƒ ƒ t | t |  | ƒ ƒ k s t ‚ q Wd  S(   Nt   alphai   (   R   R	   R   R   R   R   (   R   R   R   (    (    s>   lib/python2.7/site-packages/sympy/physics/tests/test_qho_1d.pyt   test_coherent_state(   s    N(   t   sympyR    R   R   R   R   R   R   R   R   t   sympy.core.compatibilityR	   t	   sympy.abcR
   R   R   t   sympy.physics.qho_1dR   R   R   t   sympy.physics.quantum.constantsR   R   R   R   R   R   R   (    (    (    s>   lib/python2.7/site-packages/sympy/physics/tests/test_qho_1d.pyt   <module>   s   @	