Skip to content

Commit c1c025f

Browse files
Merge pull request qiskit-community/qiskit-aqua#849 from manoelmarques/provider
Algorithm Refactor - Create interface and result classes
2 parents e564a7a + 12bcfd8 commit c1c025f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

qiskit/aqua/operators/base_operator.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# This code is part of Qiskit.
44
#
5-
# (C) Copyright IBM 2019.
5+
# (C) Copyright IBM 2019, 2020.
66
#
77
# This code is licensed under the Apache License, Version 2.0. You may
88
# obtain a copy of this license in the LICENSE.txt file in the root directory
@@ -117,3 +117,14 @@ def print_details(self):
117117
def chop(self, threshold, copy=False):
118118
""" chop """
119119
raise NotImplementedError
120+
121+
@property
122+
@abstractmethod
123+
def num_qubits(self):
124+
""" Returns number of qubits for operator """
125+
raise NotImplementedError
126+
127+
@abstractmethod
128+
def is_empty(self):
129+
""" Check Operator is empty or not """
130+
raise NotImplementedError

0 commit comments

Comments
 (0)