diff --git a/README.md b/README.md index 3e9b09b..8ed4e09 100644 --- a/README.md +++ b/README.md @@ -6,17 +6,17 @@ [![Coverage](https://codecov.io/gh/ITensor/ITensorMPS.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ITensor/ITensorMPS.jl) [![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) -Finite MPS and MPO methods based on ITensor (ITensors.jl). +Finite MPS and MPO methods based on the Julia version of ITensor (ITensors.jl). -This package currently re-exports the MPS and MPO functionality of the [ITensors.jl](https://github.com/ITensor/ITensors.jl), including functionality like DMRG, applying MPO to MPS, applying gates to MPS and MPO, etc. See the [ITensor documentation](https://itensor.github.io/ITensors.jl/dev) for guides and examples on using this package. +## News -Additionally, it re-exports the functionality of the [ITensorTDVP.jl](https://github.com/ITensor/ITensorTDVP.jl) package, which provides other DMRG-like MPS solvers such as TDVP and MPS linear equation solving. +### ITensorMPS.jl v0.3 release notes -## Upgrade guide +All MPS/MPO code from [ITensors.jl](https://github.com/ITensor/ITensors.jl) and [ITensorTDVP.jl](https://github.com/ITensor/ITensorTDVP.jl) has been moved into this repository and this repository now relies on ITensors.jl v0.7 and above. All of the MPS/MPO functionality that was previously in ITensors.jl and ITensorTDVP.jl will be developed here from now on. For users of this repository, this should not break any code, it should export and provide the same functionality, though please let us know if you have any issues. -The goal will be to move the MPS and MPO code from the ITensors.jl package, along with all of the code from the [ITensorTDVP.jl](https://github.com/ITensor/ITensorTDVP.jl) package, into this repository. If you are using any MPS/MPO functionality of ITensors.jl, such as the `MPS` and `MPO` types or constructors thereof (like `randomMPS`), `OpSum`, `siteinds`, `dmrg`, `apply`, etc. you should install the ITensorMPS.jl package with `import Pkg; Pkg.add("ITensorMPS")` and add `using ITensorMPS` to your code. Additionally, if you are currently using [ITensorTDVP.jl](https://github.com/ITensor/ITensorTDVP.jl), you should replace `using ITensorTDVP` with `using ITensorMPS` in your codes. +#### Upgrade guide -## News +If you are using any MPS/MPO functionality of ITensors.jl, such as the `MPS` and `MPO` types or constructors thereof (like `random_mps`), `OpSum`, `siteinds`, `dmrg`, `apply`, etc. you should install the ITensorMPS.jl package with `import Pkg; Pkg.add("ITensorMPS")` and add `using ITensorMPS` to your code. Additionally, if you are currently using [ITensorTDVP.jl](https://github.com/ITensor/ITensorTDVP.jl), you should replace `using ITensorTDVP` with `using ITensorMPS` in your code. ### ITensorMPS.jl v0.2.1 release notes diff --git a/src/ITensorMPS.jl b/src/ITensorMPS.jl index 30d3778..7343983 100644 --- a/src/ITensorMPS.jl +++ b/src/ITensorMPS.jl @@ -45,4 +45,5 @@ include("solvers/reducedlinearproblem.jl") include("solvers/linsolve.jl") include("solvers/expand.jl") include("lib/Experimental/src/Experimental.jl") +include("lib/ITensorMPSNamedDimsArraysExt/src/ITensorMPSNamedDimsArraysExt.jl") end diff --git a/src/lib/ITensorMPSNamedDimsArraysExt/src/ITensorMPSNamedDimsArraysExt.jl b/src/lib/ITensorMPSNamedDimsArraysExt/src/ITensorMPSNamedDimsArraysExt.jl new file mode 100644 index 0000000..97229dd --- /dev/null +++ b/src/lib/ITensorMPSNamedDimsArraysExt/src/ITensorMPSNamedDimsArraysExt.jl @@ -0,0 +1,3 @@ +module ITensorMPSNamedDimsArraysExt +include("to_nameddimsarray.jl") +end diff --git a/src/lib/ITensorMPSNamedDimsArraysExt/src/to_nameddimsarray.jl b/src/lib/ITensorMPSNamedDimsArraysExt/src/to_nameddimsarray.jl new file mode 100644 index 0000000..f6596cb --- /dev/null +++ b/src/lib/ITensorMPSNamedDimsArraysExt/src/to_nameddimsarray.jl @@ -0,0 +1,6 @@ +using ..ITensorMPS: AbstractMPS +using ITensors.ITensorsNamedDimsArraysExt: ITensorsNamedDimsArraysExt, to_nameddimsarray + +function ITensorsNamedDimsArraysExt.to_nameddimsarray(x::AbstractMPS) + return to_nameddimsarray.(x) +end diff --git a/test/ext/ITensorMPSPackageCompilerExt/Project.toml b/test/ext/ITensorMPSPackageCompilerExt/Project.toml new file mode 100644 index 0000000..d9571fe --- /dev/null +++ b/test/ext/ITensorMPSPackageCompilerExt/Project.toml @@ -0,0 +1,5 @@ +[deps] +ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2" +ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5" +PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/ext/ITensorMPSPackageCompilerExt/runtests.jl b/test/ext/ITensorMPSPackageCompilerExt/runtests.jl new file mode 100644 index 0000000..cd167f7 --- /dev/null +++ b/test/ext/ITensorMPSPackageCompilerExt/runtests.jl @@ -0,0 +1,11 @@ +@eval module $(gensym()) +using ITensorMPS: ITensorMPS +using ITensors: ITensors +using PackageCompiler: PackageCompiler +using Test: @testset, @test +@testset "ITensorMPSPackageCompilerExt" begin + # Testing `ITensors.compile` would take too long so we just check + # that `ITensorsPackageCompilerExt` overloads `ITensors.compile`. + @test hasmethod(ITensors.compile, Tuple{ITensors.Algorithm"PackageCompiler"}) +end +end