diff --git a/grove/deutsch_jozsa/deutsch_jozsa.py b/grove/deutsch_jozsa/deutsch_jozsa.py index 51c962c..1b21910 100644 --- a/grove/deutsch_jozsa/deutsch_jozsa.py +++ b/grove/deutsch_jozsa/deutsch_jozsa.py @@ -56,8 +56,8 @@ def is_constant(self, cxn, bitstring_map): returned_bitstring = cxn.run_and_measure(self.deutsch_jozsa_circuit, self.computational_qubits) # We are only running a single shot, so we are only interested in the first element. bitstring = np.array(returned_bitstring, dtype=int) - constant = all([bit == 0 for bit in bitstring]) - return constant + constant = np.array([bit == 0 for bit in bitstring]) + return constant.all() def _init_attr(self, bitstring_map): """