Including jit and contractions #17
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Measurement docstrings: expanded vector/matrix measurement, POVM, …PNR, expectation, JIT wrappers with shapes, key handling, and noise notes
RNG handling: split keys drop first subkey to decorrelate repeated calls across different seeds
Kraus/measure paths: validated operator shapes, clarified contraction use, restored standalone ordering after application
Envelope measurement/Kraus: ensure contractions align with Config and maintain post-op consistency
Adapters overview: reorder targets forward, call kernels, contract optionally, restore ordering; added jit/meta entry points
Kernels overview: stateless tensor primitives for apply/measure/trace/kraus assuming targets front-most
Linear/ops layers: thin array-facing dispatchers into adapters/kernels
Meta helpers: DimsMeta stores dims/indices/permutations to keep shapes static for JIT and vmap
ShapePlan: pairs DimsMeta with state ordering for compiled kernels to reuse metadata across calls
Jitted helpers: bind metas for static-shape invocation paths
Core modules: added adapters, kernels, linear, ops, rng, jitted, meta, init wiring
State interfaces: added shared BaseState typing surface for compiled kernels
Shape planning utils: added compiled kernels and plan builder for repeated ops
Measurement RNG tests: ensure different base keys yield different outcomes after splitting
Adapter/Kraus tests: contraction flags, jit/meta paths, shape validation covered
Ops utils tests: contract vs. non-contract apply_kraus_matrix behavior verified
Doc infrastructure: enabled myst_parser for Markdown, mocked heavy imports to avoid build failures
Docs cleanup: fixed headings/underlines/code blocks in index, intro, contributing, benchmarks, examples pages
Added api/core pages: documented adapters/kernels and exposed in API toc
Added update notes: summarized core changes, meta/shape planning flow, and follow-up steps
Change summary: captured new modules and metadata strategy in docs/change_summary.md
Removed outdated roadmaps: dropped obsolete markdown plans to declutter repo
Sphinx exclusions: temporarily skipped broken example pages until formatting repaired
CustomState py3.12: enabled postponed annotations to avoid ndarray|None parsing error
Expression interpreter docs: rewritten for clarity and to fix Sphinx indentation issues
Measurements docstrings: clarified POVM/PNR noise models and destructiveness flags
Kraus docstrings: inline examples added to adapters/kernels for users
Envelope repr: adjusted tensor product symbol to match tests and docs
Lint fixes: removed unused imports, trimmed whitespace, resolved triple-quote syntax error
API toc: expanded autosummary to include new core and state utils modules
Benchmarks/contributing: fixed list-table content and heading underline lengths
Example rst fixes: corrected code directives and underlines in jaynes_cummings/time_bin/super_dense_coding
Measurement notes: documented destructive vs non-destructive outcomes and returned shapes
Kraus planning: explained how contraction is toggled and where reshape happens
RNG utilities: documented borrow/split behavior for stochastic paths
Suggested next steps: re-enable excluded examples once formatting is corrected
Testing: added coverage for jit/meta flows, contraction flags, and measurement RNG split
ShapePlan guidance: encourage reuse to keep JIT shapes static
Core overview: clarified adapter vs kernel responsibilities in docs
Summary: single commit consolidating code, tests, and documentation updates for the new measurement and core architecture
Before submitting
Please complete the following checklist when submitting a PR:
[] All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to the
test directory!
All new functions and code must be clearly commented and documented.
If you do make documentation changes, make sure that the docs build and
render correctly by running
make docs.Ensure that the test suite passes.
The Photon_Weave source code conforms to
PEP8 standards.
When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Context:
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues: