Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Q#とNWChemを試してみた/qsharp-nwchem

 Q#とNWChemを試してみた/qsharp-nwchem

Build 2019 local community event for Q# in Tokyo
での登壇資料です。

A0fb1d7c9eeb2182e5d8ca76525d5ce4?s=128

QunaSys

May 21, 2019
Tweet

Transcript

  1. Q#ͱNWChemΛࢼͯ͠Έͨ QunaSys CEO ༶ ఱ೚ !1 Build 2019 local community

    event for Q# in Tokyo
  2. Outline I. ձࣾ঺հ
 II. ྔࢠίϯϐϡʔλͰྔࢠԽֶܭࢉ
 III. Q#ͱNWChemʹ͍ͭͯ !2

  3. ձࣾ঺հ !3

  4. Confidential ձࣾ঺հ !4 ֓ཁ ໊ࣾ גࣜձࣾQunaSys
 ʢΩϡφγεʣ ઃཱ 2018೥2݄ ࣄۀ಺༰

    • ສೳྔࢠίϯϐϡʔλͷ
 ΞϧΰϦζϜɾιϑτ։ൃ • ڞಉݚڀ ϝσΟΞܝࡌ
  5. Quantum Summitͷ։࠵ ྔࢠίϯϐϡʔλͷجຊ͔ΒϏδωεԠ༻ํ๏Λ·ͱΊͨΠϕϯτ
 !5 https://www.q-summit.net/ 2೔ؒͰ200ਓΛ௒͢ࢀՃऀʹ
 ͝དྷ৔௖͖·ͨ͠ɻ ੈքͰ׆༂͢Δۀքؔ܎ऀ
 24໊ʹ͝ߨԋ௖͖·ͨ͠ɻ ଟ͘ͷاۀɾେֶʹεϙϯαʔ௖͖·ͨ͠ɻ

    ߨԋࢿྉ: https://speakerdeck.com/qunasys/ quantum-summit-2019
  6. Quantum Native Dojo !6 ྔࢠίϯϐϡʔλษڧڭࡐ ໨࣍ ===== ୈ1෦ɿجૅฤ ===== 0.

    ͦ΋ͦ΋ྔࢠίϯϐϡʔλͱ͸ʁ 1. ྔࢠ৘ใͷجૅ 2. ྔࢠΞϧΰϦζϜೖ໳ 3. ྔࢠΞϧΰϦζϜͷ࣮ߦ؀ڥ ===== ୈ2෦ɿNISQฤ ===== 4. ྔࢠμΠφϛΫεγϛϡϨʔγϣϯ 5. ม෼ྔࢠճ࿏ʹجͮ͘ΞϧΰϦζϜ 6. ྔࢠԽֶܭࢉ ===== ୈ3෦ɿLong-termฤ ===== 7. Ґ૬ਪఆʹجͮ͘ΞϧΰϦζϜ 8. ΦϥΫϧΞϧΰϦζϜ 9. ྔࢠޡΓగਖ਼ೖ໳ ྔࢠίϯϐϡʔλʹؔ͢Δલఏ஌ࣝෆཁͳ
 ษڧڭࡐɻ
 Near term͔ΒLong termΞϧΰϦζϜ·ͰΛ ޿͘Χόʔ͠ແྉʂ Google ColabΛ࢖ͬͯϓϩάϥϛϯά؀ڥ͕ͳͯ͘΋
 ࣮૷ίʔυΛಈ͔͠ͳ͕Βֶ΂Δɻ
 
 https://dojo.qulacs.org https://github.com/qulacs/quantum-native-dojo
  7. ྔࢠίϯϐϡʔλͰྔࢠԽֶܭࢉ !7

  8. ྔࢠͷ࣌୅ʹඋ͑Δํ๏ ྔࢠίϯϐϡʔλ͸ԿͰ΋Ͱ͖ ΔͱࢥΘΕ͕͕ͪͩɺ
 ࢈ۀ͝ͱʹ্ཱ͕ͪΓͷ࣌ظͱ ΠϯύΫτ͸େ͖͘ҟͳΔ ਖ਼͍͠஌ࣝʹج͍ͮͨɺՄೳੑͷݟۃΊ BCG࡞੒ϨϙʔτΑΓɺҾ༻
 ʢhttps://www.bcg.com/ja-jp/publications/2018/next-decade-quantum-computing-how-play.aspxʣ Խֶʢಛʹεϖγϟ ϦςΟέϛΧϧʣ͸

    ࠷΋࣮ݱੑ͕ߴ͍ͱ ͞ΕΔ !8 ࣗવ͸ݹయྗֶͰ͸ಈ͔ͳ͍ɻ ΋͠ɺࣗવΛγϛϡϨʔγϣϯ ͚ͨ͠Ε͹ɺ ྔࢠྗֶʹج͍ͮͨܭࢉػ
 Λ࡞Δ΂͖ͩɻ Richard Feynman
  9. ྔࢠԽֶܭࢉ on ྔࢠίϯϐϡʔλ ෼ࢠيಓ๏ͱqubitͷؔ܎
 جຊతʹ 1qubit = 1جఈؔ਺(sto-3gͳͲ) !9 !"

    !# !$ %" %# %&        |1 1 1 1 ⋯ 1 1 0 0 ⋯ 0 0⟩ !" !# !$ %" %& |1 1 1 1 ⋯ 1 0 1 0 ⋯ 0 0⟩
  10. ྔࢠԽֶܭࢉख๏ɿVQE !10 ม෼๏Λ༻͍ͨख๏ ! " 11 ⋯ 100 ⋯ 0

    &(") )* +* ( A min " &(")|0|&(") ( " ) A. Perruzo et al, Nature Communications, 5, 4213 (2014) ΤωϧΪʔͷଌఆͰ࠷খʹͳΔ㱺 ࠷খݻ༗஋ͷݻ༗ϕΫτϧ
  11. Q#ͱNWChemʹ͍ͭͯ !11

  12. Q# and NWChem: Tools for Scalable Quantum Chemistry • NWChem:


    Φʔϓϯιʔεͷ
 ྔࢠԽֶܭࢉϥΠϒϥϦ • Quantum Development Kit chemistry library:
 Microsoft͕࠷ۙެ։ɻ
 ྔࢠԽֶ޲͚ྔࢠܭࢉ
 ϥΠϒϥϦ(written in Q#) • ৽͍͠ϑΝΠϧܗࣜ ʮBroombridgeʯʹΑΓɺ γʔϜϨεʹྔࢠԽֶܭࢉ
 Λ࣮ߦՄ !12 https://www.youtube.com/watch?v=Hxz0tH8jDfQ
  13. Q#ͱNWChemͷྲྀΕ !13

  14. ྔࢠԽֶܭࢉ on Q# & NWChem !14 ܭࢉϓϩηε ྔࢠίϯϐϡʔλͰѻ͑Δܗࣜʹ Jordan-Wignerม׵ɺBravyi-Kitaevม׵ɺɾɾɾ ୈೋྔࢠԽϋϛϧτχΞϯ࡞੒

    ॏͳΓੵ෼ܭࢉ جఈΤωϧΪʔ౳෺ཧྔܭࢉ ม෼ΞϧΰϦζϜɺҐ૬ਪఆɺݫີର֯Խɺɾɾɾ ෺࣭ͷύϥϝʔλೖྗ ݩૉه߸ɺ഑ஔɺجఈؔ਺ɺɾɾɾ ϥΠϒϥϦ Q# Quantum Development Kit
  15. EMSL Arrows ෺࣭ͷ৘ใ͔ΒॏͳΓੵ෼౳Λܭࢉ → ୈೋྔࢠԽϋϛϧτχΞϯ (Broombridgeܗࣜ) Λग़ྗ !15 NWChemͷΦϯϥΠϯϑϩϯτΤϯυ https://arrows.emsl.pnnl.gov/api/qsharp_chem

  16. Broombridge format Broombridge: • NWChemͷग़ྗΛQ#Ͱར༻Ͱ ͖Δܗʹͨ͠΋ͷ • YAMLܗࣜͰݪࢠ഑ஔɺॏͳΓ ੵ෼౳ͷ৘ใ͕֨ೲ͞Ε͍ͯΔ !16

    ୈೋྔࢠԽϋϛϧτχΞϯͷอଘܗࣜʢྫɿH2෼ࢠʣ H2෼ࢠͷݪࢠ഑ஔ ୈೋྔࢠԽϋϛϧτχΞϯ ʢॏͳΓੵ෼ʣ https://docs.microsoft.com/en-us/quantum/libraries/chemistry/installation?view=qsharp-preview#using-the-quantum-development-kit-with-nwchem
  17. ϑΝΠϧಡΈࠐΈ& JWม׵ BroombridgeϑΝΠϧʢyamlʣ͔ΒୈೋྔࢠԽϋϛϧτχΞϯಡΈࠐΈ Jordan-Wignerม׵ʹΑΓɺྔࢠίϯϐϡʔλ͕ѻ͑Δܗࣜʹ !17

  18. جఈΤωϧΪʔܭࢉ • ίʔυͷ͋ΔσΟϨΫτϦ (Quantum.Chemistry.Molecular Hydrogen) 
 ʹҠಈ͠dotnet run • ϋϛϧτχΞϯ

    • Jordan-Wignerม׵ • TrotterizationʹΑΔجఈΤω ϧΪʔܭࢉ !18 H2෼ࢠͷجఈΤωϧΪʔ https://docs.microsoft.com/en-us/quantum/libraries/chemistry/samples/molecular-hydrogen
  19. ඞཁϦιʔεͷݟੵ΋Γ GetGateCountΛ༻͍ͯ ඞཁήʔτ਺ͷݟੵΓ Trotterization౳֤छ๏ ʹ͓͚Δɺ ΤωϧΪʔܭࢉʹඞཁ ήʔτ਺͕ಘΒΕΔ !19 ΤωϧΪʔܭࢉ͕ࠔ೉Ͱ΋ɺඞཁήʔτ਺ͷݟੵΓ͕Մೳ https://docs.microsoft.com/en-us/quantum/libraries/chemistry/installation?view=qsharp-preview#using-the-quantum-development-kit-with-nwchem

  20. VQEΛ༻͍ͨجఈΤωϧΪʔܭࢉ !20 H2෼ࢠͷجఈঢ়ଶΤωϧΪʔ https://github.com/christopherkang/Quantum/tree/master/Samples/src/VQESimulation ݫີͳ஋ʢ-1.137 hartreeʣ ͱ͍ۙ஋

  21. ·ͱΊ ྔࢠԽֶɿྔࢠίϯϐϡʔλͷ࠷ॳͷΞϓϦέʔγϣϯ ӳޠ : NWChem + Q# ೔ຊޠɿpyscf + openfermion

    + qulacs @Quantum Native Dojo!! !21 ͱݴ͍͍͚ͨͲɺ
 ࠓྔࢠίϯϐϡʔλʹऔΓ
 ૊ΜͰ͍Δօ͞Μʂʂ
 ࣗ෼ͷྔࢠίϯϐϡʔλݴޠΛ ࡞Γ·͠ΐ͏ɻ ࠓͳΒ·ͩؒʹ߹͏ʂ
 3೥ޙ͸࣮૷͢Δ΋ͷ͕
 ଟ͗ͯ͢ݸਓͰ͸ແཧʹͳΔɻ qlazy: https://github.com/samn33/qlazy QuPy: https://github.com/ken-nakanishi/qupy
  22. We are Quantum Native.