OneParticleOperator

class adcc.OneParticleOperator(spaces, is_symmetric=True)

Bases: object

Construct an OneParticleOperator object. All blocks are initialised as zero blocks.

Parameters

Attributes Summary

blocks_nonzero

Returns a list of the non-zero block labels

shape

Returns the shape tuple of the OneParticleOperator

size

Returns the number of elements of the OneParticleOperator

Methods Summary

block(block)

Returns tensor of the given block.

copy()

Return a deep copy of the OneParticleOperator

evaluate()

is_zero_block(block)

Checks if block is explicitly marked as zero block.

set_block(block, tensor)

Assigns tensor to a given block.

set_zero_block(block)

Set a given block as zero block

to_ao_basis([refstate_or_coefficients])

Transforms the OneParticleOperator to the atomic orbital basis using a ReferenceState or a coefficient map.

to_ndarray()

Returns the OneParticleOperator as a contiguous np.ndarray instance including all blocks

Attributes Documentation

blocks_nonzero

Returns a list of the non-zero block labels

shape

Returns the shape tuple of the OneParticleOperator

size

Returns the number of elements of the OneParticleOperator

Methods Documentation

block(block)

Returns tensor of the given block. Does not create a block in case it is marked as a zero block. Use __getitem__ for that purpose.

copy()

Return a deep copy of the OneParticleOperator

evaluate()
is_zero_block(block)

Checks if block is explicitly marked as zero block. Returns False if the block does not exist.

set_block(block, tensor)

Assigns tensor to a given block. Deprecated

set_zero_block(block)

Set a given block as zero block

to_ao_basis(refstate_or_coefficients=None)

Transforms the OneParticleOperator to the atomic orbital basis using a ReferenceState or a coefficient map. If no ReferenceState or coefficient map is given, the ReferenceState used to construct the OneParticleOperator is taken instead.

to_ndarray()

Returns the OneParticleOperator as a contiguous np.ndarray instance including all blocks