qiskit-documentation/docs/api/qiskit/0.46/qiskit.algorithms.time_evol...

39 lines
2.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: ForwardEulerSolver
description: API reference for qiskit.algorithms.time_evolvers.variational.ForwardEulerSolver
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.algorithms.time_evolvers.variational.ForwardEulerSolver
---
# ForwardEulerSolver
<Class id="qiskit.algorithms.time_evolvers.variational.ForwardEulerSolver" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.46/qiskit/algorithms/time_evolvers/variational/solvers/ode/forward_euler_solver.py" signature="qiskit.algorithms.time_evolvers.variational.ForwardEulerSolver(function, t0, y0, t_bound, vectorized=False, support_complex=False, num_t_steps=15)" modifiers="class">
Bases: `OdeSolver`
Forward Euler ODE solver.
Forward Euler ODE solver that implements an interface from SciPy.
**Parameters**
* **function** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable "(in Python v3.12)")) Right-hand side of the system. The calling signature is `fun(t, y)`. Here `t` is a scalar, and there are two options for the ndarray `y`: It can either have shape (n,); then `fun` must return array\_like with shape (n,). Alternatively it can have shape (n, k); then `fun` must return an array\_like with shape (n, k), i.e., each column corresponds to a single column in `y`. The choice between the two options is determined by vectorized argument (see below). The vectorized implementation allows a faster approximation of the Jacobian by finite differences (required for this solver).
* **t0** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Initial time.
* **y0** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence "(in Python v3.12)")) Initial state.
* **t\_bound** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Boundary time - the integration wont continue beyond it. It also determines the direction of the integration.
* **vectorized** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Whether `fun` is implemented in a vectorized fashion. Default is False.
* **support\_complex** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Whether integration in a complex domain should be supported. Generally determined by a derived solver class capabilities. Default is False.
* **num\_t\_steps** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of time steps for the forward Euler method.
## Attributes
### TOO\_SMALL\_STEP
<Attribute id="qiskit.algorithms.time_evolvers.variational.ForwardEulerSolver.TOO_SMALL_STEP" attributeValue="'Required step size is less than spacing between numbers.'" />
### step\_size
<Attribute id="qiskit.algorithms.time_evolvers.variational.ForwardEulerSolver.step_size" />
</Class>