Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ authors = ["Jan Reimers <[email protected]> and contributors"]
version = "0.3.1"

[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2"
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
Expand All @@ -13,11 +13,11 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
Documenter = "0.27"
ITensors = "0.3"
NDTensors = "0.1.45"
julia = "1"
ITensorMPS = "0.1"
ITensors = "0.3, 0.4, 0.5, 0.6"
NDTensors = "0.1.45, 0.2, 0.3"
StaticArrays = "0.12, 1.0"
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ julia> ] add ITensorMPOCompression
Here are is an example of orthogonalizing an hand generated (not using AutoMPO) MPO

```julia
julia> using ITensors
julia> using ITensors, ITensorMPS

julia> using ITensorMPOCompression

Expand Down Expand Up @@ -125,7 +125,7 @@ julia> pprint(H) #High level view of what is in the MPO.
Here are is an example of truncating an hand generated (not using AutoMPO) MPO

```julia
julia> using ITensors
julia> using ITensors, ITensorMPS

julia> using ITensorMPOCompression

Expand Down
4 changes: 2 additions & 2 deletions examples/README.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#'
#' Here are is an example of orthogonalizing an hand generated (not using AutoMPO) MPO
#+ term=true
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
include("../test/hamiltonians/hamiltonians.jl");

Expand All @@ -50,7 +50,7 @@ pprint(H) #High level view of what is in the MPO.

#' Here are is an example of truncating an hand generated (not using AutoMPO) MPO
#+ term=true
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
include("../test/hamiltonians/hamiltonians.jl");

Expand Down
2 changes: 1 addition & 1 deletion examples/apply_gates.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Define the nearest neighbor term `S⋅S` for the Heisenberg model
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
using Printf
Base.show(io::IO, f::Float64) = @printf(io, "%1.5f", f)
Expand Down
2 changes: 1 addition & 1 deletion examples/directions.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ITensors, ITensorMPOCompression
using ITensors, ITensorMPS, ITensorMPOCompression
include("../test/hamiltonians/hamiltonians.jl")

N = 10
Expand Down
2 changes: 1 addition & 1 deletion examples/orthogonalize_MPO_demo.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
include("../test/hamiltonians/hamiltonians.jl")

Expand Down
2 changes: 1 addition & 1 deletion examples/pprintH_demo.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression

include("../test/hamiltonians/hamiltonians.jl")
Expand Down
2 changes: 1 addition & 1 deletion examples/pseudo2D_demo.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
using Printf
Base.show(io::IO, f::Float64) = @printf(io, "%1.3f", f)
Expand Down
2 changes: 1 addition & 1 deletion examples/szparity.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ITensors, ITensorMPOCompression
using ITensors, ITensorMPS, ITensorMPOCompression

import ITensorMPOCompression: assign!, slice

Expand Down
2 changes: 1 addition & 1 deletion examples/test_2bodyH.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
using Test

Expand Down
2 changes: 1 addition & 1 deletion examples/test_3bodyH.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
using Test

Expand Down
2 changes: 1 addition & 1 deletion examples/truncate_MPO_demo.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
include("../test/hamiltonians/hamiltonians.jl")

Expand Down
2 changes: 1 addition & 1 deletion examples/two_component-BH_model.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ITensors
using ITensors, ITensorMPS
function two_component_BH(N::Int64;U=1.0,U12=-0.5,t1=0.5,t2=0.25,kwargs...)
sites = siteinds("Boson",N;conserve_qns=true,conserve_number=false)
op = OpSum()
Expand Down
2 changes: 1 addition & 1 deletion src/ITensorMPOCompression.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module ITensorMPOCompression

using ITensors
using ITensors, ITensorMPS
using NDTensors

import ITensors: addqns, isortho, orthocenter, setinds , linkind, data, permute, checkflux
Expand Down
4 changes: 2 additions & 2 deletions src/orthogonalize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ atol=`-1.0 and rtol=`-1.0 indicates no rank reduction.

# Examples
```julia
julia> using ITensors
julia> using ITensors, ITensorMPS
julia> using ITensorMPOCompression
include("../test/hamiltonians/hamiltonians.jl");
julia> N=10; #10 sites
Expand Down Expand Up @@ -98,7 +98,7 @@ atol=`-1.0 and rtol=`-1.0 indicates no rank reduction.

# Examples
```julia
julia> using ITensors
julia> using ITensors, ITensorMPS
julia> using ITensorMPOCompression
include("../test/hamiltonians/hamiltonians.jl");
julia> N=10; #10 sites
Expand Down
2 changes: 1 addition & 1 deletion src/qx.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Hilbert space.

# Example
```julia
julia>using ITensors
julia>using ITensors, ITensorMPS
julia>using ITensorMPOCompression
julia>N=5; #5 sites
julia>NNN=2; #Include 2nd nearest neighbour interactions
Expand Down
2 changes: 1 addition & 1 deletion src/subtensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ end
function get_subtensor_wrapper(
T::DenseTensor{ElT,N}, new_inds, rs::UnitRange{Int64}...
) where {ElT,N}
return ITensor(T[rs...], new_inds)
return ITensor(storage(T[rs...]), new_inds)
end

function get_subtensor_wrapper(
Expand Down
2 changes: 1 addition & 1 deletion src/truncate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Compress an MPO using block respecting SVD techniques as described in

# Example
```julia
julia> using ITensors
julia> using ITensors, ITensorMPS
julia> using ITensorMPOCompression
include("../test/hamiltonians/hamiltonians.jl")
julia> N=10; #10 sites
Expand Down
2 changes: 1 addition & 1 deletion src/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ for Lower in the other two columns.

# Examples
```julia
julia> using ITensors
julia> using ITensors, ITensorMPS
julia> using ITensorMPOCompression
julia> N=10; #10 sites
julia> NNN=7; #Include up to 7th nearest neighbour interactions
Expand Down
5 changes: 5 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
ITensorMPOCompression = "03645d51-6a26-4d1e-b9a1-035dc79d88e7"
ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2"
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
4 changes: 2 additions & 2 deletions test/blocking.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression

using Test
using Revise, Printf
using Printf

include("hamiltonians/hamiltonians.jl")
Base.show(io::IO, f::Float64) = @printf(io, "%1.3f", f) #dumb way to control float output
Expand Down
4 changes: 2 additions & 2 deletions test/gauge_fix.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
using Test
using Revise, Printf, SparseArrays
using Printf, SparseArrays
include("hamiltonians/hamiltonians.jl")

import ITensorMPOCompression: gauge_fix!, is_gauge_fixed
Expand Down
4 changes: 1 addition & 3 deletions test/hamiltonians.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
using Revise
using Test

include("hamiltonians/hamiltonians.jl")
Expand Down
3 changes: 1 addition & 2 deletions test/orthogonalize.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
using Revise
using Test
using Printf

Expand Down
2 changes: 1 addition & 1 deletion test/qx_unittests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
using Test
using Printf
Expand Down
3 changes: 1 addition & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
using Test
using Revise

@testset "ITensorMPOCompression.jl" begin
@testset verbose = true "$filename" for filename in [
Expand Down
4 changes: 1 addition & 3 deletions test/truncate.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using ITensors
using ITensors, ITensorMPS
using ITensorMPOCompression
using Revise
using Test
using Printf
using Profile

include("hamiltonians/hamiltonians.jl")

Expand Down