Skip to content

Commit

Permalink
build based on 323f795
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Mar 28, 2024
1 parent e5189ed commit f4d67b6
Show file tree
Hide file tree
Showing 47 changed files with 4,480 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stable
2 changes: 1 addition & 1 deletion v0.3
1 change: 1 addition & 0 deletions v0.3.2/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-28T18:51:08","documenter_version":"1.3.0"}}
105 changes: 105 additions & 0 deletions v0.3.2/API/index.html

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions v0.3.2/DeltaPotential/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Delta Potential · Antique.jl</title><meta name="title" content="Delta Potential · Antique.jl"/><meta property="og:title" content="Delta Potential · Antique.jl"/><meta property="twitter:title" content="Delta Potential · Antique.jl"/><meta name="description" content="Documentation for Antique.jl."/><meta property="og:description" content="Documentation for Antique.jl."/><meta property="twitter:description" content="Documentation for Antique.jl."/><meta property="og:url" content="https://ohno.github.io/Antique.jl/DeltaPotential/"/><meta property="twitter:url" content="https://ohno.github.io/Antique.jl/DeltaPotential/"/><link rel="canonical" href="https://ohno.github.io/Antique.jl/DeltaPotential/"/><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../search_index.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/logo.ico" rel="icon" type="image/x-icon"/><link href="../assets/css/catalog.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.svg" alt="Antique.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">Antique.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../InfinitePotentialWell/">Infinite Potential Well</a></li><li><a class="tocitem" href="../HarmonicOscillator/">Harmonic Oscillator</a></li><li><a class="tocitem" href="../MorsePotential/">Morse Potential</a></li><li><a class="tocitem" href="../HydrogenAtom/">Hydrogen Atom</a></li><li class="is-active"><a class="tocitem" href>Delta Potential</a><ul class="internal"><li><a class="tocitem" href="#Definitions"><span>Definitions</span></a></li><li><a class="tocitem" href="#Usage-and-Examples"><span>Usage &amp; Examples</span></a></li><li><a class="tocitem" href="#Testing"><span>Testing</span></a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Delta Potential</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Delta Potential</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/ohno/Antique.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/ohno/Antique.jl/blob/main/docs/src/DeltaPotential.md#" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Delta-Potential"><a class="docs-heading-anchor" href="#Delta-Potential">Delta Potential</a><a id="Delta-Potential-1"></a><a class="docs-heading-anchor-permalink" href="#Delta-Potential" title="Permalink"></a></h1><p>The Delta potential is one of the simplest models for quantum mechanical system in 1D. It always has one bound state and its wave function has a cusp at the origin.</p><h2 id="Definitions"><a class="docs-heading-anchor" href="#Definitions">Definitions</a><a id="Definitions-1"></a><a class="docs-heading-anchor-permalink" href="#Definitions" title="Permalink"></a></h2><p>This model is described with the time-independent Schrödinger equation</p><p class="math-container">\[ \hat{H} \psi(x) = E \psi(x),\]</p><p>and the Hamiltonian</p><p class="math-container">\[ \hat{H} = - \frac{\hbar^2}{2m} \frac{\mathrm{d}^2}{\mathrm{d}x ^2} + V(x).\]</p><p>Parameters are specified with the following struct.</p><h4 id="Parameters"><a class="docs-heading-anchor" href="#Parameters">Parameters</a><a id="Parameters-1"></a><a class="docs-heading-anchor-permalink" href="#Parameters" title="Permalink"></a></h4><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Antique.DeltaPotential-DeltaPotential" href="#Antique.DeltaPotential-DeltaPotential"><code>Antique.DeltaPotential</code></a><span class="docstring-category">Type</span></header><section><div><p><code>DeltaPotential(α=1.0, m=1.0, ℏ=1.0)</code></p><p><span>$\alpha$</span> is the potential strength, <span>$m$</span> is the mass of particle and <span>$\hbar$</span> is the reduced Planck constant (Dirac&#39;s constant).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ohno/Antique.jl/blob/323f795c2cb7cf70a2442b36f31955084340d421/src/DeltaPotential.jl#L27-L31">source</a></section></article><h4 id="Potential"><a class="docs-heading-anchor" href="#Potential">Potential</a><a id="Potential-1"></a><a class="docs-heading-anchor-permalink" href="#Potential" title="Permalink"></a></h4><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Antique.V-Tuple{DeltaPotential, Any}-DeltaPotential" href="#Antique.V-Tuple{DeltaPotential, Any}-DeltaPotential"><code>Antique.V</code></a><span class="docstring-category">Method</span></header><section><div><p><code>V(model::DeltaPotential, x)</code></p><p class="math-container">\[V(x) = -\alpha \delta(x).\]</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ohno/Antique.jl/blob/323f795c2cb7cf70a2442b36f31955084340d421/src/DeltaPotential.jl#L33-L39">source</a></section></article><h4 id="Eigen-Values"><a class="docs-heading-anchor" href="#Eigen-Values">Eigen Values</a><a id="Eigen-Values-1"></a><a class="docs-heading-anchor-permalink" href="#Eigen-Values" title="Permalink"></a></h4><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Antique.E-Tuple{DeltaPotential}-DeltaPotential" href="#Antique.E-Tuple{DeltaPotential}-DeltaPotential"><code>Antique.E</code></a><span class="docstring-category">Method</span></header><section><div><p><code>E(model::DeltaPotential)</code></p><p class="math-container">\[E = - \frac{m\alpha^2}{2\hbar^2}\]</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ohno/Antique.jl/blob/323f795c2cb7cf70a2442b36f31955084340d421/src/DeltaPotential.jl#L41-L47">source</a></section></article><h4 id="Eigen-Functions"><a class="docs-heading-anchor" href="#Eigen-Functions">Eigen Functions</a><a id="Eigen-Functions-1"></a><a class="docs-heading-anchor-permalink" href="#Eigen-Functions" title="Permalink"></a></h4><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Antique.ψ-Tuple{DeltaPotential, Any}-DeltaPotential" href="#Antique.ψ-Tuple{DeltaPotential, Any}-DeltaPotential"><code>Antique.ψ</code></a><span class="docstring-category">Method</span></header><section><div><p><code>ψ(model::DeltaPotential, x)</code></p><p class="math-container">\[\psi(x) = \frac{\sqrt{m\alpha}}{\hbar} \mathrm{e}^{-m\alpha |x|/\hbar^2}\]</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ohno/Antique.jl/blob/323f795c2cb7cf70a2442b36f31955084340d421/src/DeltaPotential.jl#L49-L55">source</a></section></article><h2 id="Usage-and-Examples"><a class="docs-heading-anchor" href="#Usage-and-Examples">Usage &amp; Examples</a><a id="Usage-and-Examples-1"></a><a class="docs-heading-anchor-permalink" href="#Usage-and-Examples" title="Permalink"></a></h2><p><a href="../#Install">Install Antique.jl</a> for the first use and run <code>using Antique</code> before each use. The energy <code>E()</code>, wavefunction <code>ψ()</code>, potential <code>V()</code> and some other functions are suppoted. In this system, the model is generated by <code>DeltaPotential</code> and several parameters <code>α</code>, <code>m</code> and <code></code> are set as optional arguments.</p><pre><code class="language-julia hljs">using Antique
DP = DeltaPotential(α=1.0, m=1.0, ℏ=1.0)</code></pre><p>Parameters:</p><pre><code class="language-julia hljs">julia&gt; DP.α
1.0

julia&gt; DP.m
1.0

julia&gt; DP.ℏ
1.0</code></pre><p>Eigen values:</p><pre><code class="language-julia hljs">julia&gt; E(DP)
-0.5</code></pre><p>Wave functions:</p><pre><code class="language-julia hljs">DP = DeltaPotential(α=0.1, m=0.5, ℏ=0.1)
x = LinRange(-2,2,500);

using Plots
plot(x, x-&gt;ψ(DP,x), linewidth=3)
plot!(xlim=[-2,2], ylim=[0,2.5], legend=false)
plot!(xlabel=&quot;x&quot;, ylabel=&quot;ψ(x)&quot;, title=&quot;Delta Potential&quot;)</code></pre><p><img src="../assets/fig/DeltaPotential_4_1.png" alt/></p><p>Potential energy curve, Energy levels, Wave functions:</p><pre><code class="language-julia hljs">DP = DeltaPotential(α=0.1, m=0.5, ℏ=0.1)
x = LinRange(-2,2,500);

using Plots
plot(xlim=[-2,2], ylim=[-1,2.0], legend=false, xlabel=&quot;\$x\$&quot;, ylabel=&quot;\$V(x),~E,~\\psi(x)+E\$&quot;)
plot!([-2,0,0,0,2], [0,0,-1,0,0], lw=1, lc=:black) # plot!(x, x-&gt;V(DP,x), lw=1, lc=:black)
plot!(x, x-&gt;ψ(DP,x) + E(DP), lw=2, lc=1)
hline!([E(DP)], lw=1, ls=:dash, lc=:black)</code></pre><p><img src="../assets/fig/DeltaPotential_5_1.png" alt/></p><h2 id="Testing"><a class="docs-heading-anchor" href="#Testing">Testing</a><a id="Testing-1"></a><a class="docs-heading-anchor-permalink" href="#Testing" title="Permalink"></a></h2><p>Unit testing and Integration testing were done using numerical integration (<a href="https://juliamath.github.io/QuadGK.jl/stable/">QuadGK.jl</a>). The test script is <a href="https://github.com/ohno/Antique.jl/blob/main/test/DeltaPotential.jl">here</a>.</p><h4 id="Normalization-of-\\psi(x)"><a class="docs-heading-anchor" href="#Normalization-of-\\psi(x)">Normalization of <span>$\psi(x)$</span></a><a id="Normalization-of-\\psi(x)-1"></a><a class="docs-heading-anchor-permalink" href="#Normalization-of-\\psi(x)" title="Permalink"></a></h4><p class="math-container">\[\int_{-\infty}^{\infty} \psi^\ast(x) \psi(x) ~\mathrm{d}x = 1\]</p><pre><code class="nohighlight hljs"> α | m | ℏ | analytical | numerical
--- | --- | --- | ----------------- | -----------------
0.1 | 0.1 | 0.1 | 1.000000000000 | 1.000000000000 ✔
0.1 | 0.1 | 1.0 | 1.000000000000 | 1.000000000000 ✔
0.1 | 0.1 | 7.0 | 1.000000000000 | 1.000004676239 ✔
0.1 | 1.0 | 0.1 | 1.000000000000 | 1.000000000000 ✔
0.1 | 1.0 | 1.0 | 1.000000000000 | 1.000000000000 ✔
0.1 | 1.0 | 7.0 | 1.000000000000 | 0.999999999999 ✔
0.1 | 7.0 | 0.1 | 1.000000000000 | 1.000000000000 ✔
0.1 | 7.0 | 1.0 | 1.000000000000 | 1.000000000000 ✔
0.1 | 7.0 | 7.0 | 1.000000000000 | 1.000000000000 ✔
1.0 | 0.1 | 0.1 | 1.000000000000 | 1.000000000000 ✔
1.0 | 0.1 | 1.0 | 1.000000000000 | 1.000000000000 ✔
1.0 | 0.1 | 7.0 | 1.000000000000 | 0.999999999999 ✔
1.0 | 1.0 | 0.1 | 1.000000000000 | 1.000000000000 ✔
1.0 | 1.0 | 1.0 | 1.000000000000 | 1.000000000000 ✔
1.0 | 1.0 | 7.0 | 1.000000000000 | 1.000000000000 ✔
1.0 | 7.0 | 0.1 | 1.000000000000 | 1.000000000000 ✔
1.0 | 7.0 | 1.0 | 1.000000000000 | 1.000000000000 ✔
1.0 | 7.0 | 7.0 | 1.000000000000 | 1.000000000000 ✔
7.0 | 0.1 | 0.1 | 1.000000000000 | 1.000000000000 ✔
7.0 | 0.1 | 1.0 | 1.000000000000 | 1.000000000000 ✔
7.0 | 0.1 | 7.0 | 1.000000000000 | 1.000000000000 ✔
7.0 | 1.0 | 0.1 | 1.000000000000 | 1.000000000000 ✔
7.0 | 1.0 | 1.0 | 1.000000000000 | 1.000000000000 ✔
7.0 | 1.0 | 7.0 | 1.000000000000 | 1.000000000000 ✔
7.0 | 7.0 | 0.1 | 1.000000000000 | 1.000000000000 ✔
7.0 | 7.0 | 1.0 | 1.000000000000 | 1.000000000000 ✔
7.0 | 7.0 | 7.0 | 1.000000000000 | 1.000000000000 ✔
</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../HydrogenAtom/">« Hydrogen Atom</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.3.0 on <span class="colophon-date" title="Thursday 28 March 2024 18:51">Thursday 28 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit f4d67b6

Please sign in to comment.