% post-process results from an add run like: ./add -pSSSb > jj ; octave jj format short g r echo on QQ = Q(1:r,:); SS = diag(S,r,r); VV=V(1:r,:); norm(A-QQ'*SS*VV) SS-QQ*A*VV' % "swap without connecting gates" from arXiv 1905.01353 produces A' norm(A'-VV'*(QQ*A*VV')'*QQ) echo off