qml.labs.trotter_error.AbstractState¶
- class AbstractState[source]¶
Bases:
ABCAbstract class used to define a state object for product formula error estimation.
A class inheriting from
AbstractStatemust implement the following dunder methods.__add__: implements addition__mul__: implements multiplication
Additionally, it requires the following methods.
zero_state: returns a representation of the zero statedot: implments the dot product of two states
Methods
dot(other)Compute the dot product of two states.
Return a representation of the zero state.
- abstract dot(other)[source]¶
Compute the dot product of two states.
- Parameters:
other (AbstractState) – the state to take the dot product with
- Returns:
the dot product of self and other
- Return type:
float
code/api/api/pennylane.labs.trotter_error.AbstractState
Download Python script
Download Notebook
View on GitHub