Qrisp

Latest version: v0.4.5

Safety actively analyzes 623704 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.4

=========

The latest update of Qrisp is (once again) the biggest (so far)! We integrated a large variety of features, but also worked a lot on the classical performance, making Qrisp algorithms more scalable than ever.

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:

* The 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 qcla introduced by [Wang et al.](https://arxiv.org/abs/2304.02921). The previously mentioned arithmetic can be adapted to use this adder (or any other adder for that matter!).
* We wrote a tutorial for Shor's algorithm in Qrisp and created a dead simple interface for factoring numbers.
* [Decrypt](https://www.qrisp.eu/reference/Algorithms/Shor.html) your neighbors pizza delivery order to make them eat pineapples! 😈

As we found out, implementations of Shor's algorithm that are able to return a QuantumCircuit in a finite amount of time are an extremely rare sight. After some searching, we could find some competitors . Check the [release notes](https://www.qrisp.eu/general/changelog/0.4.html) for a plot of a benchmark.

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!


Compiler upgrades
-----------------

The compile function received two important upgrades:

* 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 [here](https://www.qrisp.eu/reference/Core/generated/qrisp.QuantumSession.compile.html#gate-speed-aware-comp). 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 QuantumCircuit.depth for the QAOA algorithm applied to a MaxCut problem. We benchmarked the code that is available as tutorial.

Find the plot [here](https://www.qrisp.eu/general/changelog/0.4.html)

Algorithmic primitives
----------------------

We added the following algorithmic primitives to the Qrisp repertoire:

* [Amplitude amplification](https://www.qrisp.eu/reference/Algorithms/amplitude_amplification.html) is an algorithm, which allows you to boost the probability of measuring your desired solution.
* [Quantum amplitude estimation](https://www.qrisp.eu/reference/Algorithms/QAE.html) gives you an estimate of the amplitude of a certain sub-space without having to perform a possibly exponential amount of measurements.
* The ``gidney`` and ``jones`` methods for compiling mcx gates with optimal T-depth in a fault-tolerant setting.
* The Gidney-adder as documented [here](https://arxiv.org/abs/1709.06648>).

QUBO optimization
-----------------

QUBO is short for Quadratic Uncostrained Binary Optimization and a problem type, which captures a [large class of optimization problems](https://arxiv.org/abs/1302.5843). QUBO instances can now be 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)!


Network interface
-----------------

For remote backend queries, Qrisp now uses the network inteface developed in the [SequenC project](https://sequenc.de/). This project aims to build a uniform, open-source quantum cloud infrastructure. Note that specific backend vendors like IBMQuantum can still be called via VirtualBackends.

Minor features
--------------

* Implemented ``&``, ``|``, and ``^`` operators for general QuantumVariables.
* Classical performance upgrade for Qrisp's internal logic synthesis function, facilitating faster execution of many algorithms.
* CNOT and T-depth can now be inferred from QuantumCircuits via QuantumCircuit.cnot_depth and QuantumCircuit.t_depth
* Implemented the QAOAProblem.train_function method to reuse QAOA circuits in higher order algorithms.
* Implemented the QAOAProblem.compile_circuit method to give direct access to the circuit executed by QAOAProblem.run.
* ``==`` and ``!=`` for QuantumVariable are now compiled using the ConjugationEnvironment enabling a more efficient custom_control.
* Wrote the inpl_adder_test function to verify a user specified function is a valid adder.

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 QuantumSession.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 introduced an extra phase in the compilation of dirty-ancillae supported ``balauca`` MCX gates.

0.3

======

We’re excited to present our latest update, packed with a variety of innovative features that will optimize you programming tasks and take them to new heights. Proceed further to explore the innovative enhancements in the latest update of our Qrisp framework!

Quantum Approximate Optimization Algorithm (QAOA) module
--------------------------------------------------------

QAOA is the predominant quantum algorithm for combinatoric optimization. Within the past months, we developed a module that smoothly integrates many aspects of this algorithm into Qrisp. Together with the established infrastructure, this module enables you to formulate problems independent of the information encoding. As established for Qrisp, algorithmic elements of QAOA can be supplied as Python functions instead of QuantumCircuits, enabling a high degree of code modularity and maintanbility.

The following is new in Qrisp 0.3 with regard to QAOA

* The QAOAProblem class, which facilitates convenient problem formulation and evaluation.
* The QAOABenchmark class, which allows you to investigate the performance of your implementations.
* Various tutorials QAOA101 that cover a lot of content. From the very basics to scientific novelties.
* 7 different presolved problems from combinatoric optimization.
* Qiskit runtime services can now be used as a Qrisp backend.

Upgraded Backtracking
--------------------------

Due to a new encoding we could improve the performance of the backtracking module by 300%! The plot below shows the circuit depth for trivial ``reject`` and ``accept`` functions.

Furthermore the backtracking implementation now has to call the ``reject`` function only once per quantum step (previously twice).

Documentation
-------------

Powered by the Thebe framework, the Qrisp documentation is now fully interactive. Furthermore we made some stylistic improvements.

Framework interfacing
---------------------

Qrisp QuantumCircuit can now be export to Pennylane and PyTket.

Minor Features
--------------

* Arithmetic module uses the ConjugationEnvironment.
* Improved the simulator speed for circuits with many measurements. For many QAOA related tasks, we achieved a x2 speed-up.
* Implemented ``precompiled_qc`` keyword argument for ``get_measurement`` methods of QuantumVariable and QuantumArray.
* Implemented not equal method for general QuantumVariables and increased performance for both: ``eq`` and ``neq``.
* Implemented :meth:`custom_control <qrisp.custom_control>` decorator.
* Implemented the `Saeedi shifting method <https://arxiv.org/abs/1304.7516>`_ for the ``cyclic_shift`` function.
* Improved the substitution speed of large expressions of abstract parameters.



Bug fixes
---------

* Fixed abstract parameters not being treated properly in session merging.
* Fixed an error in the decoder of QuantumArray that prevented proper display of bitstring quantum types.
* Fixed an issue that prevented the progressbar of the statevector simulator from being properly removed if the simulation is trivial.
* Fixed an error that in some cases caused faulty results for symbolic statevector simulation.
* Fixed proper error message display for exceptions in :ref:`IterationEnvironment`.
* Fixed a bug that caused wrong results for the backtracking algorithm if the reject function did not return equivalent results on non-algorithmic states.
* Fixed permeability specification for logic synthesis functions.
* Fixed QuantumDictionary loading for pprm synthesis.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.