문제

It's been a while since I got into QCL but I ran into some difficulties by trying to figure out the functioning of measure regX or measure regX,m.

What does this do on the quantum registers? And the m integer?

도움이 되었습니까?

해결책

In Bernhard's Ömer PhD thesis Structured Quantum Programming, in Appendix A.3.1.4 clearly states that measure regX -- performs measurement on register regX and measure regX,m -- performs measurement on register regX and writes the result of the measurement to classical variable m.

If you do not understand the model behind quantum measurement it is difficult to fully understand what QCL does. But roughly speaking measurement chooses randomly one of the basis quantum states which spans the quantum superposition in which regX is and writes it to variable m.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top