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
[text drawer] controlled gates with labels #4361
Comments
@1ucian0 I was looking at how to add labels to the mpl drawer and I had a question about how they are implemented. Given these 3 statements,
It appears that in line 3, the label gets placed into op.label whereas in line 1, it's placed in op.base_gate.label. I noticed in the text drawer that line 1 produces 'My ch Gate' in the gate name and 'My ch Control' on the bullet, but in line 3, it creates a multi-box and changes the name of the gate to 'My ch Control'. This seems odd to me. If the user wanted to change the gate name, I would think that line 1 or 2 would be used, and if the intention is to add a control label to an existing gate name, line 1 or 3 would be used. In any case, I'd just like some guidance on how this should look in mpl. There are more options for putting text in different places in mpl than in text, so if there were some way do line 3 as op.base_gate.name for the gate name and putting the control name on the bullet, that seems most logical to me. Thanks for your help. |
I agree it is inconsistent. Do you mind submitting an enhancement issue for that?
I dont have an opinion there. Maybe the best way to move forward is to submit an issue (tagged What do you think? |
Thanks, @1ucian0. I'll go ahead and put my thoughts in an enhancement issue. I just wanted to check to see that there wasn't some big picture I was missing. |
@enavarro51 could you link the enhancement issue here when you open it? |
Will do. |
@ewinston raises the question on how to handle controlled gates with labels in #4262 (review).
Considering this case:
This is the current output:
Possible solutions:
The text was updated successfully, but these errors were encountered: