GithubHelp home page GithubHelp logo

gojakuch / k-sat-grover-schoening Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 509 KB

This notebook can be used as a tutorial for combining Schöning's and Grover's methods to solve k-SAT problems.

Jupyter Notebook 100.00%
grovers-algorithm quantum-algorithms quantum-computing sat

k-sat-grover-schoening's Introduction

Solving k-SAT problems with Grover's and Schöning's Algorithms

In this notebook, I present you three (actually, even more) approaches to SAT problems. These are classical Schoening's algorithm, quantum Grover's algorithm, and a combination of the two. Of course, the main purpose, to my mind, was to shed some light on the combined approach, as the first two are generally mainstream. For the proposed 9-SAT problem, with Grover, we can solve it in 3-4 quantum oracle queries, while with the combined approach we only need one and then one additional classical algorithm iteration. This sounds quite inspiring, however, the resulting quantum oracle that we use in the latter is implemented so computationally hard that the method becomes, to my mind, unusable. Surely, if we do not take the insides of the oracle to account, then such a method is overwhelmingly efficient. An alternative combined approach which is to apply Grover's search to the space of random seeds is much better in any case.

If you want to read more on what SAT problems are, you can do it on Wikipedia. SAT problems are basically systems of logical statements.

This notebook can obviously be used as a tutorial for combining Schoening's and Grover's methods, if the reader is aware of the Grover's Algorithm and 3-SAT (k-SAT) problems.

by Atell Krasnopolski, 2022

Sources

Even though this algorithm (combined Schöning's and Grover's approaches) is quite frequently mentioned, I haven't found its implementation, detailed description, or pseudocode anywhere. In fact, I only used the following sources and simply derived everything myself using those descriptions. Frankly, this was all quite intuitive and I haven't proven resulting algorithms formally, so there can be some mistakes (if so, please let me know).

  1. Notes on the Classical Schöning's Algorithm

  2. A Particularly Useful StackExchange Question

  3. Qiskit Tutorial on Grover's Algorithm, specifically, this paragraph:

"It may not be obvious at first glance, but we can actually combine Grover and Schöning's algorithms to get something even better than either individually. If you create a circuit that carries out the bit-toggling part of Schöning's algorithm, you can use this as the oracle and use Grover's algorithm to find the best "initial guess"."

  1. Another Qiskit Tutorial on Gorver's Algorithm

k-sat-grover-schoening's People

Contributors

gojakuch avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.