Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
IsmaelCesar committed Mar 13, 2024
1 parent 9074352 commit cd6ee9d
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions qiskit/circuit/library/standard_gates/x.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,8 +1391,8 @@ def __new__(
duration=None,
unit="dt",
_base_label=None,
relative_phase: bool = False, # pylint: disable=unused-argument
action_only: bool = False, # pylint: disable=unused-argument
relative_phase: bool = False, # pylint: disable=unused-argument
action_only: bool = False, # pylint: disable=unused-argument
):
"""Create a new MCX instance.
Expand Down Expand Up @@ -1435,8 +1435,6 @@ def __init__(
self._action_only = action_only
super().__init__(num_ctrl_qubits, label=label, ctrl_state=ctrl_state, _name="mcx_vchain")



def inverse(self, annotated: bool = False):
"""Invert this gate. The MCX is its own inverse.
Expand Down Expand Up @@ -1510,9 +1508,7 @@ def _define(self):
[],
)
)
definition.append(
(TdgGate(), [targets[i]], [])
)
definition.append((TdgGate(), [targets[i]], []))
definition.append((HGate(), [targets[i]], []))
else:
definition.append((HGate(), [targets[i]], []))
Expand All @@ -1524,9 +1520,7 @@ def _define(self):
[],
)
)
definition.append(
(TdgGate(), [targets[i]], [])
)
definition.append((TdgGate(), [targets[i]], []))
definition.append(
(
CXGate(),
Expand Down Expand Up @@ -1576,9 +1570,7 @@ def _define(self):
definition.append((CXGate(), [q_ancillas[i], q_ancillas[i + 1]], []))
definition.append((TGate(), [q_ancillas[i + 1]], []))
definition.append((CXGate(), [q_controls[2 + i], q_ancillas[i + 1]], []))
definition.append(
(TdgGate(), [q_ancillas[i + 1]], [])
)
definition.append((TdgGate(), [q_ancillas[i + 1]], []))
definition.append((HGate(), [q_ancillas[i + 1]], []))

if self._action_only:
Expand Down

0 comments on commit cd6ee9d

Please sign in to comment.