quimb.tensor.tn2dinf.tebd

Local Hamiltonians and imaginary-time simple update for infinite, translation-invariant 2D tensor networks (tn2dinf).

Classes

LocalHamInfinite2D

A local Hamiltonian on an infinite 2D lattice, defined per bond_type

SimpleUpdateInfinite2D

Imaginary-time simple update for an infinite 2D PEPS.

Module Contents

class quimb.tensor.tn2dinf.tebd.LocalHamInfinite2D(geometry_or_edges, H2, H1=None)[source]

Bases: quimb.tensor.tnag.tebd.LocalHamGen

A local Hamiltonian on an infinite 2D lattice, defined per bond_type and site_type (translation classes) rather than per concrete bond/site. Single-site terms are absorbed evenly into the covering two-site terms and operations on the terms (matrix exponential, etc.) are cached.

The Hamiltonian carries its own GeometryInfinite2D which may differ from a wavefunction’s geometry as long as the site_types match (e.g. a longer-range Hamiltonian on a nearest-neighbor PEPS).

Parameters:
  • geometry_or_edges (GeometryInfinite2D or sequence of edges) – The Hamiltonian’s geometry (or edges to build one from).

  • H2 (array_like or dict[bond_type, array_like]) – The two-site interaction terms. A single array is used as the default term for every bond_type. A dict gives per-bond_type terms, with None as an optional default. Keys may be given in either orientation (canonicalized via geometry.get_bond_type, flipping the operator if needed).

  • H1 (array_like or dict[site_type, array_like], optional) – The one-site term(s), absorbed evenly into the covering two-site terms. A single array is the default for every site_type. A dict gives per-site_type terms, with None as an optional default.

terms

The total effective local term for each bond_type.

Type:

dict[bond_type, array_like]

geometry

The Hamiltonian’s geometry.

Type:

GeometryInfinite2D

_op_cache
terms
_site_type_to_covering
property site_types

The unique site_types in the unit cell.

property bond_types

The unique bond_types in the unit cell.

property nsites

The number of site_types in the unit cell.

get_gate(where)[source]

Get the local term for the bond_type of where, cached.

get_auto_ordering(order='sort', group=False, **kwargs)[source]

Ordering of bond_types into commuting (non site_type-overlapping) groups, delegated to the geometry.

draw(*args, **kwargs)[source]

Draw the Hamiltonian’s geometry.

__repr__()[source]
class quimb.tensor.tn2dinf.tebd.SimpleUpdateInfinite2D(psi0, ham, *args, compute_energy_per_site=True, **kwargs)[source]

Bases: quimb.tensor.tnag.tebd.SimpleUpdateGen

Imaginary-time simple update for an infinite 2D PEPS.

Drives a PEPSInfinite2D state under a LocalHamInfinite2D, reusing quimb’s SimpleUpdateGen for all loop logic (tau schedule, gate ordering, periodic gauge equilibration, energy history and convergence). The state provides the simple-update surface the driver calls into (gate_simple_, gauge_all_simple_, normalize_simple, gauge_simple_insert, compute_local_expectation_cluster), keyed by translation class so updates are shared across the lattice.

Parameters mirror quimb.tensor.tnag.tebd.SimpleUpdateGen, e.g.:

su = SimpleUpdateInfinite2D(psi, ham, D=4)
su.evolve(100, tau=0.3)
su.evolve(100, tau=0.1)
psi_final, gauges = su.get_state(absorb_gauges="return")

Notes

  • The loop energy is the max_distance=0 cluster estimate; PEPSInfinite2D also offers larger clusters (more accurate) and generalized-loop expansions (cheaper than the equivalent-size cluster, but less accurate) for measuring the final state.

  • Only update="sequential" is reliable: the inherited sweep groups gates into layers by literal site, whereas the translation-invariant conflict rule is by site_type, so update="parallel" (and per-layer equilibration) are not supported yet.

compute_local_expectation_cluster(terms=None, **kwargs)[source]

Cluster expectation of terms on the current state, inserting the driver’s current gauges as the environment. terms defaults to the Hamiltonian and gauges to self.gauges, so a bare su.compute_local_expectation_cluster() measures the energy per unit cell. Forwards to PEPSInfinite2D.compute_local_expectation_cluster(), so max_distance, return_all, etc. pass straight through.

Returns the summed (per unit cell) value, not per-site; divide by self.ham.nsites to compare with energy.

For a meaningful estimate the gauges should be equilibrated with the current tensors, with no pending imaginary-time gate, e.g. straight after evolve() or via equilibrate().

compute_local_expectation_gloop_expand(terms=None, gloops=None, **kwargs)[source]

Generalized-loop-expansion expectation of terms on the current state, inserting the driver’s current gauges. terms defaults to the Hamiltonian and gauges to self.gauges. Forwards to PEPSInfinite2D.compute_local_expectation_gloop_expand().

See compute_local_expectation_cluster() for the per-cell return convention and the equilibration note.