qiskit.optimization.applications.ising.exact_cover¶
exact cover
Functions
|
check solution satisfiability |
|
Construct the Hamiltonian for the exact solver problem. |
|
|
- get_operator(list_of_subsets)[source]¶
Construct the Hamiltonian for the exact solver problem.
Note
Assumption: the union of the subsets contains all the elements to cover.The Hamiltonian is:sum_{each element e}{(1-sum_{every subset_i that contains e}{Xi})^2},where Xi (Xi=1 or 0) means whether should include the subset i.- Parameters
list_of_subsets (list) – list of lists (i.e., subsets)
- Returns
operator for the Hamiltonian, a constant shift for the obj function.
- Return type
tuple(WeightedPauliOperator, float)