SlideShare a Scribd company logo
1 of 110
Download to read offline
̂HΨ = EΨ
̂HΨ(r1, ⋯, rN) = EΨ(r1, ⋯, rN)
̂H
Ψ E
̂H = −
ℏ2
2me
∇2
1 −
ℏ2
2me
∇2
2 −
e2
4πϵ0 (
1
ra1
+
1
rb1
+
1
ra2
+
1
rb2 )
+
e2
4πϵ0
1
r12
+
e2
4πϵ0R
Ψ(x1, y1, z1, x2, y2, z2)
̂Hx = λx
N 1 N − 1 N − 1
3N 3 N
|⟨ΨfullCI |ΨHartree−Fock⟩|2
≈ 1
1
3N
N
|Ψ0⟩ {χa}i=1,⋯,r
Ψ0⟩ = χ1χ2⋯χa χb⋯χN⟩
E0 = ⟨Ψ0 | ̂ℋ|Ψ0⟩ =
∑
a
⟨a|h|a⟩ +
1
2 ∑
ab
⟨ab||ab⟩
⟨χa |χb⟩ = δab
[
h(1) +
N
∑
b=1
𝒥b(1) − 𝒦b(1)
]
χa(1) =
N
∑
b=1
εba χb(1)
f χa⟩ =
N
∑
b=1
εba xb⟩
f χa⟩ = εa χa⟩
{ϕμ}
ψi =
K
∑
μ=1
Cμiϕμ
Sμv =
∫
dr1ϕ*μ (1)ϕv(1)
Fμv =
∫
dr1ϕ*μ (1)f(1)ϕv(1)
∑
v
FμvCvi = εi ∑
v
SμvCvi FC = SCε
FC = SCε
Fμv = Hcore
μv +
∑
a
∑
λσ
CλaC*σa[2(μv|σλ) − (μλ|σv)]
$ sudo apt install psi4 python3-numpy libopenblas-dev
…
#! STO-3G H2 Hartree-Fock Energy Point
# see also: http://pubchemqc.riken.jp/cgi-bin/molecularquery.py?name=hydrogen
molecule h2 {
H 0.0 0.0 0.0
H 0.0 0.0 1.4
unit bohr
}
set {
basis STO-3G
}
thisenergy = energy('hf')
#! STO-3G H2 Hartree-Fock Energy Point
# see also: http://pubchemqc.riken.jp/cgi-bin/molecularquery.py?name=hydrogen
molecule h2 {
H 0.0 0.0 0.0
H 0.0 0.0 1.4
unit bohr
}
set {
basis STO-3G
}
thisenergy = energy('hf')
****
H 0
S 3 1.00
3.42525091 0.15432897
0.62391373 0.53532814
0.16885540 0.44463454
en, wfn = energy('hf', return_wfn=True)
nbf = wfn.nso()
mints = psi4.core.MintsHelper(wfn.basisset())
S = np.asarray(mints.ao_overlap())
for i in range(nbf):
for j in range(nbf):
print (i+1,j+1, S[i,j])
(μv|λσ)
|Ψ0⟩
{χa}i=1,⋯,r
|Ψ0⟩ = |χ1χ2⋯χa χb⋯χN⟩
{χa}i=1,⋯,r
|Ψ0⟩
|Ψ⟩ = c0 |Φ0⟩ +
occ
∑
i
vir
∑
a
ca
i |Φa
i ⟩ +
occ
∑
i<j
vir
∑
a<b
cab
ij |Φab
ij ⟩ +
occ
∑
i<j<k
vir
∑
a<b<c
cabc
ijk |Φabc
ijk ⟩ + ⋯
|Φ0⟩
|Φ0⟩ = |χ1χ2⋯χa χb⋯χN⟩
|Φa
i ⟩
|Φa
i ⟩ = |χ1χ2⋯χi−1χa χi+1⋯χN⟩
|Φab
ij ⟩
|Φab
ij ⟩ = |χ1χ2⋯χi−1χa χi+1⋯χj−1χb χj+1⋯χN⟩
ca
i , cab
ij
|Ψ⟩ = c0 |Φ0⟩ +
occ
∑
i
vir
∑
a
ca
i |Φa
i ⟩ +
occ
∑
i<j
vir
∑
a<b
cab
ij |Φab
ij ⟩ +
occ
∑
i<j<k
vir
∑
a<b<c
cabc
ijk |Φabc
ijk ⟩ + ⋯
min
⟨Ψ|Ψ⟩=1
⟨Ψ| ̂H|Ψ⟩
rCN
#! STO-3G H2 FullCI Energy Point
# see also: http://pubchemqc.riken.jp/cgi-bin/molecularquery.py?name=hydrogen
molecule h2 {
H 0.0 0.0 0.0
H 0.0 0.0 1.4
unit bohr
}
set {
basis STO-3G
}
thisenergy = energy(‘fci')
|⟨ΨFullCI |ΦHF⟩|2
= − 0.9872
|Ψ⟩ = c0 |Φ0⟩ +
occ
∑
i
vir
∑
a
ca
i |Φa
i ⟩ +
occ
∑
i<j
vir
∑
a<b
cab
ij |Φab
ij ⟩ +
occ
∑
i<j<k
vir
∑
a<b<c
cabc
ijk |Φabc
ijk ⟩ + ⋯
|ΨfullCI⟩ = − 0.993627|ΦHF⟩ + 0.112716|Φ2¯2
1¯1
⟩
|⟨ΨFullCI |ΦHF⟩|2
= 0.9872
|⟨ΨFullCI |ΦHF⟩|2
r(H − H)
r(H − H)
|⟨ΨFullCI |ΦHF⟩|2
(7C5)2
= 21 * 21 = 441
: CCSD(T), MP2 14_n2_631g_cc_mp_pes.dat
N-N FullCI Hartree-Fock CCSD(T) MP2
fullCI (1.5A ?)
|⟨ΨfullCI |ΨHF⟩|2
|11⟩, |01⟩, |10⟩, |00⟩
|111⟩, |101⟩, |110⟩, |100⟩
|011⟩, |001⟩, |010⟩, |000⟩
|1⟩, |0⟩
|00000000⟩ + |00000001⟩ + . . . + |11111111⟩
ei ̂Ht
|ΦHF⟩ = c0eiE0t
|Ψ0⟩ + c1eiE1t
|Ψ1⟩ + c2eiE2t
|Ψ2⟩⋯
ei ̂Hτ
≈
∏
i
eHΔτi ≈
∏
i
e
∑j
HjΔτi
̂H|Ψ⟩ = E|Ψ⟩ → ei ̂Hτ
|Ψ⟩ = ̂U|Ψ⟩ = ei2πϕ
|Ψ⟩
ei2πϕ
|Ψ⟩ ⊗ |R⟩ → ei2πϕ
|Ψ⟩ ⊗ ei2πϕ
|R⟩ → measure|R⟩ → E = 2πϕ/τ
|⟨ΦFullCI |ΦHF⟩|2
≈ 1
E0 ≤ E1 ≤ E2 ≤ ⋯
$ dotnet new -i “Microsoft.Quantum.ProjectTemplates::0.7-*”
…
$ mkdir -p qsharp
$ cd qsharp
$ sudo apt install git
$ git clone https://github.com/Microsoft/Quantum.git
$ git clone https://github.com/microsoft/QuantumLibraries
|ψ⟩
CNOT(H ⊗ 1)|00⟩ ⟶
|00⟩ + |11⟩
2
|ψ⟩ = α|0⟩ + β|1⟩ |ψ⟩ ⊗
|00⟩ + |11⟩
2
(H ⊗ 1 ⊗ 1)[CNOT ⊗ 1]|ψ⟩ ⊗
|00⟩ + |11⟩
2
=
1
2
[α|000⟩ + α|100⟩ + α|011⟩ + α|111⟩ + β|010⟩ − β|110⟩ + β|001⟩ − β|101⟩]
1
2
[|00⟩(α|0⟩ + β|1⟩) + |01⟩(α|1⟩ + β|0⟩) + |10⟩(α|0⟩ − β|1⟩) + |11⟩(α|1⟩ − β|0⟩)]
$ cd Quantum/Samples/src/Teleportation
$ dotnet run
Round 0: Sent True, got True.
Teleportation successful!!
Round 1: Sent False, got False.
Teleportation successful!!
Round 2: Sent False, got False.
Teleportation successful!!
Round 3: Sent True, got True.
Teleportation successful!!
Round 4: Sent False, got False.
Teleportation successful!!
Round 5: Sent True, got True.
Teleportation successful!!
Round 6: Sent True, got True.
Teleportation successful!!
Round 7: Sent False, got False.
Teleportation successful!!
operation Teleport (msg : Qubit, target : Qubit) : Unit {
using (register = Qubit()) {
// Create some entanglement that we can use to send our message.
H(register);
CNOT(register, target);
// Encode the message into the entangled pair,
// and measure the qubits to extract the classical data
// we need to correctly decode the message into the target qubit:
CNOT(msg, register);
H(msg);
let data1 = M(msg);
let data2 = M(register);
// decode the message by applying the corrections on
// the target qubit accordingly:
if (data1 == One) { Z(target); }
if (data2 == One) { X(target); }
// Reset our "register" qubit before releasing it.
Reset(register);
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Microsoft.Quantum.Simulation.Simulators;
using System.Linq;
namespace Microsoft.Quantum.Samples.Teleportation {
class Program
{
static void Main(string[] args)
{
using (var sim = new QuantumSimulator())
{
var rand = new System.Random();
foreach (var idxRun in Enumerable.Range(0, 8))
{
var sent = rand.Next(2) == 0;
var received = TeleportClassicalMessage.Run(sim, sent).Result;
System.Console.WriteLine($"Round {idxRun}:tSent {sent},tgot
{received}.");
System.Console.WriteLine(sent == received ? "Teleportation
successful!!n" : "n");
}
}
}
}
}
̂H =
∑
i,j
vija†
i
aj +
1
2 ∑
ijkl
wijkla†
i
a†
j
alak
|Ψ⟩
̂H|Ψ⟩ = E|Ψ⟩
|⟨ΦFullCI |ΦHF⟩|2
≈ 1
E0 ≤ E1 ≤ E2 ≤ ⋯
|Ψ⟩ = c0 |Φ0⟩ +
occ
∑
i
vir
∑
a
ca
i |Φa
i ⟩ +
occ
∑
i<j
vir
∑
a<b
cab
ij |Φab
ij ⟩ +
occ
∑
i<j<k
vir
∑
a<b<c
cabc
ijk |Φabc
ijk ⟩ + ⋯
|Φ0⟩ = |χ1χ2⋯χa χb⋯χN⟩
|Φa
i ⟩ = |χ1χ2⋯χi−1χa χi+1⋯χN⟩
|Φab
ij ⟩ = |χ1χ2⋯χi−1χa χi+1⋯χj−1χb χj+1⋯χN⟩
= |111111000000⟩
= |111110001000⟩
= |110110001010⟩
2r
r ≃ log(2r
)
1/ N!
̂P12Ψ(x1, x2) = ± Ψ(x1, x2)
̂H|Ψ⟩ = E|Ψ⟩ → ei ̂Hτ
|Ψ⟩ = ̂U|Ψ⟩ = ei2πϕ
|Ψ⟩
ei2πϕ
|Ψ⟩ ⊗ |R⟩ → ei2πϕ
|Ψ⟩ ⊗ ei2πϕ
|R⟩ → measure|R⟩ → E = 2πϕ/τ
̂H =
∑
i,j
vija†
i
aj +
1
2 ∑
ijkl
wijkla†
i
a†
j
alak
̂H =
∑
ijkl
Hijkla†
i
a†
j
alak
ei ̂Ht
|ΦHF⟩ = c0eiE0t
|Ψ0⟩ + c1eiE1t
|Ψ1⟩ + c2eiE2t
|Ψ2⟩⋯
exp(i ̂Ht)
Hijkla†
i
a†
j
alak
ei ̂Ht
≈
∏
Δt
eHΔt
≈
∏
Δt
e
∑ijkl
HijklΔt
≈
∏
Δt,ijkl
eHijklΔt
|000000111111 >
|⟨ΦFullCI |ΦHF⟩|2
≈ 1
E0 ≤ E1 ≤ E2 ≤ ⋯
ei ̂Ht
|ΦHF⟩ = c0eiE0t
|Ψ0⟩ + c1eiE1t
|Ψ1⟩ + c2eiE2t
|Ψ2⟩⋯
$ cd Quantum/Chemistry/MolecularHydrogen
$ dotnet run
----- Print Hamiltonian
PP has 4 entries).
[1 * 0u 0d, -1.252477495]
[1 * 1u 1d, -1.252477495]
[1 * 2u 2d, -0.475934275]
[1 * 3u 3d, -0.475934275]
PQQP has 6 entries).
[1 * 0u 1u 1d 0d, 0.674493166]
[1 * 0u 2u 2d 0d, 0.482184583]
[1 * 1u 3u 3d 1d, 0.482184583]
[1 * 1u 2u 2d 1d, 0.663472101]
[1 * 0u 3u 3d 0d, 0.663472101]
[1 * 2u 3u 3d 2d, 0.69739801]
PQRS has 2 entries).
[1 * 0u 3u 2d 1d, -0.362575036]
[1 * 0u 1u 3d 2d, 0.362575036]
Identity has 1 entries).
[1 * , 0.713776188]
----- End Print Hamiltonian
----- Creating Jordan–Wigner encoding
----- End Creating Jordan–Wigner encoding
----- Print Hamiltonian
Identity has 1 entries).
[Identity: [ ], -0.098834446]
Z has 4 entries).
[Z: [ 0 ], 0.171201285]
[Z: [ 1 ], 0.171201285]
[Z: [ 2 ], -0.222796536]
[Z: [ 3 ], -0.222796536]
ZZ has 6 entries).
[ZZ: [ 0 1 ], 0.1686232915]
[ZZ: [ 0 2 ], 0.12054614575]
[ZZ: [ 1 3 ], 0.12054614575]
[ZZ: [ 1 2 ], 0.16586802525]
[ZZ: [ 0 3 ], 0.16586802525]
[ZZ: [ 2 3 ], 0.1743495025]
v01234 has 1 entries).
[v01234: [ 0 1 2 3 ], 0, -0.0453218795, 0, 0.0453218795]
----- End Print Hamiltonian
$ psi4 07_h2_sto3g_hf_dumpint.dat
1 electron integral
1 1 -1.25247730398
2 2 -0.475934461144
2 electron integral
1 1 1 1 0.674493103326
1 2 1 2 0.181287535812
2 2 1 1 0.663472044861
2 2 2 2 0.69739794982
Exact molecular Hydrogen ground state energy: -1.137260278.
----- Performing quantum energy estimation by Trotter simulation algorithm
Rep #1/5: Energy estimate: -1.16005261648883; Phase estimate: -0.424487268195532
Rep #2/5: Energy estimate: -1.11126176600452; Phase estimate: -0.404970928001809
Rep #3/5: Energy estimate: -1.14194138176224; Phase estimate: -0.417242774304894
Rep #4/5: Energy estimate: -1.12383014703564; Phase estimate: -0.409998280414257
Rep #5/5: Energy estimate: -1.11126176600452; Phase estimate: -0.404970928001809
----- End Performing quantum energy estimation by Trotter simulation algorithm
----- Performing quantum energy estimation by Qubitization simulation algorithm
Rep #1/1: Energy estimate: -1.1347488350418; Phase estimate: -0.581804128657449
----- End Performing quantum energy estimation by Qubitization simulation algorithm
namespace Microsoft.Quantum.Chemistry.Samples.Hydrogen
{
class Program
{
static void Main(string[] args)
{
//////////////////////////////////////////////////////////////////////////
// Introduction //////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
// In this example, we will create a spin-orbital representation of the molecular
// Hydrogen Hamiltonian `H`, given ovelap coefficients for its one- and
// two - electron integrals.
// We when perform quantum phase estimation to obtain an estimate of
// the molecular Hydrogen ground state energy.
#region Building the Hydrogen Hamiltonian through orbital integrals
// One of the simplest representations of Hydrogen uses only two
// molecular orbitals indexed by `0` and `1`.
var nOrbitals = 2;
// This representation also has two occupied spin-orbitals.
var nElectrons = 2;
// The Coulomb repulsion energy between nuclei is
var energyOffset = 0.713776188;
// One-electron integrals are listed below
// <0|H|0> = -1.252477495
// <1|H|1> = -0.475934275
// Two-electron integrals are listed below
// <00|H|00> = 0.674493166
// <01|H|01> = 0.181287518
// <01|H|10> = 0.663472101
// <11|H|11> = 0.697398010
•
$ psi4 07_h2_sto3g_hf_dumpint
1 electron integral
1 1 -1.25247730398
2 2 -0.475934461144
2 electron integral
1 1 1 1 0.674493103326
1 2 1 2 0.181287535812
2 2 1 1 0.663472044861
2 2 2 2 0.69739794982
// We initialize a fermion Hamiltonian data structure and add terms to it
var fermionHamiltonian = new
OrbitalIntegralHamiltonian(orbitalIntegrals).ToFermionHamiltonian();
// These orbital integral terms are automatically expanded into
// spin-orbitals. We may print the Hamiltonian to see verify what it contains.
Console.WriteLine("----- Print Hamiltonian");
Console.Write(fermionHamiltonian);
Console.WriteLine("----- End Print Hamiltonian n");
// We also need to create an input quantum state to this Hamiltonian.
// Let us use the Hartree–Fock state.
var fermionWavefunction = fermionHamiltonian.CreateHartreeFockState(nElectrons);
#endregion
#region Jordan–Wigner representation
// The Jordan–Wigner encoding converts the fermion Hamiltonian,
// expressed in terms of Fermionic operators, to a qubit Hamiltonian,
// expressed in terms of Pauli matrices. This is an essential step
// for simulating our constructed Hamiltonians on a qubit quantum
// computer.
Console.WriteLine("----- Creating Jordan–Wigner encoding");
var jordanWignerEncoding =
fermionHamiltonian.ToPauliHamiltonian(Paulis.QubitEncoding.JordanWigner);
Console.WriteLine("----- End Creating Jordan–Wigner encoding n");
// Print the Jordan–Wigner encoded Hamiltonian to see verify what it contains.
Console.WriteLine("----- Print Hamiltonian");
Console.Write(jordanWignerEncoding);
Console.WriteLine("----- End Print Hamiltonian n");
#endregion
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)

More Related Content

What's hot

C++のビルド高速化について
C++のビルド高速化についてC++のビルド高速化について
C++のビルド高速化について
AimingStudy
 
20分くらいでわかった気分になれるC++20コルーチン
20分くらいでわかった気分になれるC++20コルーチン20分くらいでわかった気分になれるC++20コルーチン
20分くらいでわかった気分になれるC++20コルーチン
yohhoy
 
2015年度GPGPU実践プログラミング 第6回 パフォーマンス解析ツール
2015年度GPGPU実践プログラミング 第6回 パフォーマンス解析ツール2015年度GPGPU実践プログラミング 第6回 パフォーマンス解析ツール
2015年度GPGPU実践プログラミング 第6回 パフォーマンス解析ツール
智啓 出川
 

What's hot (20)

計算スケジューリングの効果~もし,Halideがなかったら?~
計算スケジューリングの効果~もし,Halideがなかったら?~計算スケジューリングの効果~もし,Halideがなかったら?~
計算スケジューリングの効果~もし,Halideがなかったら?~
 
マーク&スイープ勉強会
マーク&スイープ勉強会マーク&スイープ勉強会
マーク&スイープ勉強会
 
量子アニーリングマシンのプログラミング
量子アニーリングマシンのプログラミング量子アニーリングマシンのプログラミング
量子アニーリングマシンのプログラミング
 
動的計画法の並列化
動的計画法の並列化動的計画法の並列化
動的計画法の並列化
 
C++のビルド高速化について
C++のビルド高速化についてC++のビルド高速化について
C++のビルド高速化について
 
Halide による画像処理プログラミング入門
Halide による画像処理プログラミング入門Halide による画像処理プログラミング入門
Halide による画像処理プログラミング入門
 
Intro to SVE 富岳のA64FXを触ってみた
Intro to SVE 富岳のA64FXを触ってみたIntro to SVE 富岳のA64FXを触ってみた
Intro to SVE 富岳のA64FXを触ってみた
 
RISC-Vの可能性
RISC-Vの可能性RISC-Vの可能性
RISC-Vの可能性
 
Re永続データ構造が分からない人のためのスライド
Re永続データ構造が分からない人のためのスライドRe永続データ構造が分からない人のためのスライド
Re永続データ構造が分からない人のためのスライド
 
qubitによる波動関数の虚時間発展のシミュレーション: a review
qubitによる波動関数の虚時間発展のシミュレーション: a reviewqubitによる波動関数の虚時間発展のシミュレーション: a review
qubitによる波動関数の虚時間発展のシミュレーション: a review
 
Fantastic DSL in Python
Fantastic DSL in PythonFantastic DSL in Python
Fantastic DSL in Python
 
20分くらいでわかった気分になれるC++20コルーチン
20分くらいでわかった気分になれるC++20コルーチン20分くらいでわかった気分になれるC++20コルーチン
20分くらいでわかった気分になれるC++20コルーチン
 
Visual Question Answering (VQA) - CVPR2018動向分析 (CVPR 2018 完全読破チャレンジ報告会)
Visual Question Answering (VQA) - CVPR2018動向分析 (CVPR 2018 完全読破チャレンジ報告会)Visual Question Answering (VQA) - CVPR2018動向分析 (CVPR 2018 完全読破チャレンジ報告会)
Visual Question Answering (VQA) - CVPR2018動向分析 (CVPR 2018 完全読破チャレンジ報告会)
 
Solving physics many-body problems with deep learning
Solving physics many-body problems with deep learningSolving physics many-body problems with deep learning
Solving physics many-body problems with deep learning
 
CUDAプログラミング入門
CUDAプログラミング入門CUDAプログラミング入門
CUDAプログラミング入門
 
プログラムを高速化する話
プログラムを高速化する話プログラムを高速化する話
プログラムを高速化する話
 
計算機アーキテクチャを考慮した高能率画像処理プログラミング
計算機アーキテクチャを考慮した高能率画像処理プログラミング計算機アーキテクチャを考慮した高能率画像処理プログラミング
計算機アーキテクチャを考慮した高能率画像処理プログラミング
 
2015年度GPGPU実践プログラミング 第6回 パフォーマンス解析ツール
2015年度GPGPU実践プログラミング 第6回 パフォーマンス解析ツール2015年度GPGPU実践プログラミング 第6回 パフォーマンス解析ツール
2015年度GPGPU実践プログラミング 第6回 パフォーマンス解析ツール
 
Lie-Trotter-Suzuki分解、特にフラクタル分解について
Lie-Trotter-Suzuki分解、特にフラクタル分解についてLie-Trotter-Suzuki分解、特にフラクタル分解について
Lie-Trotter-Suzuki分解、特にフラクタル分解について
 
Quine・難解プログラミングについて
Quine・難解プログラミングについてQuine・難解プログラミングについて
Quine・難解プログラミングについて
 

Similar to quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)

How To Crack RSA Netrek Binary Verification System
How To Crack RSA Netrek Binary Verification SystemHow To Crack RSA Netrek Binary Verification System
How To Crack RSA Netrek Binary Verification System
Jay Corrales
 
Compilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVMCompilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVM
Linaro
 
Arna Friend Controls II Final
Arna Friend Controls II FinalArna Friend Controls II Final
Arna Friend Controls II Final
Arna Friend
 
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdfreservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
RTEFGDFGJU
 

Similar to quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo) (20)

Numerical Algorithm for a few Special Functions
Numerical Algorithm for a few Special FunctionsNumerical Algorithm for a few Special Functions
Numerical Algorithm for a few Special Functions
 
Vector time series sas-writing sample
Vector time series sas-writing sampleVector time series sas-writing sample
Vector time series sas-writing sample
 
How To Crack RSA Netrek Binary Verification System
How To Crack RSA Netrek Binary Verification SystemHow To Crack RSA Netrek Binary Verification System
How To Crack RSA Netrek Binary Verification System
 
Compilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVMCompilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVM
 
Introduction to NumPy for Machine Learning Programmers
Introduction to NumPy for Machine Learning ProgrammersIntroduction to NumPy for Machine Learning Programmers
Introduction to NumPy for Machine Learning Programmers
 
Arna Friend Controls II Final
Arna Friend Controls II FinalArna Friend Controls II Final
Arna Friend Controls II Final
 
Fast Algorithm for Computing the Discrete Hartley Transform of Type-II
Fast Algorithm for Computing the Discrete Hartley Transform of Type-IIFast Algorithm for Computing the Discrete Hartley Transform of Type-II
Fast Algorithm for Computing the Discrete Hartley Transform of Type-II
 
How to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJITHow to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJIT
 
A Course in Fuzzy Systems and Control Matlab Chapter two
A Course in Fuzzy Systems and Control Matlab Chapter twoA Course in Fuzzy Systems and Control Matlab Chapter two
A Course in Fuzzy Systems and Control Matlab Chapter two
 
Direct split-radix algorithm for fast computation of type-II discrete Hartley...
Direct split-radix algorithm for fast computation of type-II discrete Hartley...Direct split-radix algorithm for fast computation of type-II discrete Hartley...
Direct split-radix algorithm for fast computation of type-II discrete Hartley...
 
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
 
13486500-FFT.ppt
13486500-FFT.ppt13486500-FFT.ppt
13486500-FFT.ppt
 
Amber_Tutorial_PHAST.pdf dtkikydFHLfljfljfl
Amber_Tutorial_PHAST.pdf dtkikydFHLfljfljflAmber_Tutorial_PHAST.pdf dtkikydFHLfljfljfl
Amber_Tutorial_PHAST.pdf dtkikydFHLfljfljfl
 
Declare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term RewritingDeclare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term Rewriting
 
Seminar PSU 10.10.2014 mme
Seminar PSU 10.10.2014 mmeSeminar PSU 10.10.2014 mme
Seminar PSU 10.10.2014 mme
 
Towards Auto-tuning Facilities into Supercomputers in Operation - The FIBER a...
Towards Auto-tuning Facilities into Supercomputers in Operation - The FIBER a...Towards Auto-tuning Facilities into Supercomputers in Operation - The FIBER a...
Towards Auto-tuning Facilities into Supercomputers in Operation - The FIBER a...
 
Comparison GUM versus GUM+1
Comparison GUM  versus GUM+1Comparison GUM  versus GUM+1
Comparison GUM versus GUM+1
 
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdfreservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
 
PRACTICAL COMPUTING
PRACTICAL COMPUTINGPRACTICAL COMPUTING
PRACTICAL COMPUTING
 
DFT-hands-on-nguyen_notas_Presentación.pdf
DFT-hands-on-nguyen_notas_Presentación.pdfDFT-hands-on-nguyen_notas_Presentación.pdf
DFT-hands-on-nguyen_notas_Presentación.pdf
 

More from Maho Nakata

More from Maho Nakata (20)

Q#による量子化学計算 : 水素分子の位相推定について
Q#による量子化学計算 : 水素分子の位相推定についてQ#による量子化学計算 : 水素分子の位相推定について
Q#による量子化学計算 : 水素分子の位相推定について
 
20180723 量子コンピュータの量子化学への応用; Bravyi-Kitaev基底の実装
20180723 量子コンピュータの量子化学への応用; Bravyi-Kitaev基底の実装20180723 量子コンピュータの量子化学への応用; Bravyi-Kitaev基底の実装
20180723 量子コンピュータの量子化学への応用; Bravyi-Kitaev基底の実装
 
第11回分子科学 2017/9/17 Pubchemqcプロジェクト
第11回分子科学 2017/9/17 Pubchemqcプロジェクト第11回分子科学 2017/9/17 Pubchemqcプロジェクト
第11回分子科学 2017/9/17 Pubchemqcプロジェクト
 
Kobeworkshop pubchemqc project
Kobeworkshop pubchemqc projectKobeworkshop pubchemqc project
Kobeworkshop pubchemqc project
 
計算化学実習講座:第二回
 計算化学実習講座:第二回 計算化学実習講座:第二回
計算化学実習講座:第二回
 
計算化学実習講座:第一回
計算化学実習講座:第一回計算化学実習講座:第一回
計算化学実習講座:第一回
 
HOKUSAIのベンチマーク 理研シンポジウム 中田分
HOKUSAIのベンチマーク 理研シンポジウム 中田分HOKUSAIのベンチマーク 理研シンポジウム 中田分
HOKUSAIのベンチマーク 理研シンポジウム 中田分
 
為替取引(FX)でのtickdataの加工とMySQLで管理
為替取引(FX)でのtickdataの加工とMySQLで管理為替取引(FX)でのtickdataの加工とMySQLで管理
為替取引(FX)でのtickdataの加工とMySQLで管理
 
為替のTickdataをDukascopyからダウンロードする
為替のTickdataをDukascopyからダウンロードする為替のTickdataをDukascopyからダウンロードする
為替のTickdataをDukascopyからダウンロードする
 
HPCS2015 pythonを用いた量子化学プログラムの開発と応用
HPCS2015 pythonを用いた量子化学プログラムの開発と応用HPCS2015 pythonを用いた量子化学プログラムの開発と応用
HPCS2015 pythonを用いた量子化学プログラムの開発と応用
 
HPCS2015 大規模量子化学計算プログラムSMASHの開発と公開(石村)
HPCS2015 大規模量子化学計算プログラムSMASHの開発と公開(石村)HPCS2015 大規模量子化学計算プログラムSMASHの開発と公開(石村)
HPCS2015 大規模量子化学計算プログラムSMASHの開発と公開(石村)
 
The PubChemQC Project
The PubChemQC ProjectThe PubChemQC Project
The PubChemQC Project
 
3Dプリンタ導入記 タンパク質の模型をプリントする
3Dプリンタ導入記 タンパク質の模型をプリントする3Dプリンタ導入記 タンパク質の模型をプリントする
3Dプリンタ導入記 タンパク質の模型をプリントする
 
QuantumChemistry500
QuantumChemistry500QuantumChemistry500
QuantumChemistry500
 
立教大学化学実験3 SMILESを中心とした高度な分子モデリング 2014/7/1
立教大学化学実験3 SMILESを中心とした高度な分子モデリング 2014/7/1 立教大学化学実験3 SMILESを中心とした高度な分子モデリング 2014/7/1
立教大学化学実験3 SMILESを中心とした高度な分子モデリング 2014/7/1
 
The PubchemQC project
The PubchemQC projectThe PubchemQC project
The PubchemQC project
 
Direct variational calculation of second-order reduced density matrix : appli...
Direct variational calculation of second-order reduced density matrix : appli...Direct variational calculation of second-order reduced density matrix : appli...
Direct variational calculation of second-order reduced density matrix : appli...
 
高精度線形代数演算ライブラリMPACK 0.8.0の紹介
高精度線形代数演算ライブラリMPACK 0.8.0の紹介高精度線形代数演算ライブラリMPACK 0.8.0の紹介
高精度線形代数演算ライブラリMPACK 0.8.0の紹介
 
The MPACK : Multiple precision version of BLAS and LAPACK
The MPACK : Multiple precision version of BLAS and LAPACKThe MPACK : Multiple precision version of BLAS and LAPACK
The MPACK : Multiple precision version of BLAS and LAPACK
 
Recent progresses in the variational reduced-density-matrix method
Recent progresses in the variational reduced-density-matrix methodRecent progresses in the variational reduced-density-matrix method
Recent progresses in the variational reduced-density-matrix method
 

Recently uploaded

Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
levieagacer
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
1301aanya
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
Areesha Ahmad
 
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
ssuser79fe74
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Sérgio Sacani
 

Recently uploaded (20)

SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICESAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
 
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts ServiceJustdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLKochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
 
IDENTIFICATION OF THE LIVING- forensic medicine
IDENTIFICATION OF THE LIVING- forensic medicineIDENTIFICATION OF THE LIVING- forensic medicine
IDENTIFICATION OF THE LIVING- forensic medicine
 
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
 
Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...
Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...
Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...
 
STS-UNIT 4 CLIMATE CHANGE POWERPOINT PRESENTATION
STS-UNIT 4 CLIMATE CHANGE POWERPOINT PRESENTATIONSTS-UNIT 4 CLIMATE CHANGE POWERPOINT PRESENTATION
STS-UNIT 4 CLIMATE CHANGE POWERPOINT PRESENTATION
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 

quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)

  • 1.
  • 2.
  • 3.
  • 5. ̂HΨ(r1, ⋯, rN) = EΨ(r1, ⋯, rN) ̂H Ψ E ̂H = − ℏ2 2me ∇2 1 − ℏ2 2me ∇2 2 − e2 4πϵ0 ( 1 ra1 + 1 rb1 + 1 ra2 + 1 rb2 ) + e2 4πϵ0 1 r12 + e2 4πϵ0R Ψ(x1, y1, z1, x2, y2, z2)
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. N 1 N − 1 N − 1 3N 3 N |⟨ΨfullCI |ΨHartree−Fock⟩|2 ≈ 1 1 3N N
  • 14. |Ψ0⟩ {χa}i=1,⋯,r Ψ0⟩ = χ1χ2⋯χa χb⋯χN⟩ E0 = ⟨Ψ0 | ̂ℋ|Ψ0⟩ = ∑ a ⟨a|h|a⟩ + 1 2 ∑ ab ⟨ab||ab⟩ ⟨χa |χb⟩ = δab
  • 15. [ h(1) + N ∑ b=1 𝒥b(1) − 𝒦b(1) ] χa(1) = N ∑ b=1 εba χb(1) f χa⟩ = N ∑ b=1 εba xb⟩ f χa⟩ = εa χa⟩
  • 16. {ϕμ} ψi = K ∑ μ=1 Cμiϕμ Sμv = ∫ dr1ϕ*μ (1)ϕv(1) Fμv = ∫ dr1ϕ*μ (1)f(1)ϕv(1) ∑ v FμvCvi = εi ∑ v SμvCvi FC = SCε
  • 17. FC = SCε Fμv = Hcore μv + ∑ a ∑ λσ CλaC*σa[2(μv|σλ) − (μλ|σv)]
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. $ sudo apt install psi4 python3-numpy libopenblas-dev …
  • 23.
  • 24. #! STO-3G H2 Hartree-Fock Energy Point # see also: http://pubchemqc.riken.jp/cgi-bin/molecularquery.py?name=hydrogen molecule h2 { H 0.0 0.0 0.0 H 0.0 0.0 1.4 unit bohr } set { basis STO-3G } thisenergy = energy('hf')
  • 25.
  • 26.
  • 27. #! STO-3G H2 Hartree-Fock Energy Point # see also: http://pubchemqc.riken.jp/cgi-bin/molecularquery.py?name=hydrogen molecule h2 { H 0.0 0.0 0.0 H 0.0 0.0 1.4 unit bohr } set { basis STO-3G } thisenergy = energy('hf')
  • 28. **** H 0 S 3 1.00 3.42525091 0.15432897 0.62391373 0.53532814 0.16885540 0.44463454
  • 29.
  • 30.
  • 31. en, wfn = energy('hf', return_wfn=True) nbf = wfn.nso() mints = psi4.core.MintsHelper(wfn.basisset()) S = np.asarray(mints.ao_overlap()) for i in range(nbf): for j in range(nbf): print (i+1,j+1, S[i,j])
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38. |Ψ0⟩ {χa}i=1,⋯,r |Ψ0⟩ = |χ1χ2⋯χa χb⋯χN⟩ {χa}i=1,⋯,r
  • 39. |Ψ0⟩ |Ψ⟩ = c0 |Φ0⟩ + occ ∑ i vir ∑ a ca i |Φa i ⟩ + occ ∑ i<j vir ∑ a<b cab ij |Φab ij ⟩ + occ ∑ i<j<k vir ∑ a<b<c cabc ijk |Φabc ijk ⟩ + ⋯ |Φ0⟩ |Φ0⟩ = |χ1χ2⋯χa χb⋯χN⟩ |Φa i ⟩ |Φa i ⟩ = |χ1χ2⋯χi−1χa χi+1⋯χN⟩ |Φab ij ⟩ |Φab ij ⟩ = |χ1χ2⋯χi−1χa χi+1⋯χj−1χb χj+1⋯χN⟩ ca i , cab ij
  • 40. |Ψ⟩ = c0 |Φ0⟩ + occ ∑ i vir ∑ a ca i |Φa i ⟩ + occ ∑ i<j vir ∑ a<b cab ij |Φab ij ⟩ + occ ∑ i<j<k vir ∑ a<b<c cabc ijk |Φabc ijk ⟩ + ⋯ min ⟨Ψ|Ψ⟩=1 ⟨Ψ| ̂H|Ψ⟩
  • 41. rCN
  • 42.
  • 43. #! STO-3G H2 FullCI Energy Point # see also: http://pubchemqc.riken.jp/cgi-bin/molecularquery.py?name=hydrogen molecule h2 { H 0.0 0.0 0.0 H 0.0 0.0 1.4 unit bohr } set { basis STO-3G } thisenergy = energy(‘fci')
  • 45.
  • 46. |Ψ⟩ = c0 |Φ0⟩ + occ ∑ i vir ∑ a ca i |Φa i ⟩ + occ ∑ i<j vir ∑ a<b cab ij |Φab ij ⟩ + occ ∑ i<j<k vir ∑ a<b<c cabc ijk |Φabc ijk ⟩ + ⋯ |ΨfullCI⟩ = − 0.993627|ΦHF⟩ + 0.112716|Φ2¯2 1¯1 ⟩ |⟨ΨFullCI |ΦHF⟩|2 = 0.9872
  • 47.
  • 48.
  • 50.
  • 51.
  • 53. (7C5)2 = 21 * 21 = 441
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59. : CCSD(T), MP2 14_n2_631g_cc_mp_pes.dat N-N FullCI Hartree-Fock CCSD(T) MP2 fullCI (1.5A ?)
  • 60.
  • 62.
  • 63.
  • 64. |11⟩, |01⟩, |10⟩, |00⟩ |111⟩, |101⟩, |110⟩, |100⟩ |011⟩, |001⟩, |010⟩, |000⟩ |1⟩, |0⟩ |00000000⟩ + |00000001⟩ + . . . + |11111111⟩
  • 65.
  • 66.
  • 67.
  • 68. ei ̂Ht |ΦHF⟩ = c0eiE0t |Ψ0⟩ + c1eiE1t |Ψ1⟩ + c2eiE2t |Ψ2⟩⋯ ei ̂Hτ ≈ ∏ i eHΔτi ≈ ∏ i e ∑j HjΔτi ̂H|Ψ⟩ = E|Ψ⟩ → ei ̂Hτ |Ψ⟩ = ̂U|Ψ⟩ = ei2πϕ |Ψ⟩ ei2πϕ |Ψ⟩ ⊗ |R⟩ → ei2πϕ |Ψ⟩ ⊗ ei2πϕ |R⟩ → measure|R⟩ → E = 2πϕ/τ
  • 69. |⟨ΦFullCI |ΦHF⟩|2 ≈ 1 E0 ≤ E1 ≤ E2 ≤ ⋯
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75. $ dotnet new -i “Microsoft.Quantum.ProjectTemplates::0.7-*” …
  • 76. $ mkdir -p qsharp $ cd qsharp $ sudo apt install git $ git clone https://github.com/Microsoft/Quantum.git $ git clone https://github.com/microsoft/QuantumLibraries
  • 77.
  • 78.
  • 79. |ψ⟩ CNOT(H ⊗ 1)|00⟩ ⟶ |00⟩ + |11⟩ 2
  • 80. |ψ⟩ = α|0⟩ + β|1⟩ |ψ⟩ ⊗ |00⟩ + |11⟩ 2 (H ⊗ 1 ⊗ 1)[CNOT ⊗ 1]|ψ⟩ ⊗ |00⟩ + |11⟩ 2 = 1 2 [α|000⟩ + α|100⟩ + α|011⟩ + α|111⟩ + β|010⟩ − β|110⟩ + β|001⟩ − β|101⟩] 1 2 [|00⟩(α|0⟩ + β|1⟩) + |01⟩(α|1⟩ + β|0⟩) + |10⟩(α|0⟩ − β|1⟩) + |11⟩(α|1⟩ − β|0⟩)]
  • 81.
  • 82. $ cd Quantum/Samples/src/Teleportation $ dotnet run Round 0: Sent True, got True. Teleportation successful!! Round 1: Sent False, got False. Teleportation successful!! Round 2: Sent False, got False. Teleportation successful!! Round 3: Sent True, got True. Teleportation successful!! Round 4: Sent False, got False. Teleportation successful!! Round 5: Sent True, got True. Teleportation successful!! Round 6: Sent True, got True. Teleportation successful!! Round 7: Sent False, got False. Teleportation successful!!
  • 83. operation Teleport (msg : Qubit, target : Qubit) : Unit { using (register = Qubit()) { // Create some entanglement that we can use to send our message. H(register); CNOT(register, target); // Encode the message into the entangled pair, // and measure the qubits to extract the classical data // we need to correctly decode the message into the target qubit: CNOT(msg, register); H(msg); let data1 = M(msg); let data2 = M(register); // decode the message by applying the corrections on // the target qubit accordingly: if (data1 == One) { Z(target); } if (data2 == One) { X(target); } // Reset our "register" qubit before releasing it. Reset(register); } }
  • 84. // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using Microsoft.Quantum.Simulation.Simulators; using System.Linq; namespace Microsoft.Quantum.Samples.Teleportation { class Program { static void Main(string[] args) { using (var sim = new QuantumSimulator()) { var rand = new System.Random(); foreach (var idxRun in Enumerable.Range(0, 8)) { var sent = rand.Next(2) == 0; var received = TeleportClassicalMessage.Run(sim, sent).Result; System.Console.WriteLine($"Round {idxRun}:tSent {sent},tgot {received}."); System.Console.WriteLine(sent == received ? "Teleportation successful!!n" : "n"); } } } } }
  • 85.
  • 86.
  • 87. ̂H = ∑ i,j vija† i aj + 1 2 ∑ ijkl wijkla† i a† j alak |Ψ⟩ ̂H|Ψ⟩ = E|Ψ⟩
  • 88. |⟨ΦFullCI |ΦHF⟩|2 ≈ 1 E0 ≤ E1 ≤ E2 ≤ ⋯
  • 89. |Ψ⟩ = c0 |Φ0⟩ + occ ∑ i vir ∑ a ca i |Φa i ⟩ + occ ∑ i<j vir ∑ a<b cab ij |Φab ij ⟩ + occ ∑ i<j<k vir ∑ a<b<c cabc ijk |Φabc ijk ⟩ + ⋯ |Φ0⟩ = |χ1χ2⋯χa χb⋯χN⟩ |Φa i ⟩ = |χ1χ2⋯χi−1χa χi+1⋯χN⟩ |Φab ij ⟩ = |χ1χ2⋯χi−1χa χi+1⋯χj−1χb χj+1⋯χN⟩ = |111111000000⟩ = |111110001000⟩ = |110110001010⟩ 2r r ≃ log(2r )
  • 90. 1/ N! ̂P12Ψ(x1, x2) = ± Ψ(x1, x2)
  • 91. ̂H|Ψ⟩ = E|Ψ⟩ → ei ̂Hτ |Ψ⟩ = ̂U|Ψ⟩ = ei2πϕ |Ψ⟩ ei2πϕ |Ψ⟩ ⊗ |R⟩ → ei2πϕ |Ψ⟩ ⊗ ei2πϕ |R⟩ → measure|R⟩ → E = 2πϕ/τ
  • 92. ̂H = ∑ i,j vija† i aj + 1 2 ∑ ijkl wijkla† i a† j alak ̂H = ∑ ijkl Hijkla† i a† j alak ei ̂Ht |ΦHF⟩ = c0eiE0t |Ψ0⟩ + c1eiE1t |Ψ1⟩ + c2eiE2t |Ψ2⟩⋯ exp(i ̂Ht) Hijkla† i a† j alak ei ̂Ht ≈ ∏ Δt eHΔt ≈ ∏ Δt e ∑ijkl HijklΔt ≈ ∏ Δt,ijkl eHijklΔt
  • 94. |⟨ΦFullCI |ΦHF⟩|2 ≈ 1 E0 ≤ E1 ≤ E2 ≤ ⋯ ei ̂Ht |ΦHF⟩ = c0eiE0t |Ψ0⟩ + c1eiE1t |Ψ1⟩ + c2eiE2t |Ψ2⟩⋯
  • 95.
  • 96.
  • 97. $ cd Quantum/Chemistry/MolecularHydrogen $ dotnet run ----- Print Hamiltonian PP has 4 entries). [1 * 0u 0d, -1.252477495] [1 * 1u 1d, -1.252477495] [1 * 2u 2d, -0.475934275] [1 * 3u 3d, -0.475934275] PQQP has 6 entries). [1 * 0u 1u 1d 0d, 0.674493166] [1 * 0u 2u 2d 0d, 0.482184583] [1 * 1u 3u 3d 1d, 0.482184583] [1 * 1u 2u 2d 1d, 0.663472101] [1 * 0u 3u 3d 0d, 0.663472101] [1 * 2u 3u 3d 2d, 0.69739801] PQRS has 2 entries). [1 * 0u 3u 2d 1d, -0.362575036] [1 * 0u 1u 3d 2d, 0.362575036] Identity has 1 entries). [1 * , 0.713776188] ----- End Print Hamiltonian ----- Creating Jordan–Wigner encoding ----- End Creating Jordan–Wigner encoding ----- Print Hamiltonian Identity has 1 entries). [Identity: [ ], -0.098834446] Z has 4 entries). [Z: [ 0 ], 0.171201285] [Z: [ 1 ], 0.171201285] [Z: [ 2 ], -0.222796536] [Z: [ 3 ], -0.222796536] ZZ has 6 entries). [ZZ: [ 0 1 ], 0.1686232915] [ZZ: [ 0 2 ], 0.12054614575] [ZZ: [ 1 3 ], 0.12054614575] [ZZ: [ 1 2 ], 0.16586802525] [ZZ: [ 0 3 ], 0.16586802525] [ZZ: [ 2 3 ], 0.1743495025] v01234 has 1 entries). [v01234: [ 0 1 2 3 ], 0, -0.0453218795, 0, 0.0453218795] ----- End Print Hamiltonian $ psi4 07_h2_sto3g_hf_dumpint.dat 1 electron integral 1 1 -1.25247730398 2 2 -0.475934461144 2 electron integral 1 1 1 1 0.674493103326 1 2 1 2 0.181287535812 2 2 1 1 0.663472044861 2 2 2 2 0.69739794982
  • 98. Exact molecular Hydrogen ground state energy: -1.137260278. ----- Performing quantum energy estimation by Trotter simulation algorithm Rep #1/5: Energy estimate: -1.16005261648883; Phase estimate: -0.424487268195532 Rep #2/5: Energy estimate: -1.11126176600452; Phase estimate: -0.404970928001809 Rep #3/5: Energy estimate: -1.14194138176224; Phase estimate: -0.417242774304894 Rep #4/5: Energy estimate: -1.12383014703564; Phase estimate: -0.409998280414257 Rep #5/5: Energy estimate: -1.11126176600452; Phase estimate: -0.404970928001809 ----- End Performing quantum energy estimation by Trotter simulation algorithm ----- Performing quantum energy estimation by Qubitization simulation algorithm Rep #1/1: Energy estimate: -1.1347488350418; Phase estimate: -0.581804128657449 ----- End Performing quantum energy estimation by Qubitization simulation algorithm
  • 99. namespace Microsoft.Quantum.Chemistry.Samples.Hydrogen { class Program { static void Main(string[] args) { ////////////////////////////////////////////////////////////////////////// // Introduction ////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // In this example, we will create a spin-orbital representation of the molecular // Hydrogen Hamiltonian `H`, given ovelap coefficients for its one- and // two - electron integrals. // We when perform quantum phase estimation to obtain an estimate of // the molecular Hydrogen ground state energy. #region Building the Hydrogen Hamiltonian through orbital integrals // One of the simplest representations of Hydrogen uses only two // molecular orbitals indexed by `0` and `1`. var nOrbitals = 2; // This representation also has two occupied spin-orbitals. var nElectrons = 2; // The Coulomb repulsion energy between nuclei is var energyOffset = 0.713776188; // One-electron integrals are listed below // <0|H|0> = -1.252477495 // <1|H|1> = -0.475934275 // Two-electron integrals are listed below // <00|H|00> = 0.674493166 // <01|H|01> = 0.181287518 // <01|H|10> = 0.663472101 // <11|H|11> = 0.697398010 • $ psi4 07_h2_sto3g_hf_dumpint 1 electron integral 1 1 -1.25247730398 2 2 -0.475934461144 2 electron integral 1 1 1 1 0.674493103326 1 2 1 2 0.181287535812 2 2 1 1 0.663472044861 2 2 2 2 0.69739794982
  • 100. // We initialize a fermion Hamiltonian data structure and add terms to it var fermionHamiltonian = new OrbitalIntegralHamiltonian(orbitalIntegrals).ToFermionHamiltonian(); // These orbital integral terms are automatically expanded into // spin-orbitals. We may print the Hamiltonian to see verify what it contains. Console.WriteLine("----- Print Hamiltonian"); Console.Write(fermionHamiltonian); Console.WriteLine("----- End Print Hamiltonian n"); // We also need to create an input quantum state to this Hamiltonian. // Let us use the Hartree–Fock state. var fermionWavefunction = fermionHamiltonian.CreateHartreeFockState(nElectrons); #endregion #region Jordan–Wigner representation // The Jordan–Wigner encoding converts the fermion Hamiltonian, // expressed in terms of Fermionic operators, to a qubit Hamiltonian, // expressed in terms of Pauli matrices. This is an essential step // for simulating our constructed Hamiltonians on a qubit quantum // computer. Console.WriteLine("----- Creating Jordan–Wigner encoding"); var jordanWignerEncoding = fermionHamiltonian.ToPauliHamiltonian(Paulis.QubitEncoding.JordanWigner); Console.WriteLine("----- End Creating Jordan–Wigner encoding n"); // Print the Jordan–Wigner encoded Hamiltonian to see verify what it contains. Console.WriteLine("----- Print Hamiltonian"); Console.Write(jordanWignerEncoding); Console.WriteLine("----- End Print Hamiltonian n"); #endregion