quimb.experimental.cluster_update

Implementation of arbitrary geometry wavefunction cluster update.

Attributes

Classes

SimpleUpdateGen

Simple update for arbitrary geometry hamiltonians.

ClusterUpdateNNGen

Cluster update for arbitrary geometry nearest neighbor hamiltonians.

Functions

ensure_dict(x)

Make sure x is a dict, creating an empty one if x is None.

bonds(t1, t2)

Getting any indices connecting the Tensor(s) or TensorNetwork(s) t1

bonds_size(t1, t2)

Get the size of the bonds linking tensors or tensor networks t1 and

gate_inds_nn_fit(self, G, ind1, ind2[, max_bond, ...])

Gate two nearest neighbor outer indices, using full fitting of

Module Contents

quimb.experimental.cluster_update.ensure_dict(x)

Make sure x is a dict, creating an empty one if x is None.

quimb.experimental.cluster_update.bonds(t1, t2)

Getting any indices connecting the Tensor(s) or TensorNetwork(s) t1 and t2.

quimb.experimental.cluster_update.bonds_size(t1, t2)

Get the size of the bonds linking tensors or tensor networks t1 and t2.

class quimb.experimental.cluster_update.SimpleUpdateGen(psi0, ham, tau=0.01, D=None, imag=True, gate_opts=None, ordering=None, second_order_reflect=False, compute_energy_every=None, compute_energy_final=True, compute_energy_opts=None, compute_energy_fn=None, compute_energy_per_site=False, callback=None, keep_best=False, progbar=True)

Bases: TEBDGen

Simple update for arbitrary geometry hamiltonians.

gate(U, where)

Perform single gate U at coordinate pair where. This is the the most common method to override.

compute_energy()

Compute and return the energy of the current state. Subclasses can override this with a custom method to compute the energy.

get_state(absorb_gauges=True)

The default method for retrieving the current state - simply a copy. Subclasses can override this to perform additional transformations.

set_state(psi, gauges=None)

The default method for setting the current state - simply a copy. Subclasses can override this to perform additional transformations.

quimb.experimental.cluster_update.gate_inds_nn_fit(self, G, ind1, ind2, max_bond=None, method='als', pregauge=2, init_simple_guess=True, steps=10, fit_opts=None, contract_opts=None, inplace=False)

Gate two nearest neighbor outer indices, using full fitting of reduced tensors with respect to the environment. This is more accurate than a simple reduced gate when restricting the bond dimension.

Parameters:
  • G (array_like) – The gate to fit.

  • ind1 (str) – The indices to gate.

  • ind2 (str) – The indices to gate.

  • max_bond (int, optional) – The maximum bond dimension to use. If None, use the maximum bond dimension that the tensors currently share.

  • method ({'als', 'autodiff'}, optional) – The method to use for fitting.

  • pregauge (int, optional) – How many times to locally canonize from the purified environment tensor to both the left and right reduced tensors.

  • init_simple_guess (bool, optional) – Whether to use a ‘simple update’ guess for the initial guess. This can be quite high quality already if pregauging is used.

  • steps (int, optional) – The number of steps to use for fitting, can be 0 in which case the initial guess is used, which in conjuction with the envinronment pregauging can still be quite high quality.

  • inplace (bool, optional) – Whether to update the tensor network in place.

  • contract_opts – Supplied to contract().

quimb.experimental.cluster_update.gate_inds_nn_fit_
class quimb.experimental.cluster_update.ClusterUpdateNNGen(psi0, ham, tau=0.01, D=None, cluster_radius=1, cluster_fillin=0, gauge_smudge=1e-06, imag=True, gate_opts=None, ordering=None, second_order_reflect=False, compute_energy_every=None, compute_energy_final=True, compute_energy_opts=None, compute_energy_fn=None, compute_energy_per_site=False, callback=None, keep_best=False, progbar=True)

Bases: quimb.tensor.tensor_arbgeom_tebd.SimpleUpdateGen

Cluster update for arbitrary geometry nearest neighbor hamiltonians. This keeps track of simple update style gauges, in order to approximately partial trace beyond cluster_radius and form an approximate environment for two nearest neighbor sites that be used to fit the gate with higher quality than simple update only.

gate(U, where)

Perform single gate U at coordinate pair where. This is the the most common method to override.