Skip to content

Kappa eta fix#46

Merged
dihm merged 3 commits into
mainfrom
kappa_eta_fix
Jan 13, 2026
Merged

Kappa eta fix#46
dihm merged 3 commits into
mainfrom
kappa_eta_fix

Conversation

@dihm
Copy link
Copy Markdown
Contributor

@dihm dihm commented Nov 19, 2025

This fix ensures Cell.kappa and Cell.eta use a dipole-allowed edge of the coupling to introspect q

Fixes #45

@dihm dihm added the bug Something isn't working label Nov 19, 2025
@dihm
Copy link
Copy Markdown
Contributor Author

dihm commented Nov 19, 2025

@benjamin-n-miller This could really use your eyes. I'm having a hard time believing the way I implemented this is really the best way.

@Json-To-String
Copy link
Copy Markdown
Contributor

It seems like you were right that the logic also existed in the coupling coefficient matrix:

#integer values of each state that is in the upper and lower manifolds
states1 = sensor_utils.match_states(coupling[0], list(self.couplings.nodes))
states2 = sensor_utils.match_states(coupling[1], list(self.couplings.nodes))
# have to rebuild graph only with edges we want
# because networkx defaults to 1, not zero
# on adjacency creation
ag: nx.DiGraph = nx.DiGraph()
ag.add_nodes_from(self.couplings.nodes)
sg = self.couplings.subgraph(states1+states2)
se = tuple(edge
for edge in sg.edges(data='coherent_cc')
if edge[2] is not None)
ag.add_weighted_edges_from(se)
coupling_adjacency_matrix = nx.to_numpy_array(ag).T.conj()
return coupling_adjacency_matrix

with some slight differences

@dihm dihm merged commit 9834218 into main Jan 13, 2026
5 checks passed
@dihm dihm deleted the kappa_eta_fix branch January 13, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with Non-Dipole Allowed First Coupling

2 participants