Skip to content

Add Circuit factory from BBQ modal results #55

Description

@joanjcaceres

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions