Problem Statement
The architecture describes a LivePropagationPlayer that consumes trace frames for deterministic gate-by-gate playback. The current Studio UI has a Photon Live toggle and visual overlays, and runAction loads trace output, but there is no playback controller that lets users pause, seek, scrub, change speed, inspect frame metrics, or replay the exact trace as evidence.
Proposed Solution
Add a trace playback subsystem:
- parse and store trace frames from
schrosim-cli trace,
- playback controls: play, pause, seek, step, speed,
- frame inspector: gate index, gate type, measurement count, mean photon number, backend, and dropped frame count,
- deterministic replay checksum,
- bounded-memory handling for large traces,
- audit entries for playback actions.
Acceptance Criteria
- A completed run exposes an interactive frame timeline.
- Same seed and same foundry profile hash reproduce the same frame sequence.
- Playback state does not mutate the circuit design.
- Tests cover trace parsing, frame ordering, and checksum stability.
- The trace SLO script remains the CLI-side performance guard.
Validation
bash scripts/trace-slo-check.sh --max-gates 512 --max-frame-ms 50
bash scripts/swift-test.sh
Evidence
studio/docs/SWIFTUI_STUDIO_UI_ARCHITECTURE.md
core-swift/Sources/schrosim-studio/StudioStore.swift
core-swift/Sources/schrosim-studio/StudioViews.swift
scripts/trace-slo-check.sh
Problem Statement
The architecture describes a
LivePropagationPlayerthat consumes trace frames for deterministic gate-by-gate playback. The current Studio UI has aPhoton Livetoggle and visual overlays, andrunActionloads trace output, but there is no playback controller that lets users pause, seek, scrub, change speed, inspect frame metrics, or replay the exact trace as evidence.Proposed Solution
Add a trace playback subsystem:
schrosim-cli trace,Acceptance Criteria
Validation
Evidence
studio/docs/SWIFTUI_STUDIO_UI_ARCHITECTURE.mdcore-swift/Sources/schrosim-studio/StudioStore.swiftcore-swift/Sources/schrosim-studio/StudioViews.swiftscripts/trace-slo-check.sh