Skip to content

Pauli propagation sample #207

@aromanro

Description

@aromanro

In the pauli propagation example each gate is executed in a for loop. At the end of the loop the views are swapped for the next iteration (so the 'in' one becomes 'out' and viceversa).

In order to preserve the last 'out' view as the 'out' view, after the for another swap is done:

std::swap(inExpansion, outExpansion);

This seems ok so far, but then when computing the expectation value, the 'in' view is used:

HANDLE_CUPP_ERROR(cupaulipropPauliExpansionGetNumTerms(handle, inExpansion, &numOutTerms));

Shouldn't be that replaced by the 'out' expansion?

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