tlquantum.tt_precontraction.qubits_contract

tlquantum.tt_precontraction.qubits_contract(layer, ncontraq, contrsets=None)[source]

Contracts lists (layers) of tt-tensor cores horizontally (merging multiple cores in a single layer) up to some maximum number of qubits.

Parameters:
layerList of tt-tensor cores
ncontrqMaximum number of qubits to contract into each composite core.
Returns:
Layer (list of cores) resulting from horizontally contracting the cores of layer