178 lines
5.4 KiB
Plaintext
178 lines
5.4 KiB
Plaintext
---
|
||
title: PotentialBase
|
||
description: API reference for qiskit.chemistry.algorithms.pes_samplers.PotentialBase
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.chemistry.algorithms.pes_samplers.PotentialBase
|
||
---
|
||
|
||
# PotentialBase
|
||
|
||
<Class id="qiskit.chemistry.algorithms.pes_samplers.PotentialBase" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/chemistry/algorithms/pes_samplers/potentials/potential_base.py" signature="PotentialBase(molecule)" modifiers="class">
|
||
Bases: `qiskit.chemistry.algorithms.pes_samplers.potentials.potential_base.EnergySurfaceBase`, `qiskit.chemistry.algorithms.pes_samplers.potentials.potential_base.VibronicStructureBase`
|
||
|
||
Class to hold prescribed 1D potentials (e.g. Morse/Harmonic) over a degree of freedom.
|
||
|
||
## Methods
|
||
|
||
### dissociation\_energy
|
||
|
||
<Function id="qiskit.chemistry.algorithms.pes_samplers.PotentialBase.dissociation_energy" signature="PotentialBase.dissociation_energy(scaling=1.0)" modifiers="abstract">
|
||
Returns the dissociation energy (scaled by ‘scaling’)
|
||
|
||
**Return type**
|
||
|
||
`float`
|
||
</Function>
|
||
|
||
### eval
|
||
|
||
<Function id="qiskit.chemistry.algorithms.pes_samplers.PotentialBase.eval" signature="PotentialBase.eval(x)" modifiers="abstract">
|
||
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 surface in point x
|
||
</Function>
|
||
|
||
### fit
|
||
|
||
<Function id="qiskit.chemistry.algorithms.pes_samplers.PotentialBase.fit" signature="PotentialBase.fit(xdata, ydata, initial_vals=None, bounds_list=None)" modifiers="abstract">
|
||
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`
|
||
</Function>
|
||
|
||
### get\_equilibrium\_geometry
|
||
|
||
<Function id="qiskit.chemistry.algorithms.pes_samplers.PotentialBase.get_equilibrium_geometry" signature="PotentialBase.get_equilibrium_geometry(scaling=1.0)" modifiers="abstract">
|
||
Get the equilibrium energy.
|
||
|
||
Returns the geometry for the minimal energy (scaled by ‘scaling’) Default units (scaling=1.0) are Angstroms. Scale by 1E-10 to get meters.
|
||
|
||
**Parameters**
|
||
|
||
**scaling** (`float`) – scaling factor
|
||
|
||
**Return type**
|
||
|
||
`float`
|
||
|
||
**Returns**
|
||
|
||
equilibrium geometry
|
||
</Function>
|
||
|
||
### get\_maximum\_trusted\_level
|
||
|
||
<Function id="qiskit.chemistry.algorithms.pes_samplers.PotentialBase.get_maximum_trusted_level" signature="PotentialBase.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
|
||
</Function>
|
||
|
||
### get\_minimal\_energy
|
||
|
||
<Function id="qiskit.chemistry.algorithms.pes_samplers.PotentialBase.get_minimal_energy" signature="PotentialBase.get_minimal_energy(scaling=1.0)" modifiers="abstract">
|
||
Get the minimal energy.
|
||
|
||
Returns the value of the minimal energy (scaled by ‘scaling’) Default units (scaling=1.0) are J/mol. Scale appropriately for Hartrees.
|
||
|
||
**Parameters**
|
||
|
||
**scaling** (`float`) – scaling factor
|
||
|
||
**Return type**
|
||
|
||
`float`
|
||
|
||
**Returns**
|
||
|
||
minimum energy
|
||
</Function>
|
||
|
||
### get\_num\_modes
|
||
|
||
<Function id="qiskit.chemistry.algorithms.pes_samplers.PotentialBase.get_num_modes" signature="PotentialBase.get_num_modes()">
|
||
This (1D) potential represents a single vibrational mode
|
||
|
||
**Return type**
|
||
|
||
`int`
|
||
</Function>
|
||
|
||
### get\_trust\_region
|
||
|
||
<Function id="qiskit.chemistry.algorithms.pes_samplers.PotentialBase.get_trust_region" signature="PotentialBase.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`]
|
||
</Function>
|
||
|
||
### update\_molecule
|
||
|
||
<Function id="qiskit.chemistry.algorithms.pes_samplers.PotentialBase.update_molecule" signature="PotentialBase.update_molecule(molecule)">
|
||
Wipe state if molecule changes, and check validity of molecule for potential.
|
||
|
||
**Parameters**
|
||
|
||
**molecule** (`Molecule`) – chemistry molecule
|
||
|
||
**Return type**
|
||
|
||
`Molecule`
|
||
|
||
**Returns**
|
||
|
||
molecule used
|
||
</Function>
|
||
|
||
### vibrational\_energy\_level
|
||
|
||
<Function id="qiskit.chemistry.algorithms.pes_samplers.PotentialBase.vibrational_energy_level" signature="PotentialBase.vibrational_energy_level(n)" modifiers="abstract">
|
||
Returns the n-th vibrational energy level for a given mode.
|
||
|
||
**Parameters**
|
||
|
||
**n** (`int`) – number of vibrational mode
|
||
|
||
**Return type**
|
||
|
||
`float`
|
||
|
||
**Returns**
|
||
|
||
n-th vibrational energy level for a given mode
|
||
</Function>
|
||
</Class>
|
||
|