diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json
index 8854ee5..5884cc4 100644
--- a/dev/.documenter-siteinfo.json
+++ b/dev/.documenter-siteinfo.json
@@ -1 +1 @@
-{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-08-27T20:24:44","documenter_version":"1.3.0"}}
\ No newline at end of file
+{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-08-29T19:11:04","documenter_version":"1.3.0"}}
\ No newline at end of file
diff --git a/dev/assets/animation.gif b/dev/assets/animation.gif
new file mode 100644
index 0000000..9ed06cb
Binary files /dev/null and b/dev/assets/animation.gif differ
diff --git a/dev/assets/animation2spins.gif b/dev/assets/animation2spins.gif
new file mode 100644
index 0000000..4976fe2
Binary files /dev/null and b/dev/assets/animation2spins.gif differ
diff --git a/dev/guide/35287576.svg b/dev/guide/35287576.svg
new file mode 100644
index 0000000..daff82e
--- /dev/null
+++ b/dev/guide/35287576.svg
@@ -0,0 +1,42 @@
+
+
diff --git a/dev/guide/84bb832a.svg b/dev/guide/84bb832a.svg
deleted file mode 100644
index b15f386..0000000
--- a/dev/guide/84bb832a.svg
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
diff --git a/dev/guide/b35f86eb.svg b/dev/guide/b169c014.svg
similarity index 88%
rename from dev/guide/b35f86eb.svg
rename to dev/guide/b169c014.svg
index 3df9f7f..3d7f9df 100644
--- a/dev/guide/b35f86eb.svg
+++ b/dev/guide/b169c014.svg
@@ -1,52 +1,52 @@
+
A Gaussian random process (random function) can be obtained by projecting the Gaussian random field along the time-space array P
. Then, we can use R()
to invoke the process and generate a random time series.
R=RandomFunction(P, B)
-plot(t, R(), xlabel="t", ylabel="B(t)", size=(400,300))
We can follow the above approach to define a single-spin shuttling model.
σ = sqrt(2) / 20; # variance of the process
+plot(t, R(), xlabel="t", ylabel="B(t)", size=(400,300))
We can follow the above approach to define a single-spin shuttling model.
σ = sqrt(2) / 20; # variance of the process
κₜ=1/20; # temporal correlation
κₓ=1/0.1; # spatial correlation
B=OrnsteinUhlenbeckField(0,[κₜ,κₓ],σ);
@@ -47,20 +47,20 @@
Shuttling Paths:
The println
function provides us with an overview of the model. It's a single spin shuttling problem with the initial state Ψ₀
and an Ornstein-Uhlenbeck noise. The total time of simulation is T
, which is discretized into N
steps.
The effective noise of this spin qubit is completely characterized by its covariance matrix.
heatmap(collect(sqrt.(model.R.Σ)), title="sqrt cov, 1-spin one-way shuttling",
size=(400,300),
xlabel="t1", ylabel="t2", dpi=300,
-right_margin=5Plots.mm)
The state fidelity after such a quantum process can be obtained using numerical integration of the covariance matrix.
f1=statefidelity(model); # direct integration
+right_margin=5Plots.mm)
The state fidelity after such a quantum process can be obtained using numerical integration of the covariance matrix.
f1=statefidelity(model); # direct integration
-f2, f2_err=sampling(model, statefidelity, M); # Monte-Carlo sampling
(0.5186034242790567, 0.12320406635014308)
An analytical solution is also available for single-spin shuttling at a constant velocity.
f3=1/2*(1+W(T,L,B));
0.5183394145238882
We can compare the results form the three methods and check their consistency.
@assert isapprox(f1, f3,rtol=1e-2)
+f2, f2_err=sampling(model, statefidelity, M); # Monte-Carlo sampling
(0.5167902103616699, 0.12543367668916716)
An analytical solution is also available for single-spin shuttling at a constant velocity.
f3=1/2*(1+W(T,L,B));
0.5183394145238882
We can compare the results form the three methods and check their consistency.
@assert isapprox(f1, f3,rtol=1e-2)
@assert isapprox(f2, f3, rtol=1e-2)
println("NI:", f1)
println("MC:", f2)
-println("TH:", f3)
NI:0.5183393343112966
-MC:0.5186034242790567
+println("TH:", f3)
NI:0.5172897445804852
+MC:0.5167902103616699
TH:0.5183394145238882
The pure dephasing channel is computationally simple and can be represented by a dephasing matrix $w$, such that the final density state after the channel is given by $\mathcal{E}(\rho)=w \odot\rho$. Here $\odot$ is an element-wise Hadmard product.
Ψ= model.Ψ
ρ=Ψ*Ψ'
w=dephasingmatrix(model)
ρt=w.*ρ
2×2 Matrix{ComplexF64}:
- 0.5+0.0im 0.0183393+0.0im
- 0.0183393+0.0im 0.5+0.0im
We can check that the fidelity between the initial and final state is consistent with the results above.
f=(Ψ'*ρt*Ψ)
0.5183393343112966 + 0.0im
Following the approach above, we can further explore the multi-spin system. The general abstraction on such a problem is given by the data type ShuttlingModel
.
ShuttlingModel(n, Ψ, T, N, B, X, R)
Users can freely define an n-qubit system with an arbitrary initial state. Here, X=[x1,x2...]
is an array of functions, containing spin trajectories $x_i(t)$. R
is a random function constructed from the specific noise process.
One more example is the shuttling of two spin pairs. We can define such a two-spin system.
L=10; σ =sqrt(2)/20; M=5000; N=501; T1=100; T0=25; κₜ=1/20; κₓ=1/0.1;
+ 0.5+0.0im 0.0172897+0.0im
+ 0.0172897+0.0im 0.5+0.0im
We can check that the fidelity between the initial and final state is consistent with the results above.
f=(Ψ'*ρt*Ψ)
0.5172897445804852 + 0.0im
Following the approach above, we can further explore the multi-spin system. The general abstraction on such a problem is given by the data type ShuttlingModel
.
ShuttlingModel(n, Ψ, T, N, B, X, R)
Users can freely define an n-qubit system with an arbitrary initial state. Here, X=[x1,x2...]
is an array of functions, containing spin trajectories $x_i(t)$. R
is a random function constructed from the specific noise process.
One more example is the shuttling of two spin pairs. We can define such a two-spin system.
L=10; σ =sqrt(2)/20; M=5000; N=501; T1=100; T0=25; κₜ=1/20; κₓ=1/0.1;
B=OrnsteinUhlenbeckField(0,[κₜ,κₓ],σ)
model=TwoSpinSequentialModel(T0, T1, L, N, B)
println(model)
Model for spin shuttling
@@ -72,23 +72,23 @@
Shuttling Paths:
The system is initialized in the Bell state $\ket{\Psi^-}$. The model encapsulated a model of two spins shuttled in a sequential manner, as we can see from the two trajectories x1(t)
and x2(t)
. One spin goes first and then follows another, with a waiting time of T0
. This is modeled by the piece-wise linear trajectories. We can see some quite interesting covariance from such a system.
plot(model.R.P[1:N,1], label="x1(t)",
xlabel="t", ylabel="x",size=(400,300), dpi=300
)
-plot!(model.R.P[N+1:2N,1], label="x2(t)")
heatmap(collect(model.R.Σ)*1e3, title="covariance, 2-spin sequential shuttling",
+plot!(model.R.P[N+1:2N,1], label="x2(t)")
heatmap(collect(model.R.Σ)*1e3, title="covariance, 2-spin sequential shuttling",
size=(400,300),
xlabel="t1", ylabel="t2", dpi=300,
-right_margin=5Plots.mm)
We can check the dephasing of the system and calculate its fidelity as before.
f1=statefidelity(model)
+right_margin=5Plots.mm)
We can check the dephasing of the system and calculate its fidelity as before.
f1=statefidelity(model)
f2, f2_err=sampling(model, statefidelity, M)
f3=1/2*(1+W(T0, T1, L,B))
println("NI:", f1)
println("MC:", f2)
-println("TH:", f3)
NI:0.6238115349420134
-MC:0.6203135439267262
+println("TH:", f3)
NI:0.6234798910481352
+MC:0.6242115680361914
TH:0.6238118248013063
The density matrix after the channel can be given by the dephasing matrix.
Ψ= model.Ψ
ρ=Ψ*Ψ'
w=dephasingmatrix(model)
ρt=w.*ρ
4×4 Matrix{ComplexF64}:
- 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.123812-0.0im 0.0+0.0im
- 0.0+0.0im -0.123812+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
Settings
This document was generated with Documenter.jl version 1.3.0 on Tuesday 27 August 2024. Using Julia version 1.10.4.