-
Notifications
You must be signed in to change notification settings - Fork 34
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
Plans for Symbolic expressions in QuantumOptics #70
Comments
Thanks for opening this issue and pointing to your package. It looks very useful already! In fact, we are also currently thinking about symbolic algebra in QO, but things are still very much at a planning stage. The main motivation would be interoperability with QuantumCumulants and the ability to quickly create different numerical representations of the same model. That would also allow quickly switching between the cumulant expansion method and solving problems with QO (similar to what you are going for). As QuantumCumulants already has a symbolic algebra built in our approach here would probably be to abstract it out into a new package and make both QO and QC depend on that package. I wrote a small draft script that shows how such an interface could look in principle. I just uploaded it as a gist if you're interested. Note that this is very much still a draft and not really usable as of yet. There are still a lot of issues to consider. The main ones I can think of right now are:
So the bottom line here is: I think working together would make a lot of sense in order to avoid duplicate effort. Did you already consider interoperability of QuantumSavory and QuantumCumulants as well? Regarding calls: I'll reach out to you by email if that's okay. |
Yes, feel free to reach out over email! I would like to see QuantumCumulants as a backend for my simulator, but it has not been a priority. I have really enjoyed using QuantumCumulants for a few projects, but it is not the type of modeling that has been most important for my work. I did give a journal club on it at the quantum photonics group at MIT and people were really impressed with the package. I have had to deal with the problem of different representations being more useful for different applications. My current approach has been to have a cache in the metadata field of the symbolic expression that caches the representations required by different backends. Maybe something like this could work for a potential future symbolic package to be used by all of these downstream packages. There are two big points of divergence between our approaches that we should probably tackle first:
|
I wonder: do we have to? Maybe the symbolic algebra in QC.jl is not well-suited to represent generic problems, e.g. for conversion to different forms and things like that. At the same time, it will be quite difficult IMO to implement a generic symbolic framework that is as efficient at applying commutation relations as QC.jl's is. However, if we have a generic symbolic framework then conversion to the QC.jl algebra should be fairly straighforward as long as we store the type/constructor of an operator. Since rewriting is hardwired into QC.jl's algebra it will just "naturally" occur when converting from the other symbolic representation. And yes, my approach was only focused on lazy operators, but it was just a quick draft. Different ways of representing and converting expression would be needed for sure. For example, what if you want to materialize e.g. all multiplications, but keep the tensor products lazy? Also, just FYI, I'd be careful with using metadata to store things you need as it tends to get lost during simplification with SymbolicUtils sometimes. Not entirely sure what the status there is though. |
You are right, we probably should not try to unify them, if the assumption is that
That is the goal. The main risks are fairly standard: for the moment it is only one or two people that are working on QSymbolics as a tool to enable some research projects -- the bus factor of the project is low. For that reason I have tried to reuse as much as possible from
The feature of QSymbolics that is most important for my work is the
Basically, If that seems reasonable to you, I can further flesh out the current At the same time, I will probably start pushing more for #38 , as I would prefer for
Oh, good to know! For the moment I will treat that as (1) something not too important as the metadata is there just for caching |
Alright then, so we know where to start: create a core package (QuantumOpticsCore? -- #38) that is a lightweight dependency only defining basic interfaces and types (we'll need to have a more detailed discussion on what should actually be included in that package). If we do things right, we should be able to have QuantumSavory, QuantumClifford, QuantumOptics and QuantumCumulants all work together without any clashes. |
With QuantumInterface and QuantumSymbolics, there is no need to have this separate issue open anymore. For tracking the some of the related further developments check out: |
For a project of mine I need to be able to jump between different simulation formalisms (e.g. master equations from QuantumOptics, or Monte Carlo Clifford sims from QuantumClifford, or others). I need a way to express the quantum objects independent of the low-level numerical simulation library.
For that reason, I started developing a humble Symbolics.jl-based library to express objects of interest in Quantum mechanics / optics / information science.
A big design goal was to re-use as much as possible from QuantumOpticsBase. The library is nowhere near ready for release, however I find it very important to not duplicate effort. Hence, finally, my question:
Could you share your plans, if any, to add symbolics to QuantumOpticsBase? Independently of whether you have any current plans, could you consider working together on setting up symbolic packages that do not clash with each other or unnecessary duplicate effort? Would you be interested in a couple of conference calls later in the year to discuss how the aforementioned library and QuantumClifford do not clash with QuantumOptics?
While this issue focuses specifically on symbolics, it is related to #38
The text was updated successfully, but these errors were encountered: