Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bug Report
description: Report a reproducible defect in public SchroSIM components (CLI/core/docs).
description: Report a reproducible defect in public SchroSIM components (CLI/core/docs/Studio UI).
title: "[Bug]: "
labels:
- bug
Expand All @@ -24,6 +24,7 @@ body:
- CLI (schrosim-cli)
- Swift core runtime
- Rust core runtime
- SchroSIM Studio UI
- Configuration/examples
- Documentation
- Other public component
Expand All @@ -34,7 +35,7 @@ body:
attributes:
label: Command / Entry point
description: Include command and backend (if applicable).
placeholder: swift run schrosim-cli run examples/runtime_default_foundry.json --backend hybrid
placeholder: swift run schrosim-cli run docs/examples/runtime_default_foundry.json --backend hybrid
- type: textarea
id: reproduction
attributes:
Expand Down Expand Up @@ -72,5 +73,5 @@ body:
options:
- label: This is not a security vulnerability disclosure.
required: true
- label: This report only references public repo scope (CLI/core/docs), not private enterprise GUI code.
- label: This report only references public repo scope (CLI/core/docs/Studio UI).
required: true
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Security Vulnerability Report
url: https://github.com/DennisWayo/SchroSIM/security
url: https://github.com/Gottesman-Software/SchroSIM/security
about: Report security issues privately per SECURITY.md. Do not post exploit details publicly.
- name: Community Guidelines
url: https://github.com/DennisWayo/SchroSIM/blob/main/CODE_OF_CONDUCT.md
url: https://github.com/Gottesman-Software/SchroSIM/blob/main/CODE_OF_CONDUCT.md
about: Read expected behavior and reporting guidelines.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature Request
description: Propose an enhancement for public SchroSIM components (CLI/core/docs).
description: Propose an enhancement for public SchroSIM components (CLI/core/docs/Studio UI).
title: "[Feature]: "
labels:
- enhancement
Expand Down Expand Up @@ -38,5 +38,5 @@ body:
attributes:
label: Scope Confirmation
options:
- label: This request targets public repo scope (CLI/core/docs) and not private enterprise GUI components.
- label: This request targets public repo scope (CLI/core/docs/Studio UI).
required: true
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Describe the change in 2-5 bullet points.
What problem does this PR solve?

## Scope
Public scope for this repository is CLI/core/docs.
Public scope for this repository is CLI/core/docs/Studio UI.

- [ ] I confirm this PR does not add or modify private enterprise GUI code/assets/workflows.
- [ ] I confirm this PR does not include enterprise-only configuration or internal enterprise paths.
- [ ] I confirm this PR keeps public examples, config, benchmarks, and assets under `docs/`.
- [ ] I confirm this PR does not include credentials, generated exports, build outputs, or private lab data.

## Validation
List commands run and key outputs.
Expand Down
16 changes: 4 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ exports/*.json
docs/SchroSIM_ConceptNote.pdf
last_result.json

/enterprise/*
/enterprise/README.md

/Sources/schrosim-gui/
/core-rust/schrosim-gui/
/core-swift/Sources/schrosim-enterprise-ui/
/core-swift/Tests/EnterpriseUITests/
/core-swift/Sources/schrosim-cli/trace_enterprise.swift
/config/profiles/enterprise-default-v1.json
/docs/ui-mockups/*enterprise*
!/docs/ui-mockups/schrosim-enterprise-preview.gif
/.github/workflows/*enterprise*.yml
# SchroSIM Studio generated/local artifacts
/studio/docs/
/studio/.github/
/studio/exports/
26 changes: 13 additions & 13 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import Foundation
import PackageDescription

let enterpriseUISourcePath = "enterprise/core-swift/Sources/schrosim-enterprise-ui"
let enterpriseUITestsPath = "enterprise/core-swift/Tests/EnterpriseUITests"
let hasEnterpriseUI = FileManager.default.fileExists(atPath: enterpriseUISourcePath)
let studioUISourcePath = "core-swift/Sources/schrosim-studio"
let studioUITestsPath = "core-swift/Tests/SchroSIMStudioTests"
let hasStudioUI = FileManager.default.fileExists(atPath: studioUISourcePath)

var products: [Product] = [
.library(
Expand All @@ -17,11 +17,11 @@ var products: [Product] = [
),
]

if hasEnterpriseUI {
if hasStudioUI {
products.append(
.executable(
name: "schrosim-enterprise-ui",
targets: ["schrosim-enterprise-ui"]
name: "schrosim-studio",
targets: ["schrosim-studio"]
)
)
}
Expand Down Expand Up @@ -54,21 +54,21 @@ var targets: [Target] = [
),
]

if hasEnterpriseUI {
if hasStudioUI {
targets.append(
.executableTarget(
name: "schrosim-enterprise-ui",
name: "schrosim-studio",
dependencies: ["SchroSIM"],
path: enterpriseUISourcePath
path: studioUISourcePath
)
)

if FileManager.default.fileExists(atPath: enterpriseUITestsPath) {
if FileManager.default.fileExists(atPath: studioUITestsPath) {
targets.append(
.testTarget(
name: "EnterpriseUITests",
dependencies: ["schrosim-enterprise-ui"],
path: enterpriseUITestsPath
name: "SchroSIMStudioTests",
dependencies: ["schrosim-studio"],
path: studioUITestsPath
)
)
}
Expand Down
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="assets/schrosim-logo.png" alt="SchroSIM - Simulating Quantum Light" width="100%" />
<img src="docs/assets/schrosim-logo.png" alt="SchroSIM - Simulating Quantum Light" width="100%" />
</p>

<p align="center">
Expand All @@ -11,8 +11,8 @@
<img src="https://img.shields.io/badge/Metal-GPU-black?logo=apple&logoColor=white" />
<img src="https://img.shields.io/badge/License-MIT-black" />
<!-- Project Signals -->
<a href="https://github.com/DennisWayo/SchroSIM/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/DennisWayo/SchroSIM/ci.yml?branch=master&label=CI&logo=githubactions&logoColor=white&labelColor=black&color=black" alt="CI" /></a>
<a href="https://github.com/DennisWayo/SchroSIM/actions/workflows/docs-pages.yml"><img src="https://img.shields.io/github/actions/workflow/status/DennisWayo/SchroSIM/docs-pages.yml?branch=master&label=Docs&logo=readthedocs&logoColor=white&labelColor=black&color=black" alt="Docs" /></a>
<a href="https://github.com/Gottesman-Software/SchroSIM/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Gottesman-Software/SchroSIM/ci.yml?branch=master&label=CI&logo=githubactions&logoColor=white&labelColor=black&color=black" alt="CI" /></a>
<a href="https://github.com/Gottesman-Software/SchroSIM/actions/workflows/docs-pages.yml"><img src="https://img.shields.io/github/actions/workflow/status/Gottesman-Software/SchroSIM/docs-pages.yml?branch=master&label=Docs&logo=readthedocs&logoColor=white&labelColor=black&color=black" alt="Docs" /></a>
<a href="https://pypi.org/project/schrosim/"><img src="https://img.shields.io/pypi/v/schrosim?label=Release&logo=pypi&logoColor=white&labelColor=black&color=black" alt="Release" /></a>
</p>

Expand All @@ -22,20 +22,19 @@ SchroSIM is a continuous-variable (CV) photonic quantum simulation stack for des
Built for students, researchers, and quantum foundry engineers, SchroSIM provides an exact-solution simulation path for tractable circuits and scalable backend options for larger workflows.

> Documentation:
Full project documentation is in [SchroSIM Docs](https://denniswayo.github.io/SchroSIM/).
Full project documentation is in [SchroSIM Docs](https://gottesman-software.github.io/SchroSIM/).

> "SchroSIM core (compiler, runtime, SDK/CLI, docs, and public examples) is open source under MIT for research, education, and downstream studies.
Enterprise-only capabilities (advanced UI, partner-specific integrations, and commercialization-focused IP) are developed in enterprise mode and are intended to live in a separate private distribution path.
This boundary keeps reproducible scientific workflows public while allowing confidential enterprise delivery for hardware and industrial partners."
> "SchroSIM core, Studio UI, SDK/CLI, docs, and public examples are open source under MIT for research, education, and downstream studies.
The public boundary is reproducible scientific software: design photonic circuit studies, compile them into backend-aware runtime configuration, inspect validation evidence, and replay results from source-controlled artifacts."

![SchroSIM Enterprise UI Preview](docs/ui-mockups/schrosim-enterprise-preview.gif)
![SchroSIM Studio UI Preview](docs/ui-mockups/schrosim-studio-preview.gif)

The enterprise UI is focused on:
SchroSIM Studio is focused on:
1. project-scoped circuit workflows,
2. backend-aware execution policies,
3. analysis views for simulation and QEC outcomes.

Status: enterprise-track active development.
Status: open-source studio active development.

### The Need
Photonic and CV workflows need fast iteration across modeling, backend selection, and error-correction validation. In practice, teams often lose time moving between disconnected tools for design, compilation, execution, and debugging.
Expand All @@ -61,7 +60,7 @@ Use this rule of thumb:
2. use scalable/hybrid/Fock policy-targeted paths as controlled approximations for larger experiments and pre-hardware iteration.

### Design-to-Result Workflow
1. define a circuit in project JSON (public workflow) or design it in the enterprise UI (private track),
1. define a circuit in project JSON or design it in SchroSIM Studio,
2. compile to backend-aware intermediate/runtime configuration,
3. run static checks for operation support and constraint compatibility,
4. execute simulation on selected path (model-exact Gaussian or controlled approximation backend path),
Expand Down Expand Up @@ -116,15 +115,20 @@ swift run schrosim-cli --help

Python 3 is required for helper scripts and packaging workflows.

Run the open-source Studio UI:
```bash
swift run schrosim-studio
```

### CLI: Run Demos
Run Boson Sampling:
```bash
schrosim run examples/runtime_default_foundry.json --backend hybrid
schrosim run docs/examples/runtime_default_foundry.json --backend hybrid
```

Run Quantum Error Correction:
```bash
schrosim run examples/cv/qec_single_logical_gkp_memory_mvp.json --backend hybrid
schrosim run docs/examples/cv/qec_single_logical_gkp_memory_mvp.json --backend hybrid
```

### Optional: Run from CLion
Expand All @@ -133,7 +137,7 @@ CLion is recommended for contributor workflows (debugging, stepping through code
### Ecosystem Comparison (High-Level)
| Framework | Primary focus | Photonic scope | Execution path | Typical fit |
|---|---|---|---|---|
| [SchroSIM](https://denniswayo.github.io/SchroSIM/) | CV photonic circuit simulation with backend-aware compilation, runtime diagnostics, and QEC-oriented workflows | Gaussian + selected non-Gaussian workflows (JSON/CLI flow) | Local classical simulation (`gaussian`, `fock`, `hybrid`; CPU/Metal where available) | Reproducible research workflows, QEC scenario studies, validation pipelines, and hardware-like prechecks |
| [SchroSIM](https://gottesman-software.github.io/SchroSIM/) | CV photonic circuit simulation with backend-aware compilation, runtime diagnostics, and QEC-oriented workflows | Gaussian + selected non-Gaussian workflows (JSON/CLI flow) | Local classical simulation (`gaussian`, `fock`, `hybrid`; CPU/Metal where available) | Reproducible research workflows, QEC scenario studies, validation pipelines, and hardware-like prechecks |
| [Strawberry Fields](https://strawberryfields.ai/photonics/) | Full-stack Python framework for photonic quantum computing | Continuous-variable photonics, Gaussian/Fock-style workflows | Local simulators + remote execution on Xanadu photonic hardware/cloud | CV algorithm research and cloud photonic experiments |
| [Perceval](https://perceval.quandela.net/docs/v1.1/) | Linear optics quantum framework | Discrete-variable / linear-optics photonic circuits | Local simulation + remote execution on simulator/QPU platforms | Linear-optics experiment design, sampling, and cloud QPU workflows |
| [PennyLane](https://docs.pennylane.ai/) | Differentiable quantum programming and quantum ML framework | Photonics via plugins (not photonic-only core) | Local simulators + hardware integrations via devices/plugins | Hybrid quantum-classical ML workflows, gradient-based circuit research, and QEC prototyping/education workflows |
Expand Down
16 changes: 5 additions & 11 deletions core-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,23 @@ This folder contains Rust crates for SchroSIM.

Current crate:

- `schrosim-gui` — egui desktop app that invokes the Swift CLI
- `schrosim-core` — Rust CLI runtime (`run`, `trace`) used by SwiftUI runtime-engine selection
- `schrosim-core` — Rust CLI runtime (`run`, `trace`, `bench`, `parity`) used for runtime parity checks and benchmark workflows
- `schrosim-core` now includes:
- Gaussian simulation kernels (phase/squeeze/beam-splitter/displace/loss/thermal/measurement)
- Measurement-driven feedback displacement (`feedback_displace`) for syndrome-based correction loops
- GKP nearest-lattice decode correction gate (`gkp_decode_displace`) with per-round QEC logs and summary metrics (`logical_error_rate`, `suppression_factor`, `break_even_gain`)
- Fock single-mode path (`phase`, `displace`, `inject_fock`, `inject_cat`)
- Foundry compile step parity (validation + optional injected mode-loss)
- `parity` command to compare Rust output against `schrosim-cli`
- GUI default backend is `hybrid` (recommended enterprise routing policy)
- Compiler/contraction recommendation is sourced from CLI policy:
- compiler: `foundry-aware-ir-v1`
- contraction policy: `hybrid_auto`
- GUI includes trace-driven live playback:
- `Load trace` calls `schrosim-cli trace ...`
- `Play/Pause/Stop` animates per-gate propagation frames continuously

Build/test from repo root with:

```bash
cargo test -p schrosim-gui
cargo run -p schrosim-gui
cargo run -p schrosim-core -- run exports/swiftui_runtime_input.json --backend hybrid
cargo run -p schrosim-core -- trace exports/swiftui_runtime_input.json --backend hybrid --trace-role editor
cargo run -p schrosim-core -- parity exports/swiftui_runtime_input.json --backend hybrid --trace-role editor
cargo test -p schrosim-core
cargo run -p schrosim-core -- run docs/examples/foundry_loss_map.json --backend hybrid
cargo run -p schrosim-core -- trace docs/examples/foundry_loss_map.json --backend hybrid --trace-role editor
cargo run -p schrosim-core -- parity docs/examples/foundry_loss_map.json --backend hybrid --trace-role editor
```
10 changes: 5 additions & 5 deletions core-rust/schrosim-core/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,25 @@ struct BenchCaseDefinition {
const BENCHMARK_CORE_CASES: [BenchCaseDefinition; 5] = [
BenchCaseDefinition {
name: "basic_loss_gaussian",
input: BenchInputSource::File("examples/basic_loss.json"),
input: BenchInputSource::File("docs/examples/basic_loss.json"),
requested_backend: "gaussian",
expected_backend: "gaussian",
},
BenchCaseDefinition {
name: "seeded_homodyne_gaussian",
input: BenchInputSource::File("examples/seeded_homodyne.json"),
input: BenchInputSource::File("docs/examples/seeded_homodyne.json"),
requested_backend: "gaussian",
expected_backend: "gaussian",
},
BenchCaseDefinition {
name: "fock_injection_fock",
input: BenchInputSource::File("examples/fock_injection_smoke.json"),
input: BenchInputSource::File("docs/examples/fock_injection_smoke.json"),
requested_backend: "fock",
expected_backend: "fock",
},
BenchCaseDefinition {
name: "fock_injection_hybrid",
input: BenchInputSource::File("examples/fock_injection_smoke.json"),
input: BenchInputSource::File("docs/examples/fock_injection_smoke.json"),
requested_backend: "hybrid",
expected_backend: "fock",
},
Expand Down Expand Up @@ -2945,7 +2945,7 @@ fn resolve_foundry_spec(
let registry_path = options
.foundry_registry_path
.as_deref()
.unwrap_or("config/foundry_registry.json");
.unwrap_or("docs/config/foundry_registry.json");
let signing_key = resolve_foundry_signing_key(options).ok_or_else(|| {
"Missing foundry signing key. Provide --foundry-key or SCHROSIM_FOUNDRY_HMAC_KEY"
.to_string()
Expand Down
2 changes: 1 addition & 1 deletion core-swift/Sources/schrosim-cli/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ enum SchemaPolicy {
static let maxSupportedVersion = 1
}

let defaultFoundryRegistryPath = "config/foundry_registry.json"
let defaultFoundryRegistryPath = "docs/config/foundry_registry.json"

enum RuntimeRecommendation {
static let compiler = "foundry-aware-ir-v1"
Expand Down
2 changes: 1 addition & 1 deletion core-swift/Sources/schrosim-cli/trace_support.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation

let traceRBACCurrentSchemaVersion = 1
let traceArtifactCurrentSchemaVersion = 1
let defaultTraceRBACPolicyPath = "config/trace_rbac_policy.json"
let defaultTraceRBACPolicyPath = "docs/config/trace_rbac_policy.json"

enum TraceRBACAction: String {
case view
Expand Down
Loading