Skip to content

A10 Magnus schemes ​

IDGroupTypeBackendsFigureProgram
A10AccuracyPCPU (gfortran, nvfortran, ifx), GPU (OpenACC); orders in R8Pyesselah_vv_magnus

Case and scope ​

The commutator-free Magnus schemes of magnus_stepper (Schemes), run with the dense per-cell action, on two linear non-autonomous systems y′=A(t)y with a skew-symmetric A. In both, A(t) and A(t′) do not commute, so the order is the scheme's, not the quadrature's: on a commuting A the product of exponentials is the exponential of the Gauss quadrature of A, exact to the quadrature's order (selah_test_magnus checks that case). ADAM's CFM-4 runs alongside as the defect it was: each exponential a forward-Euler step, an explicit Runge–Kutta of order 2 (notes/magnus.md §4).

Setup ​

ItemValue
Rotationy∈R3, A=[ω(t)×], ω(t)=s(cos⁡2t,sin⁡2t,1+12cos⁡t): the axis turns
Two-level systemiψ′=Hψ, H=12σz+scos⁡(2t)σx, in real form y=(u,v), ψ=u+iv: A=(0H−H0)
Cellsthree per system, s = 1, 1.5, 0.7, one block per cell (the components first)
Referencefeagin-108 (order 10) at 32 sub-steps per step
Errorthe largest over the run, t∈[0,4], at every step point and every cell
Orders8 to 256 steps; the bound: within 0.15 of the declared order at 32 → 64 steps (order 4) and 16 → 32 (orders 6 and 8: below 10−13 from 64 steps on, R8P's round-off), the finer error above 10−13
Norm1000 steps of 0.05: |‖yn‖−‖y0‖|≤64εn at every step

Program ​

bash
./exe/selah_vv_magnus
scripts/run_vv.sh --only selah_vv_magnus   # magnus-orders.dat, then the table and the figure below

Results ​

The largest error of every Magnus scheme and of ADAM's CFM-4 against the steps, on both systems

SchemeSystemDeclared8→1616→3232→6464→128128→256Error at 256 steps
cf4-2rotation, turning axis43.973.994.004.004.001.27e-09
cf4-2driven two-level system44.054.014.004.004.008.33e-10
cf4-3optrotation, turning axis44.184.054.014.004.003.71e-11
cf4-3optdriven two-level system44.194.014.004.004.003.30e-11
cf4-4rotation, turning axis43.203.853.963.994.005.05e-11
cf4-4driven two-level system43.723.933.984.004.002.16e-11
cf6-5rotation, turning axis65.985.996.006.00—3.16e-14
cf6-5driven two-level system66.026.006.006.01—1.52e-14
cf6-5brotation, turning axis65.986.006.006.00—3.11e-14
cf6-5bdriven two-level system66.335.986.016.00—1.98e-14
cf6-5optrotation, turning axis65.925.995.995.96—1.61e-14
cf6-5optdriven two-level system65.985.996.00——1.39e-14
cf8-11rotation, turning axis87.988.00———1.95e-14
cf8-11driven two-level system88.888.08———1.43e-14
adam-cfm4driven two-level system22.402.112.001.981.992.01e-04

The observed order of each halving; — where the finer error is below 1e-13 (round-off). adam-cfm4: ADAM's CFM-4, each exponential a forward-Euler step (dashed); order 4 solid, 6 dash-dotted, 8 dotted. The bound: within 0.15 of the declared order at 32→64 (order 4) and 16→32 (orders 6 and 8), the finer error above 1e-13 (selah_vv_magnus).

The norm. Over 1000 steps of 0.05, every scheme keeps ‖y‖ within 2 ε per step of its start (the largest drift 1.9⋅10−14, cf6-5opt), on both systems. Over the same run ADAM's CFM-4 drifts by 7⋅10−3 and rk4 by 4⋅10−6: a Runge–Kutta polynomial is not orthogonal, the Padé approximant of a skew-symmetric block is (Cookbook: Magnus schemes).

Findings ​

  • Every scheme has its order on both systems: 4 from 16 steps on, 6 from 8 (5.98 to 6.02), 8 for cf8-11 (8.00 and 8.08 at 16 → 32 steps), down to R8P's round-off, 2⋅10−14. cf4-3opt and cf4-4 are 25 to 40 times more accurate than cf4-2 at the same steps, cf6-5opt 15 times more than cf6-5: the optimised sets earn their extra exponential or node.
  • The cost at a given error. cf8-11 makes 11 exponentials a step, 5.5 times cf4-2's. At an error of 10−10 on the rotation (interpolated in the table's errors) it needs 18 steps, 198 exponentials; cf6-5opt 42 steps, 210; cf4-2 about 480, 960. Below 10−10 the eighth order gains; above it cf6-5opt is as cheap.
  • ADAM's CFM-4 has order 2, as its Runge–Kutta tableau says (b⋅c2≠1/3): 2⋅10−4 at 256 steps where cf4-2, with half its exponentials, reaches 8⋅10−10.
  • The norm is kept to rounding by the dense action, whatever the scheme: the property the Magnus form exists for.