{"id":359439,"date":"2024-05-21T00:32:41","date_gmt":"2024-05-21T00:32:41","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=359439"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=359439","title":{"rendered":"<span>\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<\/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\/4f0\/6cd\/375\/4f06cd3758f0dc30d550bceb45229deb.jpg\" alt=\"\u041d\u0435\u0440\u043e\u043d, \u043b\u044e\u0431\u0443\u044e\u0449\u0438\u0439\u0441\u044f \u0433\u043e\u0440\u044f\u0449\u0438\u043c \u0420\u0438\u043c\u043e\u043c. \u0425\u0443\u0434. \u041a\u0430\u0440\u043b \u0422\u0435\u043e\u0434\u043e\u0440 \u0444\u043e\u043d \u041f\u0438\u043b\u043e\u0442\u0438, 1861 \u0433.\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/4f0\/6cd\/375\/4f06cd3758f0dc30d550bceb45229deb.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041d\u0435\u0440\u043e\u043d, \u043b\u044e\u0431\u0443\u044e\u0449\u0438\u0439\u0441\u044f \u0433\u043e\u0440\u044f\u0449\u0438\u043c \u0420\u0438\u043c\u043e\u043c. \u0425\u0443\u0434. \u041a\u0430\u0440\u043b \u0422\u0435\u043e\u0434\u043e\u0440 \u0444\u043e\u043d \u041f\u0438\u043b\u043e\u0442\u0438, 1861 \u0433.<\/figcaption><\/div>\n<\/figure>\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439, \u043a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u0439\u0440\u043e\u043d\u0430, \u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u043d\u0435\u0439\u0440\u043e\u043d\u0430, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d.<\/p>\n<p>\u0421 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d \u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c\u044e, \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/90a\/7e2\/956\/90a7e2956ab9ead9ce6a9015d7e5e540.png\" alt=\"\u041e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u0430\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/90a\/7e2\/956\/90a7e2956ab9ead9ce6a9015d7e5e540.png\"\/><\/p>\n<div><figcaption>\u041e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>f(SUM Wi*xi &#8212; W0)<\/strong><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c<\/p>\n<ul>\n<li>\n<p><strong>x1,&#8230;,xn<\/strong> \u2013 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 <strong>x=(x1,x2,&#8230;,xn)<\/strong>;<\/p>\n<\/li>\n<li>\n<p><strong>SUM<\/strong> \u2013 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440;<\/p>\n<\/li>\n<li>\n<p><strong>W1,W2,&#8230;,Wn<\/strong> \u2013 \u0441\u0438\u043d\u043e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0435\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>f<\/strong> \u2013 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438; <strong>f(v)= { 0 \u043f\u0440\u0438  v &lt; 0 \u0438 1 \u043f\u0440\u0438 v>0 }<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>W0<\/strong> \u2013 \u043f\u043e\u0440\u043e\u0433.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0435\u0439\u0440\u043e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043d\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <strong>g(X)=f(SUM Wi*Xi &#8212; W0)<\/strong>.<\/p>\n<p>\u0418 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u0435\u0446\u0435\u0434\u0435\u043d\u0442\u043e\u0432 <strong>(Xk,Yk)<\/strong> \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u0430, \u0442.\u0435. \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432\u0435\u0441\u043e\u0432 <strong>W1,W2,&#8230;,Wn<\/strong> \u0438 \u043f\u043e\u0440\u043e\u0433\u0430 <strong>W0<\/strong>.<\/p>\n<h4>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d<\/h4>\n<ul>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c <strong>W0,W1,W2,&#8230;Wn<\/strong> (\u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438)<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 <strong>(Xk,Yk)<\/strong> \u043f\u043e\u043a\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f <strong>f(SUM WiXki &#8212; W0)==Yi<\/strong> \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<\/li>\n<li>\n<p><strong>W = W + r(Yk &#8212; f(SUM WiXki &#8212; W0))Xk<\/strong>, \u0433\u0434\u0435 <strong>0 &lt; r &lt; 1<\/strong> &#8212; \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f <strong>\u0442\u0435\u043e\u0440\u0435\u043c\u0430 \u041d\u043e\u0432\u0438\u043a\u043e\u0432\u0430<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0449\u0430\u044f \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c, \u0442\u043e \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c.<\/p>\n<p>\u0427\u0442\u043e \u0436\u0435 \u043d\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d\u0430 &#8212; \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u0438\u043d\u043e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435?<\/p>\n<p>\u041e\u0442\u0432\u0435\u0442 &#8212; \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u0442\u043e\u0442 &#8212; \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u043d\u0430\u0448\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c &#8212; \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f \u043f\u043e<\/p>\n<ul>\n<li>\n<p>\u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044f\u043c<\/p>\n<\/li>\n<li>\n<p>\u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c (\u043a\u0443\u0431\u0438\u0442\u044b \u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438)<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0430 Q-sharp<\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043c\u0443\u0442\u0438\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041f\u0443\u0441\u0442\u044c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 <strong>(Xk,Yk)<\/strong>, \u0433\u0434\u0435 <strong>Xk<\/strong> &#8212; \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0438\u0437 <strong>{0,1}^n<\/strong>, \u0438 <strong>Yk<\/strong> &#8212; \u0442\u043e\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u0437 <strong>{0,1}<\/strong> (\u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u0438 \u043d\u0438 \u0432 \u043a\u043e\u0435\u0439 \u043c\u0435\u0440\u0435 \u043d\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0435).<\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d\u0430, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e <strong>W0,W1,W2,&#8230;,Wn<\/strong> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438<\/p>\n<ul>\n<li>\n<p>\u043d\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u0432 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u0435\u0441\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b <strong>W0,W1,W2,&#8230;,Wn<\/strong> \u0432 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0442\u0430\u043a\u0436\u0435, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>W0,W1,W2,&#8230;,Wn<\/strong> \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0441 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c <strong>m<\/strong> \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432 (\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0440\u0430\u0437\u0440\u044f\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u043a \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430)<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e<\/p>\n<ul>\n<li>\n<p>\u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c <strong>m(n+1)<\/strong> \u043a\u0443\u0431\u0438\u0442\u043e\u0432 \u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u043a\u0430\u043a \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <strong>n+1<\/strong> \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 <strong>W0,W1,W2,&#8230;,Wn<\/strong>,<\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 <strong>(Xk,Yk)<\/strong> \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043d\u0435\u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 <strong>Error(W) = SUM (sign(SUM Wi Xki &#8212; W0) xor Yk)<\/strong>, \u0433\u0434\u0435 <strong>sign<\/strong> &#8212; \u0432\u0437\u044f\u0442\u0438\u0435 \u0441\u0442\u0430\u0440\u0448\u0435\u0433\u043e (\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e) \u0440\u0430\u0437\u0440\u044f\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 <strong>W<\/strong>, \u0447\u0442\u043e <strong>Error(W)=0<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0442\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 &#8212; \u044d\u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f <strong>\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0413\u0440\u043e\u0432\u0435\u0440\u0430<\/strong>!!! \u0410 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e.<\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u044b\u0439, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0435\u0439 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0438\u0441\u043a, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 &#171;\u0447\u0451\u0440\u043d\u044b\u0439 \u044f\u0449\u0438\u043a&#187; <strong>f: {0,1}^n to {0,1}^n<\/strong>, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e <strong>EXISTS!w:f(w)=a<\/strong>, \u0433\u0434\u0435 <strong>a<\/strong> &#8212; \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u0434\u043b\u044f <strong>f<\/strong> \u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e <strong>a<\/strong> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0440\u0430\u043a\u0443\u043b <strong>Uf: { |w> to |1>, |x> to |0> if |x> != |w> }<\/strong>)<\/p>\n<h3>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442<\/h3>\n<ol>\n<li>\n<p>\u0417\u0430\u0434\u0430\u0451\u043c \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 (\u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043a\u0443\u0431\u0438\u0442\u043e\u0432) \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>H|0><\/strong><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 (\u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043e\u0446\u0435\u043d\u043a\u0438) \u043f\u0430\u0440\u0443 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>\u041e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f <strong>Uw: { |w> to -|w>, |x> to |x> if |x> !=|w> }<\/strong> \u0438\u043b\u0438 <strong>Uw = I-2|w>&lt;w|<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 <strong>s=H|0><\/strong> <strong>Us = 2|s>&lt;s|-I<\/strong><\/p>\n<\/li>\n<\/ul>\n<ol start=\"3\">\n<li>\n<p>\u0417\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 (\u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u043e\u043b\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e \u043e\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435)<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0441\u0432\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d\u0430 \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u043a\u0435, \u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 &#8212; <strong>\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0413\u0440\u043e\u0432\u0435\u0440\u0430<\/strong>.<\/p>\n<h3>\u0410 \u0437\u0430\u0447\u0435\u043c \u0432\u0441\u0451 \u044d\u0442\u043e, \u0437\u0434\u0435\u0441\u044c \u0436\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0440\u0430\u0441\u0447\u0451\u0442\u044b, \u0438 \u0438\u0445 \u0434\u0430\u0436\u0435 \u0441\u0442\u0430\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435?<\/h3>\n<p>\u0415\u0441\u043b\u0438, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 <strong>\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430<\/strong>, \u0442\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c, \u0432\u043c\u0435\u0441\u0442\u043e <strong>N\/M<\/strong> \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u043e\u043d \u0442\u0440\u0435\u0431\u0443\u0435\u0442 <strong>PI\/4*SQRT(N\/M)<\/strong> \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u0433\u0434\u0435 <strong>N<\/strong> &#8212; \u0447\u0438\u0441\u043b\u043e \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430, \u0430 <strong>M<\/strong> &#8212; \u0447\u0438\u0441\u043b\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, <strong>N=2^(m(n+1))<\/strong> \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0446\u0435\u043d\u043a\u0443 <strong>O(2^(m(n+1)\/2))<\/strong> \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0447\u0442\u043e \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 <strong>m<\/strong> \u0438 <strong>n<\/strong> \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0433\u043e\u0434\u0443 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041e\u0442\u0432\u0435\u0447\u0443 &#8212; <strong>\u0434\u0430<\/strong>, \u0432\u044b \u043f\u0440\u0430\u0432\u044b \u0432 \u0441\u0432\u043e\u0438\u0445 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f\u0445 <strong>\u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/strong>. \u041b\u0438\u0447\u043d\u043e \u044f \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e (\u0443\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441) \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e \u043d\u0438\u0445 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043e \u043d\u0438\u0445 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043a\u0430\u043a RSA). \u0410 \u043f\u043e\u043a\u0430, \u043f\u0440\u0438\u043c\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d\u0430 \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.<\/p>\n<blockquote>\n<p>\u0420\u043e\u043d \u0420\u0438\u0432\u0435\u0441\u0442, \u0410\u0434\u0438 \u0428\u0430\u043c\u0438\u0440 \u0438 \u041b\u0435\u043e\u043d\u0430\u0440\u0434 \u0410\u0434\u043b\u0435\u043c\u0430\u043d \u0438\u0437 \u041c\u0430\u0441\u0441\u0430\u0447\u0443\u0441\u0435\u0442\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0442\u0430 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0433\u043e\u0434\u0430 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044e\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u044b\u043b\u043e \u0431\u044b \u0442\u0440\u0443\u0434\u043d\u043e \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0420\u0438\u0432\u0435\u0441\u0442 \u0438 \u0428\u0430\u043c\u0438\u0440, \u0431\u0443\u0434\u0443\u0447\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u043c\u0438 \u0443\u0447\u0435\u043d\u044b\u043c\u0438, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0430 \u0410\u0434\u043b\u0435\u043c\u0430\u043d, \u0431\u0443\u0434\u0443\u0447\u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u043c, \u043e\u0442\u0432\u0435\u0447\u0430\u043b \u0437\u0430 \u043f\u043e\u0438\u0441\u043a \u0438\u0445 \u0441\u043b\u0430\u0431\u044b\u0445 \u043c\u0435\u0441\u0442. \u041e\u043d\u0438 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f &#171;\u0440\u0430\u043d\u0446\u0435\u0432\u044b\u0439&#187; \u0438 &#171;\u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u044b&#187;. \u041a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u043d\u0438 \u0434\u0443\u043c\u0430\u043b\u0438, \u0447\u0442\u043e-\u0442\u043e, \u0447\u0435\u0433\u043e \u043e\u043d\u0438 \u0445\u043e\u0442\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0438\u0447\u044c, \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0437-\u0437\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0432\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439. \u0412 \u0430\u043f\u0440\u0435\u043b\u0435 <strong>1977<\/strong> \u0433\u043e\u0434\u0430 \u043e\u043d\u0438 \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u041f\u0435\u0441\u0430\u0445 \u0432 \u0434\u043e\u043c\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u0432 \u0438 \u0432\u044b\u043f\u0438\u043b\u0438 \u043c\u043d\u043e\u0433\u043e \u043c\u0430\u043d\u0438\u0448\u0435\u0432\u0438\u0446\u043a\u043e\u0433\u043e \u0432\u0438\u043d\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u0435\u0440\u043d\u0443\u043b\u0438\u0441\u044c \u043a \u0441\u0435\u0431\u0435 \u0434\u043e\u043c\u043e\u0439 \u043e\u043a\u043e\u043b\u043e \u043f\u043e\u043b\u0443\u043d\u043e\u0447\u0438. \u0420\u0438\u0432\u0435\u0441\u0442, \u043d\u0435 \u0432 \u0441\u0438\u043b\u0430\u0445 \u0437\u0430\u0441\u043d\u0443\u0442\u044c, \u043b\u0435\u0433 \u043d\u0430 \u0434\u0438\u0432\u0430\u043d \u0441 \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u043e\u043c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0438 \u043d\u0430\u0447\u0430\u043b \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0441\u0432\u043e\u0435\u0439 \u043e\u0434\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041e\u0441\u0442\u0430\u0442\u043e\u043a \u043d\u043e\u0447\u0438 \u043e\u043d \u043f\u0440\u043e\u0432\u0435\u043b, \u0444\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u044f \u0441\u0432\u043e\u044e \u0438\u0434\u0435\u044e, \u0438 \u043a \u0440\u0430\u0441\u0441\u0432\u0435\u0442\u0443 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u0430 \u0433\u043e\u0442\u043e\u0432\u0430. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043a\u0430\u043a RSA &#8212; \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u044b \u0438\u0445 \u0444\u0430\u043c\u0438\u043b\u0438\u0439 \u0432 \u0442\u043e\u043c \u0436\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0447\u0442\u043e \u0438 \u0432 \u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<\/blockquote>\n<blockquote>\n<p>\u041a\u043b\u0438\u0444\u0444\u043e\u0440\u0434 \u041a\u043e\u043a\u0441, \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a, \u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0438\u0439 \u0432 \u0431\u0440\u0438\u0442\u0430\u043d\u0441\u043a\u043e\u0439 \u0440\u0430\u0437\u0432\u0435\u0434\u044b\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u0435 Government Communications Headquarters (GCHQ), \u043e\u043f\u0438\u0441\u0430\u043b \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u0432 <strong>1973<\/strong> \u0433. \u041e\u0434\u043d\u0430\u043a\u043e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043e\u043d\u0430 \u0441\u0447\u0438\u0442\u0430\u043b\u0430\u0441\u044c \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043a\u0443\u0440\u044c\u0435\u0437\u043e\u043c \u0438, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0442\u0430\u043a \u0438 \u043d\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 1997 \u0433\u043e\u0434\u0443 \u0438\u0437-\u0437\u0430 \u0435\u0433\u043e \u0441\u0432\u0435\u0440\u0445\u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0441\u0435\u043a\u0440\u0435\u0447\u0438\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/blockquote>\n<p>\u0410 \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u043e\u0440\u043e\u043a\u0430 \u0431\u043b\u0435\u0441\u0442\u044f\u0448\u043a\u0443 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 &#8230;<\/p>\n<h3>\u0422\u0430\u043a, \u0447\u0442\u043e \u043a\u043e\u0434\u0438\u043c &#8230;<\/h3>\n<p>\u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/p>\n<ul>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438 \u043d\u0430\u0434 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c \u0438\u0437 \u043a\u0443\u0431\u0438\u0442\u043e\u0432 <\/p>\n<ul>\n<li>\n<p>\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f <strong>Inc:|k> to |k+1><\/strong><\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f <strong>Add:|a>|b> to |a+b>|b><\/strong><\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <strong>AddiInt:|k>,value to |k+value><\/strong><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre><code>    \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043a\u0443\u0431\u0438\u0442\u043e\u0432 (\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440)     \/\/\/ \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0430 |k> -> |k+1>     operation Inc(target: Qubit[]) : Unit is Ctl {         let n = Length(target);         for idx in 1..n {             Controlled X(target[0..n-idx-1], target[n-idx]);         }      }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043a\u0443\u0431\u0438\u0442\u043e\u0432 (\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440)     \/\/\/ \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0430 |k>|value> -> |k+value>|value>     operation Add(target: Qubit[], value: Qubit[]) : Unit {         let n = Length(target);         use (qubits) = (Qubit[2]) {             for idx in 0..n-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                 \/\/ next = carry+target[idx]+value[idx]>=2                 Controlled X([carry, target[idx]], next);                 Controlled X([carry, value[idx]], next);                 Controlled X([target[idx], value[idx]], next);                 Controlled X([carry, target[idx], value[idx]], next);                 \/\/ target[idx] = carry^target[idx]^value[idx]                 Controlled X([value[idx]], target[idx]);                 Controlled X([carry], target[idx]);                 Reset(carry);             }              ResetAll(qubits);         }     }          \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043a\u0443\u0431\u0438\u0442\u043e\u0432 (\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440)     \/\/\/ \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0430 |k> -> |k+value>     operation AddInt(target: Qubit[], value: Int) : Unit {         let n = Length(target);         mutable bools = [false, size=n];         if(value>0) {             let tmp = IntAsBoolArray(value, n);             for i in 0..n-1 {                 set bools w\/= i &lt;- tmp[i];             }         }         if(value&lt;0) {              \/\/ value = ~(-value)+1             let tmp = IntAsBoolArray(-value, n);             mutable carry = true;             for i in 0..n-1 {                 let next = carry and not tmp[i];                 set bools w\/= i &lt;- (not tmp[i] and not carry) or (tmp[i] and carry);                 set carry = next;             }          }          use (qubits) = (Qubit[2]) {             for idx in 0..n-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] = 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);                 }                                  \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0431\u0438\u0442\u0430                 Controlled X([carry], target[idx]);                 if(bools[idx]) {                     X(target[idx]);                 }                 Reset(carry);             }              ResetAll(qubits);         }     } <\/code><\/pre>\n<ul>\n<li>\n<p>\u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b<\/p>\n<\/li>\n<\/ul>\n<pre><code>    \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043a\u0443\u0431\u0438\u0442\u043e\u0432     operation Copy(source: Qubit[], target: Qubit[]) : Unit {         let n = Length(source);         for i in 0..(n-1) {             Controlled X([source[i]], target[i]);         }     }       \/\/\/ # \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)     operation Measure(qubits: Qubit[]) : Bool[] {         let results = ForEach(M, qubits);         return ResultArrayAsBoolArray(results);     }      \/\/\/ # \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)     operation MeasureWeights(n: Int, m: Int, qubits: Qubit[]) : Int[] {         let results = ForEach(M, qubits);         mutable w = [0, size=n+1];         for i in 0..n {             let j = ResultArrayAsInt(results[i*m..(i+1)*m-1]);             if((j&amp;&amp;&amp;(2^(m-1))) == 0) {                 set w w\/= i &lt;- j;             }             else {                 set w w\/= i &lt;- -((j^^^(2^m-1))+1);             }         }         return w;     } <\/code><\/pre>\n<ul>\n<li>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>SUM Wi xi &#8212; W0<\/strong> (\u0433\u0434\u0435 <strong>Wi<\/strong> &#8212; \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0438\u0437 <strong>m<\/strong> \u043a\u0443\u0431\u0438\u0442\u043e\u0432, <strong>xi<\/strong> &#8212; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 <strong>{0,1}<\/strong>) \u0438 \u043e\u0440\u0430\u043a\u0443\u043b \u0434\u043b\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0413\u0440\u043e\u0432\u0435\u0440\u0430 <strong>U(W)=SUM (sign(SUM Wi Xki &#8212; W0) xor Yk)<\/strong><\/p>\n<\/li>\n<\/ul>\n<pre><code>    \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u043f\u043e\u0434\u0441\u0447\u0451\u0442 \u0441\u0443\u043c\u043c\u044b \u0432\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430     operation SumOfWeights(n: Int, m: Int, arg: Bool[], W: Qubit[], target: Qubit[]) : Unit {         \/\/ target = -W0 = ~W0 + 1         Copy(W[0..m-1], target);         ApplyToEach(X, target);         Inc(target);          for i in 1..n {             if(arg[i-1]) {                 Add(target, W[i*m..(i+1)*m-1]);             }         }     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u043f\u043e\u0434\u0441\u0447\u0451\u0442 \u0447\u0438\u0441\u043b\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438     operation CountErrors(n: Int, m: Int, l: Int, args: Bool[][], values: Bool[], W: Qubit[], target: Qubit[]) : Unit {         for i in 0..l-1 {             use (qubits) = (Qubit[m]) {                 SumOfWeights(n, m, args[i], W, qubits);                 if(not values[i]) {                     X(qubits[m-1]);                 }                 Controlled Inc([qubits[m-1]],target);                 ResetAll(qubits);             }         }     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0440\u0430\u043a\u043b\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0433\u0440\u043e\u0432\u0435\u0440\u0430     \/\/\/ \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 - \u044d\u0442\u043e \u0442\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0448\u0438\u0431\u043e\u043a     operation NoErrorOracle(n: Int, m: Int, l: Int, args: Bool[][], values: Bool[], W: Qubit[], target: Qubit) : Unit {         use (error) = (Qubit[m]) {             CountErrors(n, m, l, args, values, W, error);             ApplyToEach(X, error);             Controlled X(error, target);             ResetAll(error);         }     } <\/code><\/pre>\n<ul>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0413\u0440\u043e\u0432\u0435\u0440\u0430 (\u0432\u0437\u044f\u0442\u043e \u0441 <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<ul>\n<li>\n<p>\u041e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 <strong>H|0><\/strong><\/p>\n<\/li>\n<li>\n<p>\u0418, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0446\u0438\u043a\u043b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0413\u0440\u043e\u0432\u0435\u0440\u0430<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre><code>    \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0448\u0430\u0433 \u0434\u043b\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0433\u0440\u043e\u0432\u0435\u0440\u0430     \/\/\/ \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f         operation ReflectAboutSolution(oracle : (Qubit[], Qubit) => Unit, register : Qubit[]) : Unit {         use (target)=(Qubit()){             within {                 X(target);                 H(target);             }             apply {                 oracle(register, target);             }         }     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0448\u0430\u0433 \u0434\u043b\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0433\u0440\u043e\u0432\u0435\u0440\u0430     \/\/\/ \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 H|0>     operation ReflectAboutUniform(inputQubits : Qubit[]) : Unit {         within {             ApplyToEachA(H, inputQubits);             ApplyToEachA(X, inputQubits);         }         apply {             Controlled Z(Most(inputQubits), Tail(inputQubits));         }     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0433\u0440\u043e\u0432\u0435\u0440\u0430     operation RunGroversSearch(register : Qubit[], oracle : (Qubit[], Qubit) => Unit, iterations : Int) : Unit {         ApplyToEach(H, register);         for _ in 1 .. iterations {             ReflectAboutSolution(oracle, register);             ReflectAboutUniform(register);         }     } <\/code><\/pre>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0442\u0435\u0441\u0442<\/h3>\n<ul>\n<li>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443<\/p>\n<\/li>\n<\/ul>\n<pre><code>   \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438     operation RandomWeights(n: Int, m: Int) : Int[] {         use (qubits)=(Qubit[m*(n+1)]){             ApplyToEach(H, qubits);             let w = MeasureWeights(n, m, qubits);             ResetAll(qubits);             return w;         }     }       \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438     operation RandomTrain(n: Int, m: Int, w: Int[], l: Int) : (Bool[][],Bool[]) {         mutable args = [[false, size=n], size = l];         mutable values = [false, size = l];         use qubits = Qubit[n] {             for idx in 0..l-1 {                 ApplyToEach(H, qubits);                 let arg = Measure(qubits);                 mutable s = -w[0];                 for j in 1..n {                     if(arg[j-1]) {                         set s+=w[j];                     }                 }                 let value = s>=0;                 set args w\/= idx &lt;- arg;                 set values w\/= idx &lt;- value;                 ResetAll(qubits);             }         }         return (args,values);     }          \/\/ \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435         mutable rand_w = [0, size=n+1];         mutable (args,values)=([[false, size=n],size=l],[false,size=l]);         mutable isAllZero = false;         mutable isAllOne = false;          repeat {             let temp_w = RandomWeights(n, 2);             let (temp_args,temp_values) = RandomTrain(n, m, temp_w, l);             set isAllOne = true;             set isAllZero = true;             for i in 0..n {                 set rand_w w\/= i &lt;- temp_w[i];             }              for i in 0..l-1 {                 set args w\/= i &lt;- temp_args[i];                 set values w\/= i &lt;- temp_values[i];                 set isAllOne = isAllOne and values[i];                 set isAllZero = isAllZero and not values[i];             }          }         until (not isAllOne and not isAllZero);          Message($\"n={n} m={m} l={l} m*(n+1)={m*(n+1)} rand_w={rand_w}\");                  for i in 0..l-1 {             Message($\"TrainData: {args[i]} -> {values[i]}\");         }          let noErrorOracle = NoErrorOracle(n, m, l, args, values, _, _); <\/code><\/pre>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0440\u0430\u043a\u043b\u0430<\/p>\n<\/li>\n<\/ul>\n<pre><code>        let noErrorOracle = NoErrorOracle(n, m, l, args, values, _, _);          \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0440\u0430\u043a\u043b\u0430         use (qubits, oracle)=(Qubit[m*(n+1)],Qubit()) {             for i in 0..n {                 AddInt(qubits[i*m..(i+1)*m-1], rand_w[i]);              }             noErrorOracle(qubits, oracle);             let w = MeasureWeights(n, m, qubits);             Message($\"SelfCheck: {w} ... oracle = {M(oracle)}\");             if(M(oracle)==One){                 Message($\"SelfCheck: Success!!! {w}\");             }             ResetAll(qubits);             Reset(oracle);         } <\/code><\/pre>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430<\/p>\n<\/li>\n<\/ul>\n<pre><code>        \/\/ \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0433\u0440\u043e\u0432\u0435\u0440\u0430         \/\/ \u0442\u043e\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0448\u0430\u0433\u043e\u0432 \u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u043c (\u0437\u043d\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0446\u0435\u043d\u043a\u0443)         \/\/ \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439         \/\/ \u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u043e\u0441\u043b\u0435 groverIterations \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438         \/\/ \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u043f\u0435\u0445\u0430 \u043d\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 2*groverIterations.         \/\/ \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0441\u043d\u043e\u0432\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0434\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 3*groverIterations \u0438 \u0442. \u0434.         \/\/ \u0412 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0438\u043c\u0435\u0435\u0442 \u0432\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430,          \/\/ \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b \u0440\u0435\u0448\u0438\u0442\u0435 \u0435\u0435. \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0435\u0439 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f          \/\/ \"\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\" \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u0443\u0442\u0435\u043c \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u0432\u043e\u0439\u043a\u0438 (\u0442. \u0435. 1,2,4,8,...).         \/\/ \u041e\u0434\u043d\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u0438\u043c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0448\u0435\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u0435         \/\/ \u0441\u043e \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u043a\u043e\u043b\u043e SQRT(2^n\/S)           mutable currenIterations = 1;         set isSuccess = false;         repeat{             let repeatTests = 3;             mutable currentTest = 0;             repeat {                 set currentTest += 1;                 use (qubits, oracle) = (Qubit[m*(n+1)], Qubit()){                     RunGroversSearch(qubits, noErrorOracle, currenIterations);                     noErrorOracle(qubits, oracle);                     let w = MeasureWeights(n, m, qubits);                     Message($\"GroversSearch: iterations = {currenIterations} ... {w} ... oracle = {M(oracle)}\");                     if(M(oracle)==One){                         set isSuccess = true;                         Message($\"GroversSearch: Success!!! {w}\");                     }                     ResetAll(qubits);                     Reset(oracle);                 }             }             until(currentTest>=repeatTests or isSuccess);             set currenIterations *= 2;         }         until (isSuccess); <\/code><\/pre>\n<h4>\u041f\u043e\u043b\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u043a\u043e\u0434\u0430<\/h4>\n<pre><code>namespace qperceptron {      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;          \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043a\u0443\u0431\u0438\u0442\u043e\u0432 (\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440)     \/\/\/ \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0430 |k> -> |k+1>     operation Inc(target: Qubit[]) : Unit is Ctl {         let n = Length(target);         for idx in 1..n {             Controlled X(target[0..n-idx-1], target[n-idx]);         }      }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043a\u0443\u0431\u0438\u0442\u043e\u0432 (\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440)     \/\/\/ \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0430 |k>|value> -> |k+value>|value>     operation Add(target: Qubit[], value: Qubit[]) : Unit {         let n = Length(target);         use (qubits) = (Qubit[2]) {             for idx in 0..n-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                 \/\/ next = carry+target[idx]+value[idx]>=2                 Controlled X([carry, target[idx]], next);                 Controlled X([carry, value[idx]], next);                 Controlled X([target[idx], value[idx]], next);                 Controlled X([carry, target[idx], value[idx]], next);                 \/\/ target[idx] = carry^target[idx]^value[idx]                 Controlled X([value[idx]], target[idx]);                 Controlled X([carry], target[idx]);                 Reset(carry);             }              ResetAll(qubits);         }     }          \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043a\u0443\u0431\u0438\u0442\u043e\u0432 (\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440)     \/\/\/ \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0430 |k> -> |k+value>     operation AddInt(target: Qubit[], value: Int) : Unit {         let n = Length(target);         mutable bools = [false, size=n];         if(value>0) {             let tmp = IntAsBoolArray(value, n);             for i in 0..n-1 {                 set bools w\/= i &lt;- tmp[i];             }         }         if(value&lt;0) {              \/\/ value = ~(-value)+1             let tmp = IntAsBoolArray(-value, n);             mutable carry = true;             for i in 0..n-1 {                 let next = carry and not tmp[i];                 set bools w\/= i &lt;- (not tmp[i] and not carry) or (tmp[i] and carry);                 set carry = next;             }          }          use (qubits) = (Qubit[2]) {             for idx in 0..n-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] = 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);                 }                                  \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0431\u0438\u0442\u0430                 Controlled X([carry], target[idx]);                 if(bools[idx]) {                     X(target[idx]);                 }                 Reset(carry);             }              ResetAll(qubits);         }     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043a\u0443\u0431\u0438\u0442\u043e\u0432     operation Copy(source: Qubit[], target: Qubit[]) : Unit {         let n = Length(source);         for i in 0..(n-1) {             Controlled X([source[i]], target[i]);         }     }       \/\/\/ # \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)     operation Measure(qubits: Qubit[]) : Bool[] {         let results = ForEach(M, qubits);         return ResultArrayAsBoolArray(results);     }      \/\/\/ # \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)     operation MeasureWeights(n: Int, m: Int, qubits: Qubit[]) : Int[] {         let results = ForEach(M, qubits);         mutable w = [0, size=n+1];         for i in 0..n {             let j = ResultArrayAsInt(results[i*m..(i+1)*m-1]);             if((j&amp;&amp;&amp;(2^(m-1))) == 0) {                 set w w\/= i &lt;- j;             }             else {                 set w w\/= i &lt;- -((j^^^(2^m-1))+1);             }         }         return w;     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u043f\u043e\u0434\u0441\u0447\u0451\u0442 \u0441\u0443\u043c\u043c\u044b \u0432\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430     operation SumOfWeights(n: Int, m: Int, arg: Bool[], W: Qubit[], target: Qubit[]) : Unit {         \/\/ target = -W0 = ~W0 + 1         Copy(W[0..m-1], target);         ApplyToEach(X, target);         Inc(target);          for i in 1..n {             if(arg[i-1]) {                 Add(target, W[i*m..(i+1)*m-1]);             }         }     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u043f\u043e\u0434\u0441\u0447\u0451\u0442 \u0447\u0438\u0441\u043b\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438     operation CountErrors(n: Int, m: Int, l: Int, args: Bool[][], values: Bool[], W: Qubit[], target: Qubit[]) : Unit {         for i in 0..l-1 {             use (qubits) = (Qubit[m]) {                 SumOfWeights(n, m, args[i], W, qubits);                 if(not values[i]) {                     X(qubits[m-1]);                 }                 Controlled Inc([qubits[m-1]],target);                 ResetAll(qubits);             }         }     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0440\u0430\u043a\u043b\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0433\u0440\u043e\u0432\u0435\u0440\u0430     \/\/\/ \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 - \u044d\u0442\u043e \u0442\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0448\u0438\u0431\u043e\u043a     operation NoErrorOracle(n: Int, m: Int, l: Int, args: Bool[][], values: Bool[], W: Qubit[], target: Qubit) : Unit {         use (error) = (Qubit[m]) {             CountErrors(n, m, l, args, values, W, error);             ApplyToEach(X, error);             Controlled X(error, target);             ResetAll(error);         }     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0448\u0430\u0433 \u0434\u043b\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0433\u0440\u043e\u0432\u0435\u0440\u0430     \/\/\/ \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f         operation ReflectAboutSolution(oracle : (Qubit[], Qubit) => Unit, register : Qubit[]) : Unit {         use (target)=(Qubit()){             within {                 X(target);                 H(target);             }             apply {                 oracle(register, target);             }         }     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0448\u0430\u0433 \u0434\u043b\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0433\u0440\u043e\u0432\u0435\u0440\u0430     \/\/\/ \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 H|0>     operation ReflectAboutUniform(inputQubits : Qubit[]) : Unit {         within {             ApplyToEachA(H, inputQubits);             ApplyToEachA(X, inputQubits);         }         apply {             Controlled Z(Most(inputQubits), Tail(inputQubits));         }     }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0433\u0440\u043e\u0432\u0435\u0440\u0430     operation RunGroversSearch(register : Qubit[], oracle : (Qubit[], Qubit) => Unit, iterations : Int) : Unit {         ApplyToEach(H, register);         for _ in 1 .. iterations {             ReflectAboutSolution(oracle, register);             ReflectAboutUniform(register);         }     }           \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438     operation RandomWeights(n: Int, m: Int) : Int[] {         use (qubits)=(Qubit[m*(n+1)]){             ApplyToEach(H, qubits);             let w = MeasureWeights(n, m, qubits);             ResetAll(qubits);             return w;         }     }       \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438     operation RandomTrain(n: Int, m: Int, w: Int[], l: Int) : (Bool[][],Bool[]) {         mutable args = [[false, size=n], size = l];         mutable values = [false, size = l];         use qubits = Qubit[n] {             for idx in 0..l-1 {                 ApplyToEach(H, qubits);                 let arg = Measure(qubits);                 mutable s = -w[0];                 for j in 1..n {                     if(arg[j-1]) {                         set s+=w[j];                     }                 }                 let value = s>=0;                 set args w\/= idx &lt;- arg;                 set values w\/= idx &lt;- value;                 ResetAll(qubits);             }         }         return (args,values);     }      @EntryPoint()     operation Main(n: Int, m: Int, l: Int) : Unit {         Message(\"Hello quantum world!\");          \/\/ \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435         mutable rand_w = [0, size=n+1];         mutable (args,values)=([[false, size=n],size=l],[false,size=l]);         mutable isAllZero = false;         mutable isAllOne = false;          repeat {             let temp_w = RandomWeights(n, 2);             let (temp_args,temp_values) = RandomTrain(n, m, temp_w, l);             set isAllOne = true;             set isAllZero = true;             for i in 0..n {                 set rand_w w\/= i &lt;- temp_w[i];             }              for i in 0..l-1 {                 set args w\/= i &lt;- temp_args[i];                 set values w\/= i &lt;- temp_values[i];                 set isAllOne = isAllOne and values[i];                 set isAllZero = isAllZero and not values[i];             }          }         until (not isAllOne and not isAllZero);          Message($\"n={n} m={m} l={l} m*(n+1)={m*(n+1)} rand_w={rand_w}\");                  for i in 0..l-1 {             Message($\"TrainData: {args[i]} -> {values[i]}\");         }          let noErrorOracle = NoErrorOracle(n, m, l, args, values, _, _);          \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0440\u0430\u043a\u043b\u0430         use (qubits, oracle)=(Qubit[m*(n+1)],Qubit()) {             for i in 0..n {                 AddInt(qubits[i*m..(i+1)*m-1], rand_w[i]);              }             noErrorOracle(qubits, oracle);             let w = MeasureWeights(n, m, qubits);             Message($\"SelfCheck: {w} ... oracle = {M(oracle)}\");             if(M(oracle)==One){                 Message($\"SelfCheck: Success!!! {w}\");             }             ResetAll(qubits);             Reset(oracle);         }          let groverIterations = Round(PI()\/4.0*Sqrt(IntAsDouble(2^(m*(n+1)))));         Message($\"GroversSearch: groverIterations = {groverIterations}?\");          mutable isSuccess = false;          \/\/ \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0433\u0440\u043e\u0432\u0435\u0440\u0430         \/\/ \u0442\u043e\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0448\u0430\u0433\u043e\u0432 \u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u043c (\u0437\u043d\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0446\u0435\u043d\u043a\u0443)         \/\/ \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439         \/\/ \u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u043e\u0441\u043b\u0435 groverIterations \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438         \/\/ \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u043f\u0435\u0445\u0430 \u043d\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 2*groverIterations.         \/\/ \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0441\u043d\u043e\u0432\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0434\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 3*groverIterations \u0438 \u0442. \u0434.         \/\/ \u0412 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0438\u043c\u0435\u0435\u0442 \u0432\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430,          \/\/ \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b \u0440\u0435\u0448\u0438\u0442\u0435 \u0435\u0435. \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0435\u0439 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f          \/\/ \"\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\" \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u0443\u0442\u0435\u043c \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u0432\u043e\u0439\u043a\u0438 (\u0442. \u0435. 1,2,4,8,...).         \/\/ \u041e\u0434\u043d\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u0438\u043c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0448\u0435\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u0435         \/\/ \u0441\u043e \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u043a\u043e\u043b\u043e SQRT(2^n\/S)           mutable currenIterations = 1;         set isSuccess = false;         repeat{             let repeatTests = 3;             mutable currentTest = 0;             repeat {                 set currentTest += 1;                 use (qubits, oracle) = (Qubit[m*(n+1)], Qubit()){                     RunGroversSearch(qubits, noErrorOracle, currenIterations);                     noErrorOracle(qubits, oracle);                     let w = MeasureWeights(n, m, qubits);                     Message($\"GroversSearch: iterations = {currenIterations} ... {w} ... oracle = {M(oracle)}\");                     if(M(oracle)==One){                         set isSuccess = true;                         Message($\"GroversSearch: Success!!! {w}\");                     }                     ResetAll(qubits);                     Reset(oracle);                 }             }             until(currentTest>=repeatTests or isSuccess);             set currenIterations *= 2;         }         until (isSuccess);     } } <\/code><\/pre>\n<h3>\u0418 \u043f\u043e\u0442\u0435\u0441\u0442\u0438\u043c &#8230;<\/h3>\n<pre><code>PS C:\\Projects\\qperceptron> dotnet run -n 3 -m 3 -l 5  Hello quantum world! n=3 m=3 l=5 m*(n+1)=12 rand_w=[0,1,-1,0] TrainData: [False,True,False] -> False TrainData: [False,True,True] -> False TrainData: [False,False,True] -> True TrainData: [False,False,True] -> True TrainData: [True,False,True] -> True SelfCheck: [0,1,-1,0] ... oracle = One SelfCheck: Success!!! [0,1,-1,0] GroversSearch: groverIterations = 50? GroversSearch: iterations = 1 ... [2,-2,0,-3] ... oracle = Zero GroversSearch: iterations = 1 ... [-2,-4,-2,-1] ... oracle = Zero GroversSearch: iterations = 1 ... [2,-4,-3,-3] ... oracle = Zero GroversSearch: iterations = 2 ... [3,1,1,-1] ... oracle = Zero GroversSearch: iterations = 2 ... [-2,3,-1,-3] ... oracle = Zero GroversSearch: iterations = 2 ... [3,-1,-3,3] ... oracle = Zero GroversSearch: iterations = 4 ... [-1,-1,-1,1] ... oracle = Zero GroversSearch: iterations = 4 ... [3,-3,2,-1] ... oracle = Zero GroversSearch: iterations = 4 ... [2,2,1,-1] ... oracle = Zero GroversSearch: iterations = 8 ... [-1,0,3,2] ... oracle = One GroversSearch: Success!!! [-1,0,3,2] <\/code><\/pre>\n<blockquote>\n<p>\u2014 \u0412\u0430\u0448\u0435 \u0421\u0438\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e, \u043c\u043e\u0436\u0435\u0442 \u043c\u044b \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u043a\u0443 \u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c? <br \/> \u2014 \u0410, \u043d\u0443 \u0447\u0442\u043e \u0436\u0435, \u043d\u0435 \u0437\u0440\u044f \u0436\u0435 \u0432\u044b \u0435\u0451 \u043f\u043e\u043a\u0443\u043f\u0430\u043b\u0438&#8230; \u0414\u0430 \u0438 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439. <br \/> \u2014 \u041d\u043e\u0432\u0435\u043d\u044c\u043a\u0430\u044f! \u0422\u0443\u0442, \u0412\u0430\u0448\u0435 \u0421\u0438\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e, \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0438 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0430 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u043f\u0430\u043b\u044c\u0447\u0438\u043a! <br \/> \u2014 \u0414\u0430. \u0412 \u0441\u043c\u044b\u0441\u043b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043d\u0430\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0434\u043e \u043d\u0438\u0445 \u0434\u0430\u043b\u0435\u043a\u043e. <br \/> \u2014 \u0422\u0430\u043a, \u0410\u0444\u043e\u043d\u044c\u043a\u0430&#8230; \u0422\u044b \u0443 \u043d\u0435\u0451 \u0431\u0443\u0434\u0435\u0448\u044c \u043f\u0435\u0440\u0432\u044b\u0439. \u0412\u0435\u0449\u044c \u0445\u043e\u0440\u043e\u0448\u0430\u044f, \u043e\u0441\u0442\u0430\u043d\u0435\u0448\u044c\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u044b\u0439!<\/p>\n<\/blockquote>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/post_images\/411\/952\/140\/4119521405e9ca7fc6cdefe0e486ac22.jpg\" alt=\"\u0414\u0430. \u0412 \u0441\u043c\u044b\u0441\u043b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043d\u0430\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0434\u043e \u043d\u0438\u0445 \u0434\u0430\u043b\u0435\u043a\u043e...\u041d\u0430\u043c \u0431\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u0440\u0443\u0433\u0430\u0442\u044c...\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/411\/952\/140\/4119521405e9ca7fc6cdefe0e486ac22.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0414\u0430. \u0412 \u0441\u043c\u044b\u0441\u043b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043d\u0430\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0434\u043e \u043d\u0438\u0445 \u0434\u0430\u043b\u0435\u043a\u043e&#8230;\u041d\u0430\u043c \u0431\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u0440\u0443\u0433\u0430\u0442\u044c&#8230;<\/figcaption><\/div>\n<\/figure>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/dprotopopov\/qperceptron\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/dprotopopov\/qperceptron<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/intuit.ru\/studies\/courses\/2265\/243\/lecture\/6245?page=3\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u043e\u0440\u0435\u043c\u0430 \u041d\u043e\u0432\u0438\u043a\u043e\u0432\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/intuit.ru\/studies\/courses\/2265\/243\/lecture\/6245?page=2\" rel=\"noopener noreferrer nofollow\">\u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D0%B5%D1%80%D1%86%D0%B5%D0%BF%D1%82%D1%80%D0%BE%D0%BD\" rel=\"noopener noreferrer nofollow\">https:\/\/ru.wikipedia.org\/wiki\/\u041f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%90%D0%BB%D0%B3%D0%BE%D1%80%D0%B8%D1%82%D0%BC_%D0%93%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%B0\" rel=\"noopener noreferrer nofollow\">https:\/\/ru.wikipedia.org\/wiki\/\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c_\u0413\u0440\u043e\u0432\u0435\u0440\u0430<\/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<li>\n<p><a href=\"https:\/\/ru.wikipedia.org\/wiki\/RSA\" rel=\"noopener noreferrer nofollow\">https:\/\/ru.wikipedia.org\/wiki\/RSA<\/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\/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\/772172\/\"> https:\/\/habr.com\/ru\/articles\/772172\/<\/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=\"\">\n<div><figcaption>\u041d\u0435\u0440\u043e\u043d, \u043b\u044e\u0431\u0443\u044e\u0449\u0438\u0439\u0441\u044f \u0433\u043e\u0440\u044f\u0449\u0438\u043c \u0420\u0438\u043c\u043e\u043c. \u0425\u0443\u0434. \u041a\u0430\u0440\u043b \u0422\u0435\u043e\u0434\u043e\u0440 \u0444\u043e\u043d \u041f\u0438\u043b\u043e\u0442\u0438, 1861 \u0433.<\/figcaption><\/div>\n<\/figure>\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439, \u043a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u0439\u0440\u043e\u043d\u0430, \u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u043d\u0435\u0439\u0440\u043e\u043d\u0430, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d.<\/p>\n<p>\u0421 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d \u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c\u044e, \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c.<\/p>\n<figure class=\"\">\n<div><figcaption>\u041e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>f(SUM Wi*xi &#8212; W0)<\/strong><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c<\/p>\n<ul>\n<li>\n<p><strong>x1,&#8230;,xn<\/strong> \u2013 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 <strong>x=(x1,x2,&#8230;,xn)<\/strong>;<\/p>\n<\/li>\n<li>\n<p><strong>SUM<\/strong> \u2013 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440;<\/p>\n<\/li>\n<li>\n<p><strong>W1,W2,&#8230;,Wn<\/strong> \u2013 \u0441\u0438\u043d\u043e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0435\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>f<\/strong> \u2013 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438; <strong>f(v)= { 0 \u043f\u0440\u0438  v &lt; 0 \u0438 1 \u043f\u0440\u0438 v>0 }<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>W0<\/strong> \u2013 \u043f\u043e\u0440\u043e\u0433.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0435\u0439\u0440\u043e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043d\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <strong>g(X)=f(SUM Wi*Xi &#8212; W0)<\/strong>.<\/p>\n<p>\u0418 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u0435\u0446\u0435\u0434\u0435\u043d\u0442\u043e\u0432 <strong>(Xk,Yk)<\/strong> \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u0430, \u0442.\u0435. \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432\u0435\u0441\u043e\u0432 <strong>W1,W2,&#8230;,Wn<\/strong> \u0438 \u043f\u043e\u0440\u043e\u0433\u0430 <strong>W0<\/strong>.<\/p>\n<h4>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d<\/h4>\n<ul>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c <strong>W0,W1,W2,&#8230;Wn<\/strong> (\u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438)<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 <strong>(Xk,Yk)<\/strong> \u043f\u043e\u043a\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f <strong>f(SUM WiXki &#8212; W0)==Yi<\/strong> \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<\/li>\n<li>\n<p><strong>W = W + r(Yk &#8212; f(SUM WiXki &#8212; W0))Xk<\/strong>, \u0433\u0434\u0435 <strong>0 &lt; r &lt; 1<\/strong> &#8212; \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f <strong>\u0442\u0435\u043e\u0440\u0435\u043c\u0430 \u041d\u043e\u0432\u0438\u043a\u043e\u0432\u0430<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0449\u0430\u044f \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c, \u0442\u043e \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c.<\/p>\n<p>\u0427\u0442\u043e \u0436\u0435 \u043d\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d\u0430 &#8212; \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u0438\u043d\u043e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435?<\/p>\n<p>\u041e\u0442\u0432\u0435\u0442 &#8212; \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u0442\u043e\u0442 &#8212; \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u043d\u0430\u0448\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c &#8212; \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f \u043f\u043e<\/p>\n<ul>\n<li>\n<p>\u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044f\u043c<\/p>\n<\/li>\n<li>\n<p>\u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c (\u043a\u0443\u0431\u0438\u0442\u044b \u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438)<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0430 Q-sharp<\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043c\u0443\u0442\u0438\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041f\u0443\u0441\u0442\u044c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 <strong>(Xk,Yk)<\/strong>, \u0433\u0434\u0435 <strong>Xk<\/strong> &#8212; \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0438\u0437 <strong>{0,1}^n<\/strong>, \u0438 <strong>Yk<\/strong> &#8212; \u0442\u043e\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u0437 <strong>{0,1}<\/strong> (\u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u0438 \u043d\u0438 \u0432 \u043a\u043e\u0435\u0439 \u043c\u0435\u0440\u0435 \u043d\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0435).<\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d\u0430, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e <strong>W0,W1,W2,&#8230;,Wn<\/strong> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438<\/p>\n<ul>\n<li>\n<p>\u043d\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u0432 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u0435\u0441\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b <strong>W0,W1,W2,&#8230;,Wn<\/strong> \u0432 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0442\u0430\u043a\u0436\u0435, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>W0,W1,W2,&#8230;,Wn<\/strong> \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0441 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c <strong>m<\/strong> \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432 (\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0440\u0430\u0437\u0440\u044f\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u043a \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430)<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e<\/p>\n<ul>\n<li>\n<p>\u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c <strong>m(n+1)<\/strong> \u043a\u0443\u0431\u0438\u0442\u043e\u0432 \u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u043a\u0430\u043a \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <strong>n+1<\/strong> \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 <strong>W0,W1,W2,&#8230;,Wn<\/strong>,<\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 <strong>(Xk,Yk)<\/strong> \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043d\u0435\u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 <strong>Error(W) = SUM (sign(SUM Wi Xki &#8212; W0) xor Yk)<\/strong>, \u0433\u0434\u0435 <strong>sign<\/strong> &#8212; \u0432\u0437\u044f\u0442\u0438\u0435 \u0441\u0442\u0430\u0440\u0448\u0435\u0433\u043e (\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e) \u0440\u0430\u0437\u0440\u044f\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 <strong>W<\/strong>, \u0447\u0442\u043e <strong>Error(W)=0<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0442\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 &#8212; \u044d\u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f <strong>\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0413\u0440\u043e\u0432\u0435\u0440\u0430<\/strong>!!! \u0410 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e.<\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u044b\u0439, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0435\u0439 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0438\u0441\u043a, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 &#171;\u0447\u0451\u0440\u043d\u044b\u0439 \u044f\u0449\u0438\u043a&#187; <strong>f: {0,1}^n to {0,1}^n<\/strong>, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e <strong>EXISTS!w:f(w)=a<\/strong>, \u0433\u0434\u0435 <strong>a<\/strong> &#8212; \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u0434\u043b\u044f <strong>f<\/strong> \u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e <strong>a<\/strong> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0440\u0430\u043a\u0443\u043b <strong>Uf: { |w> to |1>, |x> to |0> if |x> != |w> }<\/strong>)<\/p>\n<h3>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442<\/h3>\n<ol>\n<li>\n<p>\u0417\u0430\u0434\u0430\u0451\u043c \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 (\u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043a\u0443\u0431\u0438\u0442\u043e\u0432) \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>H|0><\/strong><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 (\u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043e\u0446\u0435\u043d\u043a\u0438) \u043f\u0430\u0440\u0443 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>\u041e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f <strong>Uw: { |w> to -|w>, |x> to |x> if |x> !=|w> }<\/strong> \u0438\u043b\u0438 <strong>Uw = I-2|w>&lt;w|<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 <strong>s=H|0><\/strong> <strong>Us = 2|s>&lt;s|-I<\/strong><\/p>\n<\/li>\n<\/ul>\n<ol start=\"3\">\n<li>\n<p>\u0417\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 (\u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u043e\u043b\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e \u043e\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435)<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0441\u0432\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d\u0430 \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u043a\u0435, \u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 &#8212; <strong>\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0413\u0440\u043e\u0432\u0435\u0440\u0430<\/strong>.<\/p>\n<h3>\u0410 \u0437\u0430\u0447\u0435\u043c \u0432\u0441\u0451 \u044d\u0442\u043e, \u0437\u0434\u0435\u0441\u044c \u0436\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0440\u0430\u0441\u0447\u0451\u0442\u044b, \u0438 \u0438\u0445 \u0434\u0430\u0436\u0435 \u0441\u0442\u0430\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435?<\/h3>\n<p>\u0415\u0441\u043b\u0438, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 <strong>\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430<\/strong>, \u0442\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c, \u0432\u043c\u0435\u0441\u0442\u043e <strong>N\/M<\/strong> \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u043e\u043d \u0442\u0440\u0435\u0431\u0443\u0435\u0442 <strong>PI\/4*SQRT(N\/M)<\/strong> \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u0433\u0434\u0435 <strong>N<\/strong> &#8212; \u0447\u0438\u0441\u043b\u043e \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430, \u0430 <strong>M<\/strong> &#8212; \u0447\u0438\u0441\u043b\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, <strong>N=2^(m(n+1))<\/strong> \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0446\u0435\u043d\u043a\u0443 <strong>O(2^(m(n+1)\/2))<\/strong> \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0447\u0442\u043e \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 <strong>m<\/strong> \u0438 <strong>n<\/strong> \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0433\u043e\u0434\u0443 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041e\u0442\u0432\u0435\u0447\u0443 &#8212; <strong>\u0434\u0430<\/strong>, \u0432\u044b \u043f\u0440\u0430\u0432\u044b \u0432 \u0441\u0432\u043e\u0438\u0445 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f\u0445 <strong>\u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/strong>. \u041b\u0438\u0447\u043d\u043e \u044f \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e (\u0443\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441) \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0413\u0440\u043e\u0432\u0435\u0440\u0430 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e \u043d\u0438\u0445 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043e \u043d\u0438\u0445 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043a\u0430\u043a RSA). \u0410 \u043f\u043e\u043a\u0430, \u043f\u0440\u0438\u043c\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d\u0430 \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.<\/p>\n<blockquote>\n<p>\u0420\u043e\u043d \u0420\u0438\u0432\u0435\u0441\u0442, \u0410\u0434\u0438 \u0428\u0430\u043c\u0438\u0440 \u0438 \u041b\u0435\u043e\u043d\u0430\u0440\u0434 \u0410\u0434\u043b\u0435\u043c\u0430\u043d \u0438\u0437 \u041c\u0430\u0441\u0441\u0430\u0447\u0443\u0441\u0435\u0442\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0442\u0430 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0433\u043e\u0434\u0430 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044e\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u044b\u043b\u043e \u0431\u044b \u0442\u0440\u0443\u0434\u043d\u043e \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0420\u0438\u0432\u0435\u0441\u0442 \u0438 \u0428\u0430\u043c\u0438\u0440, \u0431\u0443\u0434\u0443\u0447\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u043c\u0438 \u0443\u0447\u0435\u043d\u044b\u043c\u0438, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0430 \u0410\u0434\u043b\u0435\u043c\u0430\u043d, \u0431\u0443\u0434\u0443\u0447\u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u043c, \u043e\u0442\u0432\u0435\u0447\u0430\u043b \u0437\u0430 \u043f\u043e\u0438\u0441\u043a \u0438\u0445 \u0441\u043b\u0430\u0431\u044b\u0445 \u043c\u0435\u0441\u0442. \u041e\u043d\u0438 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f &#171;\u0440\u0430\u043d\u0446\u0435\u0432\u044b\u0439&#187; \u0438 &#171;\u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u044b&#187;. \u041a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u043d\u0438 \u0434\u0443\u043c\u0430\u043b\u0438, \u0447\u0442\u043e-\u0442\u043e, \u0447\u0435\u0433\u043e \u043e\u043d\u0438 \u0445\u043e\u0442\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0438\u0447\u044c, \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0437-\u0437\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0432\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439. \u0412 \u0430\u043f\u0440\u0435\u043b\u0435 <strong>1977<\/strong> \u0433\u043e\u0434\u0430 \u043e\u043d\u0438 \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u041f\u0435\u0441\u0430\u0445 \u0432 \u0434\u043e\u043c\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u0432 \u0438 \u0432\u044b\u043f\u0438\u043b\u0438 \u043c\u043d\u043e\u0433\u043e \u043c\u0430\u043d\u0438\u0448\u0435\u0432\u0438\u0446\u043a\u043e\u0433\u043e \u0432\u0438\u043d\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u0435\u0440\u043d\u0443\u043b\u0438\u0441\u044c \u043a \u0441\u0435\u0431\u0435 \u0434\u043e\u043c\u043e\u0439 \u043e\u043a\u043e\u043b\u043e \u043f\u043e\u043b\u0443\u043d\u043e\u0447\u0438. \u0420\u0438\u0432\u0435\u0441\u0442, \u043d\u0435 \u0432 \u0441\u0438\u043b\u0430\u0445 \u0437\u0430\u0441\u043d\u0443\u0442\u044c, \u043b\u0435\u0433 \u043d\u0430 \u0434\u0438\u0432\u0430\u043d \u0441 \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u043e\u043c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0438 \u043d\u0430\u0447\u0430\u043b \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0441\u0432\u043e\u0435\u0439 \u043e\u0434\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041e\u0441\u0442\u0430\u0442\u043e\u043a \u043d\u043e\u0447\u0438 \u043e\u043d \u043f\u0440\u043e\u0432\u0435\u043b, \u0444\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u044f \u0441\u0432\u043e\u044e \u0438\u0434\u0435\u044e, \u0438 \u043a \u0440\u0430\u0441\u0441\u0432\u0435\u0442\u0443 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u0430 \u0433\u043e\u0442\u043e\u0432\u0430. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043a\u0430\u043a RSA &#8212; \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u044b \u0438\u0445 \u0444\u0430\u043c\u0438\u043b\u0438\u0439 \u0432 \u0442\u043e\u043c \u0436\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0447\u0442\u043e \u0438 \u0432 \u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<\/blockquote>\n<blockquote>\n<p>\u041a\u043b\u0438\u0444\u0444\u043e\u0440\u0434 \u041a\u043e\u043a\u0441, \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a, \u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0438\u0439 \u0432 \u0431\u0440\u0438\u0442\u0430\u043d\u0441\u043a\u043e\u0439 \u0440\u0430\u0437\u0432\u0435\u0434\u044b\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u0435 Government Communications Headquarters (GCHQ), \u043e\u043f\u0438\u0441\u0430\u043b \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u0432 <strong>1973<\/strong> \u0433. \u041e\u0434\u043d\u0430\u043a\u043e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043e\u043d\u0430 \u0441\u0447\u0438\u0442\u0430\u043b\u0430\u0441\u044c \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043a\u0443\u0440\u044c\u0435\u0437\u043e\u043c \u0438, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0442\u0430\u043a \u0438 \u043d\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 1997 \u0433\u043e\u0434\u0443 \u0438\u0437-\u0437\u0430 \u0435\u0433\u043e \u0441\u0432\u0435\u0440\u0445\u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0441\u0435\u043a\u0440\u0435\u0447\u0438\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/blockquote>\n<p>\u0410 \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u043e\u0440\u043e\u043a\u0430 \u0431\u043b\u0435\u0441\u0442\u044f\u0448\u043a\u0443 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 &#8230;<\/p>\n<h3>\u0422\u0430\u043a, \u0447\u0442\u043e \u043a\u043e\u0434\u0438\u043c &#8230;<\/h3>\n<p>\u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/p>\n<ul>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438 \u043d\u0430\u0434 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c \u0438\u0437 \u043a\u0443\u0431\u0438\u0442\u043e\u0432 <\/p>\n<ul>\n<li>\n<p>\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f <strong>Inc:|k> to |k+1><\/strong><\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f <strong>Add:|a>|b> to |a+b>|b><\/strong><\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <strong>AddiInt:|k>,value to |k+value><\/strong><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre><code>    \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043a\u0443\u0431\u0438\u0442\u043e\u0432 (\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440)     \/\/\/ \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0430 |k> -> |k+1>     operation Inc(target: Qubit[]) : Unit is Ctl {         let n = Length(target);         for idx in 1..n {             Controlled X(target[0..n-idx-1], target[n-idx]);         }      }      \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043a\u0443\u0431\u0438\u0442\u043e\u0432 (\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440)     \/\/\/ \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0430 |k>|value> -> |k+value>|value>     operation Add(target: Qubit[], value: Qubit[]) : Unit {         let n = Length(target);         use (qubits) = (Qubit[2]) {             for idx in 0..n-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                 \/\/ next = carry+target[idx]+value[idx]>=2                 Controlled X([carry, target[idx]], next);                 Controlled X([carry, value[idx]], next);                 Controlled X([target[idx], value[idx]], next);                 Controlled X([carry, target[idx], value[idx]], next);                 \/\/ target[idx] = carry^target[idx]^value[idx]                 Controlled X([value[idx]], target[idx]);                 Controlled X([carry], target[idx]);                 Reset(carry);             }              ResetAll(qubits);         }     }          \/\/\/ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435     \/\/\/ \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043a\u0443\u0431\u0438\u0442\u043e\u0432 (\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440)     \/\/\/ \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0430 |k> -> |k+value>     operation AddInt(target: Qubit[], value: Int) : Unit {         let n = Length(target);         mutable bools = [false, size=n];         if(value>0) {             let tmp = IntAsBoolArray(value, n);             for i in 0..n-1 {                 set bools w\/= i &lt;- tmp[i];             }         }         if(value&lt;0) {              \/\/ value = ~(-value)+1             let tmp = IntAsBoolArray(-value, n);             mutable carry = true;             for i in 0..n-1 {                 let next = carry and not tmp[i];                 set bools w\/= i &lt;- (not tmp[i] and not carry) or (tmp[i] and carry);                 set carry = next;             }          }          use (qubits) = (Qubit[2]) {             for idx in 0..n-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] = 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);                 }                                  \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0431\u0438\u0442\u0430  <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-359439","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359439","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=359439"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359439\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=359439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=359439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=359439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}