Skip to content

refactor: More type-stable and concrete implementation#5

Merged
ChristophHotter merged 14 commits into
mainfrom
static
Apr 13, 2026
Merged

refactor: More type-stable and concrete implementation#5
ChristophHotter merged 14 commits into
mainfrom
static

Conversation

@oameye
Copy link
Copy Markdown
Member

@oameye oameye commented Apr 4, 2026

Benchmark PR #4 Now Speedup
SLH Algebra — symbolic
3-cavity cascade 49.348 ms 120.281 μs 410x
concatenate + cascade 9.722 ms 40.050 μs 243x
feedback OPO loop 1.664 ms 32.680 μs 51x
SLH Algebra — numeric
2-QD waveguide composition 70.020 μs 63.105 μs 1.1x
SLH Algebra — closure eval
2-QD waveguide H(t) 64.030 μs 78.410 μs ~noise
2-QD waveguide L(t) 45.750 μs 9.140 μs 5.0x
Translation
static / atom-cavity 458.006 μs 453.731 μs ~same
time-dep / atom-cavity 810.541 μs 786.002 μs ~same
time-dep / 3-cavity H+L 3.239 ms 3.218 ms ~same
closure eval / 3-cavity H(t) 20.010 μs 18.080 μs 1.1x
closure eval / 3-cavity L(t) 14.970 μs 13.820 μs 1.1x
Pulse Couplings
single-pulse / input 1.329 ms 335.406 μs 4.0x
single-pulse / output 1.523 ms 366.541 μs 4.2x
multi-pulse / output 2 modes 2.709 ms 432.596 μs 6.3x
multi-pulse / input 2 modes 4.688 ms 383.831 μs 12.2x
Interaction Picture
coupling matrix / 2 modes 449.259 ns 326.082 ns 1.4x
coupling matrix / 4 modes 3.720 μs 2.140 μs 1.7x
coefficient matrix M / ODE 233.490 μs 181.781 μs 1.3x
coefficient matrix M / analytical 18.300 μs 28.020 μs ~noise
operator substitution / TLS 557.508 ms 550.204 ms ~same
Correlations
single photon cavity 405.307 ms 297.480 ms 1.4x

@oameye
Copy link
Copy Markdown
Member Author

oameye commented Apr 4, 2026

It's failing due to SciML/NonlinearSolve.jl#893

Comment thread test/test_feedback.jl
Comment thread test/test_feedback.jl
Comment thread src/pulses.jl
Comment thread src/utils.jl
Comment thread src/SLH.jl Outdated
Comment thread test/test_SLH.jl
Comment thread src/interaction_picture.jl
Comment thread src/translate.jl
Comment thread src/translate.jl Outdated
Copy link
Copy Markdown
Member

@ChristophHotter ChristophHotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks already good.

Main points:

  • contents of pulses.jl and utils.jl are swapped?
  • fix _slh_matvec in SLH.jl (suggested fix added as comment; error of example 07-1)
  • function description was sometimes deleted, and sometimes a strange description was added

@ChristophHotter ChristophHotter merged commit b0a8e8b into main Apr 13, 2026
6 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.

2 participants