diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index ca71a4a..3653a73 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-25T19:30:34","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-25T19:32:11","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/dev/guide/index.html b/dev/guide/index.html index f7ed4e4..8dc350f 100644 --- a/dev/guide/index.html +++ b/dev/guide/index.html @@ -12,4 +12,4 @@ @assert isapprox(f2, f3, rtol=1e-2) println("NI:", f1) println("MC:", f2) -println("TH:", f3)

Shuttling of entangled spin pairs.

+println("TH:", f3)

Shuttling of entangled spin pairs.

diff --git a/dev/index.html b/dev/index.html index 6bc9ebb..ad1fc2e 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · SpinShuttling.jl

SpinShuttling.jl

Simulate the multiple-spin shuttling problem under correlated stochastic noise.

Installation

SpinShuttling can be installed using the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run

pkg> add SpinShuttling
+Home · SpinShuttling.jl

SpinShuttling.jl

Simulate the multiple-spin shuttling problem under correlated stochastic noise.

Installation

SpinShuttling can be installed using the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run

pkg> add SpinShuttling
diff --git a/dev/manual/index.html b/dev/manual/index.html index d1daffb..672f888 100644 --- a/dev/manual/index.html +++ b/dev/manual/index.html @@ -1,3 +1,3 @@ Manual · SpinShuttling.jl

APIs

Spin Shuttling Models

SpinShuttling.OneSpinModelFunction

General one spin shuttling model initialized at initial state |Ψ₀⟩, with arbitrary shuttling path x(t).

Arguments

  • Ψ::Vector{<:Number}: Initial state of the spin system, the length of the vector must be `2^n
  • T::Real: Maximum time
  • N::Int: Time discretization
  • B::GaussianRandomField: Noise field
  • x::Function: Shuttling path
source

One spin shuttling model initialzied at |Ψ₀⟩=|+⟩. The qubit is shuttled at constant velocity along the path x(t)=L/T*t, with total time T in μs and length L in μm.

source
SpinShuttling.OneSpinForthBackModelFunction

One spin shuttling model initialzied at |Ψ₀⟩=|+⟩. The qubit is shuttled at constant velocity along a forth-back path x(t, T, L) = t<T/2 ? 2L/T*t : 2L/T*(T-t), with total time T in μs and length L in μm.

Arguments

  • T::Real: Maximum time
  • L::Real: Length of the path
  • N::Int: Time discretization
  • B::GaussianRandomField: Noise field
  • v::Real: Velocity of the shuttling
source
SpinShuttling.TwoSpinModelFunction

General two spin shuttling model initialized at initial state |Ψ₀⟩, with arbitrary shuttling paths x₁(t), x₂(t).

Arguments

  • Ψ::Vector{<:Number}: Initial state of the spin system, the length of the vector must be `2^n
  • T::Real: Maximum time
  • N::Int: Time discretization
  • B::GaussianRandomField: Noise field
  • x₁::Function: Shuttling path for the first spin
  • x₂::Function: Shuttling path for the second spin
source

Two spin shuttling model initialized at the singlet state |Ψ₀⟩=1/√2(|↑↓⟩-|↓↑⟩). The qubits are shuttled at constant velocity along the path x₁(t)=L/T₁*t and x₂(t)=L/T₁*(t-T₀). The delay between the them is T₀ and the total shuttling time is T₁+T₀. It should be noticed that due to the exclusion of fermions, x₁(t) and x₂(t) cannot overlap.

source
SpinShuttling.TwoSpinParallelModelFunction

Two spin shuttling model initialized at the singlet state |Ψ₀⟩=1/√2(|↑↓⟩-|↓↑⟩). The qubits are shuttled at constant velocity along the 2D path x₁(t)=L/T*t, y₁(t)=0 and x₂(t)=L/T*t, y₂(t)=D. The total shuttling time is T and the length of the path is L in μm.

source

Fidelity Metric

SpinShuttling.fidelityFunction

Sample a phase integral of the process. The integrate of a random function should be obtained from directly summation without using high-order interpolation (Simpson or trapezoid).

source
SpinShuttling.samplingFunction

Monte-Carlo sampling of any objective function. The function must return Tuple{Real,Real} or Tuple{Vector{<:Real},Vector{<:Real}}

Arguments

  • samplingfunction::Function: The function to be sampled
  • M::Int: Monte-Carlo sampling size

Returns

  • Tuple{Real,Real}: The mean and variance of the sampled function
  • Tuple{Vector{<:Real},Vector{<:Real}}: The mean and variance of the sampled function

Example

f(x) = x^2
-sampling(f, 1000)

Reference

https://en.wikipedia.org/wiki/Standarddeviation#Rapidcalculation_methods

source

Sampling an observable that defines on a specific spin shuttling model

