Schrödinger 1D¶
| Example | |
|---|---|
| Source | DeepXDE example |
| Problem | Forward and Inverse (the Inverse mode is PINNStudio's addition) |
| Dimension | 1D (x, t) |
| Regime | Time-dependent |
| Geometry | Interval |
| Outputs | u, v |
| Settings | Default, Tuned |
Governing equations¶
Mathematical form (from the benchmark records):
As typed in PINNStudio's Equations page (each expression is a residual, set to zero):
As typed in PINNStudio's Equations page (Inverse mode) (each expression is a residual, set to zero):
Inverse-mode form (from the benchmark records):
Domain¶
- Interval: \(x \in [-5, 5]\)
- Time interval: \(t \in [0, 1.5708]\)
Initial conditions¶
| Output | Initial value | How it is imposed (Settings: Default) |
|---|---|---|
u |
2/cosh(x) |
loss term |
v |
0 |
loss term |
Boundary conditions¶
| Type | Where | Output | Value | Details |
|---|---|---|---|---|
| Periodic BC | True (the whole boundary) |
u |
— | axis x, derivative order 0 |
| Periodic BC | True (the whole boundary) |
u |
— | axis x, derivative order 1 |
| Periodic BC | True (the whole boundary) |
v |
— | axis x, derivative order 0 |
| Periodic BC | True (the whole boundary) |
v |
— | axis x, derivative order 1 |
Unknowns and measured data (Inverse)¶
| Trainable parameter | Initial value | True value |
|---|---|---|
c |
1 | 0.5 |
Measured data (Inverse page, measured-data files):
reference_data/1D/schrodinger/t_0.75.txt→ output2, weight 100
From the benchmark records: pick the example from the Inverse list: the coefficient \(c\) of the second-derivative terms (0.5 in Forward mode; initial guess 1) is unknown and is learned from \(|h| = \sqrt{u^2 + v^2}\) measured at \(t = 0.75\), with the same training as the forward problem.
Settings¶
Forward mode¶
Settings: Default — DeepXDE's own settings
- Network: FNN, hidden layers 4 × 100, inputs (x, t), 2 outputs; activation tanh, initializer Glorot normal
- Points: 10,000 domain, 20 boundary, 200 initial, 1,000 test
- Loss weights:
1,1,1,1,1,1,1,1(equations, then boundary-condition rows, then initial conditions)
| Phase | Optimizer | Iterations | Learning rate | Decay |
|---|---|---|---|---|
| 1 | Adam | 10,000 | 0.001 | none |
| 2 | L-BFGS | 10,000 | — | none |
No separate Tuned preset: the Tuned item is greyed out for this example (its Default settings are PINNStudio's best).
Inverse mode¶
Settings: Default — DeepXDE's settings with PINNStudio's Inverse-mode changes (see Notes)
- Network: FNN, hidden layers 4 × 100, inputs (x, t), 2 outputs; activation tanh, initializer Glorot normal
- Points: 10,000 domain, 20 boundary, 200 initial, 1,000 test
- Loss weights:
1,1,1,1,1,1,1,1(equations, then boundary-condition rows, then initial conditions)
| Phase | Optimizer | Iterations | Learning rate | Decay |
|---|---|---|---|---|
| 1 | Adam | 10,000 | 0.001 | none |
| 2 | L-BFGS | 10,000 | — | none |
Settings: Tuned
The Training Log reports: Tuned settings: 3× the training points. The change is applied to the example's own settings.
- Network: FNN, hidden layers 4 × 100, inputs (x, t), 2 outputs; activation tanh, initializer Glorot normal
- Points: 30,000 domain, 60 boundary, 600 initial, 1,000 test
- Loss weights:
1,1,1,1,1,1,1,1(equations, then boundary-condition rows, then initial conditions)
| Phase | Optimizer | Iterations | Learning rate | Decay |
|---|---|---|---|---|
| 1 | Adam | 10,000 | 0.001 | none |
| 2 | L-BFGS | 10,000 | — | none |
Results¶
The configuration selected in PINNStudio's benchmark study, run on one RTX 4090. Forward: relative L₂ error of each output at the last reference time. Inverse: each parameter's relative error and, per seed, the largest of them (worst parameter error).
Forward problem¶
Settings: Default — the example's own settings (not in the tuning sweep); the example has no separate Tuned preset for this mode. Values: median over seeds 2026, 1, 2.
| Output | Relative L₂ |
|---|---|
| u | 1.8 × 10⁻³ |
Inverse problem¶
Settings: Tuned — 3× training points. Values: median over seeds 2026, 1, 2.
| Parameter | True value | Recovered | Relative error |
|---|---|---|---|
| c | 0.5 | 0.500121 | 0.024 % |
Worst parameter error: 0.024 % (the median over the seeds of each seed's largest error).
Full benchmark record: every setting tried, the per-seed values and all figures are in the benchmark records on GitHub.
Loading it in PINNStudio¶
- Forward: toolbar Examples: › Forward › under the ── 1D ── heading, Schrödinger 1D › Default, then Solve.
- Inverse: toolbar Examples: › Inverse › under the ── 1D ── heading, Schrödinger 1D › Default or Tuned, then Solve.
Loading an example fills in every setting; anything you change before Solve is listed in the Training Log. Your save folder, GPU, random-seed and plot-style settings are kept.
Reference solution¶
- Reference data files:
reference_data/1D/schrodinger/
Notes¶
- |h| = sqrt(u^2 + v^2) is compared against a Fourier pseudo-spectral (split-step) solution in PINNStudio's reference_data/1D/schrodinger.
- Inverse mode (PINNStudio's addition): the coefficient c (0.5 in the equations; initial guess 1) is learned from |h| = sqrt(u^2 + v^2) measured at t = 0.75, with the forward example's training. |h| at t = 1.5 alone would not do: c = 1.95 reproduces it almost as well as c = 0.5.
Definition and records¶
- Definition:
EXAMPLESentry "Schrödinger equation" inpinnstudio/core/deepxde_examples.py- Settings: Tuned: entry "Schrödinger equation" in
pinnstudio/resources/tuned_settings.json
- Settings: Tuned: entry "Schrödinger equation" in
- Equations: Governing equations on this page
- Reference data:
reference_data/1D/schrodinger/, written bytools/make_exact_reference_data.py - Measured data (Inverse):
reference_data/1D/schrodinger/, written bytools/make_exact_reference_data.py - Benchmark records:
benchmarks/problems/schr-dinger-1d.md, its entry in the examples overview, the benchmark collection - Tuning-study configurations (records of the tuning study; open one with Problem › Open Saved Problem...; not presets of the Examples list):
Schrödinger 1D (tuned).pinn.json,Schrödinger 1D, inverse mode (tuned).pinn.json - DeepXDE example: Schrodinger.ipynb
- Cite: Lu et al. 2021 (DeepXDE); the problem follows Raissi et al. 2019
How the benchmark values were measured and checked: Reproducibility.