Skip to content

Swap Control and Target #2311

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

Merged
merged 2 commits into from
Apr 21, 2025
Merged

Swap Control and Target #2311

merged 2 commits into from
Apr 21, 2025

Conversation

ScottCarda-MS
Copy link
Contributor

@ScottCarda-MS ScottCarda-MS commented Apr 17, 2025

In circuit editing, when moving a control onto a target or vise-versa, the control and target should swap positions.

Swap control target

This also fixes an issue with copy-moving controls. The behavior is now that it will create a new control for the same operation and possibly move the operation horizontally in the circuit.

Copy-move control

@ScottCarda-MS ScottCarda-MS changed the title Sccarda/ctrl move Swap Control and Target Apr 17, 2025
@ScottCarda-MS ScottCarda-MS marked this pull request as ready for review April 18, 2025 17:11
Copy link
Member

@minestarks minestarks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@ScottCarda-MS ScottCarda-MS mentioned this pull request Apr 18, 2025
21 tasks
@DmitryVasilevsky
Copy link
Contributor

I'm not sure that moving control to a different line should add another control (your second example). This seems a bit counterintuitive. We should probably discuss it, but the change can go in if needed.

@ScottCarda-MS
Copy link
Contributor Author

I'm not sure that moving control to a different line should add another control (your second example). This seems a bit counterintuitive. We should probably discuss it, but the change can go in if needed.

This is specifically the copy-move with holding down the ctrl key. This copy-moves other gates as well. Regular moving a control will not copy the control.

@ScottCarda-MS ScottCarda-MS added this pull request to the merge queue Apr 21, 2025
@ScottCarda-MS ScottCarda-MS added the circuit-editor Issues related to the circuit-editor label Apr 21, 2025
@minestarks minestarks removed this pull request from the merge queue due to a manual request Apr 21, 2025
@minestarks minestarks added this pull request to the merge queue Apr 21, 2025
Merged via the queue into main with commit 102929f Apr 21, 2025
19 checks passed
@minestarks minestarks deleted the sccarda/ctrlMove branch April 21, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
circuit-editor Issues related to the circuit-editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants