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

Fix invalid registers returned by q_registers and c_registers #1185

Conversation

yao-cqc
Copy link
Contributor

@yao-cqc yao-cqc commented Dec 19, 2023

Fix invalid registers returned by q_registers and c_registers

Description

Any set of UnitIds with the same name but not consecutive indices will not be returned as a UnitRegister

Related issues

Fixes #1160

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.

@yao-cqc yao-cqc merged commit 3b83482 into develop Dec 20, 2023
28 checks passed
@yao-cqc yao-cqc deleted the bugfix/`q_registers`-and-`c_registers`-return-invalid-registers branch December 20, 2023 10: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.

Circuit.q_registers and Circuit.c_registers are broken for circuits whose units are not organized as registers
2 participants