Skip to content

X.controlled(cirq.SumOfProducts([[1]])) does not optimize to CX #5883

@daxfohl

Description

@daxfohl

X.controlled simplifies to CX when possible (and Z to CZ). However this does not work when the control_values is represented as a SumOfProducts, requiring workarounds by any code expecting such optimizations.

A fix for this is provided in #5873.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/gateskind/bug-reportSomething doesn't seem to work.status/needs-agreed-designWe want to do this, but it needs an agreed upon design before implementationtriage/needs-more-evidence[Feature requests] Seems plausible, but maintainers are not convinced about the use cases yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions