QuantumSavory / QuantumSymbolics.jl

Computer algebra tools for symbolic manipulations in quantum mechanics and quantum information
MIT License
29 stars 9 forks source link

adding Commutators, Anticommutator, Daggers #40

Closed apkille closed 2 months ago

apkille commented 3 months ago

Defined constructors for bra, product of operators, commutator, anti commutator, and dagger. Also added scaling and a few simplification rules.

Krastanov commented 3 months ago

I left a couple of minor comments, nothing to interesting, and you might have already been thinking about some of these things.

I will convert this to a draft. When it is ready for review and it has all tests pass, just convert it back and request a review.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 63.09524% with 62 lines in your changes missing coverage. Please review.

Project coverage is 62.78%. Comparing base (8a75466) to head (af3c073).

Files Patch % Lines
src/QSymbolicsBase/predefined.jl 51.92% 25 Missing :warning:
src/QSymbolicsBase/basic_ops_homogeneous.jl 61.22% 19 Missing :warning:
src/QSymbolicsBase/literal_objects.jl 57.14% 9 Missing :warning:
src/QSymbolicsBase/basic_ops_inhomogeneous.jl 75.00% 5 Missing :warning:
src/QSymbolicsBase/rules.jl 80.00% 3 Missing :warning:
src/QSymbolicsBase/QSymbolicsBase.jl 90.90% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #40 +/- ## ========================================== + Coverage 54.70% 62.78% +8.07% ========================================== Files 14 15 +1 Lines 446 575 +129 ========================================== + Hits 244 361 +117 - Misses 202 214 +12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

apkille commented 2 months ago

I updated functionalities of (anti)commutator and dagger. Also added operator properties (hermitian, unitary, and commutative) and wrote corresponding simplification rules, which are all tested. I added doctests as well for basic operations.

Krastanov commented 2 months ago

Woohoo!

apkille commented 2 months ago

Excellent! 😁