quimb.tensor.circuit.simple_update ================================== .. py:module:: quimb.tensor.circuit.simple_update .. autoapi-nested-parse:: Shared base for the arbitrary-graph simple-update circuit simulators. Classes ------- .. autoapisummary:: quimb.tensor.circuit.simple_update.CircuitSimpleUpdate Module Contents --------------- .. py:class:: 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) Bases: :py:obj:`quimb.tensor.circuit.core.CircuitBase` Common geometry and error scaffolding for the simple-update simulators :class:`~quimb.tensor.circuit.CircuitPEPSSimpleUpdate` (a state, evolved forwards) and :class:`~quimb.tensor.circuit.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. .. py:method:: _init_geometry(edges, gates, psi0, N) 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``. .. py:method:: copy() Copy the circuit, carrying over the geometry that the base :class:`CircuitBase` copy does not know about. Subclasses extend this via ``super().copy()`` to carry any extra state (e.g. gauges). .. py:property:: edges The unique edges defining the geometry. .. py:property:: sites The sites (qubit labels) of the geometry. .. py:method:: calc_qubit_ordering(qubits=None) Natural ordering given by the sites of the geometry. .. py:property:: uni .. py:method:: amplitude(*args, **kwargs) .. py:method:: partial_trace(*args, **kwargs) .. py:method:: compute_marginal(*args, **kwargs) .. py:method:: sample(*args, **kwargs) .. py:method:: sample_chaotic(*args, **kwargs)