Arguments

  • model::ShuttlingModel: The spin shuttling model
  • objective::Function: The objective function objective(mode::ShuttlingModel; randseq)`
  • M::Int: Monte-Carlo sampling size
source
SpinShuttling.averagefidelityFunction

Calculate the average fidelity of a spin shuttling model using numerical integration of the covariance matrix.

Arguments

  • model::ShuttlingModel: The spin shuttling model
source
SpinShuttling.WFunction

Analytical dephasing factor of a one-spin shuttling model.

Arguments

  • T::Real: Total time
  • L::Real: Length of the path
  • B<:GaussianRandomField: Noise field, Ornstein-Uhlenbeck or Pink-Brownian
  • path::Symbol: Path of the shuttling model, :straight or :forthback
source

Analytical dephasing factor of a sequenced two-spin EPR pair shuttling model.

source

Stochastics

SpinShuttling.PinkBrownianFieldType

Pink-Brownian Field, the correlation function of which is σ^2 * (expinti(-γ[2]abs(t₁ - t₂)) - expinti(-γ[1]abs(t₁ - t₂)))/log(γ[2]/γ[1]) * exp(-|x₁-x₂|/θ) where expinti is the exponential integral function.

source
SpinShuttling.RandomFunctionType

Similar type of RandomFunction in Mathematica. Can be used to generate a time series on a given time array subject to a Gaussian random process traced from a Gaussian random field.

Arguments

  • μ::Vector{<:Real}: mean of the process
  • P::Vector{<:Point}: time-position array
  • Σ::Symmetric{<:Real}: covariance matrices
  • C::Cholesky: Cholesky decomposition of the covariance matrices
source
SpinShuttling.CompositeRandomFunctionFunction

Create a new random function composed by a linear combination of random processes. The input random function represents the direct sum of these processes. The output random function is a tensor contraction from the input.

source
SpinShuttling.characteristicvalueFunction

Compute the final phase of the characteristic functional of the process from the numerical quadrature of the covariance matrix. Using Simpson's rule by default.

source
SpinShuttling.covariancematrixFunction

Covariance matrix of a Gaussian random field. When P₁=P₂, it is the auto-covariance matrix of a Gaussian random process. When P₁!=P₂, it is the cross-covariance matrix between two Gaussian random processes.

Arguments

  • P₁::Vector{<:Point}: time-position array
  • P₂::Vector{<:Point}: time-position array
  • process::GaussianRandomField: a Gaussian random field
source

Auto-Covariance matrix of a Gaussian random process.

Arguments

  • P::Vector{<:Point}: time-position array
  • process::GaussianRandomField: a Gaussian random field

Returns

  • Symmetric{Real}: auto-covariance matrix
source
SpinShuttling.covarianceFunction

Covariance function of Gaussian random field.

Arguments

  • p₁::Point: time-position array
  • p₂::Point: time-position array
  • process<:GaussianRandomField: a Gaussian random field, e.g. OrnsteinUhlenbeckField or PinkBrownianField
source
+sampling(f, 1000)

Reference

https://en.wikipedia.org/wiki/Standarddeviation#Rapidcalculation_methods

source

Sampling an observable that defines on a specific spin shuttling model

Arguments

source
SpinShuttling.averagefidelityFunction

Calculate the average fidelity of a spin shuttling model using numerical integration of the covariance matrix.

Arguments

  • model::ShuttlingModel: The spin shuttling model
source
SpinShuttling.WFunction

Analytical dephasing factor of a one-spin shuttling model.

Arguments

  • T::Real: Total time
  • L::Real: Length of the path
  • B<:GaussianRandomField: Noise field, Ornstein-Uhlenbeck or Pink-Brownian
  • path::Symbol: Path of the shuttling model, :straight or :forthback
source

Analytical dephasing factor of a sequenced two-spin EPR pair shuttling model.

source

Stochastics

SpinShuttling.OrnsteinUhlenbeckFieldType

Ornstein-Uhlenbeck field, the correlation function of which is σ^2 * exp(-|t₁ - t₂|/θ_t) * exp(-|x₁-x₂|/θ_x) where t is time and x is position.

source
SpinShuttling.PinkBrownianFieldType

Pink-Brownian Field, the correlation function of which is σ^2 * (expinti(-γ[2]abs(t₁ - t₂)) - expinti(-γ[1]abs(t₁ - t₂)))/log(γ[2]/γ[1]) * exp(-|x₁-x₂|/θ) where expinti is the exponential integral function.

source
SpinShuttling.RandomFunctionType

Similar type of RandomFunction in Mathematica. Can be used to generate a time series on a given time array subject to a Gaussian random process traced from a Gaussian random field.

Arguments

  • μ::Vector{<:Real}: mean of the process
  • P::Vector{<:Point}: time-position array
  • Σ::Symmetric{<:Real}: covariance matrices
  • C::Cholesky: Cholesky decomposition of the covariance matrices
source
SpinShuttling.CompositeRandomFunctionFunction

Create a new random function composed by a linear combination of random processes. The input random function represents the direct sum of these processes. The output random function is a tensor contraction from the input.

source
SpinShuttling.characteristicfunctionFunction

Compute the characteristic functional of the process from the numerical quadrature of the covariance matrix. Using Simpson's rule by default.

source
SpinShuttling.characteristicvalueFunction

Compute the final phase of the characteristic functional of the process from the numerical quadrature of the covariance matrix. Using Simpson's rule by default.

source
SpinShuttling.covariancematrixFunction

Covariance matrix of a Gaussian random field. When P₁=P₂, it is the auto-covariance matrix of a Gaussian random process. When P₁!=P₂, it is the cross-covariance matrix between two Gaussian random processes.

Arguments

  • P₁::Vector{<:Point}: time-position array
  • P₂::Vector{<:Point}: time-position array
  • process::GaussianRandomField: a Gaussian random field
source

Auto-Covariance matrix of a Gaussian random process.

Arguments

  • P::Vector{<:Point}: time-position array
  • process::GaussianRandomField: a Gaussian random field

Returns

  • Symmetric{Real}: auto-covariance matrix
source
SpinShuttling.covarianceFunction

Covariance function of Gaussian random field.

Arguments

  • p₁::Point: time-position array
  • p₂::Point: time-position array
  • process<:GaussianRandomField: a Gaussian random field, e.g. OrnsteinUhlenbeckField or PinkBrownianField
source