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

Label support for controlled unitary #4429

Merged
merged 2 commits into from
May 12, 2020

Conversation

1ucian0
Copy link
Member

@1ucian0 1ucian0 commented May 11, 2020

@ajavadia found the following issue in master:

from qiskit import QuantumCircuit
from qiskit.extensions import UnitaryGate

circ = QuantumCircuit(2)
u = UnitaryGate([[1,0], [0,1]], label='my gate')
circ.compose(u.control(1), [0,1], inplace=True)
print(circ)
q_0: ───────■────────
     ┌──────┴───────┐
q_1: ┤ circuit57_dg ├
     └──────────────┘

With this PR, here is the output:

q_0: ─────■─────
     ┌────┴────┐
q_1: ┤ my gate ├
     └─────────┘

@1ucian0 1ucian0 added the Changelog: Bugfix Include in the "Fixed" section of the changelog label May 11, 2020
@mergify mergify bot merged commit e0faed1 into Qiskit:master May 12, 2020
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
Co-authored-by: Ali Javadi-Abhari <ajavadia@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants