Idenso · latest
On this page

dot

symbolica.community.tensor Function

dot(left: TensorExpression | Expression, right: TensorExpression | Expression) -> TensorExpression

Contract two rank-one tensors into a scalar product.

Parameters

left, right TensorExpression, Tensor, or TensorNetwork

Rank-one operands in compatible representation spaces.

Returns

TensorExpression or TensorNetwork

Symbolic operands return TensorExpression. If either operand carries component data, the result is a lazy TensorNetwork.

Notes

The pairing includes the representation metric, for example Minkowski signs. This is a bilinear product; it does not conjugate either operand.

Examples

from symbolica.community.tensor import Representation, TensorName, dot
space = Representation.euc(3)
p = TensorName.vector("dot_p")(space)
q = TensorName.vector("dot_q")(space)
dot(p, q).is_scalar

Member details

Overloads

Overload 1 #

dot(left: TensorExpression | Expression, right: TensorExpression | Expression) -> TensorExpression

Contract two rank-one tensors into a scalar product.

Returns

TensorExpression or TensorNetwork

Symbolic operands return TensorExpression. If either operand carries component data, the result is a lazy TensorNetwork.

Notes

The pairing includes the representation metric, for example Minkowski signs. This is a bilinear product; it does not conjugate either operand.

Examples
from symbolica.community.tensor import Representation, TensorName, dot
space = Representation.euc(3)
p = TensorName.vector("dot_p")(space)
q = TensorName.vector("dot_q")(space)
dot(p, q).is_scalar
Parameters
NameTypeDefaultDescription
leftTensorExpression | Expression—

Rank-one operands in compatible representation spaces.

rightTensorExpression | Expression—

Rank-one operands in compatible representation spaces.

Overload 2 #

dot(left: Union[Tensor, TensorNetwork], right: _ScalarInput | TensorExpression | TensorNetwork | Tensor | FactorProjector[TensorExpression] | FactorProjector[TensorNetwork]) -> TensorNetwork

Contract two rank-one tensors into a scalar product.

Returns

TensorExpression or TensorNetwork

Symbolic operands return TensorExpression. If either operand carries component data, the result is a lazy TensorNetwork.

Notes

The pairing includes the representation metric, for example Minkowski signs. This is a bilinear product; it does not conjugate either operand.

Examples
from symbolica.community.tensor import Representation, TensorName, dot
space = Representation.euc(3)
p = TensorName.vector("dot_p")(space)
q = TensorName.vector("dot_q")(space)
dot(p, q).is_scalar
Parameters
NameTypeDefaultDescription
leftUnion[Tensor, TensorNetwork]—

Rank-one operands in compatible representation spaces.

right_ScalarInput | TensorExpression | TensorNetwork | Tensor | FactorProjector[TensorExpression] | FactorProjector[TensorNetwork]—

Rank-one operands in compatible representation spaces.

Overload 3 #

dot(left: _ScalarInput | TensorExpression | TensorNetwork | Tensor | FactorProjector[TensorExpression] | FactorProjector[TensorNetwork], right: Union[Tensor, TensorNetwork]) -> TensorNetwork

Contract two rank-one tensors into a scalar product.

Returns

TensorExpression or TensorNetwork

Symbolic operands return TensorExpression. If either operand carries component data, the result is a lazy TensorNetwork.

Notes

The pairing includes the representation metric, for example Minkowski signs. This is a bilinear product; it does not conjugate either operand.

Examples
from symbolica.community.tensor import Representation, TensorName, dot
space = Representation.euc(3)
p = TensorName.vector("dot_p")(space)
q = TensorName.vector("dot_q")(space)
dot(p, q).is_scalar
Parameters
NameTypeDefaultDescription
left_ScalarInput | TensorExpression | TensorNetwork | Tensor | FactorProjector[TensorExpression] | FactorProjector[TensorNetwork]—

Rank-one operands in compatible representation spaces.

rightUnion[Tensor, TensorNetwork]—

Rank-one operands in compatible representation spaces.