Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QSVT Lab

QSVT Lab is a small educational Python package with visual demos for singular values, block encodings, QSP responses, and QSVT-style singular-value transformations.

Installation

pip install -e ".[dev,interactive]"

Or create the conda environment:

conda env create -f environment.yml
conda activate qsvt-lab

Run tests with:

pytest

Interactive visual learning app

Launch the Streamlit app with:

qsvt-lab app

Streamlit will print a local URL, usually http://localhost:8501.

Pages:

  • Singular Values shows small matrices, heatmaps, singular values, condition numbers, and SVD reconstruction error.
  • Block Encoding embeds a contraction A into a larger unitary U and highlights the top-left block that equals A.
  • QSP Playground lets you adjust phase angles and inspect a simplified scalar QSP response over [-1, 1].
  • QSVT Playground lets you choose a polynomial transform, checks whether it is bounded, and applies it to the singular values of a small matrix.
  • Matrix Inverse Demo compares a true inverse or pseudoinverse with a regularized polynomial inverse approximation.
  • Filtering Demo creates a noisy low-rank matrix and applies a singular-value threshold filter.

Recommended path:

  1. Start with Singular Values to build SVD intuition.
  2. Continue to Block Encoding to see why extra dimensions are needed.
  3. Use QSP Playground to see how phases change a scalar response.
  4. Use QSVT Playground to connect bounded polynomials to transformed singular values.
  5. Finish with Matrix Inverse Demo and Filtering Demo to see why small singular values are useful but dangerous.

What the visualizations simplify:

  • The app uses tiny real matrices so every entry and singular value remains inspectable.
  • The QSP page is an educational simulator, not a phase-synthesis tool.
  • The QSVT page applies polynomial responses directly to singular values; it does not construct a full quantum circuit.
  • The inverse demo uses a fitted polynomial response to mimic regularized inversion, so it is a stability illustration rather than an optimized approximation algorithm.

QSVT-intuition

About

Project for me to learn about the QSVT algorithm.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages