Spinach vs Spynach: zulf_pf6_1d (CPU)

run zulf_pf6_1d, both sides present. Built by comparison/report.py; protocol in comparison/README.md.

Provenance

spinach

run date (UTC)2026-10-14T17:39:14Z
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-14T12:34:58Z
Spynach version097b823-dirty
commit097b823313459abb57a2c727c52abfcfe013a4cf
local modificationsTrue
Python3.12.5
NumPy2.5.4
SciPy1.18.1
hostMacBook-Pro-8.local
platformmacOS-26.6.2-arm64-arm-64bit
cores12
BLAS{"numpy": "accelerate", "scipy": "Accelerate"}
thread settingslibrary defaults
GPU requestedFalse
GPU device
case options{}
not run

Timings

stageSpinach / sSpynach / sSpynach / Spinach
create1.270.000.00x
basis2.010.010.01x
hamiltonian0.510.060.11x
operators0.760.040.05x
pulse0.320.070.21x
acquisition46.6846.871.00x
processing0.030.000.02x
plot0.090.050.49x
total (wall clock)51.8347.110.91x

Data

variableSpinach shapeSpynach shaperelative errormax |difference|
coil_x(16384, 1)(16384,)0.000e+000.000e+00compared after squeezing singleton dimensions
coil_z(16384, 1)(16384,)0.000e+000.000e+00compared after squeezing singleton dimensions
fid(16384, 1)(16384,)1.521e-121.446e-17compared after squeezing singleton dimensions
rho0(16384, 1)(16384,)0.000e+000.000e+00compared after squeezing singleton dimensions
rho_pulse(16384, 1)(16384,)2.419e-225.295e-23compared after squeezing singleton dimensions
spectrum(16384, 1)(16384,)8.075e-112.039e-14compared after squeezing singleton dimensions

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

Figures

spinach: spectrum

figure_spectrum.png

Spynach: spectrum

figure_spectrum.png

interactive figure

Profiles

spinach

by self time

functioncallsself / stotal / s
evolution>(parfor body)843.2846.62
propagator13.153.34
ParforEngine>ParforEngine.getCompleteIntervals1532.582.69
existentials10.800.80
clean_up190.190.19
create10.161.26
ParforEngine>ParforEngine.addInterval2130.100.19
run_comparison10.0951.84
ParforEngine>ParforEngine.buildParforController580.080.10
table.saveobj2000.070.09
zulf_pf6_1d_spinach10.0751.75
dlmread10.050.07
scomponents20.050.08
report3850.050.06
operator490.050.74
parallel_function>distributed_execution580.053.13
hamiltonian10.030.50
sparse2csr20.030.03
tabular.parenReference260.030.05
AbstractDataQueue>AbstractDataQueue.get.QueueLength90.020.02
ParforEngine>ParforEngine.ParforEngine580.020.13
apodisation10.020.03
parallel_function590.0249.99
num2str5120.020.04
ParforEngine>ParforEngine.allIntervalsAdded580.020.02

by total time (with callees)

functioncallsself / stotal / s
run10.0051.84
run_comparison10.0951.84
zulf_pf6_1d_spinach10.0751.75
parallel_function590.0249.99
evolution20.0147.00
evolution>(parfor body)843.2846.62
propagator13.153.34
parallel_function>distributed_execution580.053.13
ParforEngine>ParforEngine.getCompleteIntervals1532.582.69
basis10.012.01
unihash10.001.95
create10.161.26
existentials10.800.80
operator490.050.74
hamiltonian10.030.50
state210.000.39
reduce20.000.22
ParforEngine>ParforEngine.addInterval2130.100.19
clean_up190.190.19
path_trace20.010.18
parallel_function>@(initData,F)createEngine(M,initData,F,N)580.000.14
PoolOptions>PoolOptions.createEngine580.000.14
ClusterPoolEngine>ClusterPoolEngine.createParforEngine580.000.14
ParforEngine>ParforEngine.ParforEngine580.020.13
VariableBuffer>@(varargin)obj.supply(varargin{:})2140.000.11

Spynach

by self time

functioncallsself / stotal / s
evolution (propagation.py:208)240.9746.94
propagator (propagation.py:25)23.655.76
matlab_round (utilities.py:20)751.041.04
<built-in method numpy._core._multiarray_umath.count_nonzero>400.420.42
<built-in method scipy.sparse._sparsetools.csr_matvecs>40.260.26
<built-in method scipy.sparse._sparsetools.csr_sort_indices>50.080.08
clean_up (utilities.py:27)180.081.57
_detect (propagation.py:355)163840.070.13
<method 'nonzero' of 'numpy.ndarray' objects>9160.060.06
_add (propagation.py:381)90.060.09
<method 'conj' of 'numpy.ndarray' objects>163840.060.06
<built-in method scipy.sparse._sparsetools.csr_todense>260.040.04
<built-in method scipy.sparse._sparsetools.csr_matmat>160.040.04
<built-in method scipy.sparse._sparsetools.csr_matvec>1520.030.03
_superop_side_build (operators.py:280)990.020.05
<built-in method scipy.sparse._sparsetools.csr_matmat_maxnnz>180.020.02
<method 'searchsorted' of 'numpy.ndarray' objects>6720.010.01
_reordered_taylor (propagation.py:122)50.010.05
<method 'sort' of 'numpy.ndarray' objects>20.010.01
<built-in method numpy.zeros>12060.010.01
<built-in method scipy.sparse._sparsetools.csr_plus_csr>270.010.01
load_matlab_csv (zulf_pf6_1d.py:61)10.010.01
<method 'reshape' of 'numpy.ndarray' objects>167160.010.01
<method 'copy' of 'numpy.ndarray' objects>3580.010.01
<built-in method scipy.sparse._sparsetools.csr_eliminate_zeros>120.010.01

by total time (with callees)

functioncallsself / stotal / s
run (zulf_pf6_1d_spynach.py:14)10.0047.11
simulate (zulf_pf6_1d.py:70)10.0047.06
evolution (propagation.py:208)240.9746.94
propagator (propagation.py:25)23.655.76
clean_up (utilities.py:27)180.081.57
matlab_round (utilities.py:20)751.041.04
count_nonzero (numeric.py:483)410.000.42
<built-in method numpy._core._multiarray_umath.count_nonzero>400.420.42
nnz (utilities.py:15)280.000.36
_matmul_dispatch (_base.py:875)2090.000.36
__matmul__ (_base.py:1006)2040.000.36
_matmul_multivector (_compressed.py:399)40.000.26
<built-in method scipy.sparse._sparsetools.csr_matvecs>40.260.26
nnz (backend.py:71)100.000.14
_detect (propagation.py:355)163840.070.13
count_nonzero (_compressed.py:138)260.000.10
sum_duplicates (_compressed.py:1072)950.000.09
_add (propagation.py:381)90.060.09
__init__ (_compressed.py:30)3620.000.09
sort_indices (_compressed.py:1124)330.000.08
<built-in method scipy.sparse._sparsetools.csr_sort_indices>50.080.08
<method 'nonzero' of 'numpy.ndarray' objects>9160.060.06
__init__ (_coo.py:32)560.000.06
_matmul_sparse (_compressed.py:415)180.000.06
<method 'conj' of 'numpy.ndarray' objects>163840.060.06

Console logs