Skip to content

Commit

Permalink
README announcement, extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Oct 23, 2024
1 parent 09c9a50 commit e9d0dc0
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/ITensorMPS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module ITensorMPSNamedDimsArraysExt
include("to_nameddimsarray.jl")
end
6 changes: 6 additions & 0 deletions src/lib/ITensorMPSNamedDimsArraysExt/src/to_nameddimsarray.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using ..ITensorMPS: AbstractMPS
using ITensors.ITensorsNamedDimsArraysExt: ITensorsNamedDimsArraysExt, to_nameddimsarray

function ITensorsNamedDimsArraysExt.to_nameddimsarray(x::AbstractMPS)
return to_nameddimsarray.(x)
end
5 changes: 5 additions & 0 deletions test/ext/ITensorMPSPackageCompilerExt/Project.toml
Original file line number Diff line number Diff line change
@@ -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"
11 changes: 11 additions & 0 deletions test/ext/ITensorMPSPackageCompilerExt/runtests.jl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e9d0dc0

Please sign in to comment.