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 version2.13
commit03a88b7e912ffbb3122dd24829cc5d216209c804
local modificationsFalse
MATLAB26.2.0.3386108 (R2026b)
hostMacBook-Pro-8.local
platformMACA64
cores12
BLASApple Accelerate BLAS (ILP64)
computational threads12
parallel pool workers11
GPU requestedFalse
GPU device
case options{"gpu": false}

Spynach

run date (UTC)2026-10-14T17:59:29Z
Spynach versionb8f2e2f-dirty
commitb8f2e2f288b34d134bda48a4c02ae4c60df6f448
local modificationsTrue
Python3.11.2
NumPy2.4.6
SciPy1.17.1
hostclaude-box
platformLinux-7.0.14-orbstack-00380-ga7e0a2dc9535-aarch64-with-glibc2.36
cores12
BLAS{"numpy": "scipy-openblas", "scipy": "scipy-openblas"}
thread settings{"OPENBLAS_NUM_THREADS": "1"}
GPU requestedFalse
GPU device
case options{}
not run

Timings

stageSpinach / sSpynach / sSpynach / Spinach
create0.700.000.00x
basis0.150.000.01x
hamiltonian0.300.010.05x
equilibrium0.030.000.12x
relaxation0.590.040.06x
trajectory0.060.193.02x
analysis0.170.100.59x
plot0.520.250.47x
total (wall clock)2.570.590.23x

Data

variableSpinach shapeSpynach shaperelative errormax |difference|
coh_order(7, 200001)(7, 200001)3.930e-131.166e-17
corr_order(1, 200001)(1, 200001)3.930e-131.166e-17
rho_eq(31, 1)(31,)1.198e-218.470e-22compared after squeezing singleton dimensions
rho_eq_ex(31, 1)(31,)1.289e-191.287e-19compared after squeezing singleton dimensions
rho_final(31, 1)(31,)9.544e-189.509e-18compared after squeezing singleton dimensions
spin_total(2, 200001)(2, 200001)3.929e-131.164e-17
tensors(3, 200001)(3, 200001)3.935e-131.305e-17
time_eq(1, 200001)(200001,)1.081e-161.110e-16compared after squeezing singleton dimensions
unit_population(1, 1)0.000e+000.000e+00compared after squeezing singleton dimensions

relative error = ||Spynach - Spinach||F / ||Spinach||F, the metric of the oracle tests.

Figures

spinach: coherence

figure_coherence.png

Spynach: coherence

figure_coherence.png

interactive figure

spinach: correlation

figure_correlation.png

Spynach: correlation

figure_correlation.png

interactive figure

spinach: spins

figure_spins.png

Spynach: spins

figure_spins.png

interactive figure

spinach: tensors

figure_tensors.png

Spynach: tensors

figure_tensors.png

interactive figure

Profiles

spinach

by self time

functioncallsself / stotal / s
existentials10.420.42
CJSKeyValueStore>CJSKeyValueStore.putSingleVariable400.140.17
ParforEngine>ParforEngine.getCompleteIntervals420.130.16
ParforEngine>ParforEngine.addInterval1120.110.16
li_exchange_equilibrium_spinach10.102.57
hamiltonian30.100.45
create10.070.70
trajan30.050.26
li_exchange_equilibrium_spinach>trajan_data30.040.05
redfield_integral_async10.040.35
evolution>(parfor body)80.040.05
report3600.040.05
parallel_function110.030.57
legend>find_legend110.030.03
parallel_function>distributed_execution90.030.43
table.saveobj1600.030.05
num2str6620.020.05
strjust>strjustOnChar2370.020.02
CJSKeyValueStore>CJSKeyValueStore.getSingleVariable100.020.04
Legend.doSetup70.020.05
superop60.020.04
unique940.020.03
ismember>ismemberR2012a690.020.03
CJSKeyValueStore>iWriteDataFile400.020.02
Legend.Legend>Legend.Legend70.020.08

by total time (with callees)

functioncallsself / stotal / s
run10.002.58
run_comparison10.012.58
li_exchange_equilibrium_spinach10.102.57
create10.070.70
relaxation10.000.59
parallel_function110.030.57
hamiltonian30.100.45
parallel_function>distributed_execution90.030.43
existentials10.420.42
redfield_integral_async10.040.35
legend40.000.30
legend>make_legend40.010.26
trajan30.050.26
ValueStore>ValueStore.put100.000.18
CJSKeyValueStore>CJSKeyValueStore.putVariable100.000.17
CJSKeyValueStore>CJSKeyValueStore.putSingleVariable400.140.17
klegend30.000.17
ParforEngine>ParforEngine.getCompleteIntervals420.130.16
ParforEngine>ParforEngine.addInterval1120.110.16
basis10.000.15
operator30.010.11
Legend.Legend>Legend.set.Axes40.000.10
Legend.Legend>Legend.set.Axes_I40.000.10
Legend.Legend>Legend.setAxesImpl40.000.10
cacheman10.000.10

Spynach

by self time

functioncallsself / stotal / s
evolution (propagation.py:208)20.170.19
<listcomp> (states.py:135)30.050.06
<method 'read' of '_io.BufferedReader' objects>1230.020.02
<listcomp> (li_exchange_equilibrium.py:124)10.020.02
<method 'copy' of 'numpy.ndarray' objects>3590.020.02
raw_decode (decoder.py:343)20.010.01
matlab_round (utilities.py:20)2230.010.01
<built-in method io.open_code>1230.010.01
<built-in method builtins.__build_class__>29800.010.02
<built-in method posix.listdir>230.010.01
__getitem__ (basedatatypes.py:4642)58340.010.06
_superop_side_build (operators.py:280)390.010.02
<built-in method posix.stat>5300.010.01
_get_validator (basedatatypes.py:4302)98670.010.01
<method 'reduce' of 'numpy.ufunc' objects>39550.010.01
<built-in method marshal.loads>1220.010.01
_str_to_dict_path_full (basedatatypes.py:50)19030.010.04
<method 'read' of '_io.TextIOWrapper' objects>190.010.01
_str_to_dict_path (basedatatypes.py:1839)264410.000.04
split_multichar (utils.py:393)113600.000.01
_get_child_props (basedatatypes.py:4414)30520.000.04
<built-in method scipy.linalg._matfuncs_expm.pick_pade_structure>120.000.00
<method '__deepcopy__' of 'numpy.ndarray' objects>260.000.00
chomp_empty_strings (utils.py:484)53600.000.02
__getitem__ (basedatatypes.py:741)81700.000.01

by total time (with callees)

functioncallsself / stotal / s
run (li_exchange_equilibrium_spynach.py:17)10.000.59
simulate (li_exchange_equilibrium.py:58)10.000.34
plot (li_exchange_equilibrium.py:147)10.000.25
plot_time_series (plotting.py:486)40.000.25
_figure (plotting.py:440)40.000.20
evolution (propagation.py:208)20.170.19
update (basedatatypes.py:5078)160.000.12
update_layout (_figure.py:191)80.000.12
update_layout (basedatatypes.py:1391)80.000.12
_find_and_load (<frozen importlib._bootstrap>:1167)3190.000.08
_find_and_load_unlocked (<frozen importlib._bootstrap>:1122)1260.000.08
import_module (__init__.py:108)2280.000.07
_gcd_import (<frozen importlib._bootstrap>:1194)2280.000.07
_load_unlocked (<frozen importlib._bootstrap>:666)1240.000.07
_perform_update (basedatatypes.py:3816)1000.000.07
exec_module (<frozen importlib._bootstrap_external>:934)1220.000.07
trajan (states.py:86)30.000.07
__getattr__ (importers.py:23)1580.000.07
<built-in method builtins.getattr>63020.000.06
<built-in method builtins.next>1100.000.06
__getitem__ (basedatatypes.py:4642)58340.010.06
<listcomp> (states.py:135)30.050.06
_call_with_frames_removed (<frozen importlib._bootstrap>:233)2730.000.05
__getattr__ (__init__.py:276)960.000.05
__exit__ (contextlib.py:141)240.000.05

Console logs