AdcMatrix¶

class
adcc.
AdcMatrix
(method, hf_or_mp, block_orders=None, intermediates=None)¶ Bases:
adcc.AdcMatrix.AdcMatrixlike
Attributes Summary
axis_blocks
Return the blocks used along one of the axes of the ADC matrix (e.g.
blocks
default_block_orders
Methods Summary
block_apply
(block, tensor)Compute the application of a block of the ADC matrix with another AmplitudeVector or Tensor.
block_spaces
(block)block_view
(block)Return a view into the AdcMatrix that represents a single block of the matrix.
compute_apply
(block, tensor)compute_matvec
(ampl)Compute the matrixvector product of the ADC matrix with an excitation amplitude and return the result.
construct_symmetrisation_for_blocks
()Construct the symmetrisation functions, which need to be applied to relevant blocks of an AmplitudeVector in order to symmetrise it to the right symmetry in order to be used with the various matrixvectorproducts of this function.
dense_basis
([axis_blocks, ordering])Return the list of indices and their values of the dense basis representation
diagonal
([block])Return the diagonal of the ADC matrix
has_block
(block)matvec
(*args, **kwargs)Compute the matrixvector product of the ADC matrix with an excitation amplitude and return the result.
rmatvec
(v)to_ndarray
([out])Return the ADC matrix object as a dense numpy array.
Attributes Documentation

axis_blocks
¶ Return the blocks used along one of the axes of the ADC matrix (e.g. [‘ph’, ‘pphh’]).

blocks
¶

default_block_orders
= {'adc0': {'ph_ph': 0, 'ph_pphh': None, 'pphh_ph': None, 'pphh_pphh': None}, 'adc1': {'ph_ph': 1, 'ph_pphh': None, 'pphh_ph': None, 'pphh_pphh': None}, 'adc2': {'ph_ph': 2, 'ph_pphh': 1, 'pphh_ph': 1, 'pphh_pphh': 0}, 'adc2x': {'ph_ph': 2, 'ph_pphh': 1, 'pphh_ph': 1, 'pphh_pphh': 1}, 'adc3': {'ph_ph': 3, 'ph_pphh': 2, 'pphh_ph': 2, 'pphh_pphh': 1}}¶
Methods Documentation

block_apply
(block, tensor)¶ Compute the application of a block of the ADC matrix with another AmplitudeVector or Tensor. Nonmatching blocks in the AmplitudeVector will be ignored.

block_spaces
(block)¶

block_view
(block)¶ Return a view into the AdcMatrix that represents a single block of the matrix. Currently only diagonal blocks are supported.

compute_apply
(block, tensor)¶

compute_matvec
(ampl)¶ Compute the matrixvector product of the ADC matrix with an excitation amplitude and return the result.

construct_symmetrisation_for_blocks
()¶ Construct the symmetrisation functions, which need to be applied to relevant blocks of an AmplitudeVector in order to symmetrise it to the right symmetry in order to be used with the various matrixvectorproducts of this function.
Most importantly the returned functions antisymmetrise the occupied and virtual parts of the doubles parts if this is sensible for the method behind this adcmatrix.
Returns a dictionary block identifier > function

dense_basis
(axis_blocks=None, ordering='adcc')¶ Return the list of indices and their values of the dense basis representation
ordering: adcc, spin, spatial

diagonal
(block=None)¶ Return the diagonal of the ADC matrix

has_block
(block)¶

matvec
(*args, **kwargs)¶ Compute the matrixvector product of the ADC matrix with an excitation amplitude and return the result.

rmatvec
(v)¶

to_ndarray
(out=None)¶ Return the ADC matrix object as a dense numpy array. Converts the sparse internal representation of the ADC matrix to a dense matrix and return as a numpy array.
Notes
This method is only intended to be used for debugging and visualisation purposes as it involves computing a large amount of matrixvector products and the returned array consumes a considerable amount of memory.
The resulting matrix has no spin symmetry imposed, which means that its eigenspectrum may contain nonphysical excitations (e.g. with linear combinations of α>β and α>α components in the excitation vector).
This function has not been sufficiently tested to be considered stable.
