-
Notifications
You must be signed in to change notification settings - Fork 6
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
Operator bases which are not outer product "KetBra" bases #35
Comments
Good catch. I do not have anything useful to say yet, but I did some git archeology. This functionality was moved to QuantumInterface from QuantumOpticsBase. It was already present in QuantumOpticsBase when it was split from QuantumOptics. Here is the initial PR that added it to QuantumOptics qojulia/QuantumOptics.jl#251 |
I think there might be some confusion about what PauliBasis is supposed to be. I have not read through all of the code, but looking at the docstring and the constructor:
To me this does not look like a basis of matrices for the vector space of unitary matrices. To me this looks like a basis of kets for the Hilbert space ℂ²ⁿ. I.e. it kinda makes sense to say that Is there something deeper in that PR that might be at odds with my interpretation? |
Yes I think the way it's specified and used it looks like it's just meant to be a shorthand for a The larger point of this issue is to to discuss how to incorporate the actual Pauli basis into |
We can start making a list of deprecations. The name I do not think that the entity currently called For when we start discussing general operator bases: do you currently have an example problem that needs an operator basis that can not be represented in terms of outer products of basis vectors of the two Hilbert spaces? |
PauliBasis
is an operator basis, not a Hilbert space basis
Nope it doesn't, I opened a different issue for that. For operator bases. This is mainly an interface design question. Given that every operator (and superoperator) can always be represented in outer product bases, that is a valid design choice to just restrict all objects to ultimately be represented as such. However two current examples where making the api of A Pauli transfer matrix describes a channel in terms of how Paulis map to Paulis and so is a "KetBra" or outer product style superoperator basis where the left and right bases are the Pauli operator basis. Of course given we have In the case of Related to this design question is what the objects in |
I think my mental model of QuantumSymbolics is very different, which might be leading to miscommunication. No matter which design ends up better (or simply implemented if not better), we should definitely document this more clearly. In my mind, we should have Similarly I do not think we currently have a way to query "what is the space of operators to which this one operator belongs". Currently I am not sure we need it. Concerning These are mostly my thoughts in the context of balancing good API design, simplicity, practicality, and minimizing breaking changes. |
I think one motivation for my thinking here is that I have some ambitions to teach QuantumSymbolics about index groups (in the context of nice error-bases - see https://errorcorrectionzoo.org/c/knill#defterm-Nice_20Xerror_20Xbasis) in which case having a more fine grained understanding of the relation between operator bases and ket-bra bases is potentially beneficial for using method dispatch in an idiomatic way to make operations on objects compatible between the two. Of course it's hard to say abstractly without digging into the details :)
I think length(b::Basis) is basically that since every finite Hilbert space along with separable Hilbert space can just be identified by its dimensionality.
I would advocate that states in Gabs should be subtypes of PS, in case you haven't seen it I would say #34 may be the most immediate basis design issue since I think there's the potential for subtle correctness issues that the basis system is intended to correct but doesn't currently. Fixing this has been the main focus of my prototyping efforts around revising the way bases work. |
Yup, that makes sense. |
This is a good point, I agree as well. I can implement these changes once the parametrization of these abstract types are changed/settled in QuantumInterface.
I don't think I agree with this. What I believe @akirakyle is referring to, particularly about bases in Gabs, is that there's an additional case of symplectic bases for Gaussian states and operators, which is based on how you order field operators for an N mode system. In Weedbrook et. al, everything is kept in a paired quadrature basis, however, you could certainly rearrange your quadrature operators. For example, they're also commonly placed in a block form (Serafini does this in his textbook "Quantum Continuous Variables"; the block symplectic form is also the first example on wikipedia: https://en.wikipedia.org/wiki/Symplectic_matrix). In Gabs, I followed the convention of Weedbrook, however, it would be good to have support for different symplectic bases. As I mentioned in #33 (comment), this could work nicely with the |
I think this is another example of the issues that come from currently conflating basis and space in this API. For me it is important to have a way to ask "in what space does this object live". For the objects from Gabs, these would be Thus, if we are to take for granted that Now there is the separate question of whether we should fix this abuse of the word "basis". Maybe one way to do that would be to introduce To clarify future discussions, could you specify whether when you say |
Yes. However, this would make things confusing if we were to have this feature and support for symplectic bases in Gabs. In this case, I would probably define a "symplectic basis" system in Gabs, while maintaining the current conflation between "basis" and "Hilbert space". So we would have something like
When I've referred to "basis" in previous responses in this issue, I meant a notion separate from "space". My thinking was that I could define |
I concur with that last message. We should indeed get around to documenting all of this somewhere. A few more points to be added in this discussion:
|
As far as To be explicit, let's focus on the |
I've been thinking a lot about all the issues related to bases here (#25, #26, #27, #32, #33, #34). To help me think through these issues, I've been iterating through a bunch of prototype abstract interfaces for
Basis
,OperatorBasis
, andSuperOperatorBasis
(discussed in #26) so I can get a feeling for how well different design tradeoffs in the abstract interface work out in practice. I'll hopefully submit that for some discussion here soon. One thing I've run into, which warrants a separate issue so that I have something to reference, isPauliBasis
.Currently
PauliBasis
is not actually used in anywhere in any dependent packages I could find aside from being exported byQuantumOpticsBase
. Here's the current definitionThere's the
test_pauli
inQuantumOpticsBase
which shows some examples of it being used such asBut this is not the CNOT gate in the pauli basis, but rather in the "standard" (assuming a given tensor product layout) computational basis. In the Pauli basis CNOT can be represented as (taken from Gottesman's textbook, the other elements can be found by acting by conjugation by other Paulis)
Thus in order to meaningfully define an operator in the Pauli basis, one needs to fix some canonical ordering of the (complex) coefficients for$I,X,Z,Y$ , which is really the whole point of the stabilizer tableau.
Currently every subtype of
AbstractOperator{BL,BR}
specifies a left hilbert space and right hilbert space basis which basically implicitly assumes a "KetBra" style operator basis in which basis elements for the operator are all outer products of basis elements for the Operators left and right Hilbert spaces. In general this need not be the case, and the Pauli basis is as example of a unitary operator basis for which the operator basis elements cannot be represented as outer products. Another example of operator bases are the Heisenberg-Weyl (sometimes called clock and shift) basis for density operators on arbitrary dimensional hilbert spaces. The Gaussian state formalism being developed in Gabs I think can be considered as working in a CV analogue of the PauliBasis which suggests that in fact theGaussianState
should actually subtypeAbstractOperator
instead ofStateVector
given that it can represent mixed as well as pure states.@Krastanov @apkille
Hopefully this makes some sense, but it's fine to hold off commenting until I have converged my prototyping work on something that I feel solves these issues at the interface level...
The text was updated successfully, but these errors were encountered: