Skip to content

Commit

Permalink
build based on 310c075
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Aug 27, 2024
1 parent f0eae0e commit 67e6100
Show file tree
Hide file tree
Showing 9 changed files with 159 additions and 159 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-08-27T14:50:47","documenter_version":"1.3.0"}}
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-08-27T15:16:17","documenter_version":"1.3.0"}}
44 changes: 44 additions & 0 deletions dev/guide/1f2edeb3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 38 additions & 38 deletions dev/guide/1f7f98ff.svg → dev/guide/458391c0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 31 additions & 31 deletions dev/guide/f03a28e6.svg → dev/guide/542b7275.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 35 additions & 35 deletions dev/guide/3dab6a67.svg → dev/guide/8a12b1fb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 0 additions & 44 deletions dev/guide/b0d296aa.svg

This file was deleted.

16 changes: 8 additions & 8 deletions dev/guide/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
(19.809045226130653, 39.618090452261306)
(19.90452261306533, 39.80904522613065)
(20.0, 40.0)</code></pre><p>A Gaussian random process (random function) can be obtained by projecting the Gaussian random field along the time-space array <code>P</code>. Then, we can use <code>R()</code> to invoke the process and generate a random time series.</p><pre><code class="language-julia hljs">R=RandomFunction(P, B)
plot(t, R(), xlabel=&quot;t&quot;, ylabel=&quot;B(t)&quot;, size=(400,300))</code></pre><img src="b0d296aa.svg" alt="Example block output"/><h2 id="Shuttling-of-a-single-spin"><a class="docs-heading-anchor" href="#Shuttling-of-a-single-spin">Shuttling of a single spin</a><a id="Shuttling-of-a-single-spin-1"></a><a class="docs-heading-anchor-permalink" href="#Shuttling-of-a-single-spin" title="Permalink"></a></h2><p>We can follow the above approach to define a single-spin shuttling model.</p><pre><code class="language-julia hljs">σ = sqrt(2) / 20; # variance of the process
plot(t, R(), xlabel=&quot;t&quot;, ylabel=&quot;B(t)&quot;, size=(400,300))</code></pre><img src="1f2edeb3.svg" alt="Example block output"/><h2 id="Shuttling-of-a-single-spin"><a class="docs-heading-anchor" href="#Shuttling-of-a-single-spin">Shuttling of a single spin</a><a id="Shuttling-of-a-single-spin-1"></a><a class="docs-heading-anchor-permalink" href="#Shuttling-of-a-single-spin" title="Permalink"></a></h2><p>We can follow the above approach to define a single-spin shuttling model.</p><pre><code class="language-julia hljs">σ = sqrt(2) / 20; # variance of the process
κₜ=1/20; # temporal correlation
κₓ=1/0.1; # spatial correlation
B=OrnsteinUhlenbeckField(0,[κₜ,κₓ],σ);
Expand All @@ -47,14 +47,14 @@
Shuttling Paths:</code></pre><p>The <code>println</code> function provides us with an overview of the model. It&#39;s a single spin shuttling problem with the initial state <code>Ψ₀</code> and an Ornstein-Uhlenbeck noise. The total time of simulation is <code>T</code>, which is discretized into <code>N</code> steps.</p><p>The effective noise of this spin qubit is completely characterized by its covariance matrix. </p><pre><code class="language-julia hljs">heatmap(collect(sqrt.(model.R.Σ)), title=&quot;sqrt cov, 1-spin one-way shuttling&quot;,
size=(400,300),
xlabel=&quot;t1&quot;, ylabel=&quot;t2&quot;, dpi=300,
right_margin=5Plots.mm)</code></pre><img src="3dab6a67.svg" alt="Example block output"/><p>The state fidelity after such a quantum process can be obtained using numerical integration of the covariance matrix. </p><pre><code class="language-julia hljs">f1=statefidelity(model); # direct integration
right_margin=5Plots.mm)</code></pre><img src="8a12b1fb.svg" alt="Example block output"/><p>The state fidelity after such a quantum process can be obtained using numerical integration of the covariance matrix. </p><pre><code class="language-julia hljs">f1=statefidelity(model); # direct integration

f2, f2_err=sampling(model, statefidelity, M); # Monte-Carlo sampling</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">(0.5226628185224098, 0.12416378224951541)</code></pre><p>An analytical solution is also available for single-spin shuttling at a constant velocity. </p><pre><code class="language-julia hljs">f3=1/2*(1+W(T,L,B));</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.5183394145238882</code></pre><p>We can compare the results form the three methods and check their consistency.</p><pre><code class="language-julia hljs">@assert isapprox(f1, f3,rtol=1e-2)
f2, f2_err=sampling(model, statefidelity, M); # Monte-Carlo sampling</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">(0.5210263631848855, 0.12494002266424573)</code></pre><p>An analytical solution is also available for single-spin shuttling at a constant velocity. </p><pre><code class="language-julia hljs">f3=1/2*(1+W(T,L,B));</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.5183394145238882</code></pre><p>We can compare the results form the three methods and check their consistency.</p><pre><code class="language-julia hljs">@assert isapprox(f1, f3,rtol=1e-2)
@assert isapprox(f2, f3, rtol=1e-2)
println(&quot;NI:&quot;, f1)
println(&quot;MC:&quot;, f2)
println(&quot;TH:&quot;, f3)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">NI:0.5172897445804852
MC:0.5226628185224098
MC:0.5210263631848855
TH:0.5183394145238882</code></pre><p>The pure dephasing channel is computationally simple and can be represented by a dephasing matrix <span>$w$</span>, such that the final density state after the channel is given by <span>$\mathcal{E}(\rho)=w \odot\rho$</span>. Here <span>$\odot$</span> is an element-wise Hadmard product. </p><pre><code class="language-julia hljs">Ψ= model.Ψ
ρ=Ψ*Ψ&#39;
w=dephasingmatrix(model)
Expand All @@ -72,17 +72,17 @@
Shuttling Paths:</code></pre><p>The system is initialized in the Bell state <span>$\ket{\Psi^-}$</span>. The model encapsulated a model of two spins shuttled in a sequential manner, as we can see from the two trajectories <code>x1(t)</code> and <code>x2(t)</code>. One spin goes first and then follows another, with a waiting time of <code>T0</code>. This is modeled by the piece-wise linear trajectories. We can see some quite interesting covariance from such a system.</p><pre><code class="language-julia hljs">plot(model.R.P[1:N,1], label=&quot;x1(t)&quot;,
xlabel=&quot;t&quot;, ylabel=&quot;x&quot;,size=(400,300), dpi=300
)
plot!(model.R.P[N+1:2N,1], label=&quot;x2(t)&quot;)</code></pre><img src="1f7f98ff.svg" alt="Example block output"/><pre><code class="language-julia hljs">heatmap(collect(model.R.Σ)*1e3, title=&quot;covariance, 2-spin sequential shuttling&quot;,
plot!(model.R.P[N+1:2N,1], label=&quot;x2(t)&quot;)</code></pre><img src="458391c0.svg" alt="Example block output"/><pre><code class="language-julia hljs">heatmap(collect(model.R.Σ)*1e3, title=&quot;covariance, 2-spin sequential shuttling&quot;,
size=(400,300),
xlabel=&quot;t1&quot;, ylabel=&quot;t2&quot;, dpi=300,
right_margin=5Plots.mm)</code></pre><img src="f03a28e6.svg" alt="Example block output"/><p>We can check the dephasing of the system and calculate its fidelity as before. </p><pre><code class="language-julia hljs">f1=statefidelity(model)
right_margin=5Plots.mm)</code></pre><img src="542b7275.svg" alt="Example block output"/><p>We can check the dephasing of the system and calculate its fidelity as before. </p><pre><code class="language-julia hljs">f1=statefidelity(model)
f2, f2_err=sampling(model, statefidelity, M)
f3=1/2*(1+W(T0, T1, L,B))

println(&quot;NI:&quot;, f1)
println(&quot;MC:&quot;, f2)
println(&quot;TH:&quot;, f3)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">NI:0.6234798910481352
MC:0.626952105107095
MC:0.6322664924140344
TH:0.6238118248013063</code></pre><p>The density matrix after the channel can be given by the dephasing matrix.</p><pre><code class="language-julia hljs">Ψ= model.Ψ
ρ=Ψ*Ψ&#39;
w=dephasingmatrix(model)
Expand All @@ -91,4 +91,4 @@
0.0+0.0im 0.0+0.0im 0.0-0.0im 0.0+0.0im
0.0+0.0im 0.5+0.0im -0.12348-0.0im 0.0+0.0im
0.0+0.0im -0.12348+0.0im 0.5+0.0im 0.0+0.0im
0.0+0.0im 0.0+0.0im 0.0-0.0im 0.0+0.0im</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../manual/">Manual »</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="Tuesday 27 August 2024 14:50">Tuesday 27 August 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0.0+0.0im 0.0+0.0im 0.0-0.0im 0.0+0.0im</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../manual/">Manual »</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="Tuesday 27 August 2024 15:16">Tuesday 27 August 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/manual/index.html

Large diffs are not rendered by default.

0 comments on commit 67e6100

Please sign in to comment.