-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
arbitrary order in circuit drawers #8063
Comments
In addition to the circuit drawers If we want to keep Since |
I previously had worked on a version of the circuit drawers that used
Following this, a generalization for |
I think BTW I'm fine adding an option to QuantumCircuit to permute wires. Perhaps permute_bits is a better name. So we can have |
The drawers don't necessarily need to be concerned with reordering things, though - you can always do |
So is there any real reason to just reverse the bits in the drawing, as @ajavadia notes above in a way that's different from the way it's done in As @jakelishman notes, it's simple enough to do both |
But what I'm saying is that
and so we need to add a generalization of these in the form of |
I buy Ali's point above. Copying over a comment I had from our internal discussion:
|
My 2 cents:
|
Some questions.
|
I agree. I suggest
We are not. We are defining a generalization of
I would say so. Many of the questions are under the umbrella "how smart this parameter should be?". I lean towards a dumb parameter and let the caller to have that smartness, as the parameter is an advance feature.
I would combine them. Under my "dumb parameter" principle, it's trivially doable by the smart caller to do
Yes. I agree,
"dumb parameter" principle again, the length should match
I would leave
Not sure if I follow this one. |
All sounds good. For this first PR, we just address the drawers and leave The |
A couple of more questions, If a user uses both
If the the
|
I think raise is reasonable. It is probably a user mistake to set both.
raise with separate explanations |
Hi, is @enavarro51 or someone else working on this? |
Yeah, I'm currently working on it. |
Okay, cool. 👍🏻 |
@prakharb10, since this issue is part of the unitary hack initiative, I think it is fine if more than one person works on it in parallel or in teams. So feel free to jump in :) Consider that this particular issue might be a bit advance as a first contribution. There is a |
What should we add?
Circuit drawers currently have
reverse_bits
, as an option to modify the order in which wires are represented. @ajavadia suggests a generalized version of that feature:wire_order
. This parameter might define the order of the wiresdraw(..., wire_order=[3,0,2,1])
and can eventually replacereverse_bits
withdraw(..., wire_order='reverse'
.The text was updated successfully, but these errors were encountered: