Skip to content

Add variational neural network solver - #43

Merged
ohno merged 2 commits into
mainfrom
codex/add-variational-neural-network
Aug 11, 2026
Merged

Add variational neural network solver#43
ohno merged 2 commits into
mainfrom
codex/add-variational-neural-network

Conversation

@ohno

@ohno ohno commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • add VariationalNeuralNetwork with the VNN abbreviation
  • support both a standard Lux network built from architecture and arbitrary user-supplied Lux models
  • evaluate and normalize trial wavefunctions using the finite-difference Hamiltonian, radial Jacobian, and Rayleigh quotient
  • support training continuation through Lux parameters, states, and optimizer state
  • add validation, tests, documentation, and dependency declarations

Why

This implements the neural-network trial wavefunction proof of concept proposed in #33 while keeping the FDM discretization as the shared numerical backend. The convenience API covers the common case, while the explicit-model API allows users to experiment with custom Lux architectures and trial envelopes.

User impact

Users can now write either:

result = solve(H, VNN(...))

or pass an arbitrary Lux model:

result = solve(H, model, VNN(...); trial=(r, value) -> exp(-r) * value)

The result includes the variational energy, normalized grid wavefunction, callable wavefunction, training history, Lux state, and optimizer state.

Validation

  • Julia 1.10.10: full package test suite passed (344/344)
  • Julia 1.7.3: targeted VNN compatibility tests passed
  • Documenter: VNN page built successfully with executable examples
  • git diff --check passed

The full local documentation site was not completed because the shared host Julia cache repeatedly stalled while precompiling CairoMakie; the VNN page itself builds cleanly without warnings.

Closes #33


This pull request was developed with assistance from Codex using GPT-5.6 Sol with High reasoning effort.

@ohno
ohno marked this pull request as ready for review August 11, 2026 14:46
@ohno
ohno merged commit 36325d1 into main Aug 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ML

1 participant