quimb.tensor.circuit.simple_update

Shared base for the arbitrary-graph simple-update circuit simulators.

Classes

CircuitSimpleUpdate

Common geometry and error scaffolding for the simple-update simulators

Module Contents

class quimb.tensor.circuit.simple_update.CircuitSimpleUpdate(N=None, psi0=None, gate_opts=None, gate_contract='auto-split-gate', gate_propagate_tags='register', tags=None, psi0_dtype='complex128', psi0_tag='PSI0', tag_gate_numbers=True, gate_tag_id='GATE_{}', tag_gate_rounds=True, round_tag_id='ROUND_{}', tag_gate_labels=True, bra_site_ind_id='b{}', dtype=None, to_backend=None, convert_eager=False)[source]

Bases: quimb.tensor.circuit.core.CircuitBase

Common geometry and error scaffolding for the simple-update simulators CircuitPEPSSimpleUpdate (a state, evolved forwards) and CircuitPEPOSimpleUpdate (a local observable, evolved backwards in the Heisenberg picture). Both keep a single tensor per site on an arbitrary graph of edges, apply one and two site gates with the Vidal-style simple update rule, and only ever hold an approximate, gauged tensor network.

This base handles the edge/site geometry parsing, the edges/sites views, the copy skeleton that carries the geometry, the natural site-based qubit ordering, and the shared unsupported-method errors. Subclasses implement _init_state, _apply_gate, local_expectation, the _unsupported(name) error message, and their other representation-specific methods.

_init_geometry(edges, gates, psi0, N)[source]

Resolve the geometry from explicit edges, else the two-site gates (only inspected here, not applied), else the bonds of an existing psi0. Populates _edges, _sites, _site_set and _edge_set. Every site appearing in the edges is included, plus any touched by single-qubit gates or present in psi0, padded up to N.

copy()[source]

Copy the circuit, carrying over the geometry that the base CircuitBase copy does not know about. Subclasses extend this via super().copy() to carry any extra state (e.g. gauges).

property edges

The unique edges defining the geometry.

property sites

The sites (qubit labels) of the geometry.

calc_qubit_ordering(qubits=None)[source]

Natural ordering given by the sites of the geometry.

property uni
amplitude(*args, **kwargs)[source]
partial_trace(*args, **kwargs)[source]
compute_marginal(*args, **kwargs)[source]
sample(*args, **kwargs)[source]
sample_chaotic(*args, **kwargs)[source]