AmplitudeVector

class adcc.AmplitudeVector(**kwargs: Tensor)

Bases: dict[str, Tensor]

Construct an AmplitudeVector. Typical use cases are AmplitudeVector(ph=tensor_singles, pphh=tensor_doubles).

Attributes Summary

blocks

Return the sorted blocks which are used inside the vector, e.g., ['ph', 'pphh'].

needs_evaluation

Methods Summary

copy()

Return a copy of the AmplitudeVector

dot(-> float)

Return the dot product with another AmplitudeVector or the dot products with a list of AmplitudeVectors.

empty_like()

Return an empty AmplitudeVector of the same shape and symmetry

evaluate()

Ensures all blocks of the AmplitudeVector are evaluated and resilient in memory.

nosym_like()

Return an empty AmplitudeVector of the same shape and symmetry

ones_like()

Return an empty AmplitudeVector of the same shape and symmetry

set_random()

Fills all blocks of the AmplitudeVector with random elements.

zeros_like()

Return an AmplitudeVector of the same shape and symmetry with all elements set to zero

Attributes Documentation

blocks

Return the sorted blocks which are used inside the vector, e.g., [‘ph’, ‘pphh’].

needs_evaluation

Methods Documentation

copy() AmplitudeVector

Return a copy of the AmplitudeVector

dot(other: AmplitudeVector) float
dot(other: Sequence[AmplitudeVector]) ndarray[tuple[int], dtype[float64]]

Return the dot product with another AmplitudeVector or the dot products with a list of AmplitudeVectors. In the latter case a np.ndarray is returned. Only blocks common to self and other are considered for the dot product.

empty_like() AmplitudeVector

Return an empty AmplitudeVector of the same shape and symmetry

evaluate() AmplitudeVector

Ensures all blocks of the AmplitudeVector are evaluated and resilient in memory.

nosym_like() AmplitudeVector

Return an empty AmplitudeVector of the same shape and symmetry

ones_like() AmplitudeVector

Return an empty AmplitudeVector of the same shape and symmetry

set_random() AmplitudeVector

Fills all blocks of the AmplitudeVector with random elements.

zeros_like() AmplitudeVector

Return an AmplitudeVector of the same shape and symmetry with all elements set to zero