Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

qiskit.chemistry.algorithms.pes_samplers.HarmonicPotential

class HarmonicPotential(molecule)

GitHub

Implements a 1D Harmonic potential.

Input units are Angstroms (distance between the two atoms), and output units are Hartrees (molecular energy).

Parameters

molecule (Molecule) – the underlying molecule.

Raises

ValueError – Only implemented for diatomic molecules

__init__

__init__(molecule)

Parameters

molecule (Molecule) – the underlying molecule.

Raises

ValueError – Only implemented for diatomic molecules


Methods

__init__(molecule)type moleculeMolecule
dissociation_energy([scaling])Returns the estimated dissociation energy for the current fit.
eval(x)After fitting the data to the fit function, predict the energy at a point x.
fit(xdata, ydata[, initial_vals, bounds_list])Fits a potential to computed molecular energies.
fit_function(x, k, r_0, m_shift)Functional form of the potential.
fundamental_frequency()Returns the fundamental frequency for the current fit (in s^-1).
get_equilibrium_geometry([scaling])Returns the interatomic distance corresponding to minimal energy.
get_maximum_trusted_level([n])Returns the maximum energy level for which the particular implementation still provides a good approximation of reality.
get_minimal_energy([scaling])Returns the smallest molecular energy for the current fit.
get_num_modes()This (1D) potential represents a single vibrational mode
get_trust_region()The potential will usually be well-defined (even if not useful) for arbitrary x so we return a fairly large interval here.
process_fit_data(xdata, ydata)Mostly for internal use. Preprocesses the data passed to fit_to_data()
update_molecule(molecule)Updates the underlying molecule.
vibrational_energy_level(n)Returns the n-th vibrational energy level for the current fit (in Hartrees).
wave_number()Returns the wave number for the current fit (in cm^-1).

dissociation_energy

dissociation_energy(scaling=1.0)

Returns the estimated dissociation energy for the current fit.

Parameters

scaling (float) – Scaling to change units. (Default is 1.0 for Hartrees)

Return type

float

Returns

estimated dissociation energy

eval

eval(x)

After fitting the data to the fit function, predict the energy at a point x.

Parameters

x (float) – value to evaluate surface in

Return type

float

Returns

value of potential in point x

fit

fit(xdata, ydata, initial_vals=None, bounds_list=None)

Fits a potential to computed molecular energies.

Parameters

  • xdata (List[float]) – interatomic distance points (Angstroms)
  • ydata (List[float]) – molecular energies (Hartrees)
  • initial_vals (Optional[List[float]]) – Initial values for fit parameters. None for default. Order of parameters is k, r_0 and m_shift (see fit_function implementation)
  • bounds_list (Optional[Tuple[List[float], List[float]]]) – Bounds for the fit parameters. None for default. Order of parameters is k, r_0 and m_shift (see fit_function implementation)

Return type

None

fit_function

static fit_function(x, k, r_0, m_shift)

Functional form of the potential.

Parameters

  • x (float) – x parameter of harmonic potential functional form
  • k (float) – k parameter of harmonic potential functional form
  • r_0 (float) – r_0 parameter of harmonic potential functional form
  • m_shift (float) – m parameter of harmonic potential functional form

Return type

float

Returns

harmonic potential functional form

fundamental_frequency

fundamental_frequency()

Returns the fundamental frequency for the current fit (in s^-1).

Return type

float

Returns

fundamental frequency for the current fit

get_equilibrium_geometry

get_equilibrium_geometry(scaling=1.0)

Returns the interatomic distance corresponding to minimal energy.

Parameters

scaling (float) – Scaling to change units. (Default is 1.0 for Angstroms)

Return type

float

Returns

geometry corresponding to minimal energy

get_maximum_trusted_level

get_maximum_trusted_level(n=0)

Returns the maximum energy level for which the particular implementation still provides a good approximation of reality. Default value of 100. Redefined where needed (see e.g. Morse).

Parameters

n (int) – vibronic mode

Return type

float

Returns

maximum_trusted_level setted

get_minimal_energy

get_minimal_energy(scaling=1.0)

Returns the smallest molecular energy for the current fit.

Parameters

scaling (float) – Scaling to change units. (Default is 1.0 for Hartrees)

Return type

float

Returns

smallest molecular energy for the current fit

get_num_modes

get_num_modes()

This (1D) potential represents a single vibrational mode

Return type

int

get_trust_region

get_trust_region()

The potential will usually be well-defined (even if not useful) for arbitrary x so we return a fairly large interval here. Redefine in derived classes if needed.

Return type

Tuple[float, float]

process_fit_data

classmethod process_fit_data(xdata, ydata)

Mostly for internal use. Preprocesses the data passed to fit_to_data()

so that only the points around the minimum are fit (which gives more accurate vibrational modes).

Parameters

  • xdata (List[float]) – xdata to be considered
  • ydata (List[float]) – ydata to be considered

Return type

Tuple[list, list]

Returns

the processed data that fit better to a harmonic potential

update_molecule

update_molecule(molecule)

Updates the underlying molecule.

Parameters

molecule (Molecule) – chemistry molecule

Raises

ValueError – Only implemented for diatomic molecules

Return type

Molecule

vibrational_energy_level

vibrational_energy_level(n)

Returns the n-th vibrational energy level for the current fit (in Hartrees).

Parameters

n (int) – vibrational mode

Return type

float

Returns

vibrational energy level for the current fit

wave_number

wave_number()

Returns the wave number for the current fit (in cm^-1).

Return type

int

Returns

wave number for the current fit

Was this page helpful?
Report a bug or request content on GitHub.