Is the Base Profile really the base of all profiles? #17
Replies: 2 comments 4 replies
-
I don't really have a strong opinion here since the current approach is fine and if issues come up later it's easy enough to switch to an alternative, but I'll write my thoughts out if it helps things. From my point of view it's purely about us not knowing what people may come up with, or what will win our conceptually in the future, so saying that 'everything' has to inherit off the base profile is pretty limiting and makes writing future profiles more complicated. An immediate example is the base profile not allowing variables, must have one method which one basic block, which is also the special entry-point method, that in future profiles should only have very particular syntax and calls in it. Most of these rules will immediately change or become void in future profiles. While we can very much write the profile in a way which states that these constraints only apply to this profile, I just feel the web of rules and edge-cases about what applies where is going to become unncessarily complicated in both reading and application as time goes on. An alternative approach I like is composable profiles. Profiles would be simply viewed as small collections of supported features or constraints, so the base profile as-written would be composed of the 'core entry-point' profile, 'core rotations', 'single entry-point' profile and little specific-to-that-profile rules. First 2 being declarations of features, the latter being specific constraints. It means you can mix-and-match rules and features based on the specific requirement for whatever your code or backend is doing. More complicated in some ways, but also more flexible and unambiguous in its rules. It has its own problems but I prefer the trade-offs. I also personally feel we're almost garanteed reach a point where we want / have QIR profiles that are distinctly seperate from everything that came before: circuit vs pulses vs super low-level hw instructions vs fun new higher-than-circuit model; digital vs analogue vs other; etc. But even if this does happen it's pretty far in the future. |
Beta Was this translation helpful? Give feedback.
-
I think that my only touchy thing with the base profile being valid code for future profiles is whether:
Although I don't have immediate concerns supporting these going forward, it's hard to predict what will change. |
Beta Was this translation helpful? Give feedback.
-
And what does it mean exactly?
Does it define a set of requirements that have to be met by all other profiles?
Does it define a set of restrictions that will also be forbidden to all other profiles?
Is it a mix of both?
In any case, how to tune how far we can go without hindering the writing of future profiles?
Can we already foresee profiles that will have such drastically different approaches/paradigms that they could not "inherit" from the Base Profile?
Beta Was this translation helpful? Give feedback.
All reactions