Skip to content

Zipup fails with a SpaceMismatch on make_time_mpo propagator MPOs #496

Description

@lkdvos

Zipup rejects propagator MPOs built by make_time_mpo, failing with a SpaceMismatch.

Its docstring presents Zipup as the single-sweep alternative to the variational algorithms for a finite MPO–MPS product, and applying a propagator MPO is the obvious case for that. But make_time_mpo produces MPOs whose virtual legs are direct sums (SumSpace), and the fused zip-up contraction does not accept them. WII and TaylorCluster fail alike; the same MPO applied variationally is fine.

Reproducer

using MPSKit, MPSKitModels, TensorKit
L = 8
H = transverse_field_ising(FiniteChain(L); g = 2.0)
ψ = FiniteMPS(L, ℂ^2, ℂ^8)

# a plain-tensor FiniteMPO works
Vs = [oneunit(ℂ^3); fill(ℂ^3, L - 1); oneunit(ℂ^3)]
O_plain = FiniteMPO([rand(ComplexF64, Vs[i] ^2 ^2  Vs[i + 1]) for i in 1:L])
approximate((O_plain, ψ), Zipup(; trunc = truncrank(16)))          # OK, ϵ ≈ 2.4e-5

# a propagator MPO does not
O_wii = make_time_mpo(H, 0.05, WII())
approximate((O_wii, ψ), Zipup(; trunc = truncrank(16)))            # SpaceMismatch
approximate(ψ, (O_wii, ψ), DMRG2(; trunc = truncrank(16)))         # OK — variational route is fine

O_taylor = make_time_mpo(H, 0.05, TaylorCluster(; N = 2); tol = 1e-10)
approximate((O_taylor, ψ), Zipup(; trunc = truncrank(16)))         # SpaceMismatch

Error

SpaceMismatch: (⊞(ℂ^2) ⊗ ⊞((ℂ^2)')) ≠ ((ℂ^1 ⊞ ℂ^1) ⊗ ⊞((ℂ^2)'))
  [1] compose                    @ TensorKit/src/spaces/homspace.jl:269
  [2] compose                    @ BlockTensorKit/src/vectorspaces/sumspace.jl:142
  [3] tensorcontract_structure   @ TensorKit/src/tensors/tensoroperations.jl:181
  [6] _fuse_mpo_mps_left         @ src/operators/mpo.jl:306
  [7] zip_left_right!            @ src/algorithms/approximate/zipup.jl:122
  [8] approximate!               @ src/algorithms/approximate/zipup.jl:77

For TaylorCluster(; N = 2) the mismatch is (⊞(ℂ^4) ⊗ ⊞((ℂ^2)')) ≠ ((ℂ^1 ⊞ ℂ^1 ⊞ ℂ^1 ⊞ ℂ^1) ⊗ ⊞((ℂ^2)')) — the fused space is built as a single block of the summed dimension, while the operand carries the individual summands.

Notes

The Zipup testsets in test/algorithms/approximate.jl build their MPOs from dense TensorMaps only (_random_mpo_mps), so no test covers a SumSpace-legged MPO.

Found while documenting Zipup for the docs restructure (#449); the intended make_time_mpo + Zipup recipe had to be dropped.

Version: MPSKit on main at 1c81790 (v0.13.13), Julia 1.12.6.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions