mindchemistry.e3.o3.ElementwiseTensorProduct

View Source On Gitee
class mindchemistry.e3.o3.ElementwiseTensorProduct(irreps_in1, irreps_in2, filter_ir_out=None, ncon_dtype=float32, **kwargs)[source]

Elementwise connected tensor product.

Equivalent to TensorProduct with instructions='element'. For details, see mindchemistry.e3.o3.TensorProduct.

Parameters
  • irreps_in1 (Union[str, Irrep, Irreps]) – Irreps for the first input.

  • irreps_in2 (Union[str, Irrep, Irreps]) – Irreps for the second input.

  • filter_ir_out (Union[str, Irrep, Irreps, None]) – Filter to select only specific Irrep of the output. Default: None.

  • irrep_norm (str) – {'component', 'norm'}, the assumed normalization of the input and output representations. Default: 'component'. Default: 'component'.

  • path_norm (str) – {'element', 'path'}, the normalization method of path weights. Default: 'element'.

  • weight_init (str) – {'zeros', 'ones', 'truncatedNormal', 'normal', 'uniform', 'he_uniform', 'he_normal', 'xavier_uniform'}, the initial method of weights. Default: 'normal'.

  • ncon_dtype (mindspore.dtype) – The type of input tensors of ncon computation module. Default: mindspore.float32 .

Supported Platforms:

Ascend

Examples

>>> from mindchemistry.e3.o3 import ElementwiseTensorProduct
>>> ElementwiseTensorProduct('2x2e+4x1o', '3x1e+3x0o')
TensorProduct [element] (2x2e+1x1o+3x1o x 2x1e+1x1e+3x0o -> 2x1e+2x2e+2x3e+1x0o+1x1o+1x2o+3x1e)