-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/lib/ITensorMPSNamedDimsArraysExt/src/ITensorMPSNamedDimsArraysExt.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
6
src/lib/ITensorMPSNamedDimsArraysExt/src/to_nameddimsarray.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |