Version History

Silicofeller Quantum Studio records design history per project as commits on branches (Q-VCS). Every save-design that changes the design adds a commit to the default branch, and the Version History panel and the Version Control page read it through these endpoints. They are mounted at /api/projects/{project_id}/vcs and work the same in personal, team and enterprise workspaces. Conventions are on API Reference.

Roles

Access follows your project role, mapped to three history roles:

History role

Who

Can

viewer

Project viewers

Read branches, history, snapshots and diffs.

editor

Project editors

Also commit, branch, restore, tag and name versions.

admin

Project owner, workspace or organization admin, enterprise workspace admin

Also commit and restore on protected branches, create protected branches and change branch protection.

A refused action returns 403 with {"error_code": "insufficient_permissions"} or {"error_code": "protected_branch"} and a message.

Endpoints

All paths are relative to /api/projects/{project_id}/vcs.

Method

Path

Purpose

Roles/plan

GET

/branches

Branches with head commit and commit count, your history role, and the retention policy.

viewer

POST

/branches

Create a branch from a commit or another branch (status 201).

editor; admin for a protected branch

PATCH

/branches/{branch_id}

Set is_protected.

admin

GET

/commits

History of one branch, newest first, paged and filtered.

viewer

POST

/commits

Commit the current design with a message and optional tag (status 201).

editor; admin on a protected branch

GET

/commits/{commit_id}

One commit with its full snapshot and the simulations and verification runs made while it was the latest state. current returns the working design.

viewer

PATCH

/commits/{commit_id}

Name or rename a version. A named version is never pruned.

editor

POST

/commits/{commit_id}/restore

Make that commit’s design the current design, as a new commit.

editor; admin on a protected branch

GET

/diff

Semantic diff between two commits or a commit and current.

viewer

GET

/tags

Tagged commits, newest first, at most 500.

viewer

POST

/tags

Tag a commit (status 201). Tags are immutable.

editor

Wherever a commit is named in a path or query parameter, you can pass its id, its full hash or a hash prefix of at least 7 characters. An ambiguous prefix returns 409 AMBIGUOUS_COMMIT; an unknown commit 404 COMMIT_NOT_FOUND.

Retention

History is pruned once a day by a background job, never during a save. The policy follows the project owner’s plan in the project’s workspace:

Plan

Kept

Free

The newest 15 commits, plus any commit younger than 7 days

Basic

Commits younger than 90 days

Pro, Enterprise

All commits

Named commits, tagged commits and branch heads and bases are never removed. GET /branches returns the policy as retention:

{"plan": "free", "keep_last": 15, "keep_days": 7, "indefinite": false}

List commits

GET /commits query parameters:

Parameter

Default

Meaning

branch

default branch

Branch name or id.

limit

50

Page size, 1 to 200.

offset

0

Number of commits to skip.

filter

all

all; named (named or tagged commits only); no_auto (hide autosaves).

Response (total counts the filtered history):

{
  "branch": {"id": "...", "name": "main", "is_protected": false, "is_default": true},
  "role": "editor",
  "total": 42,
  "limit": 50,
  "offset": 0,
  "filter": "all",
  "commits": [
    {
      "id": "9b1e...",
      "commit_hash": "3f2a91c0d4...",
      "short_hash": "3f2a91c0",
      "message": "Readout resonators placed",
      "tag": null,
      "kind": "manual",
      "name": "Readout resonators placed",
      "restored_from": null,
      "branch_id": "...",
      "branch_name": "main",
      "parent_commit_id": "71aa...",
      "author": {"id": "...", "name": "A. Engineer", "avatar_url": null},
      "created_at": "2026-11-14T09:15:02.110214Z",
      "metrics": {"num_qubits": 8, "topology": "grid"},
      "changes_summary": {"components_added": 8, "code_changed": true},
      "legacy_version_id": null
    }
  ]
}

kind is manual, auto (autosave) or claude (saved over MCP), or restore for a commit created by a restore; restored_from then names the restored commit.

Commit detail and current

GET /commits/{commit_id} adds snapshot (the stored design), simulations and verification_reports (up to 20 each, with id, status, created_at and an in-app url) to the commit object. Pass current as the commit id to get the project’s working design in the same shape, with "kind": "current", created_at set to the project’s updated_at and empty run lists. Use it to preview a version against the current design.

Name a version

PATCH /commits/{commit_id} with {"name": "Tape-out v1"}. Names are at most 120 characters; null or "" removes the name. Returns the updated commit.

Restore

POST /commits/{commit_id}/restore writes the target commit’s design into the project and records a new commit, so nothing is lost. The body is optional:

{"branch": "main", "message": "Back to the pre-routing layout"}
{
  "restored": true,
  "project_id": "4f6c0d2e-...",
  "updated_at": "2026-11-14T10:02:11.004512Z",
  "restored_commit_id": "71aa...",
  "revert_commit": {"id": "c3d4...", "kind": "restore", "restored_from": "71aa..."},
  "design": {"placements": [], "connections": [], "feedlines": []}
}

A restore broadcasts design_saved with "reason": "vcs_restore", commit_id and restored_commit_id, so open editors reload. Send X-Client-Id to recognise your own event, and use the returned updated_at as your next base_updated_at.

Diff

GET /diff?to_commit=...&from_commit=.... to_commit is required; either side may be current. Without from_commit the diff is against the parent of to_commit (everything appears as added for the first commit). The response is a semantic diff, not a text diff:

{
  "components": {"added": [], "removed": [], "modified": []},
  "connections": {"added": [], "removed": [], "modified": []},
  "feedlines": {"added": [], "removed": [], "modified": []},
  "rf_parameters": [],
  "drc": {"from": {}, "to": {}},
  "qiskit_code": {"changed": true, "unified": "--- before.py\n+++ after.py\n...",
                  "added_lines": 12, "removed_lines": 3, "truncated": false},
  "semiconductor_changed": false,
  "materials": {"from": {}, "to": {}, "changed": false},
  "metrics": {"from": {}, "to": {}},
  "summary": {
    "components_added": 0, "components_removed": 0, "components_modified": 2,
    "components_moved": 2, "connections_added": 1, "connections_removed": 0,
    "connections_modified": 0, "routes_rerouted": 0, "feedlines_changed": 0,
    "semiconductor_changed": false
  },
  "from_commit": {"id": "71aa...", "short_hash": "71aa02be", "message": "..."},
  "to_commit": {"id": "current", "short_hash": "current", "message": "Current design"}
}

Component entries carry id, name, component_id, x, y and rotation; connection entries carry from and to (placement.pin), the route component, waypoint count, segment styles and length_mm. The code diff is bounded: it shows at most 400 lines (truncated is then true), and when the two code versions together exceed 200,000 characters or 4,000 lines it returns "too_large": true with no unified text.

Branches, commits and tags

Create a branch:

{"name": "readout-rework", "from_branch": "main", "from_commit_id": null, "is_protected": false}

name is 1 to 64 characters; a duplicate returns 409 BRANCH_EXISTS. Create a commit:

{"message": "Bus couplers routed", "branch": "main", "tag": "v0.3"}

POST /commits returns 409 NOTHING_TO_COMMIT when the design is unchanged since the branch head. Tag a commit with {"commit_id": "...", "tag": "tapeout-1"} (1 to 64 characters); an existing tag returns 409 TAG_EXISTS and an already-tagged commit 409 COMMIT_ALREADY_TAGGED.

See also

Projects and Design for save-design and the legacy /versions endpoints.