You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
A user can now drag multi-register operations all around! Drag the whole thing. Drag part of it. Drag pieces within the same moment. Drag one component onto a sibling component (thereby erasing the sibling underneath). It works!
But before closing this we ought to update Q.Circuit.prototype.clear$ to be kinder to existing multi-register operations. Right now clearing one cell that happens to be occupied by one component of a multi-reg op will erase the whole thing. That’s not so much fun. We ought to break it apart and just erase the piece that was cleared.
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 theset$
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.
The text was updated successfully, but these errors were encountered: