{"id":359670,"date":"2024-05-21T00:37:28","date_gmt":"2024-05-21T00:37:28","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=359670"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=359670","title":{"rendered":"<span>\u0418\u0437\u0443\u0447\u0430\u0435\u043c Q#. \u041e\u0440\u0451\u043b \u0438\u043b\u0438 \u0440\u0435\u0448\u043a\u0430?<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/post_images\/e46\/329\/e07\/e46329e07918003a9d4b15da7a1fb3e2.jpg\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e46\/329\/e07\/e46329e07918003a9d4b15da7a1fb3e2.jpg\" data-blurred=\"true\"\/><\/figure>\n<h3>\u041f\u0440\u043e \u043a\u0443\u0431\u0438\u0442 \u0438 \u043f\u0440\u043e \u0414\u0438\u0440\u0430\u043a\u0430<\/h3>\n<p>\u041a\u0430\u043a \u0438 \u0431\u0438\u0442, \u043a\u0443\u0431\u0438\u0442 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0434\u0432\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u043c\u044b\u0445 <strong>|0><\/strong> \u0438 <strong>|1><\/strong> (\u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0414\u0438\u0440\u0430\u043a\u0430), \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0438 \u0432 \u0438\u0445 \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u0437\u0438\u0446\u0438\u0438.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u0432\u043e\u043b\u043d\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434 <strong>A|0>+B|1><\/strong>, \u0433\u0434\u0435 <strong>A<\/strong> \u0438 <strong>B<\/strong> \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0430\u043c\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0438\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044e <strong>|A|^2+|B|^2=1<\/strong> (\u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 &#8212; \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d).<\/p>\n<p>\u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u0443\u0431\u0438\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439.<\/p>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0440\u0430\u0432\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e <strong>|A|^2<\/strong> \u0438 <strong>|B|^2<\/strong>.<\/p>\n<p>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0443\u0431\u0438\u0442\u0430 \u043d\u0435\u043e\u0431\u0440\u0430\u0442\u0438\u043c\u043e \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0435\u0442\u0441\u044f, \u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0431\u0438\u0442\u0430.<\/p>\n<p>\u0412 \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 <strong>\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0410\u0434\u0430\u043c\u0430\u0440\u0430<\/strong> <strong>H<\/strong> \u043a \u043a\u0443\u0431\u0438\u0442\u0443 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 <strong>|0><\/strong> \u0434\u0430\u0451\u0442 \u043d\u0430\u043c \u0435\u0433\u043e \u0432 \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u043e\u0432 <strong>|0><\/strong> \u0438 <strong>|1><\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 <strong>|0>+|1><\/strong><\/p>\n<p>\u041d\u043e \u043a\u0430\u043a \u043d\u0430\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0443\u0431\u0438\u0442\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0441 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 <strong>A<\/strong> \u0438 <strong>B<\/strong> ?<\/p>\n<p>\u0412\u0435\u0440\u043d\u0435\u0435, \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0443\u0431\u0438\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439? \u0412\u0435\u0434\u044c \u043b\u044e\u0431\u043e\u0439 QDK \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0443\u0431\u0438\u0442\u0430 (\u0438 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438).<\/p>\n<p>\u041d\u0443 \u0430 \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 <strong>H<\/strong> \u0438 <strong>Controlled X<\/strong>.<\/p>\n<h3>\u041a\u0430\u043a \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443?<\/h3>\n<p>\u0412\u0430\u0436\u043d\u0435\u0439\u0448\u0435\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 &#8212; \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043a\u0443\u0431\u0438\u0442\u043e\u0432 \u0432 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 (\u043c\u0430\u0441\u0441\u0438\u0432) \u043a\u0443\u0431\u0438\u0442\u043e\u0432, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 <strong>SUM |k><\/strong> \u0433\u0434\u0435 <strong>k=0..N-1<\/strong> &#8212; \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 <strong>0..N-1<\/strong> \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e <strong>0..N-1<\/strong> \u043d\u0430 \u0434\u0432\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 <strong>A<\/strong> \u0438 <strong>B<\/strong> \u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>f(k)={0, if k in A, \u0438 1, if k in B}<\/strong>. \u041e\u0447\u0435\u0432\u043e\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>k<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e <strong>P(f(k)==0)=|A|\/N<\/strong> \u0438 <strong>P(f(k)==1)=|B|\/N<\/strong> \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c <strong>|A|+|B|=N<\/strong>.<\/p>\n<p>\u0410 \u043a\u0430\u043a \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c <strong>0..N-1<\/strong> \u043d\u0430 \u0434\u0432\u0430 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 &#8212; \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <strong>fw(k)={0, if k lt w, \u0438 1, if k ge w}<\/strong> \u0438\u043b\u0438, \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 <strong>fw(k)=SIGN(w-k-1)<\/strong>, \u0433\u0434\u0435 <strong>SIGN(x)={0 if x ge 0, 1 if x lt 0}<\/strong><\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c <strong>p=P(0)=w\/N<\/strong> \u0438 <strong>q=P(1)=(N-w)\/N<\/strong><\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0434\u043b\u044f \u0431\u0443\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>fw<\/strong><\/p>\n<p><strong>Uw(x,y)=(x,y xor fw(x))<\/strong><\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/post_images\/155\/f8e\/af5\/155f8eaf591efa02a2313113f7ff4250.jpg\" alt=\"\u0421\u0445\u0435\u043c\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/155\/f8e\/af5\/155f8eaf591efa02a2313113f7ff4250.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u043c\u0435\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 <strong>Uw<\/strong> \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 <strong>SUM |k>|0><\/strong> \u043e\u043d \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u0442 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <strong>SUM |k>|fw(k)><\/strong>, \u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u0443\u0431\u0438\u0442\u0430, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043d\u0451\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>|0><\/strong> \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e <strong>p=w\/N<\/strong> \u0438 <strong>|1><\/strong> \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e <strong>q=1-p=(N-w)\/N<\/strong>. \u0422\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u0443\u0431\u0438\u0442\u043e\u0432, \u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043a\u0443\u0431\u0438\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 <strong>SQRT(p)|0>+SQRT(q)|1><\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 &#8212; \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043a\u0443\u0431\u0438\u0442\u0430 (\u043c\u044b \u0437\u0430\u0434\u0430\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0443\u0431\u0438\u0442\u0430).<\/p>\n<h3>\u041a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b?<\/h3>\n<p>\u041e\u0442\u0432\u0435\u0442 &#8212; \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <strong>p<\/strong> \u0438 <strong>q<\/strong> \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u0443\u0431\u0438\u0442\u0430 \u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435). \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 <strong>|0><\/strong> \u0438 <strong>|1><\/strong> \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0441\u0442\u044c \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <strong>p<\/strong> \u0438 <strong>q<\/strong>.<\/p>\n<h3>\u0410 \u0432\u043e\u0442 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043a\u0430 \u0438 \u0435\u0451 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h3>\n<pre><code>namespace qrnd {      open Microsoft.Quantum.Canon;     open Microsoft.Quantum.Intrinsic;     open Microsoft.Quantum.Arrays;     open Microsoft.Quantum.Convert;     open Microsoft.Quantum.Math;     open Microsoft.Quantum.Logical;     open Microsoft.Quantum.Diagnostics;     open Microsoft.Quantum.Bitwise;          \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435) \u043a\u0443\u0431\u0438\u0442\u043e\u0432 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0440\u0435\u0433\u0438\u0441\u0442\u0440)     \/\/\/ \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0447\u0438\u0441\u043b\u0430 (\u0440\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438)     operation Measure(qubits: Qubit[]) : Int {         let results = ForEach(M, qubits);         let i = ResultArrayAsInt(results);         return i;     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u043a\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u043f\u0440\u0438 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f     \/\/\/ \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0430 |k>|0> -> |k>|sign(k+value)>     operation Sign(target: Qubit[], sign: Qubit, value: Int) : Unit {         let k = Length(target);         let bools = IntAsBoolArray(2^k-value, k);         use (qubits) = (Qubit[2]) {             for idx in 0..k-1 {                 let carry = qubits[idx%2];                 let next = qubits[1-(idx%2)];                 \/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0440\u0430\u0437\u0440\u044f\u0434\u0430                 if(bools[idx]) {                     \/\/ next = carry*target[idx]^carry^target[idx]                     Controlled X([carry, target[idx]], next);                     Controlled X([carry], next);                     Controlled X([target[idx]], next);                 }                 else {                     \/\/ next = carry*target[idx] = carry&amp;target[idx]                     Controlled X([carry, target[idx]], next);                 }                 Reset(carry);             }              Controlled X([qubits[k%2]], sign);             ResetAll(qubits);         }     }      @EntryPoint()     operation Main(n: Int, w: Int, tests: Int) : Unit {         Message(\"Hello quantum world!\");          let N=2^n;         let p=100*w\/N;         let q=100*(N-w)\/N;                  Message($\"n={n} w={w} N={N} p={p}% q={q}% tests={tests}\");          mutable counters = [0, size=2];         use (x,y)=(Qubit[n],Qubit()){             for _ in 1..tests {                 ApplyToEach(H,x);                 Sign(x,y,w);                 let res = Measure([y]);                 set counters w\/= res &lt;- counters[res]+1;                 ResetAll(x);                 Reset(y);             }         }          let f = [w,N-w];          mutable total = 0;         for element in f {             set total+=element;         }         for idx in 0..1 {             let expect = tests*f[idx]\/N;             let fact = counters[idx];             Message($\"{idx}: ... expect={expect} ... fact={fact}\");         }     } } <\/code><\/pre>\n<pre><code>PS C:\\Projects\\qrnd> dotnet run -n 4 -w 5 --tests 1000 Hello quantum world! n=4 w=5 N=16 p=31% q=68% tests=1000 0: ... expect=312 ... fact=289 1: ... expect=687 ... fact=711 PS C:\\Projects\\qrnd> dotnet run -n 4 -w 5 --tests 1000 Hello quantum world! n=4 w=5 N=16 p=31% q=68% tests=1000 0: ... expect=312 ... fact=275 1: ... expect=687 ... fact=725 PS C:\\Projects\\qrnd> dotnet run -n 4 -w 5 --tests 1000 Hello quantum world! n=4 w=5 N=16 p=31% q=68% tests=1000 0: ... expect=312 ... fact=292 1: ... expect=687 ... fact=708 PS C:\\Projects\\qrnd> dotnet run -n 4 -w 5 --tests 1000 Hello quantum world! n=4 w=5 N=16 p=31% q=68% tests=1000 0: ... expect=312 ... fact=324 1: ... expect=687 ... fact=676 <\/code><\/pre>\n<h3>\u0418 \u0437\u0430\u0434\u0430\u0447\u043a\u0430 \u0441\u043e \u0437\u0432\u0451\u0437\u0434\u043e\u0447\u043a\u043e\u0439<\/h3>\n<p>\u0410 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e <strong>U(w,x,y)=(w,x,y xor SIGN(w-x-1))<\/strong> \u0433\u0434\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>w<\/strong> \u0442\u0430\u043a \u0436\u0435 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0430\u043a \u0436\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0443\u043c\u043c\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 (\u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044f\u043c\u0438).<\/p>\n<p>\u041d\u043e \u044d\u0442\u043e, \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f, \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f &#8230; \u0442\u0443\u0442 \u0438 <strong>\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430<\/strong> \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c &#8230;<\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/dprotopopov\/qrnd\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/dprotopopov\/qrnd<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/azure\/quantum\/tutorial-qdk-grovers-search?tabs=tabid-visualstudio\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/azure\/quantum\/tutorial-qdk-grovers-search?tabs=tabid-visualstudio<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/azure\/quantum\/user-guide\/host-programs?tabs=tabid-copilot\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/azure\/quantum\/user-guide\/host-programs?tabs=tabid-copilot<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/training\/modules\/qsharp-create-first-quantum-development-kit\/2-install-quantum-development-kit-code\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/training\/modules\/qsharp-create-first-quantum-development-kit\/2-install-quantum-development-kit-code<\/a><\/p>\n<\/li>\n<\/ul>\n<h3>\u0420\u0430\u043d\u0435\u0435<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/p\/772172\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0443\u0447\u0430\u0435\u043c Q#. \u041e\u0431\u0443\u0447\u0430\u0435\u043c \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/p\/769148\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0443\u0447\u0430\u0435\u043c Q#. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0447\u0438\u0441\u0435\u043b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/p\/768666\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0443\u0447\u0430\u0435\u043c Q#. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430. \u041d\u0435 \u0431\u0443\u0434\u0438\u0442\u0435 \u0441\u043f\u044f\u0449\u0435\u0433\u043e \u0426\u0435\u0437\u0430\u0440\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/p\/766512\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0443\u0447\u0430\u0435\u043c Q#. \u0414\u0435\u043b\u0430\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u0438\u043d\u043e\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/p\/759352\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438 \u0432 Q#. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0414\u043e\u0439\u0447\u0430<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/772722\/\"> https:\/\/habr.com\/ru\/articles\/772722\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><\/figure>\n<h3>\u041f\u0440\u043e \u043a\u0443\u0431\u0438\u0442 \u0438 \u043f\u0440\u043e \u0414\u0438\u0440\u0430\u043a\u0430<\/h3>\n<p>\u041a\u0430\u043a \u0438 \u0431\u0438\u0442, \u043a\u0443\u0431\u0438\u0442 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0434\u0432\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u043c\u044b\u0445 <strong>|0><\/strong> \u0438 <strong>|1><\/strong> (\u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0414\u0438\u0440\u0430\u043a\u0430), \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0438 \u0432 \u0438\u0445 \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u0437\u0438\u0446\u0438\u0438.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u0432\u043e\u043b\u043d\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434 <strong>A|0>+B|1><\/strong>, \u0433\u0434\u0435 <strong>A<\/strong> \u0438 <strong>B<\/strong> \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0430\u043c\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0438\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044e <strong>|A|^2+|B|^2=1<\/strong> (\u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 &#8212; \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d).<\/p>\n<p>\u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u0443\u0431\u0438\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439.<\/p>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0440\u0430\u0432\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e <strong>|A|^2<\/strong> \u0438 <strong>|B|^2<\/strong>.<\/p>\n<p>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0443\u0431\u0438\u0442\u0430 \u043d\u0435\u043e\u0431\u0440\u0430\u0442\u0438\u043c\u043e \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0435\u0442\u0441\u044f, \u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0431\u0438\u0442\u0430.<\/p>\n<p>\u0412 \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 <strong>\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0410\u0434\u0430\u043c\u0430\u0440\u0430<\/strong> <strong>H<\/strong> \u043a \u043a\u0443\u0431\u0438\u0442\u0443 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 <strong>|0><\/strong> \u0434\u0430\u0451\u0442 \u043d\u0430\u043c \u0435\u0433\u043e \u0432 \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u043e\u0432 <strong>|0><\/strong> \u0438 <strong>|1><\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 <strong>|0>+|1><\/strong><\/p>\n<p>\u041d\u043e \u043a\u0430\u043a \u043d\u0430\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0443\u0431\u0438\u0442\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0441 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 <strong>A<\/strong> \u0438 <strong>B<\/strong> ?<\/p>\n<p>\u0412\u0435\u0440\u043d\u0435\u0435, \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0443\u0431\u0438\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439? \u0412\u0435\u0434\u044c \u043b\u044e\u0431\u043e\u0439 QDK \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0443\u0431\u0438\u0442\u0430 (\u0438 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438).<\/p>\n<p>\u041d\u0443 \u0430 \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 <strong>H<\/strong> \u0438 <strong>Controlled X<\/strong>.<\/p>\n<h3>\u041a\u0430\u043a \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443?<\/h3>\n<p>\u0412\u0430\u0436\u043d\u0435\u0439\u0448\u0435\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 &#8212; \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043a\u0443\u0431\u0438\u0442\u043e\u0432 \u0432 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 (\u043c\u0430\u0441\u0441\u0438\u0432) \u043a\u0443\u0431\u0438\u0442\u043e\u0432, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 <strong>SUM |k><\/strong> \u0433\u0434\u0435 <strong>k=0..N-1<\/strong> &#8212; \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 <strong>0..N-1<\/strong> \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e <strong>0..N-1<\/strong> \u043d\u0430 \u0434\u0432\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 <strong>A<\/strong> \u0438 <strong>B<\/strong> \u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>f(k)={0, if k in A, \u0438 1, if k in B}<\/strong>. \u041e\u0447\u0435\u0432\u043e\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>k<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e <strong>P(f(k)==0)=|A|\/N<\/strong> \u0438 <strong>P(f(k)==1)=|B|\/N<\/strong> \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c <strong>|A|+|B|=N<\/strong>.<\/p>\n<p>\u0410 \u043a\u0430\u043a \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c <strong>0..N-1<\/strong> \u043d\u0430 \u0434\u0432\u0430 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 &#8212; \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <strong>fw(k)={0, if k lt w, \u0438 1, if k ge w}<\/strong> \u0438\u043b\u0438, \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 <strong>fw(k)=SIGN(w-k-1)<\/strong>, \u0433\u0434\u0435 <strong>SIGN(x)={0 if x ge 0, 1 if x lt 0}<\/strong><\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c <strong>p=P(0)=w\/N<\/strong> \u0438 <strong>q=P(1)=(N-w)\/N<\/strong><\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0434\u043b\u044f \u0431\u0443\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>fw<\/strong><\/p>\n<p><strong>Uw(x,y)=(x,y xor fw(x))<\/strong><\/p>\n<figure class=\"\">\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u043c\u0435\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 <strong>Uw<\/strong> \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 <strong>SUM |k>|0><\/strong> \u043e\u043d \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u0442 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <strong>SUM |k>|fw(k)><\/strong>, \u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u0443\u0431\u0438\u0442\u0430, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043d\u0451\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>|0><\/strong> \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e <strong>p=w\/N<\/strong> \u0438 <strong>|1><\/strong> \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e <strong>q=1-p=(N-w)\/N<\/strong>. \u0422\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u0443\u0431\u0438\u0442\u043e\u0432, \u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043a\u0443\u0431\u0438\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 <strong>SQRT(p)|0>+SQRT(q)|1><\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 &#8212; \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043a\u0443\u0431\u0438\u0442\u0430 (\u043c\u044b \u0437\u0430\u0434\u0430\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0443\u0431\u0438\u0442\u0430).<\/p>\n<h3>\u041a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b?<\/h3>\n<p>\u041e\u0442\u0432\u0435\u0442 &#8212; \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <strong>p<\/strong> \u0438 <strong>q<\/strong> \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u0443\u0431\u0438\u0442\u0430 \u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435). \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 <strong>|0><\/strong> \u0438 <strong>|1><\/strong> \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0441\u0442\u044c \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <strong>p<\/strong> \u0438 <strong>q<\/strong>.<\/p>\n<h3>\u0410 \u0432\u043e\u0442 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043a\u0430 \u0438 \u0435\u0451 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h3>\n<pre><code>namespace qrnd {      open Microsoft.Quantum.Canon;     open Microsoft.Quantum.Intrinsic;     open Microsoft.Quantum.Arrays;     open Microsoft.Quantum.Convert;     open Microsoft.Quantum.Math;     open Microsoft.Quantum.Logical;     open Microsoft.Quantum.Diagnostics;     open Microsoft.Quantum.Bitwise;          \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435) \u043a\u0443\u0431\u0438\u0442\u043e\u0432 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0440\u0435\u0433\u0438\u0441\u0442\u0440)     \/\/\/ \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0447\u0438\u0441\u043b\u0430 (\u0440\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438)     operation Measure(qubits: Qubit[]) : Int {         let results = ForEach(M, qubits);         let i = ResultArrayAsInt(results);         return i;     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u043a\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u043f\u0440\u0438 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f     \/\/\/ \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0430 |k>|0> -> |k>|sign(k+value)>     operation Sign(target: Qubit[], sign: Qubit, value: Int) : Unit {         let k = Length(target);         let bools = IntAsBoolArray(2^k-value, k);         use (qubits) = (Qubit[2]) {             for idx in 0..k-1 {                 let carry = qubits[idx%2];                 let next = qubits[1-(idx%2)];                 \/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0440\u0430\u0437\u0440\u044f\u0434\u0430                 if(bools[idx]) {                     \/\/ next = carry*target[idx]^carry^target[idx]                     Controlled X([carry, target[idx]], next);                     Controlled X([carry], next);                     Controlled X([target[idx]], next);                 }                 else {                     \/\/ next = carry*target[idx] = carry&amp;target[idx]                     Controlled X([carry, target[idx]], next);                 }                 Reset(carry);             }              Controlled X([qubits[k%2]], sign);             ResetAll(qubits);         }     }      @EntryPoint()     operation Main(n: Int, w: Int, tests: Int) : Unit {         Message(\"Hello quantum world!\");          let N=2^n;         let p=100*w\/N;         let q=100*(N-w)\/N;                  Message($\"n={n} w={w} N={N} p={p}% q={q}% tests={tests}\");          mutable counters = [0, size=2];         use (x,y)=(Qubit[n],Qubit()){             for _ in 1..tests {                 ApplyToEach(H,x);                 Sign(x,y,w);                 let res = Measure([y]);                 set counters w\/= res &lt;- counters[res]+1;                 ResetAll(x);                 Reset(y);             }         }          let f = [w,N-w];          mutable total = 0;         for element in f {             set total+=element;         }         for idx in 0..1 {             let expect = tests*f[idx]\/N;             let fact = counters[idx];             Message($\"{idx}: ... expect={expect} ... fact={fact}\");         }     } } <\/code><\/pre>\n<pre><code>PS C:\\Projects\\qrnd> dotnet run -n 4 -w 5 --tests 1000 Hello quantum world! n=4 w=5 N=16 p=31% q=68% tests=1000 0: ... expect=312 ... fact=289 1: ... expect=687 ... fact=711 PS C:\\Projects\\qrnd> dotnet run -n 4 -w 5 --tests 1000 Hello quantum world! n=4 w=5 N=16 p=31% q=68% tests=1000 0: ... expect=312 ... fact=275 1: ... expect=687 ... fact=725 PS C:\\Projects\\qrnd> dotnet run -n 4 -w 5 --tests 1000 Hello quantum world! n=4 w=5 N=16 p=31% q=68% tests=1000 0: ... expect=312 ... fact=292 1: ... expect=687 ... fact=708 PS C:\\Projects\\qrnd> dotnet run -n 4 -w 5 --tests 1000 Hello quantum world! n=4 w=5 N=16 p=31% q=68% tests=1000 0: ... expect=312 ... fact=324 1: ... expect=687 ... fact=676 <\/code><\/pre>\n<h3>\u0418 \u0437\u0430\u0434\u0430\u0447\u043a\u0430 \u0441\u043e \u0437\u0432\u0451\u0437\u0434\u043e\u0447\u043a\u043e\u0439<\/h3>\n<p>\u0410 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e <strong>U(w,x,y)=(w,x,y xor SIGN(w-x-1))<\/strong> \u0433\u0434\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>w<\/strong> \u0442\u0430\u043a \u0436\u0435 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0430\u043a \u0436\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0443\u043c\u043c\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 (\u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044f\u043c\u0438).<\/p>\n<p>\u041d\u043e \u044d\u0442\u043e, \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f, \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f &#8230; \u0442\u0443\u0442 \u0438 <strong>\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430<\/strong> \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c &#8230;<\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/dprotopopov\/qrnd\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/dprotopopov\/qrnd<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/azure\/quantum\/tutorial-qdk-grovers-search?tabs=tabid-visualstudio\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/azure\/quantum\/tutorial-qdk-grovers-search?tabs=tabid-visualstudio<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/azure\/quantum\/user-guide\/host-programs?tabs=tabid-copilot\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/azure\/quantum\/user-guide\/host-programs?tabs=tabid-copilot<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/training\/modules\/qsharp-create-first-quantum-development-kit\/2-install-quantum-development-kit-code\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/training\/modules\/qsharp-create-first-quantum-development-kit\/2-install-quantum-development-kit-code<\/a><\/p>\n<\/li>\n<\/ul>\n<h3>\u0420\u0430\u043d\u0435\u0435<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/p\/772172\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0443\u0447\u0430\u0435\u043c Q#. \u041e\u0431\u0443\u0447\u0430\u0435\u043c \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/p\/769148\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0443\u0447\u0430\u0435\u043c Q#. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0447\u0438\u0441\u0435\u043b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/p\/768666\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0443\u0447\u0430\u0435\u043c Q#. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430. \u041d\u0435 \u0431\u0443\u0434\u0438\u0442\u0435 \u0441\u043f\u044f\u0449\u0435\u0433\u043e \u0426\u0435\u0437\u0430\u0440\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/p\/766512\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0443\u0447\u0430\u0435\u043c Q#. \u0414\u0435\u043b\u0430\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u0438\u043d\u043e\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/p\/759352\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438 \u0432 Q#. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0414\u043e\u0439\u0447\u0430<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/772722\/\"> https:\/\/habr.com\/ru\/articles\/772722\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-359670","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=359670"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359670\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=359670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=359670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=359670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}