tlquantum.tt_precontraction.layers_contract

tlquantum.tt_precontraction.layers_contract(layer_list, ncontrl)[source]

Contracts sublists of a list of layers vertically (merging cores of multiple layers for a single qubit) up to some maximum contraction depth.

Parameters:
layer_listList of tt-tensor layers
ncontrlMaximum number of layers to contract into each composite layer.
Returns:
List of layers resulting from vertically contracting the layers of layer_list