Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/adaptive.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ pout, xout = QuanEstimation.Bayes([x], p, rho, y, M=M, savefile=false)
H, dH = QuanEstimation.BayesInput([x], H0_func, dH_func;
channel="dynamics")
# adaptive measurement
QuanEstimation.Adaptive([x], pout, rho0, tspan, H, dH; M=M,
QuanEstimation.Adapt([x], pout, rho0, tspan, H, dH; M=M,
max_episode=100)
8 changes: 4 additions & 4 deletions src/Common/AdaptiveScheme.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@doc raw"""

Adaptive(x::AbstractVector, p, rho0::AbstractMatrix, tspan, H, dH; method="FOP", savefile=false, max_episode::Int=1000, eps::Float64=1e-8, Hc=missing, ctrl=missing, decay=missing, M=missing, W=missing)
Adapt(x::AbstractVector, p, rho0::AbstractMatrix, tspan, H, dH; method="FOP", savefile=false, max_episode::Int=1000, eps::Float64=1e-8, Hc=missing, ctrl=missing, decay=missing, M=missing, W=missing)

In QuanEstimation, the Hamiltonian of the adaptive system should be written as
``H(\textbf{x}+\textbf{u})`` with ``\textbf{x}`` the unknown parameters and ``\textbf{u}``
Expand All @@ -22,7 +22,7 @@ Hamiltonian work at the optimal point ``\textbf{x}_{\mathrm{opt}}``.
- `M`: A set of positive operator-valued measure (POVM). The default measurement is a set of rank-one symmetric informationally complete POVM (SIC-POVM).
- `W`: Whether or not to save all the posterior distributions.
"""
function Adaptive(x::AbstractVector, p, rho0::AbstractMatrix, tspan, H, dH; method="FOP", savefile=false, max_episode::Int=1000, eps::Float64=1e-8,
function Adapt(x::AbstractVector, p, rho0::AbstractMatrix, tspan, H, dH; method="FOP", savefile=false, max_episode::Int=1000, eps::Float64=1e-8,
Hc=missing, ctrl=missing, decay=missing, M=missing, W=missing)
dim = size(rho0)[1]
para_num = length(x)
Expand Down Expand Up @@ -165,7 +165,7 @@ end

@doc raw"""

Adaptive(x::AbstractVector, p, rho0::AbstractMatrix, K, dK; method="FOP", savefile=false, max_episode::Int=1000, eps::Float64=1e-8, M=missing, W=missing)
Adapt(x::AbstractVector, p, rho0::AbstractMatrix, K, dK; method="FOP", savefile=false, max_episode::Int=1000, eps::Float64=1e-8, M=missing, W=missing)

In QuanEstimation, the Hamiltonian of the adaptive system should be written as
``H(\textbf{x}+\textbf{u})`` with ``\textbf{x}`` the unknown parameters and ``\textbf{u}``
Expand All @@ -183,7 +183,7 @@ Hamiltonian work at the optimal point ``\textbf{x}_{\mathrm{opt}}``.
- `M`: A set of positive operator-valued measure (POVM). The default measurement is a set of rank-one symmetric informationally complete POVM (SIC-POVM).
- `W`: Whether or not to save all the posterior distributions.
"""
function Adaptive(x::AbstractVector, p, rho0::AbstractMatrix, K, dK; method="FOP", savefile=false, max_episode::Int=1000,
function Adapt(x::AbstractVector, p, rho0::AbstractMatrix, K, dK; method="FOP", savefile=false, max_episode::Int=1000,
eps::Float64=1e-8, M=missing, W=missing)
dim = size(rho0)[1]
para_num = length(x)
Expand Down