gate_lr_old¶
Functions¶
|
|
|
|
|
|
|
|
|
|
|
Generate a string of coordinates, in order, from |
|
Generate the coordinates or a series of swaps that would bring |
|
Generates the ordered long-range path - a sequence of coordinates - from |
|
Module Contents¶
- gate_lr_old.maybe_factor_gate_into_tensor(G, phys_dim, nsites, where)¶
- gate_lr_old.manhattan_distance(coo_a, coo_b)¶
- gate_lr_old.gate_string_split_(TG, where, string, original_ts, bonds_along, reindex_map, site_ix, info, **compress_opts)¶
- gate_lr_old.gate_string_reduce_split_(TG, where, string, original_ts, bonds_along, reindex_map, site_ix, info, **compress_opts)¶
- gate_lr_old.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)¶
- gate_lr_old.gen_long_range_path(ij_a, ij_b, sequence=None)¶
Generate a string of coordinates, in order, from
ij_atoij_b.- Parameters:
sequence (None, iterable of {'v', 'h'}, or 'random', optional) – 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').
- Returns:
The path, each element is a single coordinate.
- Return type:
- gate_lr_old.gen_long_range_swap_path(ij_a, ij_b, sequence=None)¶
Generate the coordinates or a series of swaps that would bring
ij_aandij_btogether.- Parameters:
sequence (None, it of {'av', 'bv', 'ah', 'bh'}, or 'random', optional) – 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').
- Returns:
The path, each element is two coordinates to swap.
- Return type:
- gate_lr_old.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.
- gate_lr_old.get_swap(dp, dtype, backend)¶