Skip to content

Add label argument to all gates #14335

@Frank995

Description

@Frank995

What should we add?

Currently, not every gate support label argument definition. For example, the x gate does, the i gate doesn't. Is there a design reason for this? I tried to manually add the label argument like this:

    def id(self, qubit: QubitSpecifier, label: str | None = None) -> InstructionSet:  # pylint: disable=invalid-name
        """...
        """
        return self._append_standard_gate(StandardGate.IGate, [qubit], (), label=label)

But the custom label is still not displayed while drawing. How come?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions