Skip to content

Commit

Permalink
Add default d in shorthand signature
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiendesignolle committed Jun 27, 2024
1 parent 93f4fe3 commit 92a14a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function ket(::Type{T}, i::Integer, d::Integer = 2) where {T<:Number}
psi[i] = 1
return psi
end
ket(i::Integer, d::Integer) = ket(ComplexF64, i, d)
ket(i::Integer, d::Integer = 2) = ket(ComplexF64, i, d)
export ket

"""
Expand All @@ -31,7 +31,7 @@ function proj(::Type{T}, i::Integer, d::Integer = 2) where {T<:Number}
p[i, i] = 1
return p
end
proj(i::Integer, d::Integer) = proj(ComplexF64, i, d)
proj(i::Integer, d::Integer = 2) = proj(ComplexF64, i, d)
export proj

const Measurement{T} = Vector{LA.Hermitian{T,Matrix{T}}}
Expand Down

0 comments on commit 92a14a8

Please sign in to comment.