-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Rewrite singleton handling including SingletonInstruction
#11014
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
Changes from all commits
4cf52f2
145decf
1274fe7
e1cde2f
f3c6a43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| .. _qiskit-circuit-singleton: | ||
|
|
||
| .. automodule:: qiskit.circuit.singleton | ||
| :no-members: | ||
| :no-inherited-members: | ||
| :no-special-members: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ | |
|
|
||
| """Double-CNOT gate.""" | ||
|
|
||
| from qiskit.circuit.singleton_gate import SingletonGate | ||
| from qiskit.circuit.singleton import SingletonGate | ||
| from qiskit.circuit.quantumregister import QuantumRegister | ||
| from qiskit.circuit._utils import with_gate_array | ||
|
|
||
|
|
@@ -48,14 +48,9 @@ class DCXGate(SingletonGate): | |
| \end{pmatrix} | ||
| """ | ||
|
|
||
| def __init__(self, label=None, duration=None, unit=None, _condition=None): | ||
| def __init__(self, label=None, *, duration=None, unit="dt"): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, this actually was a bit of a mistake that I changed what you originally had - I was just writing it on autopilot, mechanically and manually undoing the mistake I made where I'd removed all the |
||
| """Create new DCX gate.""" | ||
| if unit is None: | ||
| unit = "dt" | ||
|
|
||
| super().__init__( | ||
| "dcx", 2, [], label=label, _condition=_condition, duration=duration, unit=unit | ||
| ) | ||
| super().__init__("dcx", 2, [], label=label, duration=duration, unit=unit) | ||
|
|
||
| def _define(self): | ||
| """ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.