-
Notifications
You must be signed in to change notification settings - Fork 13
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
Make quantum algebra separate package? #214
Comments
@david-pl @ChristophHotter @Krastanov I noticed that there is a lot of integration with QuantumSavory and QuantumOptics. Are there any plans to move the symbolics representation to QuantumSymbolics.jl? |
David and I have briefly brought up the possibility to use QuantumSymbolics as a universal interface for many of these packages. That type of work is underway (QuantumSymbolics already has extensions to convert into QuantumOptics and into QuantumClifford, and a bounty for developing an extension for conversion into QuantumCumulants). QuantumSymbolics also is inspired by some of the work done here, but aims to be more general. QuantumSymbolics leans heavily into the basis-defining infrastructure from QuantumOptics. I however do not expect any of the internals of QuantumCumulants to start depending on QuantumSymbolics -- QuantumCumulants is designed to be efficient at what it does (a fairly single-purpose focus), while QuantumSymbolics will definitely not be as fast at it. |
I am writing a package myself which computes Floquet perturbative expansions to compute effective Hamiltonians for time-periodic systems. QuantumCumulants contains a lot of the foundation to do this. I am happy to depend on QuantumCumlants, as it adds directly the computation of the associate mean-field equation. If there any plans to isolate the symbolic infrastructure I am happy to help in the endeavor.
In the end, QuantumCumulants builds a non-commutive algebra with SymbolicUtils. Isn't QuantumSymbolics doing the same? Why would it be slower? In what way is QuantumCumulants optimised?
Interesting, I would be willing to look into this. :) |
QuantumCumulants needs tensor products over a couple of simple Hilbert spaces, commutation rules, and expectation values. QuantumSymbolics covers traces, partial traces, determinants, a plethora of nestings of such expressions with tensor products and linear algebra "application" products, inner products, superoperators, and more. It is quite possible to make QuantumSymbolics as fast as QuantumCumulants in the domain in which QuantumCumulants is applicable, but that is currently not an active project (mostly because QuantumCumulants already exists). I believe that if your priority is high productivity in developing your near-term research work, sticking to QuantumCumulants for the project you described is optimal. If there is a consideration of longer-term unification of interfaces and packages, QuantumSymbolics is probably a better choice, but such a choice comes with the need to invest more work in developing QuantumSymbolics. If you and/or your colleagues of yours are interested in helping with that, I do have funding for bounties related to such developments (https://github.com/QuantumSavory/.github/blob/main/BUG_BOUNTIES.md) |
And while I can not speak for the QuantumCumulant devs, I expect that if you decide to factor out a small symbolics core out of QuantumCumulants, most people will be supportive of the idea (but will probably not have much time to contribute dev effort). |
TL;DR We never needed it, but feel free to do it ;) The long version I've thought about this, but the symbolic algebra as defined in QuantumCumulants didn't strike me as generic enough to warrant an abstracted package. There are a few key things that QuantumCumulants does differently.
Strictly speaking, that's not true. QuantumCumulants defines it's very own symbolic, non-commutative, algebra which works without SymbolicUtils. We do use some method definitions to make it behave the same, but under the hood, everything that's non-commutative ( The reason behind this is that QuantumCumulants focuses on applying commutation relations. All symbolic This goes a bit against what symbolic simplification usually does. Consider, for example, the expression In that sense, the algebra in QuantumCumulants is quite opinionated. It's not generic because you can never really construct an expression such as
The list is not exhaustive. These rules make it very simple to apply all commutators that you can and it's much more efficient than working with a generic rule re-writing engine. Note that all of this happens before averaging a q-number expression, however. Once you QuantumSymbolics, on the other hand, allows you to construct arbitrary expressions and simplify them with a custom and/or pre-defined set of re-writing rules. None of those have to involve commutation relations. Furthermore, they can easily be converted to QuantumOptics or QuantumClifford expressions. All that being said, I'm not opposed to factoring out the symbolic algebra here, if you rely on some of the behavior (normal-ordering, applying commutation relations). Which parts of QuantumCumulants do you require? The biggest gain, IMO, would be if you can abstract things such that the new base package doesn't depend on MTK and OrdinaryDiffEq in any way, since these are pretty large dependencies. Is that even possible? Other than slimming down dependencies, I don't really see the point in abstracting things. |
I would like to borrow the quantum symbolics of this package to build my own package on top of. Are there any plans to make the symbolics its own package?
The text was updated successfully, but these errors were encountered: