class QOConstants(pydantic.BaseModel)
#
Parent classes#
Introduction#
class QOConstants
contains physical constants used in loss function
during neural network learning process. It inherits from the pydantic's
BaseModel class to guarantee field type compatibility and their correct filling
without manual implementation of all checks.
Example construction with manual values set | |
---|---|
Instance attributes#
Note
- Attributes are mutable
- Arbitrary types are allowed to be used as attribute values
optimizer: keras.optimizers.Optimizer
#
Argument required for compiling a Keras model.
tracker: QOTracker
#
QOTracker class, responsible for collecting metrics during neural network learning process.
k: float
#
Oscillator force constant.
mass: float
#
Oscillator mass used in \([\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2} + V(x)]\psi(x) = E\psi(x)\)
x_left: float
#
Left boundary condition of our quantum harmonic oscillator model.
x_right: float
#
Right boundary condition of our quantum harmonic oscillator model.
fb: float
#
Constant boundary value for boundary conditions.
sample_size: int
#
Size of our current learning sample (number of points on the linear space).
v_f: int
#
Multiplier of regularization function which prevents our network from learning trivial eigenfunctions.
v_lambda: int
#
Multiplier of regularization function which prevents our network from learning trivial eigenvalues.
v_drive: int
#
Multiplier of regularization function which motivates our network to scan for higher values of eigenvalues.
Instance methods#
def sample(self) -> tf.Tensor
#
Generates tensor of sample_size
float32
values in range from x_left
to
x_right
for network learning process.
Returns#
type | description |
---|---|
tf.Tensor | float32 tensor in shape (sample_size, 1) |