qir-alliance / qir-spec

QIR specification defining how to represent quantum programs within the LLVM IR
Other
68 stars 19 forks source link

Adaptive spec wording tweaks #40

Open chemix-lunacy opened 1 month ago

chemix-lunacy commented 1 month ago

A few small fixes which stuck out to me as I was reading it that may be useful:

  1. Talk about measuring qubits not affecting others' states if taken literally meant that all qubits in a system never affected each other no matter their level of entanglement or relation on a measure. While I'm unfamiliar with anything but superconducting for hardware nuance, and it's likely its implied that a 'measure' is the collective measurement of all associated qubits, this is definitely one I had some questions around. Unless it's an assumption that mid-circuit measurements in the future just peek at the result without actually collapsing the qubits state? Either way, some additional clarification - whether it's my change or not - would likely help a ton here I feel.

  2. Moved phi node into its own section as it's around looping/branching and not about integers (directly at least). I also gave it a more understandable description, as while I know the previous one was taken directly from the manual unless you know what a phi node does already that description will not help your understanding.

  3. The talk about phis moving data around and returns in my opinion complicates things. I'm pretty sure you can have if-return blocks that immediately jump in a straight line without phis since there's no variables to merge, and this becomes way more complicated if you have sub-functions too. For now I've tried to restrict it to if everything is in a single function to avoid the latter, but I feel this section would be a bit clearer of this sentence was removed.

General notes or things which require rewriting whole sections which I wouldn't do without peoples agreement beforehand:

github-actions[bot] commented 1 month ago

CLA Assistant Lite bot All Contributors have signed the CLA.

chemix-lunacy commented 1 month ago

I have read the Contributor License Agreement and I hereby accept the Terms.