refactor: More type-stable and concrete implementation#5
Merged
Conversation
Member
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 |
Member
Author
|
It's failing due to SciML/NonlinearSolve.jl#893 |
ChristophHotter
requested changes
Apr 5, 2026
Member
ChristophHotter
left a comment
There was a problem hiding this comment.
Looks already good.
Main points:
- contents of pulses.jl and utils.jl are swapped?
- fix
_slh_matvecin SLH.jl (suggested fix added as comment; error of example 07-1) - function description was sometimes deleted, and sometimes a strange description was added
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.