Spinach vs Spynach: li_exchange_equilibrium (CPU)
run li_exchange_equilibrium, both sides present. Built by comparison/report.py; protocol in comparison/README.md.
Provenance
spinach
| run date (UTC) | 2026-10-14T17:53:28Z |
|---|---|
| Spinach version | 2.13 |
| commit | 03a88b7e912ffbb3122dd24829cc5d216209c804 |
| local modifications | False |
| MATLAB | 26.2.0.3386108 (R2026b) |
| host | MacBook-Pro-8.local |
| platform | MACA64 |
| cores | 12 |
| BLAS | Apple Accelerate BLAS (ILP64) |
| computational threads | 12 |
| parallel pool workers | 11 |
| GPU requested | False |
| GPU device | |
| case options | {"gpu": false} |
Spynach
| run date (UTC) | 2026-10-14T17:59:29Z |
|---|---|
| Spynach version | b8f2e2f-dirty |
| commit | b8f2e2f288b34d134bda48a4c02ae4c60df6f448 |
| local modifications | True |
| Python | 3.11.2 |
| NumPy | 2.4.6 |
| SciPy | 1.17.1 |
| host | claude-box |
| platform | Linux-7.0.14-orbstack-00380-ga7e0a2dc9535-aarch64-with-glibc2.36 |
| cores | 12 |
| BLAS | {"numpy": "scipy-openblas", "scipy": "scipy-openblas"} |
| thread settings | {"OPENBLAS_NUM_THREADS": "1"} |
| GPU requested | False |
| GPU device | |
| case options | {} |
| not run |
Timings
| stage | Spinach / s | Spynach / s | Spynach / Spinach |
|---|---|---|---|
| create | 0.70 | 0.00 | 0.00x |
| basis | 0.15 | 0.00 | 0.01x |
| hamiltonian | 0.30 | 0.01 | 0.05x |
| equilibrium | 0.03 | 0.00 | 0.12x |
| relaxation | 0.59 | 0.04 | 0.06x |
| trajectory | 0.06 | 0.19 | 3.02x |
| analysis | 0.17 | 0.10 | 0.59x |
| plot | 0.52 | 0.25 | 0.47x |
| total (wall clock) | 2.57 | 0.59 | 0.23x |
Data
| variable | Spinach shape | Spynach shape | relative error | max |difference| | |
|---|---|---|---|---|---|
| coh_order | (7, 200001) | (7, 200001) | 3.930e-13 | 1.166e-17 | |
| corr_order | (1, 200001) | (1, 200001) | 3.930e-13 | 1.166e-17 | |
| rho_eq | (31, 1) | (31,) | 1.198e-21 | 8.470e-22 | compared after squeezing singleton dimensions |
| rho_eq_ex | (31, 1) | (31,) | 1.289e-19 | 1.287e-19 | compared after squeezing singleton dimensions |
| rho_final | (31, 1) | (31,) | 9.544e-18 | 9.509e-18 | compared after squeezing singleton dimensions |
| spin_total | (2, 200001) | (2, 200001) | 3.929e-13 | 1.164e-17 | |
| tensors | (3, 200001) | (3, 200001) | 3.935e-13 | 1.305e-17 | |
| time_eq | (1, 200001) | (200001,) | 1.081e-16 | 1.110e-16 | compared after squeezing singleton dimensions |
| unit_population | (1, 1) | 0.000e+00 | 0.000e+00 | compared after squeezing singleton dimensions |
relative error = ||Spynach - Spinach||F / ||Spinach||F, the metric of the oracle tests.
Figures
spinach: coherence
spinach: correlation
spinach: spins
spinach: tensors
Profiles
spinach
by self time
| function | calls | self / s | total / s |
|---|---|---|---|
| existentials | 1 | 0.42 | 0.42 |
| CJSKeyValueStore>CJSKeyValueStore.putSingleVariable | 40 | 0.14 | 0.17 |
| ParforEngine>ParforEngine.getCompleteIntervals | 42 | 0.13 | 0.16 |
| ParforEngine>ParforEngine.addInterval | 112 | 0.11 | 0.16 |
| li_exchange_equilibrium_spinach | 1 | 0.10 | 2.57 |
| hamiltonian | 3 | 0.10 | 0.45 |
| create | 1 | 0.07 | 0.70 |
| trajan | 3 | 0.05 | 0.26 |
| li_exchange_equilibrium_spinach>trajan_data | 3 | 0.04 | 0.05 |
| redfield_integral_async | 1 | 0.04 | 0.35 |
| evolution>(parfor body) | 8 | 0.04 | 0.05 |
| report | 360 | 0.04 | 0.05 |
| parallel_function | 11 | 0.03 | 0.57 |
| legend>find_legend | 11 | 0.03 | 0.03 |
| parallel_function>distributed_execution | 9 | 0.03 | 0.43 |
| table.saveobj | 160 | 0.03 | 0.05 |
| num2str | 662 | 0.02 | 0.05 |
| strjust>strjustOnChar | 237 | 0.02 | 0.02 |
| CJSKeyValueStore>CJSKeyValueStore.getSingleVariable | 10 | 0.02 | 0.04 |
| Legend.doSetup | 7 | 0.02 | 0.05 |
| superop | 6 | 0.02 | 0.04 |
| unique | 94 | 0.02 | 0.03 |
| ismember>ismemberR2012a | 69 | 0.02 | 0.03 |
| CJSKeyValueStore>iWriteDataFile | 40 | 0.02 | 0.02 |
| Legend.Legend>Legend.Legend | 7 | 0.02 | 0.08 |
by total time (with callees)
| function | calls | self / s | total / s |
|---|---|---|---|
| run | 1 | 0.00 | 2.58 |
| run_comparison | 1 | 0.01 | 2.58 |
| li_exchange_equilibrium_spinach | 1 | 0.10 | 2.57 |
| create | 1 | 0.07 | 0.70 |
| relaxation | 1 | 0.00 | 0.59 |
| parallel_function | 11 | 0.03 | 0.57 |
| hamiltonian | 3 | 0.10 | 0.45 |
| parallel_function>distributed_execution | 9 | 0.03 | 0.43 |
| existentials | 1 | 0.42 | 0.42 |
| redfield_integral_async | 1 | 0.04 | 0.35 |
| legend | 4 | 0.00 | 0.30 |
| legend>make_legend | 4 | 0.01 | 0.26 |
| trajan | 3 | 0.05 | 0.26 |
| ValueStore>ValueStore.put | 10 | 0.00 | 0.18 |
| CJSKeyValueStore>CJSKeyValueStore.putVariable | 10 | 0.00 | 0.17 |
| CJSKeyValueStore>CJSKeyValueStore.putSingleVariable | 40 | 0.14 | 0.17 |
| klegend | 3 | 0.00 | 0.17 |
| ParforEngine>ParforEngine.getCompleteIntervals | 42 | 0.13 | 0.16 |
| ParforEngine>ParforEngine.addInterval | 112 | 0.11 | 0.16 |
| basis | 1 | 0.00 | 0.15 |
| operator | 3 | 0.01 | 0.11 |
| Legend.Legend>Legend.set.Axes | 4 | 0.00 | 0.10 |
| Legend.Legend>Legend.set.Axes_I | 4 | 0.00 | 0.10 |
| Legend.Legend>Legend.setAxesImpl | 4 | 0.00 | 0.10 |
| cacheman | 1 | 0.00 | 0.10 |
Spynach
by self time
| function | calls | self / s | total / s |
|---|---|---|---|
| evolution (propagation.py:208) | 2 | 0.17 | 0.19 |
| <listcomp> (states.py:135) | 3 | 0.05 | 0.06 |
| <method 'read' of '_io.BufferedReader' objects> | 123 | 0.02 | 0.02 |
| <listcomp> (li_exchange_equilibrium.py:124) | 1 | 0.02 | 0.02 |
| <method 'copy' of 'numpy.ndarray' objects> | 359 | 0.02 | 0.02 |
| raw_decode (decoder.py:343) | 2 | 0.01 | 0.01 |
| matlab_round (utilities.py:20) | 223 | 0.01 | 0.01 |
| <built-in method io.open_code> | 123 | 0.01 | 0.01 |
| <built-in method builtins.__build_class__> | 2980 | 0.01 | 0.02 |
| <built-in method posix.listdir> | 23 | 0.01 | 0.01 |
| __getitem__ (basedatatypes.py:4642) | 5834 | 0.01 | 0.06 |
| _superop_side_build (operators.py:280) | 39 | 0.01 | 0.02 |
| <built-in method posix.stat> | 530 | 0.01 | 0.01 |
| _get_validator (basedatatypes.py:4302) | 9867 | 0.01 | 0.01 |
| <method 'reduce' of 'numpy.ufunc' objects> | 3955 | 0.01 | 0.01 |
| <built-in method marshal.loads> | 122 | 0.01 | 0.01 |
| _str_to_dict_path_full (basedatatypes.py:50) | 1903 | 0.01 | 0.04 |
| <method 'read' of '_io.TextIOWrapper' objects> | 19 | 0.01 | 0.01 |
| _str_to_dict_path (basedatatypes.py:1839) | 26441 | 0.00 | 0.04 |
| split_multichar (utils.py:393) | 11360 | 0.00 | 0.01 |
| _get_child_props (basedatatypes.py:4414) | 3052 | 0.00 | 0.04 |
| <built-in method scipy.linalg._matfuncs_expm.pick_pade_structure> | 12 | 0.00 | 0.00 |
| <method '__deepcopy__' of 'numpy.ndarray' objects> | 26 | 0.00 | 0.00 |
| chomp_empty_strings (utils.py:484) | 5360 | 0.00 | 0.02 |
| __getitem__ (basedatatypes.py:741) | 8170 | 0.00 | 0.01 |
by total time (with callees)
| function | calls | self / s | total / s |
|---|---|---|---|
| run (li_exchange_equilibrium_spynach.py:17) | 1 | 0.00 | 0.59 |
| simulate (li_exchange_equilibrium.py:58) | 1 | 0.00 | 0.34 |
| plot (li_exchange_equilibrium.py:147) | 1 | 0.00 | 0.25 |
| plot_time_series (plotting.py:486) | 4 | 0.00 | 0.25 |
| _figure (plotting.py:440) | 4 | 0.00 | 0.20 |
| evolution (propagation.py:208) | 2 | 0.17 | 0.19 |
| update (basedatatypes.py:5078) | 16 | 0.00 | 0.12 |
| update_layout (_figure.py:191) | 8 | 0.00 | 0.12 |
| update_layout (basedatatypes.py:1391) | 8 | 0.00 | 0.12 |
| _find_and_load (<frozen importlib._bootstrap>:1167) | 319 | 0.00 | 0.08 |
| _find_and_load_unlocked (<frozen importlib._bootstrap>:1122) | 126 | 0.00 | 0.08 |
| import_module (__init__.py:108) | 228 | 0.00 | 0.07 |
| _gcd_import (<frozen importlib._bootstrap>:1194) | 228 | 0.00 | 0.07 |
| _load_unlocked (<frozen importlib._bootstrap>:666) | 124 | 0.00 | 0.07 |
| _perform_update (basedatatypes.py:3816) | 100 | 0.00 | 0.07 |
| exec_module (<frozen importlib._bootstrap_external>:934) | 122 | 0.00 | 0.07 |
| trajan (states.py:86) | 3 | 0.00 | 0.07 |
| __getattr__ (importers.py:23) | 158 | 0.00 | 0.07 |
| <built-in method builtins.getattr> | 6302 | 0.00 | 0.06 |
| <built-in method builtins.next> | 110 | 0.00 | 0.06 |
| __getitem__ (basedatatypes.py:4642) | 5834 | 0.01 | 0.06 |
| <listcomp> (states.py:135) | 3 | 0.05 | 0.06 |
| _call_with_frames_removed (<frozen importlib._bootstrap>:233) | 273 | 0.00 | 0.05 |
| __getattr__ (__init__.py:276) | 96 | 0.00 | 0.05 |
| __exit__ (contextlib.py:141) | 24 | 0.00 | 0.05 |
Console logs
- spinach: console.log
- Spynach: console.log