@yuichirominato 2018.08.11更新 45views

量子ゲートで量子化学計算、OpenFermionを触る

VQE 量子ゲート 量子コンピュータ 量子化学

はじめに

GoogleがPythonベースで量子化学計算を量子コンピュータゲートモデルで行うためのパッケージを配布していますので、それを見て見たいと思います。OpenFermionは量子化学計算のライブラリで量子化学の基礎知識を必要とします。多少の量子コンピュータにおける量子化学の手順はこちらの参考にまとめてあります。

「量子コンピュータで量子化学計算」
http://blog.mdrft.com/post/391

リポジトリ

OpenFermion
https://github.com/quantumlib/OpenFermion

こちらになります。

インストール

インストール方法は、


git clone https://github.com/quantumlib/OpenFermion
cd OpenFermion
python -m pip install -e .

もしくは


python -m pip install --user openfermion

早速チュートリアル

こちらのページのチュートリアルを確認したいと思います。

OpenFermion/examples/openfermion_tutorial.ipynb
https://github.com/quantumlib/OpenFermion/blob/master/examples/openfermion_tutorial.ipynb

フェルミ演算子のデータ構造

第二量子化されたハミルトニアンには生成消滅演算子が登場し、今後パウリ演算子に書き換える必要がありますが、そのフェルミ演算子の取り扱いに関してOpenFermionでは2通りの記述方法あります。

$
I \mapsto ()\\
a_1 \mapsto ((1,0),)\\
a_3^\dagger a_1 \mapsto ((3,1),(1,0))\\
a_4^\dagger a_3^\dagger a_9 a_1 \mapsto ((4,1),(3,1),(9,0),(1,0))
$
上記は括弧付きで表現し、カンマで繋げます。daggerあり、なしのものを0,1で表現しています。一方、

$
I \mapsto “”\\
a_1 \mapsto “1”\\
a_3^\dagger a_1 \mapsto “3^{\hat{}}\,1″\\
a_4^\dagger a_3^\dagger a_9 a_1 \mapsto “4^{\hat{}}\, 3^{\hat{}}\, 9\, 1”
$

hatとスペースでフェルミ演算子を表現するも使えます。

試しにpythonで行ってみます、


from openfermion.ops import FermionOperator

my_term = FermionOperator(((3, 1), (1, 0)))
print(my_term)

my_term = FermionOperator('3^ 1')
print(my_term)

1.0 [3^ 1]
1.0 [3^ 1]

このように同じ出力がされます。前の数字は係数です。次にこの係数を扱って見ます。係数はオプションで記述するようです。


good_way_to_initialize = FermionOperator('3^ 1', -1.7)
print(good_way_to_initialize)

identity = FermionOperator('')
print(identity)

zero_operator = FermionOperator()
print(zero_operator)

-1.7 [3^ 1]
1.0 []
0

係数に複素数など導入したりして、


my_operator = FermionOperator('4^ 1^ 3 9', 1. + 2.j)
print(my_operator)
print(my_operator.terms)

(1+2j) [4^ 1^ 3 9]
{((4, 1), (1, 1), (3, 0), (9, 0)): (1+2j)}

このように書くことができます。

フェルミ演算子の操作

単体のフェルミ演算子を初期化してから、それを操作することでハミルトニアンを構成する。例えば、2項からなる$(1+2i)a_4^\dagger a_3^\dagger a_9 a_1 – 1.7a_3^\dagger a_1$は各項を初期化して下記のように作ることができる。


from openfermion.ops import FermionOperator

term_1 = FermionOperator('4^ 3^ 9 1', 1. + 2.j)
term_2 = FermionOperator('3^ 1', -1.7)
my_operator = term_1 + term_2
print(my_operator)

my_operator = FermionOperator('4^ 3^ 9 1', 1. + 2.j)
term_2 = FermionOperator('3^ 1', -1.7)
my_operator += term_2
print('')
print(my_operator)

-1.7 [3^ 1] +
(1+2j) [4^ 3^ 9 1]

-1.7 [3^ 1] +
(1+2j) [4^ 3^ 9 1]

また、様々な演算子を組み合わせてやってみてもできて、


term_1 = FermionOperator('4^ 3^ 9 1', 1. + 2.j)
term_2 = FermionOperator('3^ 1', -1.7)

my_operator = term_1 - 33. * term_2
print(my_operator)

my_operator *= 3.17 * (term_2 + term_1) ** 2
print('')
print(my_operator)

print('')
print(term_2 ** 3)

print('')
print(term_1 == 2.*term_1 - term_1)
print(term_1 == my_operator)

56.1 [3^ 1] +
(1+2j) [4^ 3^ 9 1]

513.9489299999999 [3^ 1 3^ 1 3^ 1] +
(-302.32289999999995-604.6457999999999j) [3^ 1 3^ 1 4^ 3^ 9 1] +
(-302.32289999999995-604.6457999999999j) [3^ 1 4^ 3^ 9 1 3^ 1] +
(-533.511+711.348j) [3^ 1 4^ 3^ 9 1 4^ 3^ 9 1] +
(9.161299999999999+18.322599999999998j) [4^ 3^ 9 1 3^ 1 3^ 1] +
(16.166999999999998-21.555999999999997j) [4^ 3^ 9 1 3^ 1 4^ 3^ 9 1] +
(16.166999999999998-21.555999999999997j) [4^ 3^ 9 1 4^ 3^ 9 1 3^ 1] +
(-34.87-6.34j) [4^ 3^ 9 1 4^ 3^ 9 1 4^ 3^ 9 1]

-4.912999999999999 [3^ 1 3^ 1 3^ 1]

True
False

その他の演算子もあります。


from openfermion.utils import commutator, count_qubits, hermitian_conjugated, normal_ordered

# Get the Hermitian conjugate of a FermionOperator, count its qubit, check if it is normal-ordered.
term_1 = FermionOperator('4^ 3 3^', 1. + 2.j)
print(hermitian_conjugated(term_1))
print(term_1.is_normal_ordered())
print(count_qubits(term_1))

# Normal order the term.
term_2 = normal_ordered(term_1)
print('')
print(term_2)
print(term_2.is_normal_ordered())

# Compute a commutator of the terms.
print('')
print(commutator(term_1, term_2))

(1-2j) [3 3^ 4]
False
5

(1+2j) [4^] +
(-1-2j) [4^ 3^ 3]
True

(-3+4j) [4^ 3 3^ 4^] +
(3-4j) [4^ 3 3^ 4^ 3^ 3] +
(-3+4j) [4^ 3^ 3 4^ 3 3^] +
(3-4j) [4^ 4^ 3 3^]

量子ビット演算子の初期化と操作

こちらはフェルミ演算子とほぼ同じです。量子ビット演算子はテンソル積の順番があるだけ注意が必要です。


from openfermion.ops import QubitOperator

my_first_qubit_operator = QubitOperator('X1 Y2 Z3')
print(my_first_qubit_operator)
print(my_first_qubit_operator.terms)

operator_2 = QubitOperator('X3 Z4', 3.17)
operator_2 -= 77. * my_first_qubit_operator
print('')
print(operator_2)

1.0 [X1 Y2 Z3]
{((1, 'X'), (2, 'Y'), (3, 'Z')): 1.0}

-77.0 [X1 Y2 Z3] +
3.17 [X3 Z4]

ジョルダン・ウィグナーとブラビ・キタエフ変換

フェルミ演算子を量子ビット演算子に書き換える変換です。


from openfermion.ops import FermionOperator
from openfermion.transforms import jordan_wigner, bravyi_kitaev
from openfermion.utils import eigenspectrum, hermitian_conjugated

#フェルミ演算子の初期化と生成
fermion_operator = FermionOperator('2^ 0', 3.17)
fermion_operator += hermitian_conjugated(fermion_operator)
print(fermion_operator)

#ジョルダン・ウィグナー変換とスペクトルの表示
jw_operator = jordan_wigner(fermion_operator)
print('')
print(jw_operator)
jw_spectrum = eigenspectrum(jw_operator)
print(jw_spectrum)

#ブラビ・キタエフ変換とスペクトルの表示
bk_operator = bravyi_kitaev(fermion_operator)
print('')
print(bk_operator)
bk_spectrum = eigenspectrum(bk_operator)
print(bk_spectrum)

3.17 [0^ 2] +
3.17 [2^ 0]

(1.585+0j) [X0 Z1 X2] +
(1.585+0j) [Y0 Z1 Y2]
[-3.17 -3.17  0.    0.    0.    0.    3.17  3.17]

(1.585+0j) [X0 Y1 Y2] +
(-1.585+0j) [Y0 Y1 X2]
[-3.17 -3.17  0.    0.    0.    0.    3.17  3.17]

逆変換

逆変換も簡単です。量子ビット演算子を用意してから変換をかけます。


from openfermion.transforms import reverse_jordan_wigner

#量子ビット演算子の初期化
my_operator = QubitOperator('X0 Y1 Z2', 88.)
my_operator += QubitOperator('Z1 Z4', 3.17)
print(my_operator)

#フェルミ演算子へのジョルダン・ウィグナー逆変換
mapped_operator = reverse_jordan_wigner(my_operator)
print('')
print(mapped_operator)

#同一であることを確認
back_to_normal = jordan_wigner(mapped_operator)
back_to_normal.compress()
print('')
print(back_to_normal)

88.0 [X0 Y1 Z2] +
3.17 [Z1 Z4]

3.17 [] +
-88j [1 0] +
88j [1 0^] +
88j [1^ 0] +
-88j [1^ 0^] +
-6.34 [1^ 1] +
176j [2^ 2 1 0] +
-176j [2^ 2 1 0^] +
-176j [2^ 2 1^ 0] +
176j [2^ 2 1^ 0^] +
-6.34 [4^ 4] +
12.68 [4^ 4 1^ 1]

88.0 [X0 Y1 Z2] +
3.17 [Z1 Z4]

スパース行列とハバードモデル

下記にパラメータから特定のモデル(ハバードモデル)を作ってフェルミ演算子を得て、そこからジョルダンウィグナーでの変換と、Scipyでの疎行列表現と基底状態の算出例がでています。


from openfermion.hamiltonians import fermi_hubbard
from openfermion.transforms import get_sparse_operator, jordan_wigner
from openfermion.utils import get_ground_state

#モデルのパラメータを決める
x_dimension = 2
y_dimension = 2
tunneling = 2.
coulomb = 1.
magnetic_field = 0.5
chemical_potential = 0.25
periodic = 1
spinless = 1

#パラメータからフェルミ演算子を得る
hubbard_model = fermi_hubbard(
    x_dimension, y_dimension, tunneling, coulomb, chemical_potential,
    magnetic_field, periodic, spinless)
print(hubbard_model)

#ジョルダン・ウィグナー変換で量子ビット演算子に
jw_hamiltonian = jordan_wigner(hubbard_model)
jw_hamiltonian.compress()
print('')
print(jw_hamiltonian)

#scipyの疎行列ライブラリ表現scipy.sparse.cscで出力する
sparse_operator = get_sparse_operator(hubbard_model)
print('')
print(sparse_operator)
print('\nEnergy of the model is {} in units of T and J.'.format(
    get_ground_state(sparse_operator)[0]))


-0.25 [0^ 0] +
1.0 [0^ 0 1^ 1] +
1.0 [0^ 0 2^ 2] +
-2.0 [0^ 1] +
-2.0 [0^ 2] +
-2.0 [1^ 0] +
-0.25 [1^ 1] +
1.0 [1^ 1 3^ 3] +
-2.0 [1^ 3] +
-2.0 [2^ 0] +
-0.25 [2^ 2] +
1.0 [2^ 2 3^ 3] +
-2.0 [2^ 3] +
-2.0 [3^ 1] +
-2.0 [3^ 2] +
-0.25 [3^ 3]

0.5 [] +
-1.0 [X0 X1] +
-1.0 [X0 Z1 X2] +
-1.0 [Y0 Y1] +
-1.0 [Y0 Z1 Y2] +
-0.375 [Z0] +
0.25 [Z0 Z1] +
0.25 [Z0 Z2] +
-1.0 [X1 Z2 X3] +
-1.0 [Y1 Z2 Y3] +
-0.375 [Z1] +
0.25 [Z1 Z3] +
-1.0 [X2 X3] +
-1.0 [Y2 Y3] +
-0.375 [Z2] +
0.25 [Z2 Z3] +
-0.375 [Z3]

  (1, 1)	(-0.25+0j)
  (2, 1)	(-2+0j)
  (4, 1)	(-2+0j)
  (1, 2)	(-2+0j)
  (2, 2)	(-0.25+0j)
  (8, 2)	(-2+0j)
  (3, 3)	(0.5+0j)
  (6, 3)	(2+0j)
  (9, 3)	(-2+0j)
  (1, 4)	(-2+0j)
  (4, 4)	(-0.25+0j)
  (8, 4)	(-2+0j)
  (5, 5)	(0.5+0j)
  (6, 5)	(-2+0j)
  (9, 5)	(-2+0j)
  (3, 6)	(2+0j)
  (5, 6)	(-2+0j)
  (6, 6)	(-0.5+0j)
  (10, 6)	(-2+0j)
  (12, 6)	(2+0j)
  (7, 7)	(1.25+0j)
  (11, 7)	(-2+0j)
  (13, 7)	(2+0j)
  (2, 8)	(-2+0j)
  (4, 8)	(-2+0j)
  (8, 8)	(-0.25+0j)
  (3, 9)	(-2+0j)
  (5, 9)	(-2+0j)
  (9, 9)	(-0.5+0j)
  (10, 9)	(-2+0j)
  (12, 9)	(-2+0j)
  (6, 10)	(-2+0j)
  (9, 10)	(-2+0j)
  (10, 10)	(0.5+0j)
  (7, 11)	(-2+0j)
  (11, 11)	(1.25+0j)
  (14, 11)	(2+0j)
  (6, 12)	(2+0j)
  (9, 12)	(-2+0j)
  (12, 12)	(0.5+0j)
  (7, 13)	(2+0j)
  (13, 13)	(1.25+0j)
  (14, 13)	(-2+0j)
  (11, 14)	(2+0j)
  (13, 14)	(-2+0j)
  (14, 14)	(1.25+0j)
  (15, 15)	(3+0j)

Energy of the model is -4.249999999999995 in units of T and J.

平面波基底でのハミルトニアン

OpenFermionにはさまざまなモジュールをつけることができますが、基本的な機能はすでに搭載されています。


from openfermion.hamiltonians import jellium_model
from openfermion.utils import eigenspectrum, fourier_transform, Grid
from openfermion.transforms import jordan_wigner

#小さな1次元のジェリウムモデルを見てみる
grid = Grid(dimensions=1, length=3, scale=1.0)
spinless = True

#ハミルトニアンを求める
momentum_hamiltonian = jellium_model(grid, spinless)
momentum_qubit_operator = jordan_wigner(momentum_hamiltonian)
momentum_qubit_operator.compress()
print(momentum_qubit_operator)

#ハミルトニアンにフーリエ変換
position_hamiltonian = fourier_transform(momentum_hamiltonian, grid, spinless)
position_qubit_operator = jordan_wigner(position_hamiltonian)
position_qubit_operator.compress()
print('')
print (position_qubit_operator)

#等スペクトルであることを確認する
spectral_difference = eigenspectrum(momentum_qubit_operator) -  eigenspectrum(position_qubit_operator)
print('')
print(spectral_difference)


19.50047638754088 [] +
-9.71044945799746 [Z0] +
-0.07957747154594767 [Z0 Z1] +
-0.07957747154594767 [Z0 Z2] +
0.15915494309189535 [Z1] +
-0.07957747154594767 [Z1 Z2] +
-9.71044945799746 [Z2]

19.500476387540857 [] +
-3.289868133696451 [X0 X1] +
-3.2898681336964564 [X0 Z1 X2] +
-3.289868133696451 [Y0 Y1] +
-3.2898681336964564 [Y0 Z1 Y2] +
-6.42058132430101 [Z0] +
-0.07957747154594766 [Z0 Z1] +
-0.07957747154594767 [Z0 Z2] +
-3.289868133696451 [X1 X2] +
-3.289868133696451 [Y1 Y2] +
-6.4205813243010095 [Z1] +
-0.07957747154594766 [Z1 Z2] +
-6.42058132430101 [Z2]

[2.93653990e-14 2.57294186e-14 2.84217094e-14 2.48689958e-14
 3.55271368e-14 1.77635684e-14 7.10542736e-15 2.13162821e-14]

分子データのクラス

分子データはインスタンスの形で保存されて、簡単に呼び出すことができます。それを見て見ます。


from openfermion.hamiltonians import MolecularData

# Set parameters to make a simple molecule.
diatomic_bond_length = .7414
geometry = [('H', (0., 0., 0.)), ('H', (0., 0., diatomic_bond_length))]
basis = 'sto-3g'
multiplicity = 1
charge = 0
description = str(diatomic_bond_length)

# Make molecule and print out a few interesting facts about it.
molecule = MolecularData(geometry, basis, multiplicity,
                         charge, description)
print('Molecule has automatically generated name {}'.format(
    molecule.name))
print('Information about this molecule would be saved at:\n{}\n'.format(
    molecule.filename))
print('This molecule has {} atoms and {} electrons.'.format(
    molecule.n_atoms, molecule.n_electrons))
for atom, atomic_number in zip(molecule.atoms, molecule.protons):
    print('Contains {} atom, which has {} protons.'.format(
        atom, atomic_number))


Molecule has automatically generated name H2_sto-3g_singlet_0.7414
Information about this molecule would be saved at:
/Users/****/Documents/OpenFermion/src/openfermion/data/H2_sto-3g_singlet_0.7414

This molecule has 2 atoms and 2 electrons.
Contains H atom, which has 1 protons.
Contains H atom, which has 1 protons.

さらに、以前作ったデータを読みだして使ったりできます。


#分子構造のパラメータを設定
basis = 'sto-3g'
multiplicity = 1
bond_length_interval = 0.1
n_points = 25

#異なる結合長でつくる
hf_energies = []
fci_energies = []
bond_lengths = []
for point in range(3, n_points + 1):
    bond_length = bond_length_interval * point
    bond_lengths += [bond_length]
    description = str(round(bond_length,2))
    print(description)
    geometry = [('H', (0., 0., 0.)), ('H', (0., 0., bond_length))]
    molecule = MolecularData(
        geometry, basis, multiplicity, description=description)
    
    #データ読み出し
    molecule.load()

    #計算結果をいくつか出力
    print('\nAt bond length of {} angstrom, molecular hydrogen has:'.format(
        bond_length))
    print('Hartree-Fock energy of {} Hartree.'.format(molecule.hf_energy))
    print('MP2 energy of {} Hartree.'.format(molecule.mp2_energy))
    print('FCI energy of {} Hartree.'.format(molecule.fci_energy))
    print('Nuclear repulsion energy between protons is {} Hartree.'.format(
        molecule.nuclear_repulsion))
    for orbital in range(molecule.n_orbitals):
        print('Spatial orbital {} has energy of {} Hartree.'.format(
            orbital, molecule.orbital_energies[orbital]))
    hf_energies += [molecule.hf_energy]
    fci_energies += [molecule.fci_energy]

#出力結果をプロット
import matplotlib.pyplot as plt
%matplotlib inline

plt.figure(0)
plt.plot(bond_lengths, fci_energies, 'x-')
plt.plot(bond_lengths, hf_energies, 'o-')
plt.ylabel('Energy in Hartree')
plt.xlabel('Bond length in angstrom')
plt.show()


0.3

At bond length of 0.30000000000000004 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.59382776458494 Hartree.
MP2 energy of -0.5997818888874376 Hartree.
FCI energy of -0.6018037168352988 Hartree.
Nuclear repulsion energy between protons is 1.7639240286333335 Hartree.
Spatial orbital 0 has energy of -0.8028666187118976 Hartree.
Spatial orbital 1 has energy of 1.368938795250223 Hartree.
0.4

At bond length of 0.4 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.904361397713845 Hartree.
MP2 energy of -0.9114367296997896 Hartree.
FCI energy of -0.9141497082141279 Hartree.
Nuclear repulsion energy between protons is 1.322943021475 Hartree.
Spatial orbital 0 has energy of -0.7452125332909346 Hartree.
Spatial orbital 1 has energy of 1.167416395038123 Hartree.
0.5

At bond length of 0.5 angstrom, molecular hydrogen has:
Hartree-Fock energy of -1.0429962765072203 Hartree.
MP2 energy of -1.0514858618835026 Hartree.
FCI energy of -1.055159796496619 Hartree.
Nuclear repulsion energy between protons is 1.05835441718 Hartree.
Spatial orbital 0 has energy of -0.6908223275124182 Hartree.
Spatial orbital 1 has energy of 0.9886736693741557 Hartree.
0.6

At bond length of 0.6000000000000001 angstrom, molecular hydrogen has:
Hartree-Fock energy of -1.1011282431368283 Hartree.
MP2 energy of -1.1113317674794059 Hartree.
FCI energy of -1.1162860078265333 Hartree.
Nuclear repulsion energy between protons is 0.8819620143166668 Hartree.
Spatial orbital 0 has energy of -0.6408762643991083 Hartree.
Spatial orbital 1 has energy of 0.8380849781488554 Hartree.
0.7

At bond length of 0.7000000000000001 angstrom, molecular hydrogen has:
Hartree-Fock energy of -1.1173490350703141 Hartree.
MP2 energy of -1.1295815518324286 Hartree.
FCI energy of -1.1361894542708848 Hartree.
Nuclear repulsion energy between protons is 0.7559674408428572 Hartree.
Spatial orbital 0 has energy of -0.5954634716745077 Hartree.
Spatial orbital 1 has energy of 0.7141652810054977 Hartree.
0.8

At bond length of 0.8 angstrom, molecular hydrogen has:
Hartree-Fock energy of -1.1108503969854677 Hartree.
MP2 energy of -1.125453091983669 Hartree.
FCI energy of -1.1341476663578605 Hartree.
Nuclear repulsion energy between protons is 0.6614715107375 Hartree.
Spatial orbital 0 has energy of -0.5544958797639515 Hartree.
Spatial orbital 1 has energy of 0.6126180834930599 Hartree.
0.9

At bond length of 0.9 angstrom, molecular hydrogen has:
Hartree-Fock energy of -1.0919140401071208 Hartree.
MP2 energy of -1.1092713614102743 Hartree.
FCI energy of -1.1205602806186359 Hartree.
Nuclear repulsion energy between protons is 0.5879746762111111 Hartree.
Spatial orbital 0 has energy of -0.5176680309627193 Hartree.
Spatial orbital 1 has energy of 0.5284772431612719 Hartree.
1.0

At bond length of 1.0 angstrom, molecular hydrogen has:
Hartree-Fock energy of -1.0661086480817525 Hartree.
MP2 energy of -1.0866648035682114 Hartree.
FCI energy of -1.101150329303588 Hartree.
Nuclear repulsion energy between protons is 0.52917720859 Hartree.
Spatial orbital 0 has energy of -0.4844416789615343 Hartree.
Spatial orbital 1 has energy of 0.4575019361641323 Hartree.
1.1

At bond length of 1.1 angstrom, molecular hydrogen has:
Hartree-Fock energy of -1.0365388735395633 Hartree.
MP2 energy of -1.0608057828548 Hartree.
FCI energy of -1.0791929438802303 Hartree.
Nuclear repulsion energy between protons is 0.4810701896272727 Hartree.
Spatial orbital 0 has energy of -0.4542186927189922 Hartree.
Spatial orbital 1 has energy of 0.39669590841169317 Hartree.
1.2

At bond length of 1.2000000000000002 angstrom, molecular hydrogen has:
Hartree-Fock energy of -1.0051067048832343 Hartree.
MP2 energy of -1.0336620966065275 Hartree.
FCI energy of -1.056740745132591 Hartree.
Nuclear repulsion energy between protons is 0.4409810071583334 Hartree.
Spatial orbital 0 has energy of -0.42650264072324545 Hartree.
Spatial orbital 1 has energy of 0.3441268787843519 Hartree.
1.3

At bond length of 1.3 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.9731106139491602 Hartree.
MP2 energy of -1.006590197243068 Hartree.
FCI energy of -1.0351862652459827 Hartree.
Nuclear repulsion energy between protons is 0.40705939122307694 Hartree.
Spatial orbital 0 has energy of -0.40094651614872323 Hartree.
Spatial orbital 1 has energy of 0.29851388983893856 Hartree.
1.4

At bond length of 1.4000000000000001 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.9414806527840186 Hartree.
MP2 energy of -0.9805687328589369 Hartree.
FCI energy of -1.0154682481426915 Hartree.
Nuclear repulsion energy between protons is 0.3779837204214286 Hartree.
Spatial orbital 0 has energy of -0.3773228239693589 Hartree.
Spatial orbital 1 has energy of 0.2589019723128326 Hartree.
1.5

At bond length of 1.5 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.9108735526174462 Hartree.
MP2 energy of -0.9562942016363287 Hartree.
FCI energy of -0.9981493524136993 Hartree.
Nuclear repulsion energy between protons is 0.35278480572666665 Hartree.
Spatial orbital 0 has energy of -0.3554774880192603 Hartree.
Spatial orbital 1 has energy of 0.22449543728518556 Hartree.
1.6

At bond length of 1.6 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.8817324479521221 Hartree.
MP2 energy of -0.9342411695719502 Hartree.
FCI energy of -0.9834727280932716 Hartree.
Nuclear repulsion energy between protons is 0.33073575536875 Hartree.
Spatial orbital 0 has energy of -0.3352963505891839 Hartree.
Spatial orbital 1 has energy of 0.19459795539978458 Hartree.
1.7

At bond length of 1.7000000000000002 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.8543376249706873 Hartree.
MP2 energy of -0.9147126228432917 Hartree.
FCI energy of -0.9714266876511379 Hartree.
Nuclear repulsion energy between protons is 0.31128071093529414 Hartree.
Spatial orbital 0 has energy of -0.3166860441012991 Hartree.
Spatial orbital 1 has energy of 0.16859732072886116 Hartree.
1.8

At bond length of 1.8 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.8288481459846262 Hartree.
MP2 energy of -0.8978805380405488 Hartree.
FCI energy of -0.9618169521199167 Hartree.
Nuclear repulsion energy between protons is 0.29398733810555555 Hartree.
Spatial orbital 0 has energy of -0.29956322022346127 Hartree.
Spatial orbital 1 has energy of 0.1459602966246219 Hartree.
1.9

At bond length of 1.9000000000000001 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.8053328430090216 Hartree.
MP2 energy of -0.8838158086555916 Hartree.
FCI energy of -0.9543388534525794 Hartree.
Nuclear repulsion energy between protons is 0.2785143203105263 Hartree.
Spatial orbital 0 has energy of -0.2838478652114843 Hartree.
Spatial orbital 1 has energy of 0.1262260489187021 Hartree.
2.0

At bond length of 2.0 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.783792652466311 Hartree.
MP2 energy of -0.8725100604810707 Hartree.
FCI energy of -0.9486411117424077 Hartree.
Nuclear repulsion energy between protons is 0.264588604295 Hartree.
Spatial orbital 0 has energy of -0.26945922244444087 Hartree.
Spatial orbital 1 has energy of 0.1089973681318946 Hartree.
2.1

At bond length of 2.1 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.7641776498896591 Hartree.
MP2 energy of -0.8638929333599986 Hartree.
FCI energy of -0.944374680781336 Hartree.
Nuclear repulsion energy between protons is 0.25198914694761904 Hartree.
Spatial orbital 0 has energy of -0.25631405863438766 Hartree.
Spatial orbital 1 has energy of 0.0939315946347687 Hartree.
2.2

At bond length of 2.2 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.7464013483548488 Hartree.
MP2 energy of -0.8578472435835268 Hartree.
FCI energy of -0.9412240334330747 Hartree.
Nuclear repulsion energy between protons is 0.24053509481363636 Hartree.
Spatial orbital 0 has energy of -0.24432699142489445 Hartree.
Spatial orbital 1 has energy of 0.08073270789777327 Hartree.
2.3

At bond length of 2.3000000000000003 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.7303533198131085 Hartree.
MP2 energy of -0.854222721280043 Hartree.
FCI energy of -0.938922385789505 Hartree.
Nuclear repulsion energy between protons is 0.2300770472130435 Hartree.
Spatial orbital 0 has energy of -0.2334122089960839 Hartree.
Spatial orbital 1 has energy of 0.069144997403965 Hartree.
2.4

At bond length of 2.4000000000000004 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.7159100590078187 Hartree.
MP2 energy of -0.8528478930177863 Hartree.
FCI energy of -0.9372549528606704 Hartree.
Nuclear repulsion energy between protons is 0.2204905035791667 Hartree.
Spatial orbital 0 has energy of -0.22348569714218677 Hartree.
Spatial orbital 1 has energy of 0.05894803199690316 Hartree.
2.5

At bond length of 2.5 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.7029435983728299 Hartree.
MP2 energy of -0.8535394695489013 Hartree.
FCI energy of -0.9360549198442759 Hartree.
Nuclear repulsion energy between protons is 0.21167088343600005 Hartree.
Spatial orbital 0 has energy of -0.2144671917818725 Hartree.
Spatial orbital 1 has energy of 0.04995242289757026 Hartree.

データはpubchemからも引っ張ってこれる。
https://pubchem.ncbi.nlm.nih.gov/


from openfermion.utils import geometry_from_pubchem

methane_geometry = geometry_from_pubchem('methane')
print(methane_geometry)

サーバーへの問い合わせもあるのでちょっと待って結果が戻ってきます。


[('C', (0, 0, 0)), ('H', (0.5541, 0.7996, 0.4965)), ('H', (0.6833, -0.8134, -0.2536)), ('H', (-0.7782, -0.3735, 0.6692)), ('H', (-0.4593, 0.3874, -0.9121))]

あわせて読みたい

SERVICE

汎用量子コンピュータ向けアプリケーション開発SDK

詳しく見る Githubで入手する(無料)

汎用量子コンピュータ向け高速シミュレータ

詳しく見る

量子コンピュータ向けクラウドサービス(準備中)

詳しく見る

イジングマシン向けアプリケーション開発SDK

詳しく見る Githubで入手する(無料)

COMMUNITY

量子コンピュータのことを学びたい、仕事としたいなどの情報交換の場を設け、コミュニティの形成を進めています。オフラインの勉強会と、オンラインのチャットコミュニティの2種類あります。オフラインのConnpassは1400名、オンラインのSlackは880名を超える参加があります。どちらも無料ですのでお気軽にご参加ください。

CONNPASS SLACK

CONTACT

弊社あての連絡はinfo@mdrft.comより用件を明記の上、メールで連絡を頂けますと幸いです。

ブログトップに戻る

Recent Posts