Skip to content

zyHan2077/HamiltonianLearning

Repository files navigation

Hamiltonian Learning, utils and demos

This repository contains the code and original data for Practical and Efficient Hamiltonian Learning.

Overview

Oracles

The oracle contained in noisy_oracle.jl mimics the actual evolution of the quantum system, by brutal-force state evolution under a certain Hamiltonian. Specifically

  • oracle_f extracts the second-order pauli error rates, as defined by equation (8) and (11)
  • oracle_s gives the stage 2 measurements, defined by equation (15)

HamsGen

hamsGen.jl generates random transverse field Ising model, resulting in a Dict $s$ that shall be used as an input to the oracles.

Utils

utils.jl implements separately all the relevant procedures described in the article, for instance,

  • stage 1, bins detection and peeling process (Fig 1. (b)) are wrapped in doPeel(), see also Algorithm 2 in our main text
    • bPointSubBin() implements Algorithm 7 described in appendix B
    • subroutine binDetector() implements Algorithm 8
  • stage 2 sign estimation (Algorithm 3) is implemented by pauliparametersReconstruction(), while the first input $\alpha s$ is the non zero error rates support from stage 1.
    • the coefficients matrix $\Phi$, as defined in equation (17), is constructed by the subroutine determineAllCoefficients()

hamLearning_xxx

These files glue and invoke all the subroutines together and demonstrate our algorithm under different settings (different Hamiltonian, different noise level, different bin size $b$, etc)

data folder

The reconstruction results are stored in JSON format. Each JSON file contains

  • a dictionary, representing the original Hamiltonian's parameters, i.e., the $s$ in main article
  • a list of reconstructed parameters, containing
    • the reconstructed Hamiltonian
    • two numbers, counting the calls to the oracles in two subsequent stages.

plot folder

Data analysis (with python) and results.

Selected Results

  • Figure 3 in our article, demonstrating the supression of noise error ising_varb

  • Figure 4 (a) in the article, random TFIM randomIsing_varn

  • Figure 4 (d) in the article, estimated Hamiltonian for the $\text{H}_4$ (8 qubits) molecule Molecules

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published