Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
fix keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger-luo committed Mar 8, 2019
1 parent a6c708b commit 4833cc2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/measure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ function _measure(pl::AbstractMatrix, ntimes::Int)
return res
end

YaoBase.measure(reg::ArrayReg{1}; nshot::Int=1) = _measure(reg |> probs, nshot)
YaoBase.measure(reg::ArrayReg{1}; ntimes::Int=1) = _measure(reg |> probs, ntimes)

function YaoBase.measure(reg::ArrayReg{B}; nshot::Int=1) where B
function YaoBase.measure(reg::ArrayReg{B}; ntimes::Int=1) where B
pl = dropdims(sum(reg |> rank3 .|> abs2, dims=2), dims=2)
return _measure(pl, nshot)
return _measure(pl, ntimes)
end

function YaoBase.measure_remove!(reg::ArrayReg{B}) where B
Expand Down

0 comments on commit 4833cc2

Please sign in to comment.