Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.

Commit c51aab1

Browse files
Remove the boolean logic gates (#896)
* deprecate boolean logic gates * fix mcmt import the test relied on the implicit import of mcmt via FixedValueComparator * add changelog * completely remove and/or from gates Co-authored-by: Manoel Marques <[email protected]>
1 parent fac58d2 commit c51aab1

File tree

5 files changed

+7
-141
lines changed

5 files changed

+7
-141
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ Removed
4141
-------
4242

4343
- Declarative api (#758) (#759) (#760) (#762) (#763)
44-
- Moved to Terra: multi-controlled Toffoli, U1 and Pauli rotation gates (including tests) (#833)
45-
- Moved to the circuit library in Terra: arithmetic circuits in qiskit/aqua/circuits (#895)
44+
- Moved to Terra:
45+
- multi-controlled Toffoli, U1 and Pauli rotation gates (including tests) (#833)
46+
- arithmetic circuits in qiskit/aqua/circuits (#895)
47+
- boolean logic gates (#896)
4648

4749
Fixed
4850
-----

qiskit/aqua/circuits/fixed_value_comparator.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
from qiskit.circuit.library import IntegerComparator
2121
from qiskit.aqua.utils.circuit_factory import CircuitFactory
22-
from qiskit.aqua.circuits.gates import logical_or # pylint: disable=unused-import
23-
24-
# pylint: disable=invalid-name
2522

2623

2724
class FixedValueComparator(CircuitFactory):
@@ -92,8 +89,7 @@ def required_ancillas_controlled(self):
9289
return self.num_state_qubits - 1
9390

9491
def _get_twos_complement(self):
95-
"""
96-
Returns the 2's complement of value as array
92+
"""Returns the 2's complement of value as array
9793
9894
Returns:
9995
list: two's complement

qiskit/aqua/circuits/gates/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,11 @@
3030
:nosignatures:
3131
3232
mcmt
33-
logical_and
34-
logical_or
3533
3634
"""
3735

3836
from .multi_control_multi_target_gate import mcmt
39-
from .boolean_logical_gates import logical_and, logical_or
4037

4138
__all__ = [
4239
'mcmt',
43-
'logical_and',
44-
'logical_or',
4540
]

qiskit/aqua/circuits/gates/boolean_logical_gates.py

Lines changed: 0 additions & 129 deletions
This file was deleted.

test/aqua/test_mcmt.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
from qiskit import execute as q_execute
2424
from qiskit.quantum_info import state_fidelity
2525
from qiskit import BasicAer
26+
# pylint:disable=unused-import
27+
from qiskit.aqua.circuits.gates import multi_control_multi_target_gate
2628

2729
NUM_CONTROLS = [i + 1 for i in range(7)]
2830
NUM_TARGETS = [i + 1 for i in range(5)]

0 commit comments

Comments
 (0)