# API reference¶

Note

Work in progress. Many function do not yet follow the numpy standard in their documentation!

### Functions¶

 `run_adc`(data_or_matrix[, n_states, kind, …]) Run an ADC calculation. `add`(a, b[, out]) Return the elementwise sum of two objects If out is given the result will be written to the latter tensor. `contract`(contraction, a, b[, out]) Form a single, einsum-like contraction, that is contract tensor a and be to form out via a contraction defined by the first argument string, e.g. Return a copy of the input tensor. `divide`(a, b[, out]) Return the elementwise division of two objects If out is given the result will be written to the latter tensor. `dot`(a, b) Form the scalar product between two tensors. Return an empty tensor of the same shape and symmetry as the input tensor. `linear_combination`(coefficients, tensors) Form a linear combination from a list of tensors. `multiply`(a, b[, out]) Return the elementwise product of two objects If out is given the result will be written to the latter tensor. Return tensor of the same shape, but without the symmetry setup of the input tensor. Return tensor of the same shape and symmetry as the input tensor, but initialised to 1, that is the canonical blocks are 1 and the other ones are symmetry-equivalent (-1 or 0) `subtract`(a, b[, out]) Return the elementwise difference of two objects If out is given the result will be written to the latter tensor. `transpose`(a[, axes]) Return the transpose of a tensor as a copy. Return a zero tensor of the same shape and symmetry as the input tensor. `set_n_threads`(arg0) Set the number of running worker threads used by adcc `get_n_threads`() Get the number of running worker threads used by adcc. `guesses_singlet`(matrix, n_guesses[, block, …]) Obtain guesses for computing singlet states by inspecting the passed ADC matrix. `guesses_triplet`(matrix, n_guesses[, block, …]) Obtain guesses for computing triplet states by inspecting the passed ADC matrix. `guesses_any`(matrix, n_guesses[, block, …]) Obtain guesses by inspecting a block of the diagonal of the passed ADC matrix. `guess_symmetries`(matrix[, irrep, …]) Return guess symmetry objects (one for each AmplitudeVector block) such that the specified requirements on the guesses are satisfied. `guesses_spin_flip`(matrix, n_guesses[, …]) Obtain guesses for computing spin-flip states by inspecting the passed ADC matrix. `guess_zero`(matrix[, irrep, spin_change, …]) Return an AmplitudeVector object filled with zeros, but where the symmetry has been properly set up to meet the specified requirements on the guesses. `adc0`(*args, **kwargs) Run an ADC calculation. `cis`(*args, **kwargs) Run an ADC calculation. `adc1`(*args, **kwargs) Run an ADC calculation. `adc2`(*args, **kwargs) Run an ADC calculation. `adc2x`(*args, **kwargs) Run an ADC calculation. `adc3`(*args, **kwargs) Run an ADC calculation. `cvs_adc0`(*args, **kwargs) Run an ADC calculation. `cvs_adc1`(*args, **kwargs) Run an ADC calculation. `cvs_adc2`(*args, **kwargs) Run an ADC calculation. `cvs_adc2x`(*args, **kwargs) Run an ADC calculation. `cvs_adc3`(*args, **kwargs) Run an ADC calculation. `banner`([colour, show_doi, show_website]) Return a nice banner describing adcc and its components

### Classes¶

 `AdcMatrix`(method, hf_or_mp) `AdcBlockView`(fullmatrix, block) `AdcMatrixlike`(innermatrix) Class implementing minimal functionality of AdcMatrixlike objects. `AdcMethod`(method) `Symmetry`(mospaces, space[, irreps_allowed, …]) `ReferenceState`(hfdata[, core_orbitals, …]) `AmplitudeVector`(*tensors) `HartreeFockProvider` Abstract class defining the interface for passing data from the host program to adcc. `ExcitedStates`(data[, method, property_method]) `Tensor`(sym_or_mo[, space, irreps_allowed, …]) `DictHfProvider`(*args, **kwargs) `DataHfProvider`(data) `OneParticleOperator`(mospaces[, …]) This caching policy advises against caching any data, it does, however, keep track of the number of times the caching for a particular object has been requested and thus allows to gain some insight on the helpfulness of particular cachings. `LazyMp`(hf[, caching_policy])

 `add`(arg0, arg1, arg2) Apply the spin symmetrisation required to make the doubles and higher parts of an amplitude vector consist of components for a particular spin kind only. `compute_gs2state_optdm`(arg0, arg1, arg2, arg3) `compute_state2state_optdm`(arg0, arg1, arg2, …) `compute_state_diffdm`(arg0, arg1, arg2, arg3) `contract`(arg0, arg1, arg2) `contract_to`(arg0, arg1, arg2, arg3) `divide`(arg0, arg1, arg2) Get the number of running worker threads used by adcc. Get the total number of threads (running and sleeping) used by adcc. `guess_symmetries`(arg0, arg1) Return a list of symmetry objects in order to construct the singles / doubles part of the AmplitudeVector. `guess_zero`(arg0, arg1) Return an AmplitudeVector object filled with zeros, but where the symmetry has been properly set up to meet the requirements of the AdcGuessKind object `guesses_from_diagonal`(arg0, arg1, arg2, …) Obtain guesses by inspecting a block of the diagonal of the passed ADC matrix. `make_symmetry_eri`(arg0, arg1) Return the Symmetry object like it would be set up for the passed subspace of the electron-repulsion tensor. `make_symmetry_operator`(arg0, arg1, arg2, arg3) Return the Symmetry object for an orbital subspace block of a one-particle operator `make_symmetry_operator_basis`(arg0, arg1, arg2) Return the symmetry object for an operator in the AO basis. Return the Symmetry object like it would be set up for the passed subspace of the orbital coefficients tensor. `make_symmetry_orbital_energies`(arg0, arg1) Return the Symmetry object like it would be set up for the passed subspace of the orbital energies tensor. `multiply`(arg0, arg1, arg2) `set_n_threads`(arg0) Set the number of running worker threads used by adcc Set the total number of threads (running and sleeping) used by adcc. `subtract`(arg0, arg1, arg2)
 `AdcGuessKind` Class which collects information about the kind of guess vectors to be constructed. `AdcIntermediates` Class holding the computed ADC intermediates. `AdcMatrix` Class representing the AdcMatrix in various variants. `AdcMemory` Class controlling the memory allocations for adcc ADC calculations. `AmplitudeVector` Class representing an AmplitudeVector. `CachingPolicy_i` Should a particular tensor given by a label, its space string and the string of the spaces involved in the most expensive contraction be stored. `HartreeFockProvider` Abstract class defining the interface for passing data from the host program to adcc. `HartreeFockSolution_i` Interface class representing the data expected in adcc from an interfacing HF / SCF program. `LazyMp` Class representing information about the Mo/ller-Plesset results from ADCman. `MoIndexTranslation` Helper object to extract information from indices into orbitals subspaces and to map them between different indexing conventions (full MO space, MO subspaces, indexing convention in the HF Provider / SCF host program, … `MoSpaces` Class setting up the molecular orbital index spaces and subspaces and exposing information about them. `OneParticleOperator` Class representing a one-particle operator. `ReferenceState` Class representing information about the reference state for adcc. `Symmetry` Container for Tensor symmetry information `Tensor` Class representing the Tensor objects used for computations in adcc