qit.examples.adiabatic_qc_3sat¶
- qit.examples.adiabatic_qc_3sat(n=6, n_clauses=None, clauses=None, problem='3sat')¶
Adiabatic quantum computing demo.
This example solves random 3-SAT problems by simulating the adiabatic quantum algorithm of [1].
NOTE: This simulation is incredibly inefficient because we first essentially solve the NP-complete problem classically using an exhaustive search when computing the problem Hamiltonian H1, and then simulate an adiabatic quantum computer solving the same problem using the quantum algorithm.
- Parameters
n (int) – number of logical variables (bits, qubits)
n_clauses (int) – number of clauses
clauses (array[int]) – array of shape (n_clauses, 3) defining the clauses
problem (str) – problem type, either ‘3sat’ or ‘3exact_cover’