Summary
Add a Circuit factory that consumes modal quantities from BBQ rather than raw C and L_inv matrices.
Design intent
Circuit should remain the Hamiltonian model. It should receive physical/modal inputs:
- mode frequencies
- phase zero-point fluctuations
- Josephson energy
- dimensions/truncation choices
- optional external phase and second harmonic parameters
It should not own graph parsing, matrix assembly, or the generalized eigenvalue solve.
Requirements
- Add a factory such as
Circuit.from_bbq_result(...).
- For the first PR, support the existing single-JJ Hamiltonian path.
- Accept a selected junction and selected mode subset from a BBQ result.
- Preserve current constructors, especially
Circuit(...), Circuit.from_harmonic_modes(...), and Circuit.from_star_basis(...).
- Store enough modal metadata to recover or print the source frequencies and phase ZPF values.
Tests
- A
Circuit created from a BBQ result matches one built manually from the same frequencies, phase ZPF, and Ej.
- Errors are clear when the BBQ result has multiple junctions and no selected junction is provided.
- Existing
Circuit tests keep passing unchanged.
Follow-up
Full multi-JJ Hamiltonian support belongs in issue #6.
Summary
Add a
Circuitfactory that consumes modal quantities fromBBQrather than rawCandL_invmatrices.Design intent
Circuitshould remain the Hamiltonian model. It should receive physical/modal inputs:It should not own graph parsing, matrix assembly, or the generalized eigenvalue solve.
Requirements
Circuit.from_bbq_result(...).Circuit(...),Circuit.from_harmonic_modes(...), andCircuit.from_star_basis(...).Tests
Circuitcreated from a BBQ result matches one built manually from the same frequencies, phase ZPF, andEj.Circuittests keep passing unchanged.Follow-up
Full multi-JJ Hamiltonian support belongs in issue #6.