q-optimize / c3

Toolset for control, calibration and characterization of physical systems
https://c3-toolset.readthedocs.io/
Apache License 2.0
66 stars 36 forks source link

Introducing a Qobj like in QuTiP? More QuTiP combatability? #96

Closed fedroy closed 3 years ago

fedroy commented 3 years ago

In many places in the code we need to pass information between classes and functions in libraries. The information we pass is (not comprehensive list): the dimension of the subspaces of the hilbert subspace, their order, the states computationally relevant, the representation (superoper/oper, state/density matrix/density vector). For example when doing propagation the experiment class asks the model class if lindblad is true, in which case the assumption is that we are using the superoper + density vector formalism, and hence different types of propagation and population calls are made.

Qutip solves some of these issues by having some of this information in the Qobj class and then you can just make the relevant calls, like population or fidelity calls, on the object and the underlying implementation will change based on the information the object itself provides. https://qutip.org/docs/latest/guide/guide-basics.html#the-quantum-object-class

I think this is the right way to move forward to allow the code to stay modular.

In general with the expansion of the propagation library and the recent improvements made on qutip to have noise (https://arxiv.org/abs/2105.09902) do we want to try for more compatability with QuTip?

lazyoracle commented 3 years ago

QuTiP has active projects for implementing GPU and TensorFlow backends to their Qobj. The QuTiP API is mature, extensible and widely used. It is feature-rich with introduction of the pulse level circuit simulation recently. I, for one, feel that there is strong incentive in increasingly porting our code to this style, essentially allowing any backends - a QuTiP backend, our own TensorFlow based simulator, a real hardware stack. That is the right direction that would enable we get to do all the nice C3 stuff while keeping it decoupled from the developments of the simulator/control stack etc.

shaimach commented 3 years ago

I think we have much more important and interesting things to do than QuTip compatibility.

I'm not saying we cannot have a few routines to transfer information there and back - that's a few hour's work, so no reason not to do it. But to invest time in changing the internal object format is not the correct prioritization.

On Wed, 26 May 2021 at 11:49, Anurag Saha Roy @.***> wrote:

QuTiP has active projects https://github.com/qutip/qutip/wiki/Google-Summer-of-Code-2021 for implementing GPU and TensorFlow backends to their Qobj. The QuTiP API is mature, extensible and widely used. It is feature-rich with introduction of the pulse level circuit simulation recently. I, for one, feel that there is strong incentive in increasingly porting our code to this style, essentially allowing any backends - a QuTiP backend, our own TensorFlow based simulator, a real hardware stack. That is the right direction that would enable we get to do all the nice C3 stuff while keeping it decoupled from the developments of the simulator/control stack etc.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/q-optimize/c3/issues/96#issuecomment-848590428, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH3Q4ISZT6BQ7DTFTVFCH3TPSYYJANCNFSM45RPVZCQ .

lazyoracle commented 3 years ago

Closing this for now since it is not immediate priority. Please open a new feature request should we revisit this for interfacing with qutip.