-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support OperatorBraQuantumObject
and OperatorKetQuantumObject
#44
Conversation
define `OperatorKetQuantumObject` and `OperatorBraQuantumObject`
Merge from main branch
Basic functionalities for Operator-Ket and Operator-Bra
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
+ Coverage 89.03% 89.23% +0.19%
==========================================
Files 18 18
Lines 1660 1690 +30
==========================================
+ Hits 1478 1508 +30
Misses 182 182 ☔ View full report in Codecov by Sentry. |
Why don't we include also the |
Ahh, I was thinking cause the origin Maybe we can keep the origin methods, but also add new methods for just mat2vec(A::QuantumObject{<:AbstractArray{T},OperatorQuantumObject}) where {T} = QuantumObject(mat2vec(A.data), OperatorKetQuantumObject, A.dims)
vec2mat(A::QuantumObject{<:AbstractArray{T},OperatorKetQuantumObject}) where {T} = QuantumObject(vec2mat(A.data), OperatorQuantumObject, A.dims) I will add this and also the corresponding runtests |
Yes, that's what I had in mind. |
Solve #37
TODO list (I definitely miss something, let me know and I will add to the list):
abstract type OperatorBraQuantumObject <: QuantumObjectType end
(8994e7d)abstract type OperatorKetQuantumObject <: QuantumObjectType end
(8994e7d)show
for above new types (8994e7d)isoperbra()
(8994e7d)isoperket()
(8994e7d)QuantumObject
constructors forOperatorKet
andOperatorBra
(0060fff):(+), :(-), :(*)
(0060fff)mat2vec(Operator) -> OperatorKet
(0096192)vec2mat(OperatorKet) -> Operator
(0096192)adjoint(OperatorKet) -> OperatorBra
(0060fff)adjoint(OperatorBra) -> OperatorKet
(0060fff)Base.conj()
for allQuantumObjectType
(0060fff)SuperOperator * Operator -> Operator
(0060fff)SuperOperator * OperatorKet -> OperatorKet
(0060fff)OperatorBra * SuperOperator -> OperatorBra
(0060fff)OperatorBra * OperatorKet -> Number
(0060fff)dot(OperatorKet, OperatorKet) -> Number
(0060fff)