You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @flaport,
there seems to be a small oddity in the way dense S-matrices are represented:
The transmission from port 1 to port 2 seems to be S12. This seems to be inconsistent with the matrix expression
and setting $\mathrm{in}_2=0$. We find $\mathrm{out}2=S{21}\mathrm{in}1$. This is why typically the transmission from 1->2 is contained in $S{21}$ (this is also how it is in meow).
Demo
Let's set up an SDict that contains the S matrix indices compatible to the matrix equation above.
Hey @flaport,
there seems to be a small oddity in the way dense S-matrices are represented:
The transmission from port 1 to port 2 seems to be S12. This seems to be inconsistent with the matrix expression
where$\mathbf{E}_\mathrm{in, out}$ are in the basis of the port modes. Writing this for a simple single mode two port:
and setting$\mathrm{in}_2=0$ . We find $\mathrm{out}2=S{21}\mathrm{in}1$. This is why typically the transmission from 1->2 is contained in $S{21}$ (this is also how it is in meow).
Demo
Let's set up an
SDict
that contains the S matrix indices compatible to the matrix equation above.The entry with the key
("1", "2")
represents the transmission from 1->2 according to the sax tutorials.which is not the correct matrix indexing...
As far as I can see
SDense
is not used much within sax. So only minor modifications would be needed to change the convention:The line converting from
SCoo
toSDense
would need to be adjusted:sax/sax/saxtypes.py
Line 405 in aabd9f9
to
Its inverse would also need to be touched:
sax/sax/saxtypes.py
Line 350 in aabd9f9
and in the klu backend:
sax/sax/backends/klu.py
Line 135 in aabd9f9
would need to be adjusted
Conclusions/Questions
It is not clear to me yet, whether this discrepancy between conventions between
meow
andsax
has caused any hidden issues. I'll look into that.Is there a way we can adjust the convention without introducing loads of regressions? Does it make sense to try, or do we leave it as is?
Best JD
The text was updated successfully, but these errors were encountered: