Skip to content

Commit

Permalink
improve expect
Browse files Browse the repository at this point in the history
  • Loading branch information
ytdHuang committed Jan 27, 2025
1 parent 94eaf43 commit ca79557
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/qobj/functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ function expect(O::AbstractVector{<:AbstractQuantumObject{OperatorQuantumObject}
result .= expect.(O, Ref(ρ))
return result
end
function expect(O::AbstractQuantumObject{OperatorQuantumObject}, ρ::AbstractVector{<:QuantumObject})
_expect =-> expect(O, _ρ)
return _expect.(ρ)
end
expect(O::AbstractQuantumObject{OperatorQuantumObject}, ρ::AbstractVector{<:QuantumObject}) = expect.(Ref(O), ρ)
function expect(
O::AbstractVector{<:AbstractQuantumObject{OperatorQuantumObject,DimsType,<:Union{<:Hermitian{TF},<:Symmetric{TR}}}},
ρ::AbstractVector{<:QuantumObject},
Expand Down

0 comments on commit ca79557

Please sign in to comment.