Spinach vs spynach: zulf_pf6_1d (CPU)
run zulf_pf6_1d-numba, both sides present. Built by comparison/report.py; protocol in comparison/README.md.
Provenance
spinach
| run date (UTC) | 2026-10-14T17:39:14Z |
|---|---|
| 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-26T13:24:14Z |
|---|---|
| spynach version | v0.2.0-21-g2e8843c-dirty |
| commit | 2e8843cd088ebc17faf75fd8d06a6692f8507f71 |
| local modifications | True |
| Python | 3.12.5 |
| NumPy | 2.5.4 |
| SciPy | 1.18.1 |
| Numba (compiled kernels) | 0.68.0 |
| host | jerschowlab25.chem.nyu.edu |
| platform | macOS-26.6.2-arm64-arm-64bit |
| cores | 12 |
| BLAS | {"numpy": "accelerate", "scipy": "Accelerate"} |
| thread settings | library defaults |
| GPU requested | False |
| GPU device | |
| case options | {} |
| not run |
Timings
| stage | Spinach / s | spynach / s | spynach / Spinach |
|---|---|---|---|
| create | 1.27 | 0.00 | 0.00x |
| basis | 2.01 | 0.01 | 0.01x |
| hamiltonian | 0.51 | 0.05 | 0.09x |
| operators | 0.76 | 0.03 | 0.04x |
| pulse | 0.32 | 0.05 | 0.17x |
| acquisition | 46.68 | 42.19 | 0.90x |
| processing | 0.03 | 0.00 | 0.01x |
| plot | 0.09 | 0.04 | 0.40x |
| total (wall clock) | 51.83 | 42.39 | 0.82x |
Data
| variable | Spinach shape | spynach shape | relative error | max |difference| | |
|---|---|---|---|---|---|
| coil_x | (16384, 1) | (16384,) | 0.000e+00 | 0.000e+00 | compared after squeezing singleton dimensions |
| coil_z | (16384, 1) | (16384,) | 0.000e+00 | 0.000e+00 | compared after squeezing singleton dimensions |
| fid | (16384, 1) | (16384,) | 1.521e-12 | 1.446e-17 | compared after squeezing singleton dimensions |
| rho0 | (16384, 1) | (16384,) | 0.000e+00 | 0.000e+00 | compared after squeezing singleton dimensions |
| rho_pulse | (16384, 1) | (16384,) | 2.419e-22 | 5.295e-23 | compared after squeezing singleton dimensions |
| spectrum | (16384, 1) | (16384,) | 8.075e-11 | 2.039e-14 | compared after squeezing singleton dimensions |
relative error = ||spynach - Spinach||F / ||Spinach||F, the metric of the oracle tests.
Figures
spinach: spectrum
Profiles
spinach
by self time
| function | calls | self / s | total / s |
|---|---|---|---|
| evolution>(parfor body) | 8 | 43.28 | 46.62 |
| propagator | 1 | 3.15 | 3.34 |
| ParforEngine>ParforEngine.getCompleteIntervals | 153 | 2.58 | 2.69 |
| existentials | 1 | 0.80 | 0.80 |
| clean_up | 19 | 0.19 | 0.19 |
| create | 1 | 0.16 | 1.26 |
| ParforEngine>ParforEngine.addInterval | 213 | 0.10 | 0.19 |
| run_comparison | 1 | 0.09 | 51.84 |
| ParforEngine>ParforEngine.buildParforController | 58 | 0.08 | 0.10 |
| table.saveobj | 200 | 0.07 | 0.09 |
| zulf_pf6_1d_spinach | 1 | 0.07 | 51.75 |
| dlmread | 1 | 0.05 | 0.07 |
| scomponents | 2 | 0.05 | 0.08 |
| report | 385 | 0.05 | 0.06 |
| operator | 49 | 0.05 | 0.74 |
| parallel_function>distributed_execution | 58 | 0.05 | 3.13 |
| hamiltonian | 1 | 0.03 | 0.50 |
| sparse2csr | 2 | 0.03 | 0.03 |
| tabular.parenReference | 26 | 0.03 | 0.05 |
| AbstractDataQueue>AbstractDataQueue.get.QueueLength | 9 | 0.02 | 0.02 |
| ParforEngine>ParforEngine.ParforEngine | 58 | 0.02 | 0.13 |
| apodisation | 1 | 0.02 | 0.03 |
| parallel_function | 59 | 0.02 | 49.99 |
| num2str | 512 | 0.02 | 0.04 |
| ParforEngine>ParforEngine.allIntervalsAdded | 58 | 0.02 | 0.02 |
by total time (with callees)
| function | calls | self / s | total / s |
|---|---|---|---|
| run | 1 | 0.00 | 51.84 |
| run_comparison | 1 | 0.09 | 51.84 |
| zulf_pf6_1d_spinach | 1 | 0.07 | 51.75 |
| parallel_function | 59 | 0.02 | 49.99 |
| evolution | 2 | 0.01 | 47.00 |
| evolution>(parfor body) | 8 | 43.28 | 46.62 |
| propagator | 1 | 3.15 | 3.34 |
| parallel_function>distributed_execution | 58 | 0.05 | 3.13 |
| ParforEngine>ParforEngine.getCompleteIntervals | 153 | 2.58 | 2.69 |
| basis | 1 | 0.01 | 2.01 |
| unihash | 1 | 0.00 | 1.95 |
| create | 1 | 0.16 | 1.26 |
| existentials | 1 | 0.80 | 0.80 |
| operator | 49 | 0.05 | 0.74 |
| hamiltonian | 1 | 0.03 | 0.50 |
| state | 21 | 0.00 | 0.39 |
| reduce | 2 | 0.00 | 0.22 |
| ParforEngine>ParforEngine.addInterval | 213 | 0.10 | 0.19 |
| clean_up | 19 | 0.19 | 0.19 |
| path_trace | 2 | 0.01 | 0.18 |
| parallel_function>@(initData,F)createEngine(M,initData,F,N) | 58 | 0.00 | 0.14 |
| PoolOptions>PoolOptions.createEngine | 58 | 0.00 | 0.14 |
| ClusterPoolEngine>ClusterPoolEngine.createParforEngine | 58 | 0.00 | 0.14 |
| ParforEngine>ParforEngine.ParforEngine | 58 | 0.02 | 0.13 |
| VariableBuffer>@(varargin)obj.supply(varargin{:}) | 214 | 0.00 | 0.11 |
spynach
by self time
| function | calls | self / s | total / s |
|---|---|---|---|
| matmul (utilities.py:72) | 16413 | 37.90 | 37.93 |
| matmul_clean (utilities.py:62) | 12 | 3.21 | 3.84 |
| <built-in method numpy._core._multiarray_umath.count_nonzero> | 40 | 0.36 | 0.36 |
| <built-in method scipy.sparse._sparsetools.csr_matvecs> | 4 | 0.23 | 0.23 |
| _detect (propagation.py:447) | 16384 | 0.07 | 0.14 |
| <built-in method numpy.array> | 1096 | 0.06 | 0.06 |
| <method 'nonzero' of 'numpy.ndarray' objects> | 916 | 0.06 | 0.06 |
| <method 'conj' of 'numpy.ndarray' objects> | 16384 | 0.06 | 0.06 |
| _add (propagation.py:452) | 9 | 0.04 | 0.06 |
| _evolve_observable (propagation.py:379) | 1 | 0.04 | 42.18 |
| taylor_term (kernels.py:315) | 148 | 0.03 | 0.03 |
| round_array (kernels.py:231) | 24 | 0.03 | 0.10 |
| <built-in method scipy.sparse._sparsetools.csr_todense> | 26 | 0.02 | 0.02 |
| <built-in method scipy.sparse._sparsetools.csr_sort_indices> | 4 | 0.02 | 0.02 |
| _superop_side_build (operators.py:290) | 99 | 0.02 | 0.04 |
| <method 'searchsorted' of 'numpy.ndarray' objects> | 672 | 0.01 | 0.01 |
| <built-in method scipy.sparse._sparsetools.csr_matmat> | 15 | 0.01 | 0.01 |
| <built-in method builtins.isinstance> | 38479 | 0.01 | 0.02 |
| <method 'sort' of 'numpy.ndarray' objects> | 2 | 0.01 | 0.01 |
| <built-in method _abc._abc_instancecheck> | 17673 | 0.01 | 0.01 |
| <built-in method numpy.zeros> | 1062 | 0.01 | 0.01 |
| <method 'reshape' of 'numpy.ndarray' objects> | 16633 | 0.01 | 0.01 |
| <built-in method scipy.sparse._sparsetools.csr_plus_csr> | 27 | 0.01 | 0.01 |
| <lambda> (kernels.py:278) | 48 | 0.01 | 0.00 |
| matlab_round (kernels.py:63) | 45 | 0.01 | 0.01 |
by total time (with callees)
| function | calls | self / s | total / s |
|---|---|---|---|
| run (zulf_pf6_1d_spynach.py:14) | 1 | 0.00 | 42.39 |
| simulate (zulf_pf6_1d.py:73) | 1 | 0.00 | 42.35 |
| evolution (propagation.py:245) | 2 | 0.00 | 42.25 |
| _evolve_observable (propagation.py:379) | 1 | 0.04 | 42.18 |
| matmul (utilities.py:72) | 16413 | 37.90 | 37.93 |
| propagator (propagation.py:25) | 2 | 0.00 | 4.08 |
| matmul_clean (utilities.py:62) | 12 | 3.21 | 3.84 |
| clean_up (utilities.py:25) | 17 | 0.00 | 0.41 |
| count_nonzero (numeric.py:483) | 41 | 0.00 | 0.36 |
| <built-in method numpy._core._multiarray_umath.count_nonzero> | 40 | 0.36 | 0.36 |
| _choose_storage (utilities.py:50) | 18 | 0.00 | 0.33 |
| _matmul_dispatch (_base.py:875) | 62 | 0.00 | 0.26 |
| __matmul__ (_base.py:1006) | 57 | 0.00 | 0.26 |
| nnz (utilities.py:20) | 28 | 0.00 | 0.25 |
| _matmul_multivector (_compressed.py:399) | 4 | 0.00 | 0.24 |
| <built-in method scipy.sparse._sparsetools.csr_matvecs> | 4 | 0.23 | 0.23 |
| _detect (propagation.py:447) | 16384 | 0.07 | 0.14 |
| nnz (backend.py:73) | 10 | 0.00 | 0.12 |
| round_array (backend.py:77) | 24 | 0.00 | 0.10 |
| round_array (kernels.py:231) | 24 | 0.03 | 0.10 |
| __init__ (_compressed.py:30) | 361 | 0.00 | 0.08 |
| <built-in method numpy.array> | 1096 | 0.06 | 0.06 |
| <method 'nonzero' of 'numpy.ndarray' objects> | 916 | 0.06 | 0.06 |
| <method 'conj' of 'numpy.ndarray' objects> | 16384 | 0.06 | 0.06 |
| __init__ (_coo.py:32) | 56 | 0.00 | 0.06 |
Console logs
- spinach: console.log
- spynach: console.log