Add lazy superoperator types and measurement utility functions
## Summary
- Add AbstractLazySuperOperator hierarchy with LazyPrePost, LazySuperSum, LazySuperTensor types for efficient lazy evaluation of superoperators
- Add measurement utility functions: _drop_singular_bases, _branch_prob, _overlap, _project_and_drop for quantum measurement post-selection
- Uncomment expect function for AbstractKet types that was marked TODO upstream
## New Types
- `AbstractLazySuperOperator`: Base type for lazy superoperator implementations
- `LazyPrePost`: Applies pre- and post-operators without storing full superoperator matrix
- `LazySuperSum`: Lazy sum of multiple superoperators with factors
- `LazySuperTensor`: Lazy tensor product of superoperators for composite systems
## Utility Functions
- `_drop_singular_bases`: Remove dimension-1 bases after measurement
- `_branch_prob`: Calculate measurement outcome probabilities
- `_overlap`: Compute state/operator overlaps
- `_project_and_drop`: Project onto measurement outcome and reduce dimensionality
## Test plan
- [ ] Verify all new types can be constructed and used
- [ ] Test lazy superoperator arithmetic operations work correctly
- [ ] Confirm measurement utilities produce expected results on example systems
- [ ] Check that exports work and no name conflicts exist
🤖 Generated with [Claude Code](https://claude.ai/code)
合并状态:未合并 0 条评论