Skip to content

Add dipole-coupled nanoring example#519

Open
Krastanov-agent wants to merge 1 commit into
qojulia:masterfrom
Krastanov-agent:move-dipole-arrays-example-codex
Open

Add dipole-coupled nanoring example#519
Krastanov-agent wants to merge 1 commit into
qojulia:masterfrom
Krastanov-agent:move-dipole-arrays-example-codex

Conversation

@Krastanov-agent

Copy link
Copy Markdown
Contributor

Recreates qojulia/QuantumOptics.jl-examples#27 in QuantumOptics.jl now that examples live in this repository.

Original PR: qojulia/QuantumOptics.jl-examples#27
Original commit: qojulia/QuantumOptics.jl-examples@93a6901

Authorship is preserved on the commit as Raphael Holzinger raphael3d@users.noreply.github.com; this PR ports the notebook into the current docs/examples layout. The old notebook imported CollectiveSpins only for GreenTensor, but the registered CollectiveSpins compat bounds conflict with the current examples environment, so the Green tensor helper is inlined here and the headless docs build avoids pygui(true).

Validation:

  • MPLBACKEND=Agg python3 -m nbconvert --to markdown --execute --ExecutePreprocessor.kernel_name=quantumoptics-docs --ExecutePreprocessor.timeout=200 --output-dir=docs/src/examples --template-file=docs/examples/markdown_template.tpl docs/examples/notebooks/atomic_dipole_arrays.ipynb

Recreates qojulia/QuantumOptics.jl-examples#27 in QuantumOptics.jl.

Original PR: qojulia/QuantumOptics.jl-examples#27

Original commit: 93a6901a36b9c295385b26258d60737fd74152a1

Port note: inline the Green tensor helper instead of depending on CollectiveSpins.jl, whose current compat bounds conflict with the docs examples environment.
@Krastanov-agent
Krastanov-agent force-pushed the move-dipole-arrays-example-codex branch from cff8fde to cc9d538 Compare May 5, 2026 05:06
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master cc9d538... master / cc9d538...
master/base array types/1//2 25.1 ± 7.9 μs 25.6 ± 8 μs 0.982 ± 0.44
master/base array types/100//1 18.6 s 19 s 0.979
master/base array types/20//1 0.0458 ± 0.00086 s 0.0458 ± 0.0008 s 1 ± 0.026
master/base array types/50//1 1.29 ± 0.029 s 1.29 ± 0.016 s 0.998 ± 0.025
master/qo types/1//2 30.9 ± 9 μs 30.6 ± 9.4 μs 1.01 ± 0.43
master/qo types/100//1 15.4 s 16.4 s 0.938
master/qo types/20//1 0.0353 ± 0.00064 s 0.036 ± 0.0011 s 0.981 ± 0.035
master/qo types/50//1 1.06 ± 0.0064 s 1.12 ± 0.013 s 0.95 ± 0.012
schroedinger/base array types/1//2 6.21 ± 0.32 μs 6.2 ± 0.33 μs 1 ± 0.074
schroedinger/base array types/100//1 3.36 ± 0.067 ms 3.37 ± 0.067 ms 0.997 ± 0.028
schroedinger/base array types/20//1 0.136 ± 0.007 ms 0.136 ± 0.0071 ms 0.998 ± 0.073
schroedinger/base array types/50//1 0.706 ± 0.018 ms 0.709 ± 0.019 ms 0.996 ± 0.036
schroedinger/qo types/1//2 6.5 ± 0.38 μs 6.58 ± 0.36 μs 0.988 ± 0.08
schroedinger/qo types/100//1 3.21 ± 0.045 ms 3.22 ± 0.045 ms 0.999 ± 0.02
schroedinger/qo types/20//1 0.224 ± 0.011 ms 0.226 ± 0.011 ms 0.991 ± 0.067
schroedinger/qo types/50//1 0.77 ± 0.016 ms 0.772 ± 0.015 ms 0.998 ± 0.029
stochastic master/base array types/1//2 0.231 ± 0.065 ms 0.238 ± 0.063 ms 0.971 ± 0.38
stochastic master/base array types/100//1 0.252 ± 0.018 s 0.249 ± 0.019 s 1.01 ± 0.11
stochastic master/base array types/20//1 28.7 ± 0.67 ms 28.3 ± 0.77 ms 1.01 ± 0.036
stochastic master/base array types/50//1 0.0809 ± 0.0051 s 0.0792 ± 0.0051 s 1.02 ± 0.092
stochastic master/qo types/1//2 0.274 ± 0.056 ms 0.267 ± 0.055 ms 1.02 ± 0.3
stochastic master/qo types/100//1 0.596 ± 0.013 s 0.608 ± 0.0076 s 0.981 ± 0.025
stochastic master/qo types/20//1 24.3 ± 0.73 ms 24.1 ± 0.73 ms 1.01 ± 0.043
stochastic master/qo types/50//1 0.147 ± 0.0035 s 0.152 ± 0.0052 s 0.967 ± 0.04
stochastic schroedinger/base array types/1//2 0.0585 ± 0.0014 ms 0.0585 ± 0.0018 ms 1 ± 0.038
stochastic schroedinger/base array types/100//1 1.03 ± 0.052 ms 1.05 ± 0.056 ms 0.985 ± 0.072
stochastic schroedinger/base array types/20//1 0.28 ± 0.012 ms 0.281 ± 0.012 ms 0.995 ± 0.062
stochastic schroedinger/base array types/50//1 0.629 ± 0.017 ms 0.632 ± 0.017 ms 0.995 ± 0.038
stochastic schroedinger/qo types/1//2 0.0698 ± 0.0087 ms 0.0688 ± 0.0089 ms 1.02 ± 0.18
stochastic schroedinger/qo types/100//1 1.47 ± 0.028 ms 1.47 ± 0.026 ms 1 ± 0.026
stochastic schroedinger/qo types/20//1 0.34 ± 0.017 ms 0.345 ± 0.016 ms 0.986 ± 0.067
stochastic schroedinger/qo types/50//1 0.759 ± 0.018 ms 0.767 ± 0.019 ms 0.99 ± 0.034
time_to_load 2.42 ± 0.039 s 2.42 ± 0.0058 s 1 ± 0.016
Memory benchmarks
master cc9d538... master / cc9d538...
master/base array types/1//2 0.488 k allocs: 27.5 kB 0.488 k allocs: 27.5 kB 1
master/base array types/100//1 0.135 M allocs: 11.6 GB 0.135 M allocs: 11.6 GB 1
master/base array types/20//1 8.01 k allocs: 29.8 MB 8.01 k allocs: 29.8 MB 1
master/base array types/50//1 0.0376 M allocs: 0.818 GB 0.0376 M allocs: 0.818 GB 1
master/qo types/1//2 0.609 k allocs: 30.1 kB 0.609 k allocs: 30.1 kB 1
master/qo types/100//1 0.155 M allocs: 11.7 GB 0.155 M allocs: 11.7 GB 1
master/qo types/20//1 9.19 k allocs: 29.9 MB 9.19 k allocs: 29.9 MB 1
master/qo types/50//1 0.0429 M allocs: 0.817 GB 0.0429 M allocs: 0.817 GB 1
schroedinger/base array types/1//2 0.073 k allocs: 4 kB 0.073 k allocs: 4 kB 1
schroedinger/base array types/100//1 0.089 k allocs: 0.0533 MB 0.089 k allocs: 0.0533 MB 1
schroedinger/base array types/20//1 0.073 k allocs: 14.5 kB 0.073 k allocs: 14.5 kB 1
schroedinger/base array types/50//1 0.073 k allocs: 31.2 kB 0.073 k allocs: 31.2 kB 1
schroedinger/qo types/1//2 0.084 k allocs: 4.5 kB 0.084 k allocs: 4.5 kB 1
schroedinger/qo types/100//1 0.098 k allocs: 0.0477 MB 0.098 k allocs: 0.0477 MB 1
schroedinger/qo types/20//1 0.084 k allocs: 13.7 kB 0.084 k allocs: 13.7 kB 1
schroedinger/qo types/50//1 0.084 k allocs: 28.3 kB 0.084 k allocs: 28.3 kB 1
stochastic master/base array types/1//2 3.88 k allocs: 0.208 MB 3.88 k allocs: 0.208 MB 1
stochastic master/base array types/100//1 1.87 k allocs: 0.147 GB 1.87 k allocs: 0.147 GB 1
stochastic master/base array types/20//1 4.53 k allocs: 16.8 MB 4.53 k allocs: 16.8 MB 1
stochastic master/base array types/50//1 2.26 k allocs: 0.0457 GB 2.26 k allocs: 0.0457 GB 1
stochastic master/qo types/1//2 4.84 k allocs: 0.228 MB 4.84 k allocs: 0.228 MB 1
stochastic master/qo types/100//1 5.49 k allocs: 0.389 GB 5.49 k allocs: 0.389 GB 1
stochastic master/qo types/20//1 5.49 k allocs: 16.8 MB 5.49 k allocs: 16.8 MB 1
stochastic master/qo types/50//1 5.49 k allocs: 0.0984 GB 5.49 k allocs: 0.0984 GB 1
stochastic schroedinger/base array types/1//2 0.099 k allocs: 5.3 kB 0.099 k allocs: 5.3 kB 1
stochastic schroedinger/base array types/100//1 0.276 k allocs: 0.0638 MB 0.276 k allocs: 0.0638 MB 1
stochastic schroedinger/base array types/20//1 0.099 k allocs: 15.8 kB 0.099 k allocs: 15.8 kB 1
stochastic schroedinger/base array types/50//1 0.099 k allocs: 0.0318 MB 0.099 k allocs: 0.0318 MB 1
stochastic schroedinger/qo types/1//2 0.43 k allocs: 20.8 kB 0.43 k allocs: 20.8 kB 1
stochastic schroedinger/qo types/100//1 0.446 k allocs: 0.0698 MB 0.446 k allocs: 0.0698 MB 1
stochastic schroedinger/qo types/20//1 0.43 k allocs: 31.3 kB 0.43 k allocs: 31.3 kB 1
stochastic schroedinger/qo types/50//1 0.43 k allocs: 0.0469 MB 0.43 k allocs: 0.0469 MB 1
time_to_load 0.145 k allocs: 11 kB 0.145 k allocs: 11 kB 1

@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.24%. Comparing base (2c83119) to head (cc9d538).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #519   +/-   ##
=======================================
  Coverage   96.24%   96.24%           
=======================================
  Files          18       18           
  Lines        1704     1704           
=======================================
  Hits         1640     1640           
  Misses         64       64           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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