{"id":381,"date":"2025-09-07T22:43:50","date_gmt":"2025-09-07T13:43:50","guid":{"rendered":"https:\/\/techwalkin.net\/?p=381"},"modified":"2025-09-07T22:51:00","modified_gmt":"2025-09-07T13:51:00","slug":"post-381","status":"publish","type":"post","link":"https:\/\/techwalkin.net\/?p=381","title":{"rendered":"\u30a2\u30c0\u30de\u30fc\u30eb\u30b2\u30fc\u30c8"},"content":{"rendered":"\n<p>\u30b9\u30d4\u30f3\u306a\u3093\u304b\u306eZ\u8ef8\u306e\u4e0a\u5411\u304d\u30fb\u4e0b\u5411\u304d\u3092\u57fa\u5e95\u306b\u3068\u3063\u3066\u3001\u305d\u308c\u3089\u3092 \\(  \\Ket{0} \\) \u3068 \\(  \\Ket{1} \\) \u3067\u66f8\u304f\u3053\u3068\u306b\u3059\u308b\u3002 \u3053\u306e\u3068\u304d\u3001\u30a2\u30c0\u30de\u30fc\u30eb\u30b2\u30fc\u30c8 (Hadamard) \\( H \\) \u306f\u3001\\[  H = \\frac{1}{\\sqrt{2}} \\begin{pmatrix} 1 &amp; 1 \\\\ 1 &amp; -1 \\end{pmatrix} \\] \u3068\u304b\u3051\u308b\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u305f\u3068\u3048\u3070\u3001\\[ \\Ket{0} \\to \\frac{1}{\\sqrt{2}} \\left( \\Ket{0} + \\Ket{1} \\right) \\] \u3068\u5909\u63db\u3055\u308c\u308b\u3002<\/p>\n\n\n\n<p>\u6b21\u306b\u3001 \\( n \\) \u91cf\u5b50\u30d3\u30c3\u30c8\u3092\u8003\u3048\u308b\u3053\u3068\u306b\u3059\u308b\u3002\u521d\u671f\u72b6\u614b\u3068\u3057\u3066\u3059\u3079\u3066 \\( \\Ket{0} \\) \u3067\u3042\u308b\u91cf\u5b50\u30d3\u30c3\u30c8\u3092\u8003\u3048\u308b\u3068\u3059\u308b\u3068\u3001$$ \\bigotimes_{n} \\Ket{0} = \\Ket{0}^{\\otimes n}$$ \u3068\u30c6\u30f3\u30bd\u30eb\u7a4d\u3092\u4f7f\u3063\u3066\u8868\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u304c (\u53f3\u8fba\u306f\u5de6\u8fba\u3092\u4ee5\u4e0b\u3053\u3046\u66f8\u304f\u3068\u3044\u3046\u610f\u5473)\u3001\u3053\u306e\\( n \\)\u91cf\u5b50\u30d3\u30c3\u30c8\u3092\\( 1 \\) \u30d3\u30c3\u30c8\u305a\u3064\u305d\u308c\u305e\u308c\u30a2\u30c0\u30de\u30fc\u30eb\u30b2\u30fc\u30c8 \\( H \\) \u3092\u4f5c\u7528\u3055\u305b\u308b\u3068\u3001$$ \\begin{equation} \\begin{split} H^{\\otimes n} \\Ket{0}^{\\otimes n} &amp;= \\bigotimes_{n} \\left[ \\frac{1}{\\sqrt{2}} \\left( \\Ket{0} + \\Ket{1}\\right) \\right] \\\\ &amp;= \\frac{1}{\\sqrt{2^n}} \\sum_{k=0}^{2^n-1} \\Ket{k} \\end{split} \\end{equation}$$ \u3068\u66f8\u3051\u3001\u305d\u3046\u3060\u306a\u3042\u3068\u3044\u3064\u3082\u601d\u3046\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u3044\u3064\u3082\u308f\u304b\u3089\u306a\u304f\u306a\u308b\u306e\u306f\u3053\u3053\u304b\u3089\u3067\u4eca\u65e5\u306e\u30c6\u30fc\u30de\u306b\u3057\u305f\u3044\u3002\u3082\u3046\u3044\u3063\u304b\u3044\u30a2\u30c0\u30de\u30fc\u30eb\u30b2\u30fc\u30c8\u3092\u4f5c\u7528\u3055\u305b\u3066\u307f\u308b\u3053\u3068\u3092\u8003\u3048\u308b\u3002\u3059\u306a\u308f\u3061\u3001$$ H^{\\otimes n} \\left( H^{\\otimes n} \\Ket{0}^{\\otimes n} \\right) = H^{\\otimes n} \\left( \\frac{1}{\\sqrt{2^n}} \\sum_{k=0}^{2^n-1} \\Ket{k} \\right) $$ \u3092\u8a08\u7b97\u3057\u3066\u3044\u304d\u305f\u3044\u3002<\/p>\n\n\n\n<p>\u5f0f\u306f \\(k \\) \u306e\u7dcf\u548c\u306a\u306e\u3067\u3001\u3068\u308a\u3042\u3048\u305a \\( k = y \\) \u3068\u306a\u308b \\( y \\) \u306e\u9805\u3092\u8003\u3048\u3066\u307f\u308b\u3002\u307e\u305a\u7b2c\\( 1 \\) \u30d3\u30c3\u30c8\u76ee\u304b\u3089\u8003\u3048\u3066\u3044\u304f\u3068\u3001\u3082\u3057 \\( \\Ket{0} \\) \u3067\u3042\u308c\u3070\u3001\\[ \\Ket{0} \\to \\frac{1}{\\sqrt{2}} \\left( \\Ket{0} + \\Ket{1} \\right) \\]  \u3068\u5909\u63db\u3055\u308c\u3001\u3082\u3057\\( \\Ket{1} \\) \u3067\u3042\u308c\u3070\u3001\\[ \\Ket{1} \\to \\frac{1}{\\sqrt{2}} \\left( \\Ket{0} &#8211; \\Ket{1} \\right) \\] \u3068\u5909\u63db\u3055\u308c\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u3053\u3067\u306e\u6c17\u3065\u304d\u306f\u3001\u3068\u308a\u3042\u3048\u305a \\( \\frac{1}{\\sqrt{2^n}} \\) \u304c\u4fc2\u6570\u3068\u3057\u3066\u307e\u305f\u51fa\u3066\u304f\u308b\u3053\u3068\u3001\\( \\Ket{0}\\) \u3060\u308d\u3046\u304c \\( \\Ket{1}\\) \u3060\u308d\u3046\u304c \\( H^{\\otimes n} \\Ket{y} \\) \u304b\u3089\u306f \\( \\sum_{x=0}^{2^n-1} \\Ket{x} \\) \u307f\u305f\u3044\u306a\u9805\u304c\u51fa\u3066\u304f\u308b\u3068\u3044\u3046\u3053\u3068\u3060\u3002<\/p>\n\n\n\n<p>\u305f\u3060\u6ce8\u610f\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u306f\u7b26\u53f7\u3067\u3042\u308b\u3002\\( \\Ket{1} \\) \u306b\\( H \\) \u3092\u4f5c\u7528\u3055\u305b\u308b\u3068\u3001\u4e0a\u3067\u898b\u305f\u901a\u308a\u3001\u4f5c\u7528\u5f8c\u306e \\( \\Ket{1} \\) \u306b\u5bfe\u3057\u3066\\( -1 \\) \u306e\u4fc2\u6570\u304c\u3072\u3068\u3064\u3067\u308b\u3002\u305d\u3053\u3067\u6b21\u306f\u3001\u5c55\u958b\u5f8c\u306e \\( \\Ket{x} \\) \u305d\u308c\u305e\u308c\u306b\u5bfe\u3057\u3066\u3001\u7b26\u53f7\u304c\u3069\u3046\u306a\u308b\u304b\u3092\u8003\u3048\u3066\u307f\u308b\u3053\u3068\u306b\u3059\u308b\u3002<\/p>\n\n\n\n<p>\\( \\Ket{x} \\) \u306e\u7b26\u53f7\u304c \\( + \\) \u304b \\( &#8211; \\) \u304b\u3092\u8003\u3048\u308b\u3068\u304d\u306b\u306f\u3001\\( \\Ket{x} \\) \u306b\u542b\u307e\u308c\u308b \\( \\Ket{1} \\) \u304c \u300c\u3082\u3068\u3082\u3068 \\( \\Ket{0} \\) \u306b \\( H \\) \u3092\u4f5c\u7528\u3055\u305b\u305f\u3068\u304d\u306e\u3082\u306e\u300d\u304b\u3001\u300c\u3082\u3068\u3082\u3068 \\( \\Ket{1} \\) \u306b \\( H \\) \u3092\u4f5c\u7528\u3055\u305b\u305f\u3068\u304d\u306e\u3082\u306e\u300d\u304b\u3092\u9451\u5225\u3059\u308c\u3070\u3088\u3044\u3002\u305d\u306e\u8003\u3048\u3092\u4e00\u6b69\u9032\u3081\u308c\u3070\u3001\\( \\Ket{x} \\) \u306b\u542b\u307e\u308c\u308b  \\( \\Ket{1} \\) \u3068\u3001\\( \\Ket{y} \\) \u306b\u542b\u307e\u308c\u308b  \\( \\Ket{1} \\)  \u306e\u4f4d\u7f6e\u304c\u307e\u3063\u305f\u304f\u540c\u3058\u5834\u5408\u3060\u3068 \\( -1 \\) \u304c\u3072\u3068\u3064\u51fa\u3066\u304f\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002\u305d\u3057\u3066\u305d\u306e\u500b\u6570\u3092\u6570\u3048\u3001\u5947\u6570\u500b\u306a\u3089 \\( -1 \\) \u3060\u3057\u3001\u5076\u6570\u500b\u306a\u3089 \\( +1 \\) \u304c  \\( \\Ket{x} \\) \u306b\u5bfe\u3059\u308b\u4fc2\u6570\u306b\u306a\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p> \u3053\u3053\u3067\u5510\u7a81\u3060\u304c XOR\u6f14\u7b97\u3092\u8003\u3048\u308b\u3053\u3068\u306b\u3059\u308b\u3002XOR\u6f14\u7b97\u306f\u6392\u4ed6\u7684\u8ad6\u7406\u548c\u3068\u547c\u3070\u308c\u308b\u3082\u306e\u3067\u3001\u8a18\u53f7\u3060\u3068 \\( \\oplus \\) \u3067\u8868\u8a18\u3055\u308c\u308b\u3053\u3068\u304c\u591a\u3044\u3002\u771f\u507d\u8868\u3060\u3068\u4e0b\u8a18\u306e\u901a\u308a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><\/td><td>0<\/td><td>1<\/td><\/tr><tr><td>0<\/td><td>0<\/td><td>1<\/td><\/tr><tr><td>1<\/td><td>1<\/td><td>0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>XOR\u6f14\u7b97\u306f\u7af6\u6280\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3082\u3088\u304f\u3064\u304b\u308f\u308c\u308b\u3082\u306e\u3067\u3001\u4ee3\u6570\u7684\u306b\u8a00\u3048\u3070\u4e0b\u8a18\u306e\u7279\u5fb4\u304c\u3042\u308b<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53ef\u63db\u3067\u3042\u308b\u3002\\( a \\oplus b = b \\oplus a \\) <\/li>\n\n\n\n<li>\u7d50\u5408\u5f8b\u3092\u6e80\u305f\u3059\u3002\\( \\left( a \\oplus b\\right) \\oplus c = a \\oplus  \\left( b \\oplus c\\right)  \\) <\/li>\n\n\n\n<li>\\( 0 \\) \u3092\u4e2d\u7acb\u5143 \u3068\u3057\u3066\u3082\u3064\u3002 \\( a \\oplus 0 = a \\)<\/li>\n\n\n\n<li>\u81ea\u8eab\u3092\u9006\u5143\u3068\u3057\u3066\u3082\u3064\u3002 \\( a \\oplus a = 0 \\)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u3059\u308b\u3068\u3001\u3044\u307e\u53e4\u5178\u7684\u306a \\( n \\) \u30d3\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u3001\\( \\bigoplus_{k} b_{k} \\) (\u305f\u3060\u3057 \\(b_{k}\\) \u306f \\(k\\)\u30d3\u30c3\u30c8\u76ee\u306e\u6570\u5b57 \\(0 or 1\\) \u3092\u8868\u3059\u3082\u306e\u3068\u3059\u308b) \u3092\u8a08\u7b97\u3059\u308b\u3068\u3001\\( 0 \\) \u306f\u4e2d\u7acb\u5143\u306e\u305f\u3081\u7121\u8996\u3067\u304d\u308b\u3053\u3068\u3001\\( 1 \\) \u304c2\u500b\u3042\u308b\u3068 \\( 0 \\) \u3068\u4e2d\u7acb\u5143\u306b\u306a\u3063\u3066\u7121\u8996\u3067\u304d\u308b\u3053\u3068\u3092\u8e0f\u307e\u3048\u308b\u3068\u3001\\( 1 \\) \u306e\u500b\u6570\u304c\u5947\u6570\u500b\u306e\u5834\u5408\u306b\u306f \\( \\bigoplus_{k} b_{k} = 1 \\) \u3067\u3042\u308b\u3057\u3001\u5076\u6570\u500b\u306e\u5834\u5408\u306b\u306f\\( \\bigoplus_{k} b_{k} = 0 \\) \u3067\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002\u4ee5\u4e0a\u304b\u3089\u3001$$ x \\cdot y = \\bigoplus_{k} x_k y_k $$ \u3068\u3044\u3046\u3082\u306e\u3092\u8003\u3048\u308b\u3068 ( \\(x_k y_k\\) \u306f\u639b\u3051\u7b97\u3068\u601d\u3063\u3066\u3082\u3001AND\u6f14\u7b97\u3068\u601d\u3063\u3066\u3082\u3088\u3044)\u3001$$ \\left( -1 \\right)^{x \\cdot y} $$ \u306f\u307e\u3055\u306b \\( \\Ket{x} \\) \u306b\u5bfe\u3059\u308b\u4fc2\u6570\u306b\u306a\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002<\/p>\n\n\n\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u305a\u3044\u3076\u3093\u9577\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u304c\u3001$$ \\begin{equation} \\begin{split} H^{\\otimes n} \\left( H^{\\otimes n}  \\Ket{0}^{\\otimes n} \\right) &amp;= H^{\\otimes n} \\left( \\frac{1}{\\sqrt{2^n}} \\sum_{y=0}^{2^n-1} \\Ket{y} \\right) \\\\   &amp;= \\frac{1}{2^n}  \\sum_{x=0}^{2^n-1}  \\sum_{y=0}^{2^n-1}  \\left( -1 \\right)^{x \\cdot y}  \\Ket{x} \\end{split} \\end{equation}$$ \u3068\u306a\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u3053\u308c\u3051\u3063\u3053\u3046\u3088\u304f\u51fa\u3066\u304f\u308b\u3093\u3060\u3051\u3069\u3001\u3044\u3064\u3082\u3059\u3050\u308f\u304b\u3089\u306a\u304f\u306a\u3063\u3061\u3083\u3046\u3093\u3060\u3088\u306d\u3048\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b9\u30d4\u30f3\u306a\u3093\u304b\u306eZ\u8ef8\u306e\u4e0a\u5411\u304d\u30fb\u4e0b\u5411\u304d\u3092\u57fa\u5e95\u306b\u3068\u3063\u3066\u3001\u305d\u308c\u3089\u3092 \\( \\Ket{0} \\) \u3068 \\( \\Ket{1} \\) \u3067\u66f8\u304f\u3053\u3068\u306b\u3059\u308b\u3002 \u3053\u306e\u3068\u304d\u3001\u30a2\u30c0\u30de\u30fc\u30eb\u30b2\u30fc\u30c8 (Hadamard) \\( H \\) \u306f\u3001\\[ H  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":467,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[27,28],"class_list":["post-381","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-quantum-algorithm","tag-hadamard","tag-xor"],"_links":{"self":[{"href":"https:\/\/techwalkin.net\/index.php?rest_route=\/wp\/v2\/posts\/381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techwalkin.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techwalkin.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techwalkin.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techwalkin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=381"}],"version-history":[{"count":67,"href":"https:\/\/techwalkin.net\/index.php?rest_route=\/wp\/v2\/posts\/381\/revisions"}],"predecessor-version":[{"id":469,"href":"https:\/\/techwalkin.net\/index.php?rest_route=\/wp\/v2\/posts\/381\/revisions\/469"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techwalkin.net\/index.php?rest_route=\/wp\/v2\/media\/467"}],"wp:attachment":[{"href":"https:\/\/techwalkin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techwalkin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techwalkin.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}