Skip to content

Commit

Permalink
Merge 89e2ae3 into 6131b1c
Browse files Browse the repository at this point in the history
  • Loading branch information
bastikr committed Feb 9, 2017
2 parents 6131b1c + 89e2ae3 commit bc7fae2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/operators_lazy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Base: ==, *, /, +, -
import ..operators: dagger, identityoperator,
trace, ptrace, normalize!, tensor, permutesystems

using Base.Cartesian
using ..bases, ..states, ..operators, ..operators_dense, ..operators_sparse

export lazy, LazyWrapper, LazyTensor, LazySum, LazyProduct
Expand Down
4 changes: 2 additions & 2 deletions src/operators_lazytensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function operators.gemv!(alpha, a::LazyTensor, b::Ket, beta, result::Ket)
_lazytensor_gemv!(rank, index, Complex(1.), a.operators[op_index], b, Complex(0.), tmp)
b = tmp
end
result.data[:] = beta*result.data[:] + b.data[:]
result.data[:] = beta*result.data[:] + alpha*a.factor*b.data[:]
nothing
end

Expand Down Expand Up @@ -206,6 +206,6 @@ function operators.gemv!(alpha, a::Bra, b::LazyTensor, beta, result::Bra)
_lazytensor_gemv!(rank, index, Complex(1.), a, b.operators[op_index], Complex(0.), tmp)
a = tmp
end
result.data[:] = beta*result.data[:] + a.data[:]
result.data[:] = beta*result.data[:] + alpha*b.factor*a.data[:]
nothing
end

0 comments on commit bc7fae2

Please sign in to comment.