From 57c8bb23208ac0c78dc287d28ec062214446d5a1 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 14 Mar 2024 14:15:27 +0000 Subject: [PATCH] build based on 34e9b38 --- dev/.documenter-siteinfo.json | 2 +- dev/guide/index.html | 2 +- dev/index.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index bfeab87..098cef8 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.6.7","generation_timestamp":"2024-03-08T17:16:49","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.6.7","generation_timestamp":"2024-03-14T14:15:23","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/dev/guide/index.html b/dev/guide/index.html index fca3b40..3b1498f 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 1c76da5..e6aa0da 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,3 +1,3 @@ -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

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.φFunction

Analytical average fidelity of a one-spin shuttling model.

source

Analytical average fidelity of a sequenced two-spin EPR pair shuttling model.

source

Theoretical fidelity of a one-spin shuttling model for a pink-brownian noise.

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::Array{<:Real}: 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₁::Matrix{<:Real}: time-position array
  • P₂::Matrix{<:Real}: time-position array
  • process::GaussianRandomField: a Gaussian random field
source

Auto-Covariance matrix of a Gaussian random process.

source
+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

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.φFunction

Analytical average fidelity of a one-spin shuttling model.

source

Analytical average fidelity of a sequenced two-spin EPR pair shuttling model.

source

Theoretical fidelity of a one-spin shuttling model for a pink-brownian noise.

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::Array{<:Real}: 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₁::Matrix{<:Real}: time-position array
  • P₂::Matrix{<:Real}: time-position array
  • process::GaussianRandomField: a Gaussian random field
source

Auto-Covariance matrix of a Gaussian random process.

source