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
11 changes: 8 additions & 3 deletions src/AsymptoticBound/CramerRao.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ abstract type SLD <: AbstractDtype end
abstract type RLD <: AbstractDtype end
abstract type LLD <: AbstractDtype end

struct QFIM_Obj{D} <: AbstractObj
struct QFIM_Obj{P,D} <: AbstractObj
W::AbstractMatrix
eps::Number
end

struct CFIM_obj <: AbstractObj
struct CFIM_obj{P} <: AbstractObj
M::AbstractVecOrMat
W::AbstractMatrix
eps::Number
end

struct HCRB <: AbstractObj
struct HCRB{P} <: AbstractObj
W::AbstractMatrix
eps::Number
end

QFIM_Obj(W, eps, syms::Symbol...) = QFIM_Obj{eval.(syms)...}(W,eps)
CFIM_Obj(M, W, eps, syms::Symbol...) = CFIM_Obj{eval.(syms)...}(M,W,eps)
HCRB_Obj(W, eps, syms::Symbol...) = HCRB_Obj{eval.(syms)...}(W,eps)

7 changes: 7 additions & 0 deletions src/AsymptoticBound/CramerRaoBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function SLD_liouville(
∂ρ_∂x::Vector{Matrix{T}};
eps = eps_default,
) where {T<:Complex}

(x -> SLD_liouville(ρ, x; eps = eps)).(∂ρ_∂x)
end

Expand Down Expand Up @@ -187,6 +188,7 @@ function QFIM(
dtype = :SLD,
eps = eps_default,
) where {T<:Complex}

Symbol("QFIM_" * string(dtype))(ρ, dρ; eps = eps)
end

Expand All @@ -197,6 +199,7 @@ function QFIM(
dtype = :SLD,
eps = eps_default,
) where {T<:Complex}

Symbol("QFIM_" * string(dtype))(ρ, dρ; eps = eps)
end

Expand All @@ -211,6 +214,7 @@ function QFIM(
dtype = :SLD,
eps = eps_default,
) where {T<:Complex}

F = QFIM(ρ, dρ; dtype = dtype, eps = eps)
LD = eval(dtype)(ρ, dρ; eps = eps)
return F, LD
Expand All @@ -224,6 +228,7 @@ function QFIM(
dtype = :SLD,
eps = eps_default,
) where {T<:Complex}

F = QFIM(ρ, dρ; dtype = dtype, eps = eps)
LD = eval(dtype)(ρ, dρ; eps = eps)
return F, LD
Expand Down Expand Up @@ -346,11 +351,13 @@ function QFIM_Gauss(R̄::V, dR̄::VV, D::M, dD::VM) where {V,VV,M,VM<:AbstractVe
i = 1:quad_num, j = 1:quad_num
] for k = 1:para_num
]

S, cs = Williamson_form(C)
Gs = G_Gauss(S, dC, cs)
F = [
tr(Gs[i] * dC[j]) + transpose(dR̄[i]) * inv(C) * dR̄[j] for i = 1:para_num,
j = 1:para_num
]

F |> real
end
4 changes: 0 additions & 4 deletions src/dynamics.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
abstract type AbstractDynamics end
abstract type AbstractDynamicsData end

abstract type AbstracParaType end
abstract type single_para <: AbstracParaType end
abstract type multi_para <: AbstracParaType end

abstract type AbstractStateType end
abstract type ket <: AbstractStateType end
abstract type dm <: AbstractStateType end
Expand Down
3 changes: 3 additions & 0 deletions src/objective.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
abstract type AbstractObj end

abstract type AbstracParaType end
abstract type single_para <: AbstracParaType end
abstract type multi_para <: AbstracParaType end

include("AsymptoticBound/CramerRao.jl")
include("AsymptoticBound/Holevo")