qiskit-documentation/docs/api/qiskit-addon-mpf/backends-tenpy-tebd-tebd-ev...

88 lines
4.7 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: TEBDEvolver (latest version)
description: API reference for qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver in the latest version of qiskit-addon-mpf
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver
---
# TEBDEvolver
<Class id="qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.3/qiskit_addon_mpf/backends/tenpy_tebd/evolver.py#L29-L182" signature="TEBDEvolver(*args, dt=0.1, **kwargs)" modifiers="class">
Bases: [`TEBDEngine`](https://tenpy.readthedocs.io/en/latest/reference/tenpy.algorithms.tebd.TEBDEngine.html#tenpy.algorithms.tebd.TEBDEngine "(in TeNPy v1.0.5)"), [`Evolver`](backends#evolver "qiskit_addon_mpf.backends.interface.Evolver")
A TEBD algorithm for evolving an internal MPO.
As discussed in more detail in [`tenpy_tebd`](backends-tenpy-tebd#module-qiskit_addon_mpf.backends.tenpy_tebd "qiskit_addon_mpf.backends.tenpy_tebd"), this extension of TeNPys existing [`TEBDEngine`](https://tenpy.readthedocs.io/en/latest/reference/tenpy.algorithms.tebd.TEBDEngine.html#tenpy.algorithms.tebd.TEBDEngine "(in TeNPy v1.0.5)") implementation time-evolves an internal matrix product operator (MPO) rather than the conventional matrix product state (MPS).
More concretely, the internal object is expected to be an [`MPOState`](backends-tenpy-tebd-mpo-state "qiskit_addon_mpf.backends.tenpy_tebd.MPOState").
<Admonition title="Warning" type="caution">
The API of this class is actually much larger than shown here, because it inherits additional methods from the [`TEBDEngine`](https://tenpy.readthedocs.io/en/latest/reference/tenpy.algorithms.tebd.TEBDEngine.html#tenpy.algorithms.tebd.TEBDEngine "(in TeNPy v1.0.5)") base class. However, we do not duplicate that API here.
</Admonition>
Initialize a [`TEBDEvolver`](#qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver "qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver") instance.
**Parameters**
* **args** any positional arguments will be forwarded to the [`TEBDEngine`](https://tenpy.readthedocs.io/en/latest/reference/tenpy.algorithms.tebd.TEBDEngine.html#tenpy.algorithms.tebd.TEBDEngine "(in TeNPy v1.0.5)") constructor.
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) the time step to be used by this time-evolution instance.
* **kwargs** any further keyword arguments will be forwarded to the [`TEBDEngine`](https://tenpy.readthedocs.io/en/latest/reference/tenpy.algorithms.tebd.TEBDEngine.html#tenpy.algorithms.tebd.TEBDEngine "(in TeNPy v1.0.5)") constructor.
## Attributes
### conjugate
<Attribute id="qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver.conjugate">
Returns whether this time-evolver instance acts on the right-hand side.
</Attribute>
### evolved\_time
<Attribute id="qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver.evolved_time">
Returns the current evolution time.
</Attribute>
### dt
<Attribute id="qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver.dt">
The time step to be used by this time-evolution instance.
</Attribute>
## Methods
### step
<Function id="qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver.step" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.3/qiskit_addon_mpf/backends/tenpy_tebd/evolver.py#L78-L84" signature="step()">
Perform a single time step of TEBD.
This essentially calls [`run_evolution()`](https://tenpy.readthedocs.io/en/latest/reference/tenpy.algorithms.tebd.TEBDEngine.html#tenpy.algorithms.tebd.TEBDEngine.run_evolution "(in TeNPy v1.0.5)") and forwards the value of [`dt`](#qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver.dt "qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver.dt") that was provided upon construction.
**Return type**
None
</Function>
### update\_bond
<Function id="qiskit_addon_mpf.backends.tenpy_tebd.TEBDEvolver.update_bond" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.3/qiskit_addon_mpf/backends/tenpy_tebd/evolver.py#L86-L182" signature="update_bond(i, U_bond)">
Update the specified bond.
Overwrites the original (MPS-based) implementation to support an MPO as the shared state.
**Parameters**
* **i** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the bond index.
* **U\_bond** ([*Array*](https://tenpy.readthedocs.io/en/latest/reference/tenpy.linalg.np_conserved.Array.html#tenpy.linalg.np_conserved.Array "(in TeNPy v1.0.5)")) the bond to update.
**Returns**
The truncation error.
**Return type**
[float](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")
</Function>
</Class>