Visualization¶
The divi.viz module provides loss-landscape scans, analysis tools, and
plotting utilities for variational programs.
Scan functions cover one-dimensional (scan_1d()), two-dimensional
(scan_2d()), PCA-based (scan_pca()), and
interpolation (scan_interp_1d(), scan_interp_2d())
slices through the loss landscape. Analysis tools include
compute_hessian() for curvature information,
fourier_analysis_2d() for frequency decomposition, and
run_neb() for nudged elastic band transition paths.
ProgramViz wraps a variational program and exposes all of the
above as convenient methods.
Loss-landscape visualization for variational programs.
Provides one- and two-dimensional objective scans and a PCA-based plane scan.
Evaluations use Divi’s batched cost path. On
VariationalQuantumAlgorithm
subclasses, the same entry points are available as program.viz.
Attribution for orqviz-aligned geometry is recorded in
LICENSES/ORQViz-Apache-2.0-acknowledgement.txt.
Functions¶
|
Compute the Hessian matrix at center. |
|
Compute the 2D Fourier power spectrum of a scan grid. |
|
Unwrap a trajectory so consecutive rows are within half a period. |
|
Wrap point to the closest periodic copy relative to reference. |
|
Find a minimum-energy path between two parameter vectors via NEB. |
|
One-dimensional loss-landscape scan for a variational program. |
|
Two-dimensional loss-landscape scan for a variational program. |
|
One-dimensional interpolation scan between two parameter vectors. |
|
Two-dimensional interpolation scan between two parameter vectors. |
|
Evaluate a 2D scan in PCA score space (orqviz-compatible layout). |
Classes¶
|
Result of a 2D Fourier analysis on a scan grid. |
Strategy for computing gradients in viz analysis functions. |
|
|
Result of a Hessian computation at a parameter point. |
|
Result of a NEB relaxation. |
|
|
|
Thin convenience wrapper for |
|
|
|