Skip to content

Support energy-parameter entry for capacitance and inductance values #99

Description

@joanjcaceres

Context

Users often think in terms of charging and inductive energies (E_C, E_L) instead of capacitance and inductance values (C, L). cQEDraw currently asks for capacitance, linear inductance, and Josephson inductance directly, then generates C and L_inv matrix expressions.

Scope To Design

  • Let users enter either physical component values (C, L, LJ) or equivalent energy values (E_C, E_L, E_J) where appropriate.
  • Define the exact conversion conventions and units before implementation.
  • Preserve the generated C_matrix, L_inv_matrix, and Josephson metadata contracts.
  • Make it clear in the UI which representation is active for each component.
  • Avoid silently mixing incompatible units or conventions.

Questions

  • Should energy inputs be accepted only as numeric values, or also symbolic expressions?
  • Which units should be used in the web UI by default: SI joules, Hz/GHz energies, or angular-frequency units?
  • Should E_J be an alternative to LJ for Josephson branches in the saved project schema?
  • How should copied Python snippets expose the original user-entered representation?
  • Should this be implemented in cQEDraw only, or aligned with sccircuits APIs first?

Acceptance Criteria

  • A documented conversion convention exists for C <-> E_C, L <-> E_L, and LJ <-> E_J.
  • The project schema can round-trip whichever representation the user entered.
  • Generated matrix expressions remain unambiguous and backwards-compatible.
  • Web UI makes the active representation obvious per component.
  • Tests cover numeric and symbolic inputs, save/load, copy/paste, generated matrices, and analysis.

Notes

This should be a separate feature PR from the current plot-readability work because it changes input semantics and saved project data, not just chart presentation.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions