Closed ytdHuang closed 8 months ago
Thank you for submitting this issue.
The proposed changes are reasonable. We can even try to change all QuantumObjects to Qobj, which could be implemented using a simple ctrl+f and then substituting. In this way, we will never deal with QuantumObject anymore.
Thank you for submitting this issue.
The proposed changes are reasonable. We can even try to change all QuantumObjects to Qobj, which could be implemented using a simple ctrl+f and then substituting. In this way, we will never deal with QuantumObject anymore.
I have made a PR as shown above.
For the substitution of QuantumObject
to Qobj
, I didn't do this in the beginning because Julia
language's naming rule prefer not to use the abbreviation.
In this PR, the new function is really defined as:
Qobj(A; kwargs...) = QuantumObject(A; kwargs...)
That means it is just passing all the args to QuantumObject()
directly, and QuantumObject()
will still handle all the types and other stuffs.
For me, I think defining Qobj
is convenient, and QuantumObject
looks nice and clear. So I like them both~
I agree with you. Let's merge it with with both of them.
To make the syntax more similar to
QuTiP
, I suggest to add the following function support:Qobj(A; kwargs...) = QuantumObject(A; kwargs...)
: This is just for us to createQuantumObject
in a lazy way (and more similar toQuTiP
). (f3c95b52822e5d3a2266bf3ed6542e0ad98eb103)tensor(A...) = kron(A...)
: does the same thing askron
(9949e380d75ffd5ce9daa02d02c96d1294b1c9a5)⊗(A, B) = kron(A, B)
: take advantage ofQuantumOptics
(9949e380d75ffd5ce9daa02d02c96d1294b1c9a5)The last support allows us to express
tensor(A, B, C)
asA ⊗ B ⊗ C
.If @albertomercurio agrees with this, I can make a PR for this issue.