Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself
This tutorial demonstrates the ability of the Classiq synthesis engine to reduce depth and cx-counts in approximated quantum functions for Hamiltonian evolution, focusing on Suzuki-Trotter (ST) and qDRIFT (qD) product formulas and their controlled operations. In addition, it is compared to the equivalent quantum examples in Qiskit. The demonstration is for the Hamiltonian of a water molecule, which has 551 terms and a dimension of 12 qubits. Define a molecule and get the Hamiltonian as a list of Pauli strings and coefficients:
These cases are examined:

  1. Approximating with Suzuki-Trotter Formulas

  1. Implementing Controlled Hamiltonian Dynamics

  1. Approximating with the qDRIFT Formula

  1. Comparing to Qiskit Implementation
Comments:
  • Qiskit’s Suzuki-Trotter of order 1 is a separate function, called the Lie-Trotter function.
  • Qiskit’s qDRIFT takes a long time to run for unclear problems. Alternatively, a random product formula is implemented, which is equivalent to qDRIFT.
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:
output