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

QRegister constructor should take qubits #31

Closed
ahelsing opened this issue Jun 13, 2019 · 1 comment
Closed

QRegister constructor should take qubits #31

ahelsing opened this issue Jun 13, 2019 · 1 comment

Comments

@ahelsing
Copy link
Contributor

If you supply a Qubit (or list of or ...) to the QRegister constructor, extract the label to make that qubit part of this QRegister. That would make it easier for programs running QGL2 to create / retrieve Qubits from the channel library, and use the desired qubits in the QGL2 program.

ahelsing added a commit that referenced this issue Jun 25, 2019
 - if a single arg and it is int, handle specially
 - else for each Arg, allow it to be a tuple, list, QRegister, String, or a Qubit
  - QRegister: Append all qubits in the arg to the local set of qubits, ignoring any duplicates
  - String: Try parsing as 'q#' and append that to local set if not already present
  - Fix issue #31: Qubit: Try parsing name as 'q#' and append that to local set if not already present
  - Fix Issue #32: list/tuple: Recurse
ahelsing added a commit that referenced this issue Oct 11, 2019
 - Updates to working BasicSequences and notebooks, and up to date documentation
 - Addresses issues #55, #38
 - Also addresses #35, #32, #31
 - Also #26, #25, #21
@ahelsing
Copy link
Contributor Author

A QRegister created from a Qubit produces a QRegister with the same name.

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

No branches or pull requests

1 participant