EnergySurface1DSpline
class EnergySurface1DSpline
Bases: qiskit.chemistry.algorithms.pes_samplers.potentials.potential_base.EnergySurfaceBase
A simple cubic spline interpolation for the potential energy surface.
A spline interpolation method for data fitting.
This allows for fitting BOPES sampler results or potential energy surfaces.
Methods
eval
EnergySurface1DSpline.eval(x)
After fitting the data to the fit function, predict the energy at a point x.
Parameters
x (float
) – Value to be evaluated
Return type
float
Returns
Value of surface fit in point x.
fit
EnergySurface1DSpline.fit(xdata, ydata, initial_vals=None, bounds_list=None)
Fits surface to data.
Parameters
- xdata (
List
[float
]) – x data to be fitted - ydata (
List
[float
]) – y data to be fitted - initial_vals (
Optional
[List
[float
]]) – Initial values for fit parameters. None for default. Order of parameters is d_e, alpha, 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 d_e, alpha, r_0 and m_shift (see fit_function implementation)
Return type
None
get_equilibrium_geometry
EnergySurface1DSpline.get_equilibrium_geometry(scaling=1.0)
Returns the geometry for the minimal energy (scaled by ‘scaling’) Default units (scaling=1.0) are Angstroms. Scale by 1E-10 to get meters. :type scaling: float
:param scaling: scaling factor
Return type
float
Returns
equilibrium geometry
get_minimal_energy
EnergySurface1DSpline.get_minimal_energy(scaling=1.0)
Returns the value of the minimal energy (scaled by ‘scaling’) Default units (scaling=1.0) are J/mol. Scale appropriately for Hartrees. :type scaling: float
:param scaling: scaling factor
Return type
float
Returns
minimum energy
get_trust_region
EnergySurface1DSpline.get_trust_region()
Get the trust region.
Returns the bounds of the region (in space) where the energy surface implementation can be trusted. When doing spline interpolation, for example, that would be the region where data is interpolated (vs. extrapolated) from the arguments of fit().
Return type
Tuple
[float
, float
]
Returns
The trust region between bounds.