You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.
res =measure(...)
iftypeof(res) ==typeof(mb) &&size(res) ==size(mb)
mb.result[:] .= res
elseisdefined(res, :result) &&warn("Measure result output stream changed! Giveup allocated memory and use new one.")
mb.result = res
end
For two reasons,
It is easier to port QASM, where classical memory creg can be mapped to a constant address. (or can we use measure block itself as creg? sounds a bit strange)
When porting real device, mb.result can act as a shared memory between quantum program and classical program.
The text was updated successfully, but these errors were encountered:
I think we would compile instead interpretation when porting real device, since interpretation itself is just not very suitable (and require more work) to make it. I don't think it matters to consider whether measure block represents classical register or not, only its semantic matters. It can be lowered to classical register without changing its inner behaviour.
The implementation in this package is mainly just for simulation, and I think simply give an allocated memory is sufficient.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Change
mb.result = measure(...)
toFor two reasons,
creg
can be mapped to a constant address. (or can we use measure block itself ascreg
? sounds a bit strange)mb.result
can act as a shared memory between quantum program and classical program.The text was updated successfully, but these errors were encountered: