cuquantum.cutensornet.experimental.ContractDecomposeAlgorithm

class cuquantum.cutensornet.experimental.ContractDecomposeAlgorithm(qr_method: Optional[Union[cuquantum.cutensornet.tensor.QRMethod, Literal[False, None], Dict]] = <factory>, svd_method: Optional[Union[cuquantum.cutensornet.tensor.SVDMethod, Literal[False, None], Dict]] = False)[source]

A data class for specifying the algorithm to use for the contract and decompose operations. Three choices are supported, as listed below:

  1. When svd_method is False while qr_method is not False (default), this amounts to direct contraction of the tensor network followed by a QR decomposition.

  2. When qr_method is False while svd_method is not False, this amounts to direct contraction of the tensor network followed by a singular value decomposition.

  3. When neither qr_method and svd_method is False, this amounts to QR-assisted contraction with singular value decomposition. QR decomposition will first be applied onto certain input tensors to reduce the network size. The resulting R tensors along with the remaining tensors form a new network that will be contracted and decomposed using SVD. The Q tensors from the first QR operations along with the SVD outputs are then subject to two more contractions to yield the final output.

Note

The third choice above (QR-assisted contract and SVD) is currently only supported for ternary operands that are fully connected to each other with un-contracted modes on each tensor. The results from the third choice is expected to be equivalent to that from the second choice but typically at lower computational cost.

qr_method

The QR method used for the decomposition. See QRMethod.

Type

Optional[Union[cuquantum.cutensornet.tensor.QRMethod, Literal[False, None], Dict]]

svd_method

The SVD method used for the decomposition. See SVDMethod.

Type

Optional[Union[cuquantum.cutensornet.tensor.SVDMethod, Literal[False, None], Dict]]

svd_info

The SVD information during runtime. See SVDInfo.