Summary
Add a reusable factory that builds the open cavity–emitter (Tavis–Cummings–like) problem used in README Example 2 / the Sims et al. workflow, so users can swap parameters without copying operator soup.
Motivation
The README and examples/simple_algo_benchmark.py hard-code ω_c, ω_e, κ, γ, g, Fock truncation, Lindblad ops, local vs full embeddings, and measurement helpers. That duplication makes it hard to:
- change coupling / decay / truncation for a paper figure
- keep Example 2 and docs in sync
- write short benchmarks or tests against a known physical model
Proposed API
from shadowsim.models import tavis_cummings
model = tavis_cummings(
omega_c=245000,
omega_e=245000,
kappa=..., # or decay rates as used today
gamma=...,
g=100,
cavity_levels=4, # truncation → two-qubit Fock encoding or explicit dim
# optional: initial_fock=2, etc.
)
# Suggested fields (names flexible):
model.full_hamiltonians # list[Hamiltonian] for QuTiP path
model.local_hamiltonians # list[LocalHamiltonian] for Split-J path
model.c_ops_full # list[Operator]
model.c_ops_local # list[LocalOperator]
model.psi0 # State
model.e_ops # observables for QuTiP
model.measurement_groups # for Split-J, if applicable
model.reducers # cavity_population, population_one, etc.
Summary
Add a reusable factory that builds the open cavity–emitter (Tavis–Cummings–like) problem used in README Example 2 / the Sims et al. workflow, so users can swap parameters without copying operator soup.
Motivation
The README and
examples/simple_algo_benchmark.pyhard-code ω_c, ω_e, κ, γ, g, Fock truncation, Lindblad ops, local vs full embeddings, and measurement helpers. That duplication makes it hard to:Proposed API