Skip to content

Commit

Permalink
Fix a bug in subspace; export norm
Browse files Browse the repository at this point in the history
  • Loading branch information
david-pl committed Aug 2, 2018
1 parent 5d8dccd commit b803bd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/QuantumOptics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using SparseArrays, LinearAlgebra

export bases, Basis, GenericBasis, CompositeBasis, basis,
tensor, , permutesystems,
states, StateVector, Bra, Ket, basisstate,
states, StateVector, Bra, Ket, basisstate, norm,
dagger, normalize, normalize!,
operators, Operator, expect, variance, identityoperator, ptrace, embed, dense, tr,
sparse,
Expand Down
3 changes: 2 additions & 1 deletion src/subspace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ mutable struct SubspaceBasis <: Basis
throw(ArgumentError("The basis of the basisstates has to be the superbasis."))
end
end
basisstates_hash = hash([hash.(x.data) for x=basisstates])
println(basisstates)
basisstates_hash = hash(hash.([hash.(x.data) for x=basisstates]))
new(Int[length(basisstates)], superbasis, basisstates, basisstates_hash)
end
end
Expand Down

0 comments on commit b803bd0

Please sign in to comment.