NAME
Quantum::Superpositions::Lazy::ComputedState - a weighted state implementation with the source of the computation
DESCRIPTION
This is a subclass of Quantum::Superpositions::Lazy::State with extra fields that allow tracking of the computation sources that produced the state. Objects of this class are produced inside the with_sources block.
METHODS
All of the methods available in Quantum::Superpositions::Lazy::State, plus:
operation
Instance of a class consuming the Quantum::Superpositions::Lazy::Role::Operation role. This can be helpful to determine what kind of operation was performed to obtain the state.
source
An array reference of state values that were used in the operation (in order). The number of elements in the arrayref will depend of the operation type.