Skip to content
Permalink
Browse files

Fix bug in copy() for state vectors.

Missing parameter constraint means it was implemented for all types.
  • Loading branch information
bastikr committed Jun 13, 2017
1 parent c83a9df commit 3cee89b523e988fadaffda0faa428c8c752043cf
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/states.jl
@@ -49,7 +49,7 @@ Ket(b::Basis) = Ket(b, zeros(Complex128, length(b)))

Base.length(a::StateVector) = length(a.basis)::Int
bases.basis(a::StateVector) = a.basis
Base.copy{T}(a::T) = T(a.basis, copy(a.data))
Base.copy{T<:StateVector}(a::T) = T(a.basis, copy(a.data))

# Arithmetic operations
*(a::Bra, b::Ket) = (check_multiplicable(a, b); sum(a.data.*b.data))

0 comments on commit 3cee89b

Please sign in to comment.
You can’t perform that action at this time.