-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
DAG.width needs to be updated to match QuantumCircuit definition #2564
Comments
qiskit.dagcircuit.dagcircuit defines width() as
There may be code that depends on the semantic of |
Fulfilling the literal request of this ticket would be as simple as removing the |
The only test of dagcircuit.width() I have found is in
...
However, in
So does changing |
It probably breaks several things which is why it has not been implemented yet. |
Ah, so maybe the trick is to
?? |
First step: coded replacement function. Next, have to look everywhere for usage of Then when invocations are all changed, DAGCircuit.width() can be changed to return the total number of bits. |
Per @ajavadia 's comments after merge of #2708 I'll proceed to
|
The pull requests #2807 and qiskit-aqua number 613 should complete this issue. |
It's now pull requests #2812 and aqua pr 614 |
I'll make the transpiler pass changes requested in #2812 on 2019-07-22 |
I have pushed the transpiler pass changes requested in #2812 |
* updated readme to #2564 changes * typographic considerations for change log * This should complete #2564 * remove now-superfluous DAGCircuit.num_cbits() which was replaced by DAGCircuit.num_clbits() * - Reverted Width transpiler pass to return DAGCircuit.width() Note that is the new width() which is qubits + clbits - Added a NumQutbits transpiler pass to return that which the Width pass was previously returning, i.e., DAGCircuit.num_qubits * change requested on pull request #2812 by Kevin Krsulich * Changed test as requested in pull request conversation * Added NumQubits() to test as requested in pull request discussion
* updated readme to Qiskit#2564 changes * typographic considerations for change log * This should complete Qiskit#2564 * remove now-superfluous DAGCircuit.num_cbits() which was replaced by DAGCircuit.num_clbits() * - Reverted Width transpiler pass to return DAGCircuit.width() Note that is the new width() which is qubits + clbits - Added a NumQutbits transpiler pass to return that which the Width pass was previously returning, i.e., DAGCircuit.num_qubits * change requested on pull request Qiskit#2812 by Kevin Krsulich * Changed test as requested in pull request conversation * Added NumQubits() to test as requested in pull request discussion
Information
What is the current behavior?
gives:
(10, 5)
.Steps to reproduce the problem
What is the expected behavior?
Suggested solutions
DAG width needs to count both qubits and cbits for self-consistency.
The text was updated successfully, but these errors were encountered: