This repository contains the code and original data for Practical and Efficient Hamiltonian Learning.
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.jl generates random transverse field Ising model, resulting in a Dict
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()
- the coefficients matrix
These files glue and invoke all the subroutines together and demonstrate our algorithm under different settings (different Hamiltonian, different noise level, different bin size
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.
Data analysis (with python) and results.