Skip to content

Infinite range gives InexactError: trunc(Int64, Inf) #27

@HumpyBlumpy

Description

@HumpyBlumpy

Hi,

Trying out one of the examples to create a Hamiltonian on an infinite chain:

using MPSKit, MPSKitModels, TensorKit
H = @mpoham sum(σᶻᶻ{i, i+1} + h * σˣ{i} for i in -Inf:Inf)

yields ERROR: InexactError: trunc(Int64, Inf). Tried replacing Inf with ∞ but it is not recognized.
Am I missing a certain package or something?
I have Julia 1.10

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