oqc-community / rasqal

A dynamically executed quantum-classical hybrid runtime.
Other
20 stars 5 forks source link

Add QIR base profile output labelling #67

Closed chemix-lunacy closed 3 months ago

chemix-lunacy commented 3 months ago

Just add proper support for additional labels in __quantum__rt__result_record_output.

Likely solution is just detecting whether it's a base profile run, recording the output keys/values, then reconstituting the dictionary at the end of execution. I believe there's already a special case in place for base profile QIR anyway since it has a result but doesn't return anything IR-wise.

chemix-lunacy commented 3 months ago

After re-reading the spec it states that the output can omit the labels if the order as-defined is honoured - which we do for base profile. As I'd prefer less special cases this is considered OK.