Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
GiggleLiu committed Jul 28, 2024
1 parent 2034a67 commit 85a0724
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/src/api/public.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@ read_td_file
sample
update_evidence!
update_temperature
random_matrix_product_state
```
4 changes: 2 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ connected in a chain.
- `chi` is the bond dimension of the virtual indices.
- `d` is the dimension of the physical indices.
"""
random_matrix_product_state(n::Int, chi::Int, d::Int=2) = random_matrix_product_state(ComplexF64, n, chi, d)
function random_matrix_product_state(::Type{T}, n::Int, chi::Int, d::Int=2) where T
# chi ^ (n-1) * (variance^n)^2 == 1/d^n
variance = d^(-1/2) * chi^(-1/2+1/2n)
Expand All @@ -357,4 +356,5 @@ function random_matrix_product_state(::Type{T}, n::Int, chi::Int, d::Int=2) wher
Dict{Int, Int}(),
Vector{Int}[[i] for i=1:n]
)
end
end
random_matrix_product_state(n::Int, chi::Int, d::Int=2) = random_matrix_product_state(ComplexF64, n, chi, d)

0 comments on commit 85a0724

Please sign in to comment.