gate_lr_old =========== .. py:module:: gate_lr_old Functions --------- .. autoapisummary:: gate_lr_old.maybe_factor_gate_into_tensor gate_lr_old.manhattan_distance gate_lr_old.gate_string_split_ gate_lr_old.gate_string_reduce_split_ gate_lr_old.gate_2d_long_range gate_lr_old.gen_long_range_path gate_lr_old.gen_long_range_swap_path gate_lr_old.swap_path_to_long_range_path gate_lr_old.get_swap Module Contents --------------- .. py:function:: maybe_factor_gate_into_tensor(G, phys_dim, nsites, where) .. py:function:: manhattan_distance(coo_a, coo_b) .. py:function:: gate_string_split_(TG, where, string, original_ts, bonds_along, reindex_map, site_ix, info, **compress_opts) .. py:function:: gate_string_reduce_split_(TG, where, string, original_ts, bonds_along, reindex_map, site_ix, info, **compress_opts) .. py:function:: gate_2d_long_range(self, G, where, contract=False, tags=None, inplace=False, info=None, long_range_use_swaps=False, long_range_path_sequence=None, **compress_opts) .. py:function:: gen_long_range_path(ij_a, ij_b, sequence=None) Generate a string of coordinates, in order, from ``ij_a`` to ``ij_b``. :param ij_a: Coordinate of site 'a'. :type ij_a: (int, int) :param ij_b: Coordinate of site 'b'. :type ij_b: (int, int) :param sequence: What order to cycle through and try and perform moves in, 'v', 'h' standing for move vertically and horizontally respectively. The default is ``('v', 'h')``. :type sequence: None, iterable of {'v', 'h'}, or 'random', optional :returns: The path, each element is a single coordinate. :rtype: generator[tuple[int]] .. py:function:: gen_long_range_swap_path(ij_a, ij_b, sequence=None) Generate the coordinates or a series of swaps that would bring ``ij_a`` and ``ij_b`` together. :param ij_a: Coordinate of site 'a'. :type ij_a: (int, int) :param ij_b: Coordinate of site 'b'. :type ij_b: (int, int) :param sequence: What order to cycle through and try and perform moves in, 'av', 'bv', 'ah', 'bh' standing for move 'a' vertically, 'b' vertically, 'a' horizontally', and 'b' horizontally respectively. The default is ``('av', 'bv', 'ah', 'bh')``. :type sequence: None, it of {'av', 'bv', 'ah', 'bh'}, or 'random', optional :returns: The path, each element is two coordinates to swap. :rtype: generator[tuple[tuple[int]]] .. py:function:: swap_path_to_long_range_path(swap_path, ij_a) Generates the ordered long-range path - a sequence of coordinates - from a (long-range) swap path - a sequence of coordinate pairs. .. py:function:: get_swap(dp, dtype, backend)