Skip to content
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

Quantum Chess: Improve Qubit picking algorithm #127

Closed
dstrain115 opened this issue Jan 19, 2021 · 0 comments · Fixed by #144
Closed

Quantum Chess: Improve Qubit picking algorithm #127

dstrain115 opened this issue Jan 19, 2021 · 0 comments · Fixed by #144
Assignees
Labels

Comments

@dstrain115
Copy link
Collaborator

The qubit picking algorithm for quantum chess greedily picks the most connected qubit. This is good if there is only one circuit transformation to do. However, if there are two distinct "chains" of moves, this greedy algorithm may no longer work. For instance, suppose the b1 knight splits on one side of the board, and the g1 knight splits on the other side of the board (and the two sides never interact). It may be possible to put b1 circuit on the right side of the chip, and g1 circuit on the left side of the chip. However, since the greedy algorithm put the b1 circuit right in the middle of the circuit, they can't both fit.

Another possibility that may be easier algorithmically (but possibly involve changing more code), is to split discrete chains of moves into different circuits, rather than try to fit both chains into the first circuit. This could also slow down performance.

The qubit picking algorithm for quantum chess is found here:
https://github.com/quantumlib/ReCirq/blob/master/recirq/quantum_chess/circuit_transformer.py#L58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants