Skip to content

Circuit editor multi-register operation dragging #14

@stewdio

Description

@stewdio

Now that multi-register creation is possible through the Circuit editor, we need to be able to drag those operations to new positions without destroying them.

If all components of a multi-register operation are dragged together the interface should treat them as intact, sending a set$ command to the circuit for the new position. (If portions of the operation will fall outside of the circuit’s moment and register bounds it is the job of the set$ routine to handle this.)

If some (but not all) components of a multi-register operation are dragged to new registers within the same moment—and these new positions do not overwrite a sibling component—the operation should also remain intact, sending a set$ command for the whole operation with a modified register indices array that addresses the dragged components’ new positions. If the drag-and-drop overwrites any sibling components then more logic is needed to determine how to proceed.

If some (but not all) components of a multi-register operation are dragged to a new moment then the operation must be broken in to its individual components. The control component should resolve to an identity gate. The remaining should resolve to the overall operation—for example the target component of a controlled-not gate should resolve to a Pauli-X operation.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions