-
Notifications
You must be signed in to change notification settings - Fork 30
Description
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.