diff --git a/src/Quantum/MP.jl b/src/Quantum/MP.jl index 52ca5cb7a..18ba008a5 100644 --- a/src/Quantum/MP.jl +++ b/src/Quantum/MP.jl @@ -32,7 +32,6 @@ sitealias(::Type{MatrixProduct{P,Open}}, order, n, i) where {P<:Plug} = order end sitealias(::Type{MatrixProduct{P,Periodic}}, order, n, i) where {P<:Plug} = tuple(order...) -sitealias(::Type{MatrixProduct{P,Infinite}}, order, n, i) where {P<:Plug} = tuple(order...) defaultorder(::Type{<:MatrixProduct{Property}}) = (:l, :r) defaultorder(::Type{<:MatrixProduct{State}}) = (:l, :r, :o) diff --git a/src/Quantum/PEP.jl b/src/Quantum/PEP.jl index df3fb5533..06e36d742 100644 --- a/src/Quantum/PEP.jl +++ b/src/Quantum/PEP.jl @@ -30,7 +30,6 @@ function sitealias(::Type{<:ProjectedEntangledPair{P,Open}}, order, size, pos) w end end sitealias(::Type{<:ProjectedEntangledPair{P,Periodic}}, order, _, _) where {P<:Plug} = tuple(order...) -sitealias(::Type{<:ProjectedEntangledPair{P,Infinite}}, order, _, _) where {P<:Plug} = tuple(order...) defaultorder(::Type{<:ProjectedEntangledPair{State}}) = (:l, :r, :u, :d, :o) defaultorder(::Type{<:ProjectedEntangledPair{Operator}}) = (:l, :r, :u, :d, :i, :o) diff --git a/src/Quantum/Quantum.jl b/src/Quantum/Quantum.jl index e09528736..65b4bbe42 100644 --- a/src/Quantum/Quantum.jl +++ b/src/Quantum/Quantum.jl @@ -230,7 +230,6 @@ end abstract type Boundary end struct Open <: Boundary end struct Periodic <: Boundary end -struct Infinite <: Boundary end """ boundary(::QuantumTensorNetwork) @@ -239,7 +238,6 @@ Return the `Boundary` type of the [`TensorNetwork`](@ref). The following `Bounda - `Open` - `Periodic` - - `Infinite` """ function boundary end diff --git a/src/Tenet.jl b/src/Tenet.jl index 8e0b066ef..bbe52d09f 100644 --- a/src/Tenet.jl +++ b/src/Tenet.jl @@ -19,7 +19,7 @@ export transform, transform! include("Quantum/Quantum.jl") export QuantumTensorNetwork, sites, fidelity export Plug, plug, Property, State, Dual, Operator -export Boundary, boundary, Open, Periodic, Infinite +export Boundary, boundary, Open, Periodic include("Quantum/MP.jl") export MatrixProduct, MPS, MPO diff --git a/test/MatrixProductOperator_test.jl b/test/MatrixProductOperator_test.jl index d0f5dbc5d..97cc6de2d 100644 --- a/test/MatrixProductOperator_test.jl +++ b/test/MatrixProductOperator_test.jl @@ -93,42 +93,6 @@ MatrixProduct{Operator,Periodic}(arrays) isa QuantumTensorNetwork end end - - # @testset "`Infinite` boundary" begin - # # product operator - # @test skip = true begin - # arrays = [rand(1, 1, 2, 2), rand(1, 1, 2, 2), rand(1, 1, 2, 2)] - # MatrixProduct{Operator,Infinite}(arrays) isa MPO{Infinite} - # end - - # # alternative constructor - # @test skip = true begin - # arrays = [rand(1, 1, 2, 2), rand(1, 1, 2, 2), rand(1, 1, 2, 2)] - # MatrixProduct{Operator}(arrays; boundary = Infinite) isa MPO{Infinite} - # end - - # # entangling operator - # @test skip = true begin - # i = 3 - # o = 5 - # arrays = [rand(2, 4, i, o), rand(4, 8, i, o), rand(8, 2, i, o)] - # MatrixProduct{Operator,Infinite}(arrays) isa MPO{Infinite} - # end - - # # entangling operator - change order - # @test skip = true begin - # i = 3 - # o = 5 - # arrays = [rand(2, i, 4, o), rand(4, i, 8, o), rand(8, i, 2, o)] - # MatrixProduct{Operator,Infinite}(arrays, order = (:l, :i, :r, :o)) isa MPO{Infinite} - # end - - # # fail on Infinite with Open format - # @test_throws MethodError begin - # arrays = [rand(1, 2, 2), rand(1, 1, 2, 2), rand(1, 2, 2)] - # MatrixProduct{Operator,Infinite}(arrays) isa MPO{Infinite} - # end - # end end @testset "merge" begin diff --git a/test/MatrixProductState_test.jl b/test/MatrixProductState_test.jl index a2066c940..c3459a66e 100644 --- a/test/MatrixProductState_test.jl +++ b/test/MatrixProductState_test.jl @@ -99,48 +99,6 @@ MatrixProduct{State,Periodic}(arrays) isa QuantumTensorNetwork end end - - # @testset "`Infinite` boundary" begin - # # product state - # @test skip = true begin - # arrays = [rand(1, 1, 2), rand(1, 1, 2), rand(1, 1, 2)] - # MatrixProduct{State,Infinite}(arrays) isa MPS{Infinite} - # end - - # # entangled state - # @test skip = true begin - # arrays = [rand(3, 4, 2), rand(4, 8, 2), rand(8, 3, 2)] - # MatrixProduct{State,Infinite}(arrays) isa MPS{Infinite} - # end - - # @testset "custom order" begin - # arrays = [rand(3, 1, 3), rand(3, 1, 3), rand(3, 1, 3)] - # ψ = MatrixProduct{State,Infinite}(arrays, order = (:r, :o, :l)) - - # @test skip = true ψ isa MPS{Infinite} - # end - - # # alternative constructor - # @test skip = true begin - # arrays = [rand(1, 1, 2), rand(1, 1, 2), rand(1, 1, 2)] - # MatrixProduct{State}(arrays; boundary = Infinite) isa MPS{Infinite} - # end - - # # fail on Infinite with Open format - # @test_throws skip = true Exception begin - # arrays = [rand(1, 2), rand(1, 1, 2), rand(1, 2)] - # MatrixProduct{State,Infinite}(arrays) isa MPS{Infinite} - # end - - # # @testset "tensors" begin - # # arrays = [rand(1, 1, 2), rand(1, 1, 2), rand(1, 1, 2)] - # # ψ = MatrixProduct{State,Infinite}(arrays, order = (:l, :r, :o)) - - # # @test tensors(ψ, 1) isa Tensor - # # @test tensors(ψ, 4) == tensors(ψ, 1) - # # @test tensors(ψ, 0) == tensors(ψ, 3) - # # end - # end end @testset "merge" begin