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

Update Noise Aware Placement for Circuits with only single qubit gates #1165

Merged
merged 7 commits into from
Dec 8, 2023

Conversation

sjdilkes
Copy link
Contributor

@sjdilkes sjdilkes commented Dec 8, 2023

#922 brings up that qubits without 2-qubit gates aren't placed by NoiseAwarePlacement. This is fine for GraphPlacement as these qubits will be dynamically assigned during routing, with their allocation unrelated to performance as it assumes "no noise", but for NoiseAwarePlacement they could still be assigned to Node in the Architecture that have smaller error rates.

However, the expectation is that typical circuits won't have qubits without any 2-qubit gates, i.e. this is a special case fix. My proposed solution is:
• If the Circuit has qubits with 2-qubit gates and qubits without 2-qubit gates, don't assign the qubits without 2-qubit gates to any Node, as these Node may be better used as dynamically assigned later.
• If the Circuit only has qubits without 2-qubit gates, then assign them to the Node with best reported error-rates.

This changes two previous tests that were seeing how NoiseAwarePlacement worked on circuits with no 2-qubit gates. In particular, these tests assumed they would be assigned to the unplaced register, while now they are assigned to any Architecture Node. I have considered this a fine change & minor change in behaviour as this not an impactful change for any realistic circuits.

Checklist

  • I have performed a self-review of my code.
  • I have commented hard-to-understand parts of my code.
  • I have made corresponding changes to the public API documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the changelog with any user-facing changes.

@sjdilkes sjdilkes requested a review from cqc-alec December 8, 2023 15:45
Copy link
Collaborator

@cqc-alec cqc-alec left a comment

Choose a reason for hiding this comment

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

Just a typo in the changelog.

pytket/docs/changelog.rst Outdated Show resolved Hide resolved
@sjdilkes sjdilkes requested a review from cqc-alec December 8, 2023 16:50
@sjdilkes sjdilkes merged commit ef9fbbb into develop Dec 8, 2023
30 checks passed
@sjdilkes sjdilkes deleted the noise-aware-placement-single-qubit-gates- branch December 8, 2023 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants