Skip to content

comp-physics/Quantum-HRF-Tomography

Repository files navigation

Quantum HRF Tomography

HRF Banner

License: MIT Coverage Status arXiv

Efficient and Robust Reconstruction of Real-Valued Quantum States using Hadamard Random Forests

Summary

Fast: Reduces required quantum circuits from exponential to linear in the number of qubits
🎯 Accurate: Achieves 89% fidelity on 10-qubit real states using IBM quantum hardware
🧠 Smart: Uses a random forest over hypercube graphs for efficient sign reconstruction

Introduction

This is the code that accompanies the following paper: arxiv.org/abs/2505.06455

Install

We recommend cloning the repo. and installing locally:

git clone https://github.com/comp-physics/Quantum-HRF-Tomography
cd Quantum-HRF-Tomography
python -m venv qenv
source qenv/bin/activate
pip install -e .
pip install jupyter

To visualize the tree structure, one needs to install Graphviz to enforce the graph layout. For macOS,

brew install graphviz
pip install --global-option=build_ext \
            --global-option="-I$(brew --prefix graphviz)/include" \
            --global-option="-L$(brew --prefix graphviz)/lib" \
            pygraphviz

Please refer to here for more instructions. Then one can use

import hadamard_random_forest as hrf
hrf.get_statevector(num_qubits, num_trees, samples, save_tree=True, show_tree=True)

Citation

@article{song2025reconstructing,
  author       = {Zhixin Song and Hang Ren and Melody Lee and Bryan Gard and Nicolas Renaud and Spencer H. Bryngelson},
  title        = {Reconstructing Real-Valued Quantum States},
  year         = {2025},
  eprint       = {2505.06455},
  archivePrefix= {arXiv},
  primaryClass = {quant-ph}
}

License

MIT

About

Reconstructing real-valued quantum states using Hadamard Random Forest (HRF) tomography 

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •