diff --git a/examples/adaptive.jl b/examples/adaptive.jl index cede4be..d153c1d 100644 --- a/examples/adaptive.jl +++ b/examples/adaptive.jl @@ -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) diff --git a/src/Common/AdaptiveScheme.jl b/src/Common/AdaptiveScheme.jl index 3f04b2c..b300fa6 100644 --- a/src/Common/AdaptiveScheme.jl +++ b/src/Common/AdaptiveScheme.jl @@ -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}`` @@ -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) @@ -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}`` @@ -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)