quimb.experimental.belief_propagation.mps1bp ============================================ .. py:module:: quimb.experimental.belief_propagation.mps1bp Classes ------- .. autoapisummary:: quimb.experimental.belief_propagation.mps1bp.MPS1BP Module Contents --------------- .. py:class:: MPS1BP(tn, max_bond, layer_tags, site_tags=None, *, cutoff=0.0, method='srcmps', fit_messages=True, compress_opts=None, damping=0.0, update='sequential', normalize='L2', distance='L2', local_convergence=True, optimize='auto-hq', **kwargs) Bases: :py:obj:`quimb.tensor.belief_propagation.bp_common.BeliefPropagationCommon` Matrix product state 1-norm lazy belief propagation. :param tn: The tensor network to perform belief propagation on. It should have a 'graph + 1' structure, i.e. some geometry (given by `site_tags`) repeated in layers (given by `layer_tags`). :type tn: TensorNetwork :param max_bond: The maximum bond dimension to use when compressing the message update tensor network. :type max_bond: int :param layer_tags: The tags which identify the layers of the tensor network. Each tensor should have exactly one of these tags. :type layer_tags: sequence[str, ...] :param site_tags: The tags which identify the sites of the tensor network. If None, these are assumed to be default `tn.site_tags`. :type site_tags: sequence[str, ...], optional :param cutoff: The cutoff to use when compressing the message update tensor network. Default is 0.0. :type cutoff: float, optional :param method: The method to use when compressing the message update tensor network. See `qtn.tensor_network_1d_compress` for options. :type method: str, optional :param fit_messages: Whether to use the current message as a fit target when using 'fit' or 'srcmps' compression methods. Default is True. :type fit_messages: bool, optional :param compress_opts: Additional options to pass to `qtn.tensor_network_1d_compress`. :type compress_opts: dict, optional :param optimize: The optimization strategy to use when contracting tensor networks. :type optimize: str, optional :param kwargs: Additional keyword arguments to pass to the base `BeliefPropagationCommon` class. .. py:attribute:: local_convergence :value: True .. py:attribute:: touched .. py:attribute:: layer_tags .. py:attribute:: max_bond .. py:attribute:: compress_opts .. py:attribute:: fit_messages :value: True .. py:attribute:: backend :value: 'numpy' .. py:attribute:: optimize :value: 'auto-hq' .. py:attribute:: messages .. py:method:: get_message_tn(a, b) -> quimb.tensor.TensorNetwork Get the (uncompressed) tensor network describing the current message from site `a` to site `b`. .. py:method:: compute_message(a, b) -> quimb.tensor.TensorNetwork Compute the (compressed) tensor network message from site `a` to site `b`. .. py:method:: iterate(tol=5e-06) Perform one round of message passing. .. py:method:: contract(strip_exponent=False, check_zero=True, **kwargs) Contract the target tensor network, via the belief propagation approximation, using the current messages. :param strip_exponent: Whether to return the mantissa and exponent separately. :type strip_exponent: bool, optional :param check_zero: Whether to check for zero values and return zero early. :type check_zero: bool, optional