The Python examples are organized by module area and are intended to be runnable from the repository root with PYTHONPATH=Python.
-
examples/algebra/- Hilbert-space construction.
- Custom many-body Hamiltonians.
- Sparse and dense matrix construction.
- Quadratic single-particle and BdG Hamiltonians.
- Operator actions on integer and vector states.
-
examples/physics/- Density matrices and entropy.
- Time evolution and level statistics.
- Spectral broadening and statistical helpers.
-
examples/lattices/- Square and honeycomb lattices.
- Neighbor access and region/visualization support.
-
examples/workflows/- Lattice-driven Hamiltonian assembly and larger analysis scripts.
-
examples/models/- Model-specific demonstrations.
-
examples/nqs/- Variational and optimization examples.
examples/algebra/example_hilbert_and_custom_hamiltonian.pyexamples/algebra/example_operators_on_states.pyexamples/algebra/example_sparse_dense_matrix_build.pyexamples/algebra/example_quadratic_single_particle.pyexamples/physics/example_entropy_density_matrix.pyexamples/physics/example_time_evolution_and_spectral_stats.pyexamples/physics/example_spectral_and_statistical_tools.pyexamples/lattices/example_lattice_neighbors_and_honeycomb.pyexamples/workflows/example_lattice_driven_hamiltonian.py
cd pyqusolver
PYTHONPATH=Python python examples/run_all_examples.py