Skip to content

Add TrICal emulator datastore group#12

Open
glasses666 wants to merge 1 commit into
OpenQuantumDesign:mainfrom
glasses666:codex/unitaryhack-44-trical-group
Open

Add TrICal emulator datastore group#12
glasses666 wants to merge 1 commit into
OpenQuantumDesign:mainfrom
glasses666:codex/unitaryhack-44-trical-group

Conversation

@glasses666

Copy link
Copy Markdown
  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Feature: adds a typed datastore group for TrICal emulator outputs.

  • What is the current behavior? (You can also link to an open issue here)

Related to OpenQuantumDesign/oqd-trical#44. oqd-trical needs a typed oqd-dataschema group before its QuTiP backend can return HDF5-serializable datastore results instead of an ad hoc dict.

  • What is the new behavior (if this is a feature change)?

Adds TrICalEmulatorDataGroup, exported from oqd_dataschema, with datasets for:

  • tspan: 1D float timeline
  • states: complex ket or density-matrix trajectory
  • final_state: complex final ket or density matrix

The new tests cover ket and density-matrix HDF5 round trips plus validation of complex state data.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No. This only adds a new registered group type and public export.

  • Other information:

AI-assisted with OpenAI Codex; the diff was reviewed and locally verified before submission.

Validation run locally:

uv run --extra tests pytest tests/ -q
147 passed, 58 xfailed

uv run ruff check src tests
All checks passed!

git diff --check
passed

TrICal needs a typed dataschema group before its QuTiP backend can return portable HDF5 output. This adds the smallest domain group for saved times, state trajectories, and final states while keeping existing generic GroupBase behavior unchanged.

Constraint: oqd-trical issue #44 requires the group to be contributed upstream to oqd-dataschema
Constraint: Datastore attrs only support scalar values, so run metadata remains a caller-side concern here
Confidence: high
Scope-risk: narrow
Directive: Keep emulator-specific fields in this group limited to serialized simulation data, not backend runtime objects
Tested: uv run --extra tests pytest tests/ -q
Tested: uv run ruff check src tests
Tested: git diff --check

@benjimaclellan benjimaclellan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glasses666 Thanks for the PR. This looks great, I don't have any feedback. I will manage the hackathon feedback/acceptance on the PRs on the oqd-trical repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants