Skip to content

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

Closed
ElePT wants to merge 1 commit into
Qiskit:mainfrom
ElePT:dag-circ-with-capacity
Closed

Add qubits and clbits to dag in DAGCircuit::with_capacity#13090
ElePT wants to merge 1 commit into
Qiskit:mainfrom
ElePT:dag-circ-with-capacity

Conversation

@ElePT

@ElePT ElePT commented Sep 5, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

ElePT commented Sep 9, 2024

Copy link
Copy Markdown
Contributor Author

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