Skip to content

simplification with undo_average #275

@ChristophHotter

Description

@ChristophHotter

The function simplify(x) for operator expressions uses something like undo_average( simplify( average(x) ) ), to use the simplification rules for "normal" numbers of SymbolicUtils. This causes problems if x already includes averages like x = a*average(a), which leads to the wrong result a*average(a) -> a*a. Such terms appear if one deals with measurement backaction. To circumvent this problem, one can simply create the average of the expression as soon as possible. I mention this here since I made this mistake multiple times.

@david-pl Do you think there would be a problem to average terms, in general, as soon as possible after the operator algebra is applied? The only "major" change I see is that we would not have the operator_equations. But I think we only use the operator_equations for the correlation function, so maybe we can just create them there with undo_average()?

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