diff --git a/.github/workflows/comment_trigger_test_itensors_mps.yml b/.github/workflows/comment_trigger_test_itensors_mps.yml index 3c29c51764..00a5f0fec2 100644 --- a/.github/workflows/comment_trigger_test_itensors_mps.yml +++ b/.github/workflows/comment_trigger_test_itensors_mps.yml @@ -9,7 +9,7 @@ on: jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.threads }} thread(s) - if: github.event.issue.pull_request && contains(github.event.comment.body, '[test ITensors mps]') + if: github.event.issue.pull_request && contains(github.event.comment.body, '[test ITensorMPS]') runs-on: ${{ matrix.os }} env: JULIA_NUM_THREADS: ${{ matrix.threads }} diff --git a/ITensorGaussianMPS/src/gmps.jl b/ITensorGaussianMPS/src/gmps.jl index 7d39f01ecc..6d2e3a8e96 100644 --- a/ITensorGaussianMPS/src/gmps.jl +++ b/ITensorGaussianMPS/src/gmps.jl @@ -1,5 +1,6 @@ import Base: sortperm, size, length, eltype, conj, transpose, copy, * using ITensors: alias +using ITensors.ITensorMPS: ITensorMPS abstract type AbstractSymmetry end struct ConservesNfParity{T} <: AbstractSymmetry data::T @@ -177,8 +178,8 @@ end function quadratic_operator(os::OpSum) os = deepcopy(os) - #os = ITensors.sorteachterm(os, sites) - os = ITensors.sortmergeterms(os) + #os = ITensorMPS.sorteachterm(os, sites) + os = ITensorMPS.sortmergeterms(os) nterms = length(os) coefs = Vector{Number}(undef, nterms) diff --git a/src/ITensorMPS/abstractprojmpo/projmposum.jl b/src/ITensorMPS/abstractprojmpo/projmposum.jl index c47ffc368f..3d5d5d95d7 100644 --- a/src/ITensorMPS/abstractprojmpo/projmposum.jl +++ b/src/ITensorMPS/abstractprojmpo/projmposum.jl @@ -1,3 +1,4 @@ +using Compat: allequal abstract type AbstractSum end diff --git a/src/ITensorMPS/dmrg.jl b/src/ITensorMPS/dmrg.jl index 8bd94f6511..37885fcbb4 100644 --- a/src/ITensorMPS/dmrg.jl +++ b/src/ITensorMPS/dmrg.jl @@ -249,12 +249,11 @@ function dmrg( ## into `DeviceMemory`. This conversion line is here temporarily to fix that problem when it arises ## Adapt is only called when using CUDA backend. CPU will work as implemented previously. ## TODO this might be the only place we really need iscu if its not fixed. - phi::ITensor = if NDTensors.iscu(phi) && NDTensors.iscu(vecs[1]) - adapt(set_eltype(unwrap_array_type(phi), eltype(vecs[1])), vecs[1]) + phi = if NDTensors.iscu(phi) && NDTensors.iscu(vecs[1]) + adapt(ITensors.set_eltype(unwrap_array_type(phi), eltype(vecs[1])), vecs[1]) else vecs[1] end - #phi::ITensor = vecs[1] ortho = ha == 1 ? "left" : "right" diff --git a/test/ITensorMPS/Ops/test_ops_mpo.jl b/test/ITensorMPS/Ops/test_ops_mpo.jl index 0799e04fad..f7b42b30a4 100644 --- a/test/ITensorMPS/Ops/test_ops_mpo.jl +++ b/test/ITensorMPS/Ops/test_ops_mpo.jl @@ -1,6 +1,7 @@ using Test using ITensors using ITensors.Ops +using ITensors.ITensorMPS: ITensorMPS using LinearAlgebra @testset "Ops to MPO" begin @@ -42,7 +43,7 @@ using LinearAlgebra ℋ_merged = OpSum() ℋ_merged += (4, "Z", 1) ℋ_merged += (3, "X", 2) - @test ITensors.sortmergeterms(ℋ) == ℋ_merged + @test ITensorMPS.sortmergeterms(ℋ) == ℋ_merged # Test with repeated terms s = siteinds("S=1/2", 1)