Skip to content

Create DiagonalTensorMap from SectorVector #362

Closed

Description

@Yue-Zhengyuan

The new behavior of svd_vals to return a SectorVector instead of DiagonalTensorMap has broken PEPSKit in (at least) the following places (see QuantumKitHub/PEPSKit.jl#314):

  • CTMRG convergence check calc_convergence calls _singular_value_distance((S₁, S₂)), which assumes both S₁, S₂ are DiagonalTensorMaps with domain V₁, V₂. It needs to use the space information to project both into the smaller space.
  • BPEnv to SUWeight conversion, which only needs the singular values of the product of square roots of two messages on the same bond.

The easiest way to solve these is to add a new constructor of DiagonalTensorMap directly from SectorVectors, from which the (non-dual) domain can also be inferred.

Activity

  1. Yue-Zhengyuan commented on Feb 4, 2026

    @Yue-Zhengyuan
    MemberAuthor

    A simple implementation of the constructor:

    function DiagonalTensorMap(s::SectorVector)
        S = sectortype(s)
        V = Vect[S](c => length(b) for (c, b) in blocks(s))
        return DiagonalTensorMap(s.data, V)
    end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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