ContractDecomposeAlgorithm#
-
class cuquantum.
tensornet. experimental. ContractDecomposeAlgorithm( - qr_method: ~cuquantum.tensornet.tensor.QRMethod | ~typing.Literal[False,
- None] | ~typing.Dict | None = <factory>,
- svd_method: ~cuquantum.tensornet.tensor.SVDMethod | ~typing.Literal[False,
- None] | ~typing.Dict | None = False,
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
cuquantum.
.tensornet. tensor. QRMethod - Type:
cuquantum.
tensornet. tensor. QRMethod | Literal[False, None] | Dict | None
- svd_method#
The SVD method used for the decomposition. See
cuquantum.
.tensornet. tensor. SVDMethod - Type:
cuquantum.
tensornet. tensor. SVDMethod | Literal[False, None] | Dict | None