We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e564a7a + 12bcfd8 commit c1c025fCopy full SHA for c1c025f
qiskit/aqua/operators/base_operator.py
@@ -2,7 +2,7 @@
2
3
# This code is part of Qiskit.
4
#
5
-# (C) Copyright IBM 2019.
+# (C) Copyright IBM 2019, 2020.
6
7
# This code is licensed under the Apache License, Version 2.0. You may
8
# obtain a copy of this license in the LICENSE.txt file in the root directory
@@ -117,3 +117,14 @@ def print_details(self):
117
def chop(self, threshold, copy=False):
118
""" chop """
119
raise NotImplementedError
120
+
121
+ @property
122
+ @abstractmethod
123
+ def num_qubits(self):
124
+ """ Returns number of qubits for operator """
125
+ raise NotImplementedError
126
127
128
+ def is_empty(self):
129
+ """ Check Operator is empty or not """
130
0 commit comments