Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extraction of controlled parametric gates #13067

Merged
merged 1 commit into from
Sep 3, 2024

Commits on Sep 2, 2024

  1. Fix extraction of controlled parametric gates

    The `mutable` check in the controlled-gate `OperationFromPython`
    extraction logic to check for a mutated `base_gate` was overzealous,
    and would return false positives for parametric controlled gates.  The
    only modification to `base_gate` of a standard-library gate that would
    not have caused data-model problems from Python space would be setting
    the base-gate label, which is used for a public feature of the circuit
    visualisers.
    
    The change to `get_standard_gate_name_mapping` is just a minor
    convenience to make the gate objects directly appendable to a circuit;
    previously, each `Parameter` object was distinct and had a UUID clash
    with others of the same name, so could not be used together.  The new
    behaviour is purely a convenience for tests; it largely should not be
    useful for users to directly append these gates.
    jakelishman committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    c03604b View commit details
    Browse the repository at this point in the history