Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself
This tutorial demonstrates an implementation of the HHL algorithm for a specific matrix. The Hamiltonian evolution is implemented by an “exact” operation, explicitly evaluating eiAe^{iA}.

  1. HHL with Classiq
An HHL solver is tested for different precisions of the QPE size. The following function gets precision and returns the characteristics of the quantum program, as well as the overlap between the classical and the quantum solver.
Output:

  1. Comparing to Qiskit
Qiskit’s HHL solver has been deprecated. For comparison, in an analogy to the Classiq model above, wire the four quantum blocks of the HHL algorithm in Qiskit. The qiskit data was generated using qiskit version 1.
  1. To run the qiskit code uncomment the commented cells below.

  1. Plotting the Data
Output:
output