Skip to content

Pauli propagation sample #207

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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