Skip to content

Preserve mode identities and full-model Lamb shifts in EPR reports - #95

Open
davrens101 wants to merge 1 commit into
sqdlab:mainfrom
davrens101:fix/epr-mode-selection
Open

davrens101 wants to merge 1 commit into
sqdlab:mainfrom
davrens101:fix/epr-mode-selection

Conversation

@davrens101

Copy link
Copy Markdown
Contributor

Selecting modes_to_compare=[3,1] currently labels mode 1 as mode 3 and vice versa: the retained arrays stay in ascending order, but receive requested-order labels. Selecting fewer modes also changes their dressed frequencies because unreported modes are deleted before the Lamb-shift sum.

Calculate the Hamiltonian quantities from all simulated modes, then select the requested rows and matrix columns from the output DataFrames. Both entry-point docstrings now describe the one-based reporting selection and full-mode Lamb shifts. Public signatures and return keys are unchanged.

Actual three-mode/two-junction CSV reproduction:

  • Before: mode_3 reports 4 GHz and mode_1 reports 8 GHz for selection [3,1].
  • After: they correctly report 8 GHz and 4 GHz. Dressed frequencies are 7.950556875742865 and 3.905084128575915 GHz, matching the full-model results.
  • All 15 ordered nonempty selections match the corresponding full-result rows/columns across all six returned tables. The full Lamb shifts also agree with an independently evaluated EPR half-sum equation. Invalid mode zero is rejected.

Verified with actual imports and temporary CSV/config files, without mocks or an external solver. No permanent tests added, per contributor preference. Independent read-only AI review found no blocker. CPU-only; no full-suite or external EM-solver validation claimed.

Review and assistance

Human review: davrens101 confirmed reviewing the work live before submission. AI assistance was used for investigation, implementation and verification. No maintainer review or approval is claimed. Verification was CPU-only; no GPU validation is claimed.

@davrens101

davrens101 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

I cherry-picked all seven SQDMetal fixes (#91-97) onto their shared upstream base and they apply cleanly together. The existing focused tests give 14 passed, 21 subtests passed (19 source/dependency/SciPy warnings, not suppressed). I also ran the 15 ordered three-mode EPR selections, 18 single-qubit capacitance configurations, three two-qubit input forms, single- and multi-port linewidths, and absent optional files directly, and they all work. No new permanent tests for #95-97, and I did not run the full suite or an external EM solver.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant