Skip to content

VQEIteration

The result of a an iteration of VQE

Source code in q3as/algo/vqe.py
@dataclass
class VQEIteration:
    """
    The result of a an iteration of VQE
    """

    iter: int
    "The number of the iteration"
    cost: float
    "The value of the cost function of the iteration"
    params: np.ndarray
    "The parameters of the ansatz of the iteration"
    estimated: PrimitiveResult[PubResult]
    "The result of the estimation"
    best: bool = False
    "Whether this iteration is the best so far"

best: bool = False class-attribute instance-attribute

Whether this iteration is the best so far

cost: float instance-attribute

The value of the cost function of the iteration

estimated: PrimitiveResult[PubResult] instance-attribute

The result of the estimation

iter: int instance-attribute

The number of the iteration

params: np.ndarray instance-attribute

The parameters of the ansatz of the iteration