Skip to content

Allow EfficientDepthOneEvaluator to receive Paulis that are constants #58

@liranszlak

Description

@liranszlak

When calling the EfficientDepthOneEvaluator with a SparsePauliOp, if it includes terms that are constant (i.e. Paulis of the sort "IIIII" with some coeff), the evaluator raises an error. It would be beneficial if it could just add the constant term to the expected value computed, instead of throwing an error.
I ran into this when running RQAOA, where in some cases eliminating vertices creates new constant terms in the hamiltonian, and in that case the EfficientDepthOneEvaluator throws an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions