diff --git a/documentation/source/general/changelog/0.4.rst b/documentation/source/general/changelog/0.4.rst index 6020fa18..cf3cea47 100644 --- a/documentation/source/general/changelog/0.4.rst +++ b/documentation/source/general/changelog/0.4.rst @@ -8,7 +8,7 @@ The latest update of Qrisp is (once again) the biggest (so far)! We integrated a Shor's Algorithm and modular arithmetic --------------------------------------- -With 0.4 we integrated the infrastructure to facility the implementation and compilation of Shor's algorithm. Most notably: +With 0.4 we integrated the infrastructure to facilitate the implementation and compilation of Shor's algorithm. Most notably: * The :ref:`QuantumModulus` quantum type, which allows you to utilize modular arithmetic in your algorithms with a minimal amount of knowledge of the `underlying circuits `_. * Furthermore, we implemented the :meth:`qcla ` introduced by `Wang et al `_. The previously mentioned arithmetic can be adapted to use this adder (or any other adder for that matter!). @@ -26,7 +26,7 @@ As we found out, implementations of Shor's algorithm that are able to return a Q .. image:: 04_shor_plot.svg -This demonstrates how powerful the Qrisp version is compared to other compilers/implementations. The presented values for the are averaged over several choices of $a$ per $N$. T-depth and T-count are computed under the (extremely optimistic) assumption that parametrized phase gates can be executed in unit time and unit cost. Without this assumption the Qrisp implementation brings a speed-up of almost 3 orders of magnitude! +This demonstrates how powerful the Qrisp version is compared to other compilers/implementations. The presented values are averaged over several choices of $a$ per $N$. T-depth and T-count are computed under the (extremely optimistic) assumption that parametrized phase gates can be executed in unit time and unit cost. Without this assumption the Qrisp implementation brings a speed-up of almost 3 orders of magnitude! Compiler upgrades @@ -37,7 +37,7 @@ The :meth:`compile ` function received two importa * Due to another topological ordering step, this function can now reduce the depth in many cases by a significant portion with minimal classical performance overhead. * It is now possible to specify the time each gate takes to optimize the overall run time in a physical execution of the quantum circuit. Read more about this feature :ref:`here `. This especially enables compilation for fault tolerant backends, as they are expected to be bottlenecked by T-gates. -This plot highlights how the Qrisp compiler evolved compared to the last version (and it's competitors). It shows the circuit depth (as acquired with :meth:`depth `) for the QAOA algorithm applied to a MaxCut problem. We benchmarked the code that is available as tutorial. +This plot highlights how the Qrisp compiler evolved compared to the last version (and its competitors). It shows the circuit depth (as acquired with :meth:`depth `) for the QAOA algorithm applied to a MaxCut problem. We benchmarked the code that is available as tutorial. .. image:: 04_compiler_plot.svg @@ -50,25 +50,25 @@ Algorithmic primitives We added the following algorithmic primitives to the Qrisp repertoire: * :meth:`amplitude_amplification ` is an algorithm, which allows you to boost the probability of measuring your desired solution. -* :meth:`QAE ` gives you an estimate of the amplitude of a certain sub-space without having to perform a possibly exponential amount of measurements. +* :meth:`QAE ` gives you an estimate of the probability of measuring your desired solution. * The ``gidney`` and ``jones`` methods for compiling :meth:`mcx ` gates with optimal T-depth in a fault-tolerant setting. * The :meth:`gidney_adder ` as documented `here `_. QUBO optimization ----------------- -QUBO is short for Quadratic Uncostrained Binary Optimization and a problem type, which captures a `large class of optimization problems `_. QUBO instances can now be :ref:`solved within the QAOA module `. +QUBO is short for Quadratic Unconstrained Binary Optimization and a problem type, which captures a `large class of optimization problems `_. QUBO instances can now be :ref:`solved within the QAOA module `. Simulator --------- -The Qrisp simulator received multiple powerfull performance upgrades such as a much faster sparse matrix multiplication algorithm and better statevector factoring. These upgrades facility the simulation of extremely large circuits (in some cases, we observed >200 qubits)! +The Qrisp simulator received multiple powerful performance upgrades such as a much faster sparse matrix multiplication algorithm and better statevector factoring. These upgrades facilitate the simulation of extremely large circuits (in some cases, we observed >200 qubits)! Network interface ----------------- -For remote backend queries, Qrisp now uses the network inteface developed in the `SequenC project `_. This project aims to build a uniform, open-source quantum cloud infrastructure. Note that specific backend vendors like IBMQuantum can still be called via :ref:`VirtualBackends `. +For remote backend queries, Qrisp now uses the network interface developed in the `SequenC project `_. This project aims to build a uniform, open-source quantum cloud infrastructure. Note that specific backend vendors like IBMQuantum can still be called via :ref:`VirtualBackends `. Docker Container ---------------- @@ -90,9 +90,9 @@ Bug-fixes --------- * Fixed a bug that caused false results in some simulations containing a Y-gate. -* Fixed a bug that prevented proper QFT cancelation within the :meth:`compile ` method in some cases. +* Fixed a bug that prevented proper QFT cancellation within the :meth:`compile ` method in some cases. * Fixed a bug that prevented proper verification of correct automatic uncomputation in some cases. * Fixed a bug that caused false determination of the unitary of controlled gates with a non-trivial control state. * Fixed a bug that caused problems during circuit visualisation on some platforms. -* Fixed a bug that caused the simulation progressbar to not vanish after the simulation concluded. +* Fixed a bug that caused the simulation progress bar to not vanish after the simulation concluded. * Fixed a bug that introduced an extra phase in the compilation of dirty-ancillae supported ``balauca`` MCX gates. diff --git a/documentation/source/general/tutorial/Sudoku.rst b/documentation/source/general/tutorial/Sudoku.rst index e600bbd5..424c0efc 100644 --- a/documentation/source/general/tutorial/Sudoku.rst +++ b/documentation/source/general/tutorial/Sudoku.rst @@ -2,6 +2,8 @@ Solving Sudoku using Quantum Backtracking ========================================= .. _sudoku: +This tutorial is the practical hands on-part of `this paper `_. + Sudoku ------ @@ -13,6 +15,16 @@ Sudoku puzzles come in various difficulty levels, ranging from easy to extremely Over the years, Sudoku has evolved into a beloved pastime for enthusiasts of all ages, offering a stimulating mental exercise that promotes concentration, critical thinking, and problem-solving skills. Whether played casually in newspapers, puzzle books, or digital platforms, Sudoku continues to captivate individuals worldwide with its timeless appeal. +In our case, we will be working with 4x4 Sudoku mostly because we want to keep the results still simulable. A 9x9 or even 16x16 implementation would of course however equally well. + +| + +.. image:: ./sudoku.png + :width: 400 + :alt: Sudoku + :align: center + + Backtracking ------------ @@ -105,6 +117,8 @@ for the algorithm to function properly: * Both functions must delete/uncompute all temporarily created QuantumVariables. * ``accept`` and ``reject`` must never return ``True`` on the same node. +More details for the Qrisp interface to quantum backtracking (including visualisation features) kann be found :ref:`here `. + Quantum backtracking for solving a Sudoku puzzle ------------------------------------------------ @@ -741,6 +755,7 @@ Note that, in order to achieve a speed-up in practical scenarios, it is necessar sol = tree.find_solution(precision = 3) print(sol[::-1][1:]) + # Yields [1, 1, 2] With this, we can find the solution for Sudoku problems with up to 3 empty fields with the statevector simulator on our local computer. For instances with more empty fields, we can still find the solution with a matrix product state simulator that can be employd with the ``measurement_kwargs`` keyword. diff --git a/documentation/source/general/tutorial/sudoku.png b/documentation/source/general/tutorial/sudoku.png new file mode 100644 index 00000000..e0a84aa9 Binary files /dev/null and b/documentation/source/general/tutorial/sudoku.png differ