Skip to content

[StructuredState] Conflict between apply_scalar and normalisation #106

@PabloAndresCQ

Description

@PabloAndresCQ

The simulation algorithms under StructuredState expect the states are normalised and, in fact whenever there is a truncation, this is enforced. However, the current method apply_scalar allows users to multiply the state by complex numbers with absolute value different to 1. This can lead to bugs when users work with non-normalised states.

As a related issue, the tensors updated by apply_scalar are not currently marked as non-canonicalised. I can't think of a case where the current features would have unexpected behaviour because of this, but there may be edge cases where this also causes a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions