reset clause register when done
@@ -185,6 +185,9 @@ class CNF(BooleanLogicNormalForm):
for clause_index, clause_expr in reversed(list(enumerate(self._expr))):
_or(clause_expr, clause_index, circuit, self._qr_variable, self._qr_clause, self._qr_ancilla, mct_mode)
+ # reset all clause qubits to 0
+ circuit.u3(pi, 0, pi, self._qr_clause)
+
return circuit
