qib.tensor_network.symbolic_network.SymbolicTensor

class qib.tensor_network.symbolic_network.SymbolicTensor(tid: int, shape: Sequence[int], bids: Sequence[int], dataref)[source]

Bases: object

Symbolic tensor, storing a unique ID, its shape, connected bond IDs (representing contractions with other tensors) and a user-provided reference to the data of the tensor.

Methods

transpose

Transpose the axes of the tensor, analogous to numpy.transpose.

Attributes

ndim

Number of dimensions (degree) of the tensor.

property ndim: int

Number of dimensions (degree) of the tensor.

transpose(axes=None)[source]

Transpose the axes of the tensor, analogous to numpy.transpose. Tensor is updated in-place.