-
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
Making an AbstractQuantumBase.jl package or something like that #38
Comments
Also, the same way the efficient to simulate Stabilizer methods have implementations very different from what is in QuantumOptics, one can have the same for Gaussian circuit. |
I would be open to this in principle, but let's discuss first to make sure it really makes sense to do something like that.
Your list contains only functions. So taking abstraction to the extreme, we could really just make a package that contains a bunch of empty function definitions, e.g. Which types make sense to have would be another question. You mention defining some tensor product, so abstract types such as |
I am actually much more interested in defining interfaces (i.e. I think this is a good example of such abstract base library: https://github.com/JuliaArrays/ArrayInterface.jl Maybe we can start a collaborative document on which we can list what functions are expected (both in terms of traits like I suspect the first version of the base library would indeed just be a list of function names and nothing else. But it would be great if partial traces in QuantumClifford just use the partial trace function used in QuantumOptics. |
@david-pl , as I am trying to prototype this, I have a few more questions on how to implement an interface for a quantum object that matches the semantics of QO.jl while having drastically different internals. Say I have an object containing a tableau of 2 qubits, for instance this mixed state tableau:
The density matrix corresponding to that tableau is
The reason for these questions is that the MIT quantum photonics group is now developing a hardware simulator in the style of SPICE and Verilog, but for quantum hardware, and this type of interoperability is becoming important. |
In general I have to say I have some doubts as to whether this interoperability is too much of a stretch for QuantumOptics. It's difficult to tell though as my expertise in quantum hardware is quite limited. |
I have been implementing much of that interoperability in a separate piece of code, mostly just ensuring that the appropriate methods exist when types are mixed together from the two packages. And it should also work with a package for gaussian states too. The main issue is the namespacing of the different functions. When I have it fully working, maybe we can meet and discuss whether a minimal "interface" package can be created? (it is a part of some research code that is my actual focus, so factoring it out in a way that is community friendly is not my main priority right now) |
Having a starting point, i.e. the "glue" code you mention, would be useful to continue this discussion. It would be great if you could share it once it's finished, or at least in a working state. |
I am setting it up now. Any preferences on package name:
Unless there are preferences, I will just pick one and publish the package later this week. |
@Krastanov as the plan would be for most qojulia packages to depend on the abstract one, I'd really like this core package to be part of the qojulia organization. Would that be okay with you? |
Yes, that makes total sense! |
@Krastanov I've created a package here and another issue to collect what we actually need to be part of the interface there: qojulia/QuantumInterface.jl#1 |
closing now that we rely on https://github.com/qojulia/QuantumInterface.jl |
I have some libraries that work with stabilizer states and noisy stabilizer circuits.
Slowly, I have started working on functions like
entropy
andentanglement_of_creation
andis_factorizable
, etc. Some such functions exist in QuantumOptics and I would like to simply create methods for them so that the code can have easier time inter-operating. One cool example would be doing some entanglement purification with stabilizer states and then doing a tensor product of a stabilizer state (represented as a tableaux) and a Ket from QuantumOptics. In principle this should be trivial, but I does not make sense for QuantumOptics to import QuantumClifford or vice-versa.Hence, should we try to start discussing a common base, just so it is easy for people to have interoperable code? QuantumOpticsBase is not appropriate for this because (a) it has deep assumptions about treating things as qudits and vectors in Hilbert spaces (b) it has a ton of non-abstract implementations that ideally will not be in a package that simply defines interfaces (c) interesting functions that QuantumClifford would want to overload are actually definited in QuantumOptics, not QuantumOpticsBase
Here is an example list of things I would like to have as common interfaces:
entropy, purity, tensor, entanglement_of_formation, entanglement_of_distillation, hashing_entanglement_yield, relative_entropy, entanglement_of_assistance, entanglement_robustness, magic_robustness, trace_distance, quantum_fisher_information, helstrom_metric, wigner
.What would be a good way to get such a common interface?
The text was updated successfully, but these errors were encountered: