çŽ6ãæéãåºç瀟ã¯éåã³ã³ãã¥ãŒãã£ã³ã°ãšãã®å®çšæ§ã®ãããã¯ã«ç©æ¥µçã«åãçµãã§ããŸããã é·ãéããã®èå³æ·±ããããã¯ã«é¢ãã翻蚳ã«ãµããããèšäºãèŠã€ããããšã¯ããã®ãããªèšäºãOracleããã°ã«æ²èŒããããŸã§äžå¯èœã§ããã ãã®åºçç©ã¯ããã®æ°ãããã©ãã€ã ã®ãœãããŠã§ã¢ãããŒããŠã§ã¢ãããã³çŽç²ã«èªç¶ç§åŠã®åé¡ã®åªãã玹ä»ãšãªãã®ã§ãèªãããšã¯å¿ é ã§ãã
éå»æ°ãæããã³æ°å¹Žã«ããã£ãŠãéåã³ã³ãã¥ãŒãã£ã³ã°ãžã®é¢å¿ã¯èããé«ãŸã£ãŠããŸããã ãã®åéã§ã®ç»æçãªææã«ã€ããŠèªãç 究æ©é¢ãäŒæ¥ããŸãã¯å·çµç¹ããæ°ããè³æã絶ããç»å ŽããŠããŸãã åæã«ãæè¡çæ ¹æ ã®åŒ±ãèšäºã¯éåã³ã³ãã¥ãŒãã£ã³ã°ã®æœåšçãªçµæã«ã€ããŠè°è«ããŠãããäºæž¬ã¯ææ°ã®æå·åæè¡ã®ãããã³ã°ããããã¹ãŠã®ç æ°ãæ²»ããæ¬æ ŒçãªAIãäœæããããšãžã®åãçµã¿ã«è³ããŸã§ããŸããŸã§ãã ãã ãããããã®æåŸ ã®ãã¹ãŠãçããçŸå®çã§ã¯ãããŸããã
ããªããå®è·µçãªå°å³ãªããã°ã©ããŒãªãããããã®èšç®ã§äºå®ãšãã£ã¯ã·ã§ã³ã®å¢çãã©ãã«ããã®ãããããŠéåã³ã³ãã¥ãŒãã£ã³ã°ãå°æ¥ã®ãœãããŠã§ã¢éçºã«ã©ã®ããã«åœ±é¿ããã®ãçåã«æããããããŸããã
åœç¶ãéåã³ã³ãã¥ãŒãã£ã³ã°çšã®å®çšçãªããŒããŠã§ã¢ãäœæããããŸã§ã«ã¯ãäœå¹ŽãããããŸãã ãã ãããã®ãã©ãã€ã ã®äžè¬ååã¯ä»æ¥ãã§ã«ç解ãããŠãããã·ãã¥ã¬ãŒã¿ã䜿çšããŠéåã³ã³ãã¥ãŒãã£ã³ã°ã®å¯èœæ§ãå®çŸããã¢ããªã±ãŒã·ã§ã³ãéçºè ãäœæã§ããããã«ããæœè±¡åããããŸãã
éåã³ã³ãã¥ãŒãã£ã³ã°ã¯å¥ã®CPUã²ã€ã³ã«åæžãããŸããïŒ
åŸæ¥ã®ã³ã³ãã¥ãŒã¿ãŒã䜿çšããåŸæ¥ã®ãœãããŠã§ã¢éçºã§ã¯ãé«ã¬ãã«ã®ããã°ã©ãã³ã°èšèªïŒJavaãªã©ïŒãå€æ°ã®ïŒããŒããŠã§ã¢ïŒãã©ã³ãžã¹ã¿ãŒã§å®è¡ãããæäœã«å€æããŸãã
å³1ã§ã¯ããã®ããã»ã¹ã¯æãåçŽãªåœ¢åŒã§å³åŒåãããŠããŸããJavaãœãŒã¹ã³ãŒãã¯ãã©ãããã©ãŒã ã«äŸåããªããã€ãã³ãŒãã«ã³ã³ãã€ã«ããããã©ãããã©ãŒã åºæã®ãã·ã³ã³ãŒãã«å€æãããŸãã ãã·ã³ã³ãŒãã¯ãã¡ã¢ãªå ã§å®è¡ãããããã€ãã®åçŽãªæäœïŒã²ãŒãïŒã䜿çšããŸãã ãã®ç®çã§äœ¿çšãããäž»ãªããŒããŠã§ã¢ã³ã³ããŒãã³ãã¯ãããç¥ãããŠãããã©ã³ãžã¹ã¿ã§ãã
å³ 1.é«åºŠãªããã°ã©ãã³ã°èšèªã®ãã©ã³ãžã¹ã¿ã§å®è¡ãããæäœãžã®ç¿»èš³ ã
è¿å¹Žéæãããçç£æ§ã®åäžã¯ãäž»ã«ããŒããŠã§ã¢æè¡ã®æ¹åã«ããéæãããŸããã åäžã®ãã©ã³ãžã¹ã¿ã®ãµã€ãºã¯å€§å¹ ã«çž®å°ããåå¹³æ¹ããªã¡ãŒãã«ã«é 眮ã§ãããã©ã³ãžã¹ã¿ãå¢ããã»ã©ãã³ã³ãã¥ãŒã¿ã®ã¡ã¢ãªãšåŠçèœåãå¢ããŸãã
éåã³ã³ãã¥ãŒãã£ã³ã°ã¯ç Žå£çãªæè¡ã§ãããªããªããããã§æãåçŽãªã³ã³ãã¥ãŒãã£ã³ã°ãŠãããã¯å€å žçãªãã©ã³ãžã¹ã¿ã§ã¯ãªããéåãããã§ãããããã«ã€ããŠã¯ä»¥äžã§èª¬æããŸãã
ãã€ã³ãã¯ããããã®äž»èŠãªèŠçŽ ã®éãã ãã§ãªãããââã«ãã®ç°ãªãããã€ã¹ã«ããããŸãã ãããã£ãŠãFigã éåã³ã³ãã¥ãŒãã£ã³ã°ã®1ã¯é©çšãããŸããã
éåã³ã³ãã¥ãŒãã£ã³ã°ã¯ãã¹ã¿ãã¯å šäœãJavaã¬ãã«ãŸã§åå²ããŸããïŒ
èŠããã«-ãããã§ããªããã ç§åŠè ãã¡ã¯ãéåã³ã³ãã¥ãŒã¿ãŒãç¹å®ã®åé¡ã解決ããã®ã«ç¹ã«é©ããŠããäžæ¹ã§ãä»ã®åé¡ã¯åŸæ¥ã®ã³ã³ãã¥ãŒã¿ãŒã䜿çšããŠããåççã«è§£æ±ºãããããšã«åŸã ã«åæããŠããŸãã ããªãã¿ã§ããã GPUãšCPUãæ¯èŒãããšãåæ§ã®ç¶æ³ã芳å¯ãããŸãã GPUã§ã¯ãã©ã³ãžã¹ã¿ã䜿çšãããŸãããåççã«ã¯CPUãšã¯ç°ãªããŸãããé«çŽèšèªã§èšè¿°ãããå€ãã®ã¢ããªã±ãŒã·ã§ã³ã¯ãCPUãšGPUã®äž¡æ¹ã®æ©èœãå éšã§äœ¿çšããŸãã GPUã¯ãã¯ãã«åŠçã«éåžžã«åªããŠãããå€ãã®ã¢ããªã±ãŒã·ã§ã³ãã©ã€ãã©ãªã§ã¯ãCPUãšGPUã®åäœãåºå¥ãããŠããŸãã
ããšãã°ãããã¯ãŸãã«JavaFXãŸãã¯Deeplearning4jã䜿çšããå Žåã®ç¶æ³ã§ãã JavaFXã䜿çšãããŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšããŠã¢ããªã±ãŒã·ã§ã³ãäœæããå ŽåãJavaã³ãŒãã®ã¿ã䜿çšããŸãïŒãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ã宣èšããããã«FXMLã䜿çšããããšããããŸãïŒã JavaFXã·ãŒã³ãç»é¢ã«è¡šç€ºããå¿ èŠãããå Žåãå éšJavaFXå®è£ ã¯ããã«ã·ã§ãŒããŒãšãã¯ã¹ãã£ã䜿çšããå³2ã«ç€ºãããã«äœã¬ãã«GPUãã©ã€ããŒã«çŽæ¥æ¥ç¶ããŸãããããã£ãŠãCPUã®æäœã«é©ããã³ãŒãã®éšåãšGPUã䜿çšããŸãã
å³ 2. JavaFXã¯GPUãšCPUã®äœæ¥ãå§ä»»ããŸãã
å³ã«ç€ºãããã«ã 2ãJavaFXå®è£ ã³ãŒãããªã²ãŒãã¯ãGPUããã³CPUã«æž¡ãããšã§åäœããŸãã ãããã®æäœã¯éçºè ããã¯é ãããŠããŸããïŒAPIããã¯æäŸãããŸããïŒããã匷åãªJavaFXã¢ããªã±ãŒã·ã§ã³ãéçºããå¿ èŠãããå ŽåãGPUã®ç¹å®ã®ç¥èã圹ç«ã€ããšããããããŸãã
Deeplearning4jã䜿çšãããšãåæ§ã®ç¶æ³ãçºçããŸãã Deeplearning4jã«ã¯ãå¿ èŠãªãã¯ãã«ããã³è¡åæŒç®ãå®è¡ããããã®å®è£ ãããã€ãããããããã®ããã€ãã¯GPUã䜿çšããŸãã ãã ããã³ãŒãã䜿çšãã容éïŒCPUãŸãã¯GPUïŒãæçµéçºè ã§ãããã©ããã¯é¢ä¿ãããŸããã
éåã³ã³ãã¥ãŒã¿ãŒã¯ãéåžžãåé¡ã®éãå¢ãããšææ°é¢æ°çã«å¢å ããåé¡ã解決ããåªããä»äºãããããã§ããããããã£ãŠãå€å žçãªã³ã³ãã¥ãŒã¿ãŒã§ã¯ã»ãšãã©è§£æ±ºã§ããªãããã»ãšãã©è§£æ±ºã§ããªãããã§ãã ç¹ã«ãå°é家ã¯ãã€ããªããã®å®æœåœ¢æ ã«ã€ããŠè©±ããŸããå žåçãªãšã³ãããŒãšã³ãã®ã¢ããªã±ãŒã·ã§ã³ã«ã¯ãCPUã§å®è¡ãããå€å žçãªã³ãŒããå«ãŸããŸãããéåã³ãŒããå«ãŸããå ŽåããããŸãã
ã·ã¹ãã ã¯ã©ã®ããã«ããŠéåã³ãŒããå®è¡ã§ããŸããïŒ
ä»æ¥ãéåã³ã³ãã¥ãŒã¿ãŒã®ããŒããŠã§ã¢ã¯ãŸã éåžžã«å®éšçã§ãã 倧äŒæ¥ããããããããã€ãã®å·ã¯ãããã¿ã€ãã®éçºã«åŸäºããŠããŸããããã®ãããªæè¡ã¯åºãå©çšã§ããŸããã ãããã衚瀺ããããšãããã®åœ¢ç¶ã¯ç°ãªãå ŽåããããŸãã
- éåã³ããã»ããµãŒã¯ãã·ã¹ãã å ã®CPUãšçµ±åã§ããŸãã
- éååé¡ã¯ãéåã¯ã©ãŠãã·ã¹ãã ã«å§ä»»ã§ããŸãã
ãã®ãããªæ±ºå®ã®å®éçãªèæ¯ã«ã€ããŠã¯éåžžã«äžç¢ºå®æ§ãæ®ã£ãŠããŸãããéåã³ãŒããã©ã®ããã«èŠããã¹ããã«ã€ããŠãŸããŸãåæããŠããŸãã æäžäœã¬ãã«ã«ã¯ã次ã®ããªãã¯ãå¿ èŠã§ãã ãã¥ãŒããããšéåã²ãŒã ã ãããã«åºã¥ããŠãäºæ³ãããåäœãå®è£ ããéåã·ãã¥ã¬ãŒã¿ãŒãäœæã§ããŸãã
ãããã£ãŠãéåã·ãã¥ã¬ãŒã¿ã¯ãã®ãããªéçºã«çæ³çãªããŒã«ã§ãã
éåã³ã³ãã¥ãŒã¿ãŒã®å®éã®æ©åšã§åŸãããçµæãšã»ãŒåãçµæã«ãªãã¯ãã§ãããéåæ©åšãå éããéåå¹æã¯åŸæ¥ã®ãœãããŠã§ã¢ã䜿çšããŠã·ãã¥ã¬ãŒãããå¿ èŠããããããã·ãã¥ã¬ãŒã¿ãŒã®åäœã¯éåžžã«é ããªããŸãã
éåã³ã³ãã¥ãŒãã£ã³ã°ã®åºæ¬çãªæ§æèŠçŽ ã¯äœã§ããïŒ
å€ãã®å Žåãå€å žçãªèšç®ãšéåèšç®ãæ¯èŒããããšãéèŠã§ãã å€å žçãªèšç®ã§ã¯ãããããšã²ãŒãããããŸãã
ãããã«ã¯1ãããã®æ å ±ãå«ãŸãããã®å€ã¯0ãŸãã¯1ã§ãã
ãã«ãã¯1ã€ä»¥äžã®ãããã«äœçšããããããæäœã§ããŸãã ããšãã°ãå³3ã«ç€ºãNOTã²ãŒãã¯ããããã®å€ãå転ããŸãã å ¥åã0ã®å ŽåãNOTã²ãŒãã®åºåã¯1ã«ãªããéãåæ§ã§ãã
å³ 3. NOTãã«ã
éåã³ã³ãã¥ãŒãã£ã³ã°ã§ã¯ãåçã®ããããšã²ãŒãããããŸãã ãããã®éåç䟡ç©ã¯ãã¥ãŒãããã§ãã éåãããã®å€ã¯ãå€å žçãªãããã®ããã«0ãŸãã¯1ã«çããããããšãã§ããŸãããããããéãåããã«ããããšãã§ããŸãã ããã¯è€éãªæŠå¿µã§ããããã¥ãŒãããã¯åæã«0ãš1ã®äž¡æ¹ã®ç¶æ ã«ãªããŸãã
éåããããéãåãããããŠããå Žåããã®å€ã¯ç¶æ 0ãš1ã®ç·åœ¢çµåã§ããããã¯å³ã«ç€ºãããã«èšè¿°ã§ããŸãã 4ïŒ
å³ 4.éåããããéãåãããããŠããå Žåã®å¹³çã
泚ïŒéåãããã¯å€ãã®å Žåã ãã©ã±ããè¡šèšã§èšè¿°ãããŸããå€æ°åã¯æåã|ãã®éã«é 眮ãããŸãã ããã³ã>ãã
å³ã®åŒ 4ã¯ãéåãããxãç¶æ | 0>ãš| 1>ã®éãåããã«ããããšãå ±åããŸãã ããã¯ãç¶æ | 0>ãŸãã¯ç¶æ | 1>ã§ããããšãæå³ããŸããã ããã¯ã圌ã®çŸåšã®ç¶æ ãç§ãã¡ã«ç¥ãããŠããªãããšãæå³ããŸãã
å®éã«ã¯ãåæã«äž¡æ¹ã®ç¶æ ã«ããããã®åœ¢åŒã§ã¯æäœã§ããŸãã ãã ãããã¥ãŒãããã枬å®ãããšã| 0>ãŸãã¯| 1>ã®ããããã®ç¶æ ã«ãªããŸãã äžèšã®åŒã«ã¯å¥ã®å¶éããããŸãïŒa ^ 2 + b ^ 2 = 1ã
aãšbã®å€ã¯ç¢ºççã§ãïŒéåãããã枬å®ãããšããx ^ãå€| 0>ãå«ã確ça ^ 2ãšã枬å®ãããéåããããå€| 1>ãå«ã確çb ^ 2ããããŸãã
éåã³ã³ãã¥ãŒãã£ã³ã°ã®æ¥œãããæã¡æ¶ãéèŠãªå¶éèŠå ããããŸãããã¥ãŒãããã枬å®ããããšããã¥ãŒããããé 眮ãããæœåšçãªéãåããã«é¢ãããã¹ãŠã®æ å ±ã倱ãããŸãã ãã¥ãŒãããå€ã¯0ãŸãã¯1ã§ãã
èšç®ã§ã¯ãéãåããã®ãã¥ãŒãããã¯ã0ãš1ã«åæã«å¯Ÿå¿ã§ããŸãïŒç°ãªã確çã§ïŒã 2ã€ã®ãã¥ãŒããããããå Žåããããã䜿çšããŠ4ã€ã®ç¶æ ïŒ00ã01ã10ãããã³11ïŒãè¡šãããšãã§ããŸãã ããã§ãéåã³ã³ãã¥ãŒã¿ãŒã®åã®æ¬è³ªã«è¿«ããŸãã 8ã€ã®ã¯ã©ã·ãã¯ããããããããã0ã255ã®ç¯å²ã§1ã€ã®æ°å€ãæ£ç¢ºã«è¡šãããšãã§ããŸãã8ãããã®ããããã®å€ã¯0ãŸãã¯1ã§ãã
1ã€ã®ç¶æ ã®ã¿ã枬å®ã§ããå Žåãéãåããã®äœ¿çšã¯äœã§ããïŒ
å€ãã®å Žåãã¢ã«ãŽãªãºã ã®çµæã¯åçŽïŒãã¯ãããŸãã¯ãããããïŒã§ãããããã«å°éããã«ã¯ãå€ãã®äžŠåèšç®ãå¿ èŠã§ãã èšç®äžã«ãã¥ãŒããããéãåãããŠä¿æãããšãããŸããŸãªãªãã·ã§ã³ãããã«èæ ®ããããšãã§ããŸãã åã ã®çµã¿åããããšã«æ±ºå®ãè¡ãããšãªããéåã³ã³ãã¥ãŒã¿ãŒã¯ãã¹ãŠã®ãªãã·ã§ã³ã1ã¹ãããã§èšç®ã§ããŸãã
次ã«ãå€ãã®éåã¢ã«ãŽãªãºã ã§ã次ã®éèŠãªæ®µéãå§ãŸããŸããã¢ã«ãŽãªãºã ã®çµæããæå³ã®ããçµæããããã枬å®å€ã«çµã³ä»ããããšã§ãã å€ãã®å Žåãå¹²æžãèæ ®ãããŸããèå³æ·±ãçµæã¯æ§é çã«äºãã«éãªãåããŸãããé¢å¿ã®ãªãçµæã¯äºãã«çžæ®ºãããŸãïŒç Žå£çå¹²æžïŒã
ã©ãããã°ãã¥ãŒããããéãåããç¶æ ã«ãå€æãã§ããŸããïŒ
å€å žçãªã²ãŒããããããæäœããããã«ãéåã²ãŒãã¯ãã¥ãŒããããæäœããŸãã ããã€ãã®éåã²ãŒãã¯å€å žçãªãã®ã«äŒŒãŠããŸãã ããšãã°ãPauli-Xã²ãŒãã¯ãéåããããç¶æ a | 0> + b | 1>ããç¶æ b | 0 |ã«è»¢éããŸãã + a | 1>ãããã¯å€å žçãªNOTã²ãŒãã®åçã«äŒŒãŠããŸãã å®éãa = 1ããã³b = 0ã®å Žåããã¥ãŒãããã¯æåã¯ç¶æ | 0>ã§ããã ããŠãª-Xãã«ãã®åäœåŸããã®ãã¥ãŒãããã¯å³1ã«ç€ºãããã«ç¶æ | 1>ã«ãªããŸãã 5ã
å³ 5. Pauli-Xãã«ãã䜿çšããçµæã
ãã®æèã§ã¯ãã¢ãããŒã«åŒã¯éåžžã«èå³æ·±ãã§ãã å³ã«ç€ºãããã«ããã¥ãŒããããç¶æ | 0>ïŒ1 / sqrtïŒ2ïŒ*ïŒ| 0> + | 1>ïŒã«éãåãããŸãã 6ã
å³ 6.ã¢ãããŒã«ãã«ããé©çšããçµæã
ã¢ãããŒã«ãã«ãããã¥ãŒãããã«é©çšããŠãã¥ãŒãããã枬å®ãããšããã¥ãŒãããå€ã0ã«ãªã確çã50ïŒ ããã¥ãŒãããå€ã1ã«ãªã確çã50ïŒ ã«ãªããŸãããã¥ãŒãããã枬å®ããããŸã§ãéãåããç¶æ ã®ãŸãŸã§ãã ã
ããã¯ã©ã®ããã«å¯èœã§ããïŒ
ãã®è³ªåã®çãã«æ¬åœã«èå³ãããå Žåã¯ãéåç©çåŠã詳现ã«ç 究ããå¿ èŠããããŸãã ãããã幞ããªããšã«ããããã®çŸè±¡ã®çè«çãªåºç€å šäœã¯å¿ èŠãããŸããã éãåããã®çŸè±¡ã¯ç解ã§ããªãããã«èŠãããããããŸããããèªç¶çã®çŽ ç²åã«ç¹åŸŽçãªã®ã¯ãããã®ç¹æ§ã§ããããšã匷調ããããšãéèŠã§ãã ãããã£ãŠãéåã³ã³ãã¥ãŒãã£ã³ã°ã¯ãäžèŠãããšæãããããããç©çççŸå®ã®åºæ¬ã«ã¯ããã«è¿ããã®ã§ãã
æ°å¹ŽåŸ ã£ãŠãããéåã³ã³ãã¥ãŒãã£ã³ã°ã詳ããèŠãŠã¿ãŸãããã
ãã ãã®å Žåãé ããŸãã çè«çã«ã¯ãæåã«ããŒããŠã§ã¢ãéçºãã次ã«ãœãããŠã§ã¢ã¬ãã«ã®èª¿æ»ã«é²ã¿ãããã§äœãéæã§ãããã確èªããããšãã§ããŸãã ãããããã¹ãŠã®æŠå¿µã¯ãã§ã«å€ããå°ãªããæ確ã§ãããJavaãCïŒãPythonãªã©ãå«ãäžè¬çãªèšèªã§éåã·ãã¥ã¬ãŒã¿ãäœæããããšã¯ãã§ã«å¯èœã§ãã
次ã«ããããã®ã·ãã¥ã¬ãŒã¿ãŒã䜿çšããŠãéåã¢ã«ãŽãªãºã ãåŠçã§ããŸãã ãããã®ã¢ã«ãŽãªãºã ã¯ãå®éã®éåæ©åšã§äœæ¥ããéã«ãããã®å©ããåããŠéæå¯èœãªããã©ãŒãã³ã¹ã®åäžãããããããšã¯ãããŸããããæ©èœçã«ã¯å®å šã«å®æããã¯ãã§ãã
ãããã£ãŠãçŸåšéåã¢ã«ãŽãªãºã ãéçºããŠããå Žåã¯ããããæ¹åããæéããããéåæ©åšãå©çšå¯èœã«ãªã£ããšãã«éå§ã§ããŸãã
éåã¢ã«ãŽãªãºã ã«ã¯ãåŸæ¥ã®ã¢ã«ãŽãªãºã ãšã¯ç°ãªãç¥çã¢ãããŒããå¿ èŠã§ãã èåãªç§åŠè ãåäžçŽã«éåã¢ã«ãŽãªãºã ã®éçºãéå§ããæŽæ°ã®ä¹ç®ããªã¹ãã®æ€çŽ¢ããã¹ã®æé©åãªã©ã«é¢ããã¢ã«ãŽãªãºã ã説æããèšäºãå¢ããŠããŸãã
ä»æ¥ãéåã³ã³ãã¥ãŒãã£ã³ã°ãè¡ã䟡å€ãããçç±ã¯ä»ã«ããããŸãã çŸä»£ã®å€§äŒæ¥ã§ãœãããŠã§ã¢ã·ã¹ãã ããªãã¡ã¯ã¿ãªã³ã°ããããšã¯ãäžæ©ã§ã§ããããšã®1ã€ã§ã¯ãããŸããã ãã ããéåã³ã³ãã¥ãŒãã£ã³ã°ãçã®é©åœãèµ·ããåéã®1ã€ã¯æå·åã§ãã çµå±ã®ãšãããå€å žçãªã³ã³ãã¥ãŒã¿ãŒã§ã¯å€§ããªæŽæ°ãçŽ å æ°ã«å解ããããšã¯ã»ãšãã©äžå¯èœã§ãããšããçè«ã«åºã¥ããŠããŸãã
éåå æ°å解ã®åé¡ãç°¡åã«è§£æ±ºã§ããã»ã©éåã³ã³ãã¥ãŒã¿ãŒã倧ãããªããŸã§ã«ã¯äœå¹Žããããå ŽåããããŸãããéçºè ã¯ã·ã¹ãã ãå€æŽããŠæ°ããå®å šãªãã¯ãããžãŒãå°å ¥ããã®ã«äœå¹Žããããããšãç¥ã£ãŠããŸãã
Javaã§éåã¢ã«ãŽãªãºã ã䜿çšããæ¹æ³ãåŠç¿ããã«ã¯ã©ãããã°ããã§ããïŒ
Javaã®ãªãŒãã³ãœãŒã¹éåã³ã³ãã¥ãŒã¿ãŒã·ãã¥ã¬ãŒã¿ãŒã§ããStrangeãããŠã³ããŒãããŠãã¹ã¿ãŒã§ããŸãã ã¹ãã¬ã³ãžã§ã¯ãäžé£ã®ãã¥ãŒããããäœæãããããã«ããã€ãã®éåã²ãŒããé©çšããããšã«ãããéåã¢ã«ãŽãªãºã ãã·ãã¥ã¬ãŒãã§ããŸãã
ç°¡åãªäŸãšããŠãq [0]ãšq [1]ã®2ã€ã®ãã¥ãŒããããäœæããŠãæåã¯äž¡æ¹ãç¶æ 0ã«ãªãããã«ããŸãã次ã«ãåãã¥ãŒãããã«2ã€ã®åçŽãªã²ãŒããé©çšããŸãã 7ã
æåã®ãã¥ãŒãããã¯æåã«Pauli-Xãã«ãã«è¡ãã次ã«ã¢ãããŒã«ãã«ãã«è¡ããŸãã Pauli-Xãã«ãã¯ç¶æ | 0ïŒgtãã| 1ïŒgtã«å€æããã¢ãããŒã«ãã«ãã¯ãããçãã確ç| 0ïŒgtããã³| 1ïŒgtã®éãåããã«å€æããŸãã ãããã£ãŠãã·ãŒã±ã³ã¹å šäœã1000åå®è¡ãããã®ãµã€ã¯ã«ã®æåŸã«æåã®ãã¥ãŒãããã1000å枬å®ãããšãå¹³åããŠ500ã±ãŒã¹ã§ã¯å€0ã500ã±ãŒã¹ã§ã¯å€1ã«ãªããšäºæ³ã§ããŸãã
2çªç®ã®ãã¥ãŒãããã¯ããã«åçŽã§ãã éåãããã®æ¯ãèããå€æŽããªãIdentityã²ãŒãããéå§ãããããPauli-Xã²ãŒãã«æž¡ãããã®å€ã0ãã1ã«å€æŽããŸãã
å³ 7. Strangeã䜿çšããŠã·ãã¥ã¬ãŒãã§ããéåã¢ã«ãŽãªãºã ã®äŸã
æšè«ãæ£ããããšã確èªããããã«ãStrangeã䜿çšããŠç°¡åãªéåããã°ã©ã ãäœæã§ããŸãã
public static void main(String[] args) { Program p = new Program(2); Step s = new Step(); s.addGate(new X(0)); p.addStep(s); Step t = new Step(); t.addGate(new Hadamard(0)); t.addGate(new X(1)); p.addStep(t); SimpleQuantumExecutionEnvironment sqee = new SimpleQuantumExecutionEnvironment(); Result res = sqee.runProgram(p); Qubit[] qubits = res.getQubits(); Arrays.asList(qubits).forEach(q -> System.out.println("qubit with probability on 1 = "+q.getProbability()+", measured it gives "+ q.measure())); }
ãã®ã¢ããªã±ãŒã·ã§ã³ã§ã¯ã2ã€ã®ãã¥ãŒããããæã€éåããã°ã©ã ãäœæãããŸãã
Program p = new Program(2);
ãã®ããã°ã©ã ã®äžç°ãšããŠã2ã€ã®æ®µéãçµãŸãã æåã®ã¹ãããã§ã¯ãPauli-Xãã«ããq [0]ã«é©çšããŸãã q [1]ã«ãã«ããé©çšããªããããIdentityãã«ãã§æ©èœããããšãæå³ããŸãã ãã®ã¹ããããããã°ã©ã ã«è¿œå ããŸãã
Step s = new Step(); s.addGate(new X(0)); p.addStep(s);
次ã«ç¬¬2段éã«é²ã¿ãq [0]ã«ã¢ãããŒã«ãã«ããé©çšããq [1]ã«ããŠãªXãã«ããé©çšããŸãã ãã®ã¹ããããããã°ã©ã ã«è¿œå ããŸãã
Step t = new Step(); t.addGate(new Hadamard(0)); t.addGate(new X(1)); p.addStep(t);
ããã§ãããã°ã©ã ã®æºåãã§ããŸããã ããããã£ãŠã¿ãŸãããã éåã·ãã¥ã¬ãŒã¿ã¯Strangeã«çµã¿èŸŒãŸããŠããŸãããStrangeã¯ã¯ã©ãŠããµãŒãã¹ã䜿çšããŠãããšãã°Oracle Cloudãªã©ã®ã¯ã©ãŠãã§ããã°ã©ã ãå®è¡ããããšãã§ããŸã ã
次ã®äŸã§ã¯ãç°¡åãªçµã¿èŸŒã¿ã·ãã¥ã¬ãŒã¿ã䜿çšããŠããã°ã©ã ãå®è¡ããçµæã®ãã¥ãŒããããååŸããŸãã
SimpleQuantumExecutionEnvironment sqee = new SimpleQuantumExecutionEnvironment(); Result res = sqee.runProgram(p); Qubit[] qubits = res.getQubits();
éåãããã枬å®ããïŒããã³ãã¹ãŠã®æ å ±ã倱ãïŒåã«ã確çã衚瀺ããŸãã 次ã«ããã¥ãŒãããã枬å®ããå€ã確èªããŸãã
Arrays.asList(qubits).forEach(q -> System.out.println("qubit with probability on 1 = "+q.getProbability()+", measured it gives "+ q.measure()));
ãã®ã¢ããªã±ãŒã·ã§ã³ãå®è¡ãããšã次ã®åºåãåŸãããŸãã
qubit with probability on 1 = 0.50, measured it gives 1
qubit with probability on 1 = 1, measured it gives 1
泚æïŒæåã®ãã¥ãŒãããã«ã€ããŠã¯ãäºæ³ã©ããå€0ã枬å®ã§ããŸãã
ãã®ããã°ã©ã ãäœåºŠãå®è¡ãããšãæåã®ãã¥ãŒãããã®å€ã¯ãå¹³åããŠã±ãŒã¹ã®ååã§0ãã±ãŒã¹ã®ååã§1ã«ãªããŸãã
éåã³ã³ãã¥ãŒãã£ã³ã°ã«ã€ããŠç¥ãå¿ èŠãããã®ã¯ããã ãã§ããïŒ
ãã¡ããéããŸãã ããã§ã¯ãããã€ãã®éèŠãªæŠå¿µã«ã¯è§ŠããŸããã§ãããç¹ã«ãç©ççã«ã¯éåžžã«é ãé¢ããŠããŠãã2ã€ã®ãã¥ãŒãããéã®çžäºäœçšãä¿èšŒããè€éãã«ã€ããŠã¯èª¬æããŸããã§ããã æãæåãªéåã¢ã«ãŽãªãºã ãç¹ã«æŽæ°ãçŽ å æ°ã«å解ã§ããã·ã§ã¢ã¢ã«ãŽãªãºã ã«ã€ããŠã¯èª¬æããŸããã§ããã ãŸããããã€ãã®æ°åŠçããã³ç©ççäºå®ãç¡èŠããŸãããç¹ã«ãéãåãã| x> = a | 0> + b | 1>ã§ã¯ãaãšbã®äž¡æ¹ãè€éã«ãªãå¯èœæ§ãããããšãèæ ®ããŸããã§ããã
ãã ãããã®èšäºã®äž»ãªç®çã¯ãéåã³ã³ãã¥ãŒãã£ã³ã°ã®å°è±¡ãäžãããããããœãããŠã§ã¢éçºã®å°æ¥ã«ã©ã®ããã«é©åããããç解ããããšã§ããã