Skip to content

Commit

Permalink
improce code style
Browse files Browse the repository at this point in the history
  • Loading branch information
lpawela committed Nov 20, 2020
1 parent b7c463d commit a3e631a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/search.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function spectrum(ψ::MPS, keep::Int)
pCut = prob = 0.
k = 1

if keep < (*)(rank(ψ)...)
if keep < prod(rank(ψ))
keep_extra += 1
end

Expand Down
4 changes: 2 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ _σ(idx::Int) = (idx == 1) ? -1 : idx - 1

local_basis(d::Int) = union(-1, 1:d-1)

function proj(state::T, dims::S) where {T, S <: Union{Vector, NTuple}}
P = []
function proj(state, dims::T) where {T <: Union{Vector, NTuple}}
P = Matrix{Float64}[]
for (σ, r) zip(state, dims)
v = zeros(r)
v[idx(σ)...] = 1.
Expand Down

0 comments on commit a3e631a

Please sign in to comment.