from qiskit_aqua import run_algorithm
from qiskit_qcgpu_provider import QCGPUProvider

sat_cnf = """
c Example DIMACS 3-sat
p cnf 3 5
-1 -2 -3 0
1 -2 3 0
1 2 -3 0
1 -2 -3 0
-1 2 3 0
"""

params = {
  "problem": { "name": "search" },
  "algorithm": { "name": "Grover" },
  "oracle": { "name": "SAT", "cnf": sat_cnf },
  "backend": { "name": "qasm_simulator" }
}


backend = QCGPUProvider().get_backend('qasm_simulator')
%time result_qiskit = run_algorithm(params)
%time result = run_algorithm(params, backend=backend)

print(result["result"])

