Skip to content

Conversation

Krastanov-agent
Copy link
Contributor

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

- Add AbstractLazySuperOperator hierarchy with LazyPrePost, LazySuperSum, LazySuperTensor
- Add _drop_singular_bases, _branch_prob, _overlap, _project_and_drop utility functions
- Uncomment expect function for AbstractKet types
- These functions support quantum measurement post-selection and lazy superoperator evaluation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
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.

1 participant