10

I was wondering if there was some code available for Hamiltonian simulation for sparse matrix. And also if they exist, they correspond to a divide and conquer approach or a Quantum walk approach?

cnada
  • 4,802
  • 1
  • 9
  • 22

2 Answers2

6

Update on the subject: there are several implementations in the wild. I don't know if you still need them, but even if you don't it will hopefully be useful to other people.

I chose to list the implementations by "provenance" rather than by the algorithm used because there are not that much implementations. This may change in the future.

  1. Qiskit-aqua: Qiskit is the library of IBM for quantum computing. Qiskit-aqua is the part of the library that deals with quantum algorithms.

    The Qiskit-aqua implementation can only simulate Hamiltonians that are a sum of hermitian matrices that can be written as tensor products of Pauli operators. To do so, they used the Trotter-Suzuki formula.

    The documentation is available here.

  2. simcount: Implementation of 3 hamiltonian simulation algorithms for a specific kind of hamiltonian. Based on Quipper. All their work is explained in the paper Toward the first quantum simulation with quantum speedup (Andrew M. Childs, Dmitri Maslov, Yunseong Nam, Neil J. Ross, Yuan Su, 2017).

    The 3 algorithms (and their variations) implemented in the repository have been optimised for a very specific Hamiltonian $$H = \sum_{j=1}^n \left( \vec{\sigma}_j \cdot{} \vec{\sigma}_{j+1} + h_j \sigma_j^z \right).$$

    The implementations are available here.

  3. QatHS (disclaimer: I did this one): Implementation of the Trotter-Suzuki formula along with Hamiltonian Simulation algorithms for black-box oracles. The oracle-based Hamiltonian Simulation algorithms are based on a Master thesis available here (requires to ask for the PDF, I could not find it elsewhere).

    In short: you can simulate any Hermitian matrix as long as you have an oracle for each of the matrices in your decomposition. Integer-weighted matrices have been extensively tested with the wave equation solver implementation, fixed-points weighted matrices should also work but have not been tested as thoroughly.

    The implementation is available here.

Adrien Suau
  • 5,172
  • 22
  • 58
3

In this article the authors stated that they used this Group Leader's algorithm in order to obtain the circuit implementing the hamiltonian simulation used as a subroutine in an instance of HHL algorithm.

Unfortunately though, I did not understand quite well how they actually managed to find the circuit with that method.

FSic
  • 889
  • 6
  • 18