VibrationalBasis#

class VibrationalBasis(num_modals, *, threshold=1e-06)[ソース]#

ベースクラス: ABC

The Vibrational basis base class.

This class defines the interface which any vibrational basis must implement. A basis must be applied to the vibrational integrals in order to map them into a second-quantization form.

The following attributes can be set via the initializer but can also be read and updated once the VibrationalBasis object has been constructed.

num_modals#

the number of modals into which each mode gets expanded in second-quantization.

Type:

list[int]

threshold#

the threshold below which integral values will be dropped.

Type:

float

パラメータ:
  • num_modals (list[int]) – the number of modals to be used for each mode.

  • threshold (float) – the threshold value below which an integral coefficient gets neglected.

Methods

abstract eval_integral(mode, modal_1, modal_2, power, kinetic_term=False)[ソース]#

The integral evaluation method of this basis.

パラメータ:
  • mode (int) – the index of the mode.

  • modal_1 (int) – the index of the first modal.

  • modal_2 (int) – the index of the second modal.

  • power (int) – the exponent of the coordinate.

  • kinetic_term (bool) – if this is True, the method should compute the integral of the kinetic term of the vibrational Hamiltonian, :math:d^2/dQ^2.

戻り値:

The evaluated integral for the specified coordinate or None if this integral value falls below the threshold.

例外:

ValueError – if an unsupported parameter is supplied.

戻り値の型:

complex | None

map(coefficient, modes)[ソース]#

Maps the provided coefficient and mode index to this second-quantization basis.

This applies the actual basis and expands each mode into the number of modals with which the basis instance was initialized.

パラメータ:
  • coefficient (complex) – the initial coefficient associated with the mode indices.

  • modes (tuple[int, ...]) – the mode indices. If all of these are negative, the coefficient is treated as belonging to a kinetic term.

列挙:

Pairs of integral values and indices. The indices are now three times as long as the initially provided modes index. The reason for that is that each mode index gets expanded into three indices, denoting the (mode, modal_1, modal_2) indices.

戻り値の型:

Generator[tuple[complex, tuple[int, …]], None, None]