Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
Refactor Dense constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Apr 17, 2024
1 parent 9c2886e commit 1952c9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Ansatz/Dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ struct Dense <: Ansatz
super::Quantum
end

function Dense(::State, array::AbstractArray; sites::Vector{Site} = Site.(1:ndims(array)))
function Dense(::State, array::AbstractArray; sites = Site.(1:ndims(array)))
@assert ndims(array) > 0
@assert all(>(1), size(array))

Expand All @@ -18,7 +18,7 @@ function Dense(::State, array::AbstractArray; sites::Vector{Site} = Site.(1:ndim
Dense(qtn)
end

function Dense(::Operator, array::AbstractArray; sites::Vector{Site})
function Dense(::Operator, array::AbstractArray; sites)
@assert ndims(array) > 0
@assert all(>(1), size(array))
@assert length(sites) == ndims(array)
Expand Down

0 comments on commit 1952c9c

Please sign in to comment.