Backends (qiskit_addon_mpf.backends)¶
Optional backends for the DynamicMPF algorithm.
Availability¶
Whether a certain backend can be used depends on the availability of the underlying tensor network library. This can easily be asserted at runtime using the following indicators:
Backends¶
Depending on the availability (see above), the following backends are available:
Interface¶
The interface implemented by any one of these optional backends is made up of the following classes:
- class Evolver[source]¶
- Bases: - ABC- The interface for the time-evolution algorithms used within - DynamicMPF.- This time-evolution interface is used by the - DynamicMPF.lhsand- DynamicMPF.rhsand should time-evolve a- Stateobject under its hood. The exact mechanism of the algorithm is described in more detail in- DynamicMPF,- State, and- setup_dynamic_lse().- abstract property conjugate: bool¶
- Returns whether this time-evolver instance acts on the right-hand side. 
 - abstract step()[source]¶
- Perform a single time step of this time-evolution algorithm. - This should act on the internally referenced - Stateobject (for which no name is prescribed by this interface). Whether this time-evolution algorithm instance should evolve the- Statefrom the left- or right-hand side, depends on the value of- conjugate.- Return type:
- None 
 
 
- class State[source]¶
- Bases: - ABC- The interface for the - DynamicMPF.evolution_state.- This time-evolution state is shared between the LHS and RHS - Evolverinstances of the- DynamicMPFinstance. In most cases where a concrete backend implementing this interface is based on tensor networks, this state will be a matrix product operator (MPO). This is because most time-evolution algorithms would normally evolve a matrix product state (MPS) as shown pictorially below, where time evolution blocks (- U#) are successively applied to a 1-dimensional MPS (- S#). Here, the tensor network grows towards the right as time goes on.- MPS Evolution S0┄┄┲━━━━┱┄┄┄┄┄┄┄┄┲━━━━┱┄ │ ┃ U1 ┃ ┃ U5 ┃ S1┄┄┺━━━━┹┄┲━━━━┱┄┺━━━━┹┄ │ ┃ U3 ┃ S2┄┄┲━━━━┱┄┺━━━━┹┄┲━━━━┱┄ ... │ ┃ U2 ┃ ┃ U6 ┃ S3┄┄┺━━━━┹┄┲━━━━┱┄┺━━━━┹┄ │ ┃ U4 ┃ S4┄┄┄┄┄┄┄┄┄┺━━━━┹┄┄┄┄┄┄┄┄ - However, in our case, we want two time-evolution engines to share a single state. In order to achieve that, we can have one of them evolve the state from the right (just as before, - U#), but have the second one evolve the state from the left (- V#). This requires the state to also have bonds going of in that direction, rendering it a 2-dimensional MPO (- M#) rather than the 1-dimensional MPS from before.- MPO Evolution ┄┲━━━━┱┄┄┄┄┄┄┄┄┲━━━━┱┄┄M0┄┄┲━━━━┱┄┄┄┄┄┄┄┄┲━━━━┱┄ ┃ V5 ┃ ┃ V1 ┃ │ ┃ U1 ┃ ┃ U5 ┃ ┄┺━━━━┹┄┲━━━━┱┄┺━━━━┹┄┄M1┄┄┺━━━━┹┄┲━━━━┱┄┺━━━━┹┄ ┃ V3 ┃ │ ┃ U3 ┃ ... ┄┲━━━━┱┄┺━━━━┹┄┲━━━━┱┄┄M2┄┄┲━━━━┱┄┺━━━━┹┄┲━━━━┱┄ ... ┃ V6 ┃ ┃ V2 ┃ │ ┃ U2 ┃ ┃ U6 ┃ ┄┺━━━━┹┄┲━━━━┱┄┺━━━━┹┄┄M3┄┄┺━━━━┹┄┲━━━━┱┄┺━━━━┹┄ ┃ V4 ┃ │ ┃ U4 ┃ ┄┄┄┄┄┄┄┄┺━━━━┹┄┄┄┄┄┄┄┄┄M4┄┄┄┄┄┄┄┄┄┺━━━━┹┄┄┄┄┄┄┄┄