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:
When
svd_method
isFalse
whileqr_method
is notFalse
(default), this amounts to direct contraction of the tensor network followed by a QR decomposition.When
qr_method
isFalse
whilesvd_method
is notFalse
, this amounts to direct contraction of the tensor network followed by a singular value decomposition.When neither
qr_method
andsvd_method
isFalse
, 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]]