PageRenderTime 38ms CodeModel.GetById 34ms RepoModel.GetById 1ms app.codeStats 0ms

/dev/modules/physics/qho_1d.html

https://github.com/asmeurer/sympy_doc
HTML | 189 lines | 177 code | 12 blank | 0 comment | 0 complexity | 06565361821579d2b1d63f527494c298 MD5 | raw file
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>Quantum Harmonic Oscillator in 1-D &#8212; SymPy 1.7.dev documentation</title>
  6. <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
  7. <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  8. <link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
  9. <link rel="stylesheet" type="text/css" href="https://live.sympy.org/static/live-core.css" />
  10. <link rel="stylesheet" type="text/css" href="https://live.sympy.org/static/live-autocomplete.css" />
  11. <link rel="stylesheet" type="text/css" href="https://live.sympy.org/static/live-sphinx.css" />
  12. <script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
  13. <script src="../../_static/jquery.js"></script>
  14. <script src="../../_static/underscore.js"></script>
  15. <script src="../../_static/doctools.js"></script>
  16. <script src="../../_static/language_data.js"></script>
  17. <script src="https://live.sympy.org/static/utilities.js"></script>
  18. <script src="https://live.sympy.org/static/external/classy.js"></script>
  19. <script src="https://live.sympy.org/static/live-core.js"></script>
  20. <script src="https://live.sympy.org/static/live-autocomplete.js"></script>
  21. <script src="https://live.sympy.org/static/live-sphinx.js"></script>
  22. <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_HTML-full"></script>
  23. <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["\\(", "\\)"]], "displayMath": [["\\[", "\\]"]]}})</script>
  24. <link rel="shortcut icon" href="../../_static/sympy-notailtext-favicon.ico"/>
  25. <link href="https://docs.sympy.org/latest/modules/physics/qho_1d.html" rel="canonical" />
  26. <link rel="index" title="Index" href="../../genindex.html" />
  27. <link rel="search" title="Search" href="../../search.html" />
  28. <link rel="next" title="Quantum Harmonic Oscillator in 3-D" href="sho.html" />
  29. <link rel="prev" title="Pauli Algebra" href="paulialgebra.html" />
  30. </head><body>
  31. <div class="related" role="navigation" aria-label="related navigation">
  32. <h3>Navigation</h3>
  33. <ul>
  34. <li class="right" style="margin-right: 10px">
  35. <a href="../../genindex.html" title="General Index"
  36. accesskey="I">index</a></li>
  37. <li class="right" >
  38. <a href="../../py-modindex.html" title="Python Module Index"
  39. >modules</a> |</li>
  40. <li class="right" >
  41. <a href="sho.html" title="Quantum Harmonic Oscillator in 3-D"
  42. accesskey="N">next</a> |</li>
  43. <li class="right" >
  44. <a href="paulialgebra.html" title="Pauli Algebra"
  45. accesskey="P">previous</a> |</li>
  46. <li class="nav-item nav-item-0"><a href="../../index.html">SymPy 1.7.dev documentation</a> &#187;</li>
  47. <li class="nav-item nav-item-1"><a href="../index.html" >SymPy Modules Reference</a> &#187;</li>
  48. <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Physics</a> &#187;</li>
  49. </ul>
  50. </div>
  51. <div class="document">
  52. <div class="documentwrapper">
  53. <div class="bodywrapper">
  54. <div class="body" role="main">
  55. <div class="section" id="module-sympy.physics.qho_1d">
  56. <span id="quantum-harmonic-oscillator-in-1-d"></span><h1>Quantum Harmonic Oscillator in 1-D<a class="headerlink" href="#module-sympy.physics.qho_1d" title="Permalink to this headline"></a></h1>
  57. <dl class="py function">
  58. <dt id="sympy.physics.qho_1d.E_n">
  59. <code class="sig-prename descclassname">sympy.physics.qho_1d.</code><code class="sig-name descname">E_n</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">n</span></em>, <em class="sig-param"><span class="n">omega</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/46469d714a095fde59f9c4d83aaa528c68b0be0f/sympy/physics/qho_1d.py#L41-L64"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#sympy.physics.qho_1d.E_n" title="Permalink to this definition"></a></dt>
  60. <dd><p>Returns the Energy of the One-dimensional harmonic oscillator</p>
  61. <dl class="simple">
  62. <dt><code class="docutils literal notranslate"><span class="pre">n</span></code></dt><dd><p>the nodal quantum number</p>
  63. </dd>
  64. <dt><code class="docutils literal notranslate"><span class="pre">omega</span></code></dt><dd><p>the harmonic oscillator angular frequency</p>
  65. </dd>
  66. </dl>
  67. <p>The unit of the returned value matches the unit of hw, since the energy is
  68. calculated as:</p>
  69. <blockquote>
  70. <div><p>E_n = hbar * omega*(n + 1/2)</p>
  71. </div></blockquote>
  72. <p class="rubric">Examples</p>
  73. <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.qho_1d</span> <span class="kn">import</span> <span class="n">E_n</span>
  74. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">x</span><span class="p">,</span> <span class="n">omega</span>
  75. <span class="gp">&gt;&gt;&gt; </span><span class="n">E_n</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">omega</span><span class="p">)</span>
  76. <span class="go">hbar*omega*(x + 1/2)</span>
  77. </pre></div>
  78. </div>
  79. </dd></dl>
  80. <dl class="py function">
  81. <dt id="sympy.physics.qho_1d.coherent_state">
  82. <code class="sig-prename descclassname">sympy.physics.qho_1d.</code><code class="sig-name descname">coherent_state</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">n</span></em>, <em class="sig-param"><span class="n">alpha</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/46469d714a095fde59f9c4d83aaa528c68b0be0f/sympy/physics/qho_1d.py#L67-L78"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#sympy.physics.qho_1d.coherent_state" title="Permalink to this definition"></a></dt>
  83. <dd><p>Returns &lt;n|alpha&gt; for the coherent states of 1D harmonic oscillator.
  84. See <a class="reference external" href="https://en.wikipedia.org/wiki/Coherent_states">https://en.wikipedia.org/wiki/Coherent_states</a></p>
  85. <dl class="simple">
  86. <dt><code class="docutils literal notranslate"><span class="pre">n</span></code></dt><dd><p>the nodal quantum number</p>
  87. </dd>
  88. <dt><code class="docutils literal notranslate"><span class="pre">alpha</span></code></dt><dd><p>the eigen value of annihilation operator</p>
  89. </dd>
  90. </dl>
  91. </dd></dl>
  92. <dl class="py function">
  93. <dt id="sympy.physics.qho_1d.psi_n">
  94. <code class="sig-prename descclassname">sympy.physics.qho_1d.</code><code class="sig-name descname">psi_n</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">n</span></em>, <em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="n">m</span></em>, <em class="sig-param"><span class="n">omega</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/46469d714a095fde59f9c4d83aaa528c68b0be0f/sympy/physics/qho_1d.py#L8-L38"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#sympy.physics.qho_1d.psi_n" title="Permalink to this definition"></a></dt>
  95. <dd><p>Returns the wavefunction psi_{n} for the One-dimensional harmonic oscillator.</p>
  96. <dl class="simple">
  97. <dt><code class="docutils literal notranslate"><span class="pre">n</span></code></dt><dd><p>the nodal quantum number. Corresponds to the number of nodes in the
  98. wavefunction. n &gt;= 0</p>
  99. </dd>
  100. <dt><code class="docutils literal notranslate"><span class="pre">x</span></code></dt><dd><p>x coordinate</p>
  101. </dd>
  102. <dt><code class="docutils literal notranslate"><span class="pre">m</span></code></dt><dd><p>mass of the particle</p>
  103. </dd>
  104. <dt><code class="docutils literal notranslate"><span class="pre">omega</span></code></dt><dd><p>angular frequency of the oscillator</p>
  105. </dd>
  106. </dl>
  107. <p class="rubric">Examples</p>
  108. <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.qho_1d</span> <span class="kn">import</span> <span class="n">psi_n</span>
  109. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">m</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">omega</span>
  110. <span class="gp">&gt;&gt;&gt; </span><span class="n">psi_n</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">m</span><span class="p">,</span> <span class="n">omega</span><span class="p">)</span>
  111. <span class="go">(m*omega)**(1/4)*exp(-m*omega*x**2/(2*hbar))/(hbar**(1/4)*pi**(1/4))</span>
  112. </pre></div>
  113. </div>
  114. </dd></dl>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  120. <div class="sphinxsidebarwrapper">
  121. <p class="logo"><a href="../../index.html">
  122. <img class="logo" src="../../_static/sympylogo.png" alt="Logo"/>
  123. </a></p>
  124. <h4>Previous topic</h4>
  125. <p class="topless"><a href="paulialgebra.html"
  126. title="previous chapter">Pauli Algebra</a></p>
  127. <h4>Next topic</h4>
  128. <p class="topless"><a href="sho.html"
  129. title="next chapter">Quantum Harmonic Oscillator in 3-D</a></p>
  130. <div role="note" aria-label="source link">
  131. <h3>This Page</h3>
  132. <ul class="this-page-menu">
  133. <li><a href="../../_sources/modules/physics/qho_1d.rst.txt"
  134. rel="nofollow">Show Source</a></li>
  135. </ul>
  136. </div>
  137. <div id="searchbox" style="display: none" role="search">
  138. <h3 id="searchlabel">Quick search</h3>
  139. <div class="searchformwrapper">
  140. <form class="search" action="../../search.html" method="get">
  141. <input type="text" name="q" aria-labelledby="searchlabel" />
  142. <input type="submit" value="Go" />
  143. </form>
  144. </div>
  145. </div>
  146. <script>$('#searchbox').show(0);</script>
  147. </div>
  148. </div>
  149. <div class="clearer"></div>
  150. </div>
  151. <div class="related" role="navigation" aria-label="related navigation">
  152. <h3>Navigation</h3>
  153. <ul>
  154. <li class="right" style="margin-right: 10px">
  155. <a href="../../genindex.html" title="General Index"
  156. >index</a></li>
  157. <li class="right" >
  158. <a href="../../py-modindex.html" title="Python Module Index"
  159. >modules</a> |</li>
  160. <li class="right" >
  161. <a href="sho.html" title="Quantum Harmonic Oscillator in 3-D"
  162. >next</a> |</li>
  163. <li class="right" >
  164. <a href="paulialgebra.html" title="Pauli Algebra"
  165. >previous</a> |</li>
  166. <li class="nav-item nav-item-0"><a href="../../index.html">SymPy 1.7.dev documentation</a> &#187;</li>
  167. <li class="nav-item nav-item-1"><a href="../index.html" >SymPy Modules Reference</a> &#187;</li>
  168. <li class="nav-item nav-item-2"><a href="index.html" >Physics</a> &#187;</li>
  169. </ul>
  170. </div>
  171. <div class="footer" role="contentinfo">
  172. &#169; Copyright 2020 SymPy Development Team.
  173. Last updated on Jun 03, 2020.
  174. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.4.
  175. </div>
  176. </body>
  177. </html>