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

Add qubits and clbits to dag in DAGCircuit::with_capacity #13090

Closed
wants to merge 1 commit into from

Conversation

ElePT
Copy link
Contributor

@ElePT ElePT commented Sep 5, 2024

Summary

Follow-up to #13002 that adds qubits and clbits to the dag when num_qubits or num_clbits are non-zero. This would enable, for example, directly appending instructions using an iterator (#13032) after creating a new rust DAGCircuit. The alternative is making users add the qubits/clbits manually.

I don't think this is 100% necessary but it definitely increases the usability of with_capacity, in fact, this is how it's done in CircuitData (L238-251).

Details and comments

@ElePT ElePT requested a review from a team as a code owner September 5, 2024 09:46
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core
  • @kevinhartman
  • @mtreinish

@raynelfss raynelfss self-assigned this Sep 5, 2024
@ElePT
Copy link
Contributor Author

ElePT commented Sep 9, 2024

Closing after internal discussion.

@ElePT ElePT closed this Sep 9, 2024
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.

3 participants