Note
This page was generated from docs/tutorials/02_vibrational_structure.ipynb.
Vibrational structure#
Introduction#
The molecular Hamiltonian is
Because the nuclei are much heavier than the electrons they do not move on the same time scale and therefore, the behavior of nuclei and electrons can be decoupled. This is the Born-Oppenheimer approximation.
Within the Born-Oppenheimer approximation, a molecular wave function is factorized as a product of an electronic part, which is the solution of the electronic Schroedinger equation, and a vibro-rotational one, which is the solution of the nuclear Schroedinger equation in the potential energy surface (PES) generated by sampling the eigenvalues of the electronic Schroedinger equation for different geometries.
The nuclear Schroedinger equation is usually solved in two steps, in analogy with its electronic counterpart. A single-particle basis (the basis functions are called, in this case, modals) is obtained either by the harmonic approximation applied to the PES or from a vibrational self-consistent field (VSCF) calculation. Vibrational anharmonic correlations are added a-posteriori with perturbative or variational approaches. The latter include Vibrational Configuration Interaction (VCI) and Vibrational Coupled Cluster (VCC) for highly-accurate anharmonic energies. The main advantage of VCI and VCC over alternative approaches (such as perturbation theories) is that their accuracy can be systematically improved towards the complete basis set limit for a given PES. However, their applicability is limited to small molecules with up to about 10 atoms due to their unfavorable scaling with system size.
To tackle the scaling problem we would like to use quantum algorithms.
The nuclear Schroedinger equation is
The so-called Watson Hamiltonian (neglecting vibro-rotational coupling terms) is
where
where
A flexible second quantization form of the Watson Hamiltonian is obtained within the so-called n-mode representation. Let us assume that each mode
The
The many-body basis function
The ONV defined above is, therefore, the product of
Based on this second-quantization representation we introduce a pair of creation and annihilation operators per mode
with
The second quantization form is obtained by expressing the potential as
We highlight here the difference between the operators defined here above and the electronic structure one. First, as we already mentioned, the potential contains (in principle) three- and higher-body coupling terms that lead to strings with six (or more) second-quantization operators. Moreover, the Hamiltonian conserves the number of particles for each mode, as can be seen from the fact that the number of creation and annihilation operators for a given mode is the same in each term.
Nevertheless, different modes are coupled by two- (and higher) body terms containing SQ operators belonging to different modes
Reference: Ollitrault, Pauline J., et al., arXiv:2003.12578 (2020).
Compute the electronic potential
Solving the ESE for different nuclear configurations to obtain the PES function
The advantage of such form for the PES is that the anharmonic force fields (
and
Such numerical procedure is implemented, for instance, in the Gaussian suite of programs.
In practice this can be done with Qiskit using the GaussianForceDriver.
[1]:
from qiskit_nature.second_q.drivers import GaussianForcesDriver
# if you ran Gaussian elsewhere and already have the output file
driver = GaussianForcesDriver(logfile="aux_files/CO2_freq_B3LYP_631g.log")
# if you want to run the Gaussian job from Qiskit
# driver = GaussianForcesDriver(
# ['#p B3LYP/6-31g Freq=(Anharm) Int=Ultrafine SCF=VeryTight',
# '',
# 'CO2 geometry optimization B3LYP/6-31g',
# '',
# '0 1',
# 'C -0.848629 2.067624 0.160992',
# 'O 0.098816 2.655801 -0.159738',
# 'O -1.796073 1.479446 0.481721',
# '',
# ''
[2]:
from qiskit_nature.second_q.problems import HarmonicBasis
basis = HarmonicBasis([2, 2, 2, 2])
Map to a qubit Hamiltonian#
Now that we have an approximation for the potential, we need to write the Hamiltonian in second quantization. To this end we need to select a modal basis to calculate the one-body integrals
In the simplest case, the
The bosonic operator,
[3]:
from qiskit_nature.second_q.problems import VibrationalStructureProblem
from qiskit_nature.second_q.mappers import DirectMapper
vibrational_problem = driver.run(basis=basis)
vibrational_problem.hamiltonian.truncation_order = 2
main_op, aux_ops = vibrational_problem.second_q_ops()
The Vibrational operator for the problem now reads as
[4]:
print(main_op)
Vibrational Operator
number modes=4, number modals=[2, 2, 2, 2], number terms=50
(1268.0676746875001+0j) * ( +_0_0 -_0_0 )
+ (3813.8767834375008+0j) * ( +_0_1 -_0_1 )
+ (705.8633818750002+0j) * ( +_1_0 -_1_0 )
+ (-46.025705898886045+0j) * ( +_1_0 -_1_1 )
+ (-46.025705898886045+0j) * ( +_1_1 -_1_0 )
+ (2120.1145593750007+0j) * ( +_1_1 -_1_1 )
+ (238.31540750000005+0j) * ( +_2_0 -_2_0 )
+ (728.9613775000003+0j) * ( +_2_1 -_2_1 )
+ (238.31540750000005+0j) * ( +_3_0 -_3_0 )
+ (728.9613775000003+0j) * ( +_3_1 -_3_1 )
+ (4.942542500000002+0j) * ( +_0_0 -_0_0 +_1_0 -_1_0 )
+ (-88.20174216876333+0j) * ( +_0_0 -_0_0 +_1_0 -_1_1 )
+ (-88.20174216876333+0j) * ( +_0_0 -_0_0 +_1_1 -_1_0 )
+ (14.827627500000007+0j) * ( +_0_0 -_0_0 +_1_1 -_1_1 )
+ (14.827627500000007+0j) * ( +_0_1 -_0_1 +_1_0 -_1_0 )
+ (-264.60522650629+0j) * ( +_0_1 -_0_1 +_1_0 -_1_1 )
+ (-264.60522650629+0j) * ( +_0_1 -_0_1 +_1_1 -_1_0 )
+ (44.482882500000024+0j) * ( +_0_1 -_0_1 +_1_1 -_1_1 )
+ (-10.205891250000004+0j) * ( +_2_0 -_2_0 +_0_0 -_0_0 )
+ (-30.617673750000016+0j) * ( +_2_0 -_2_0 +_0_1 -_0_1 )
+ (-4.194299375000002+0j) * ( +_2_0 -_2_0 +_1_0 -_1_0 )
+ (42.67527310283147+0j) * ( +_2_0 -_2_0 +_1_0 -_1_1 )
+ (42.67527310283147+0j) * ( +_2_0 -_2_0 +_1_1 -_1_0 )
+ (-12.582898125000007+0j) * ( +_2_0 -_2_0 +_1_1 -_1_1 )
+ (-30.61767375000002+0j) * ( +_2_1 -_2_1 +_0_0 -_0_0 )
+ (-91.85302125000007+0j) * ( +_2_1 -_2_1 +_0_1 -_0_1 )
+ (-12.582898125000007+0j) * ( +_2_1 -_2_1 +_1_0 -_1_0 )
+ (128.02581930849442+0j) * ( +_2_1 -_2_1 +_1_0 -_1_1 )
+ (128.02581930849442+0j) * ( +_2_1 -_2_1 +_1_1 -_1_0 )
+ (-37.74869437500002+0j) * ( +_2_1 -_2_1 +_1_1 -_1_1 )
+ (-10.205891250000004+0j) * ( +_3_0 -_3_0 +_0_0 -_0_0 )
+ (-30.617673750000016+0j) * ( +_3_0 -_3_0 +_0_1 -_0_1 )
+ (-4.194299375000002+0j) * ( +_3_0 -_3_0 +_1_0 -_1_0 )
+ (42.67527310283147+0j) * ( +_3_0 -_3_0 +_1_0 -_1_1 )
+ (42.67527310283147+0j) * ( +_3_0 -_3_0 +_1_1 -_1_0 )
+ (-12.582898125000007+0j) * ( +_3_0 -_3_0 +_1_1 -_1_1 )
+ (7.0983500000000035+0j) * ( +_3_0 -_3_0 +_2_0 -_2_0 )
+ (21.29505000000001+0j) * ( +_3_0 -_3_0 +_2_1 -_2_1 )
+ 0j * ( +_3_0 -_3_1 +_2_0 -_2_1 )
+ 0j * ( +_3_0 -_3_1 +_2_1 -_2_0 )
+ 0j * ( +_3_1 -_3_0 +_2_0 -_2_1 )
+ 0j * ( +_3_1 -_3_0 +_2_1 -_2_0 )
+ (-30.61767375000002+0j) * ( +_3_1 -_3_1 +_0_0 -_0_0 )
+ (-91.85302125000007+0j) * ( +_3_1 -_3_1 +_0_1 -_0_1 )
+ (-12.582898125000007+0j) * ( +_3_1 -_3_1 +_1_0 -_1_0 )
+ (128.02581930849442+0j) * ( +_3_1 -_3_1 +_1_0 -_1_1 )
+ (128.02581930849442+0j) * ( +_3_1 -_3_1 +_1_1 -_1_0 )
+ (-37.74869437500002+0j) * ( +_3_1 -_3_1 +_1_1 -_1_1 )
+ (21.29505000000001+0j) * ( +_3_1 -_3_1 +_2_0 -_2_0 )
+ (63.88515000000004+0j) * ( +_3_1 -_3_1 +_2_1 -_2_1 )
In the previous cell we defined a bosonic transformation to express the Hamiltonian in the harmonic modal basis, with 2 modals per mode with the potential truncated at order 2 and the ‘direct’ boson to qubit mapping. The calculation is then ran as:
[5]:
qubit_mapper = DirectMapper()
qubit_op = qubit_mapper.map(main_op)
print(qubit_op)
SparsePauliOp(['IIIIIIII', 'IIIIIIIZ', 'IIIIIIZI', 'IIIIIZII', 'IIIIXXII', 'IIIIYYII', 'IIIIZIII', 'IIIZIIII', 'IIZIIIII', 'IZIIIIII', 'ZIIIIIII', 'IIIIIZIZ', 'IIIIXXIZ', 'IIIIYYIZ', 'IIIIZIIZ', 'IIIIIZZI', 'IIIIXXZI', 'IIIIYYZI', 'IIIIZIZI', 'IIIZIIIZ', 'IIIZIIZI', 'IIIZIZII', 'IIIZXXII', 'IIIZYYII', 'IIIZZIII', 'IIZIIIIZ', 'IIZIIIZI', 'IIZIIZII', 'IIZIXXII', 'IIZIYYII', 'IIZIZIII', 'IZIIIIIZ', 'IZIIIIZI', 'IZIIIZII', 'IZIIXXII', 'IZIIYYII', 'IZIIZIII', 'IZIZIIII', 'IZZIIIII', 'ZIIIIIIZ', 'ZIIIIIZI', 'ZIIIIZII', 'ZIIIXXII', 'ZIIIYYII', 'ZIIIZIII', 'ZIIZIIII', 'ZIZIIIII'],
coeffs=[ 4.85420003e+03+0.j, -6.18564597e+02+0.j, -1.86053067e+03+0.j,
-3.49485635e+02+0.j, -2.58640489e+01+0.j, -2.58640489e+01+0.j,
-1.04971911e+03+0.j, -1.11855863e+02+0.j, -3.42575167e+02+0.j,
-1.11855863e+02+0.j, -3.42575167e+02+0.j, 1.23563563e+00+0.j,
2.20504355e+01+0.j, 2.20504355e+01+0.j, 3.70690688e+00+0.j,
3.70690688e+00+0.j, 6.61513066e+01+0.j, 6.61513066e+01+0.j,
1.11207206e+01+0.j, -2.55147281e+00+0.j, -7.65441844e+00+0.j,
-1.04857484e+00+0.j, -1.06688183e+01+0.j, -1.06688183e+01+0.j,
-3.14572453e+00+0.j, -7.65441844e+00+0.j, -2.29632553e+01+0.j,
-3.14572453e+00+0.j, -3.20064548e+01+0.j, -3.20064548e+01+0.j,
-9.43717359e+00+0.j, -2.55147281e+00+0.j, -7.65441844e+00+0.j,
-1.04857484e+00+0.j, -1.06688183e+01+0.j, -1.06688183e+01+0.j,
-3.14572453e+00+0.j, 1.77458750e+00+0.j, 5.32376250e+00+0.j,
-7.65441844e+00+0.j, -2.29632553e+01+0.j, -3.14572453e+00+0.j,
-3.20064548e+01+0.j, -3.20064548e+01+0.j, -9.43717359e+00+0.j,
5.32376250e+00+0.j, 1.59712875e+01+0.j])
To have a different number of modals per mode:
[6]:
basis = HarmonicBasis([3, 3, 3, 3])
vibrational_problem = driver.run(basis=basis)
vibrational_problem.hamiltonian.truncation_order = 2
main_op, aux_ops = vibrational_problem.second_q_ops()
qubit_mapper = DirectMapper()
qubit_op = qubit_mapper.map(main_op)
print(qubit_op)
SparsePauliOp(['IIIIIIIIIIII', 'IIIIIIIIIIIZ', 'IIIIIIIIIXIX', 'IIIIIIIIIYIY', 'IIIIIIIIIIZI', 'IIIIIIIIIZII', 'IIIIIIIIZIII', 'IIIIIIIXXIII', 'IIIIIIIYYIII', 'IIIIIIXIXIII', 'IIIIIIYIYIII', 'IIIIIIIZIIII', 'IIIIIIXXIIII', 'IIIIIIYYIIII', 'IIIIIIZIIIII', 'IIIIIZIIIIII', 'IIIXIXIIIIII', 'IIIYIYIIIIII', 'IIIIZIIIIIII', 'IIIZIIIIIIII', 'IIZIIIIIIIII', 'XIXIIIIIIIII', 'YIYIIIIIIIII', 'IZIIIIIIIIII', 'ZIIIIIIIIIII', 'IIIIIIIIZIIZ', 'IIIIIIIXXIIZ', 'IIIIIIIYYIIZ', 'IIIIIIXIXIIZ', 'IIIIIIYIYIIZ', 'IIIIIIIZIIIZ', 'IIIIIIXXIIIZ', 'IIIIIIYYIIIZ', 'IIIIIIZIIIIZ', 'IIIIIIIIZXIX', 'IIIIIIIIZYIY', 'IIIIIIIXXXIX', 'IIIIIIIYYXIX', 'IIIIIIIXXYIY', 'IIIIIIIYYYIY', 'IIIIIIXIXXIX', 'IIIIIIYIYXIX', 'IIIIIIXIXYIY', 'IIIIIIYIYYIY', 'IIIIIIIZIXIX', 'IIIIIIIZIYIY', 'IIIIIIXXIXIX', 'IIIIIIYYIXIX', 'IIIIIIXXIYIY', 'IIIIIIYYIYIY', 'IIIIIIZIIXIX', 'IIIIIIZIIYIY', 'IIIIIIIIZIZI', 'IIIIIIIXXIZI', 'IIIIIIIYYIZI', 'IIIIIIXIXIZI', 'IIIIIIYIYIZI', 'IIIIIIIZIIZI', 'IIIIIIXXIIZI', 'IIIIIIYYIIZI', 'IIIIIIZIIIZI', 'IIIIIIIIZZII', 'IIIIIIIXXZII', 'IIIIIIIYYZII', 'IIIIIIXIXZII', 'IIIIIIYIYZII', 'IIIIIIIZIZII', 'IIIIIIXXIZII', 'IIIIIIYYIZII', 'IIIIIIZIIZII', 'IIIIIZIIIIIZ', 'IIIIIZIIIXIX', 'IIIIIZIIIYIY', 'IIIIIZIIIIZI', 'IIIIIZIIIZII', 'IIIIIZIIZIII', 'IIIIIZIXXIII', 'IIIIIZIYYIII', 'IIIIIZXIXIII', 'IIIIIZYIYIII', 'IIIIIZIZIIII', 'IIIIIZXXIIII', 'IIIIIZYYIIII', 'IIIIIZZIIIII', 'IIIXIXIIIIIZ', 'IIIYIYIIIIIZ', 'IIIXIXIIIXIX', 'IIIXIXIIIYIY', 'IIIYIYIIIXIX', 'IIIYIYIIIYIY', 'IIIXIXIIIIZI', 'IIIYIYIIIIZI', 'IIIXIXIIIZII', 'IIIYIYIIIZII', 'IIIXIXIIZIII', 'IIIYIYIIZIII', 'IIIXIXIXXIII', 'IIIXIXIYYIII', 'IIIYIYIXXIII', 'IIIYIYIYYIII', 'IIIXIXXIXIII', 'IIIXIXYIYIII', 'IIIYIYXIXIII', 'IIIYIYYIYIII', 'IIIXIXIZIIII', 'IIIYIYIZIIII', 'IIIXIXXXIIII', 'IIIXIXYYIIII', 'IIIYIYXXIIII', 'IIIYIYYYIIII', 'IIIXIXZIIIII', 'IIIYIYZIIIII', 'IIIIZIIIIIIZ', 'IIIIZIIIIXIX', 'IIIIZIIIIYIY', 'IIIIZIIIIIZI', 'IIIIZIIIIZII', 'IIIIZIIIZIII', 'IIIIZIIXXIII', 'IIIIZIIYYIII', 'IIIIZIXIXIII', 'IIIIZIYIYIII', 'IIIIZIIZIIII', 'IIIIZIXXIIII', 'IIIIZIYYIIII', 'IIIIZIZIIIII', 'IIIZIIIIIIIZ', 'IIIZIIIIIXIX', 'IIIZIIIIIYIY', 'IIIZIIIIIIZI', 'IIIZIIIIIZII', 'IIIZIIIIZIII', 'IIIZIIIXXIII', 'IIIZIIIYYIII', 'IIIZIIXIXIII', 'IIIZIIYIYIII', 'IIIZIIIZIIII', 'IIIZIIXXIIII', 'IIIZIIYYIIII', 'IIIZIIZIIIII', 'IIZIIIIIIIIZ', 'IIZIIIIIIXIX', 'IIZIIIIIIYIY', 'IIZIIIIIIIZI', 'IIZIIIIIIZII', 'IIZIIIIIZIII', 'IIZIIIIXXIII', 'IIZIIIIYYIII', 'IIZIIIXIXIII', 'IIZIIIYIYIII', 'IIZIIIIZIIII', 'IIZIIIXXIIII', 'IIZIIIYYIIII', 'IIZIIIZIIIII', 'IIZIIZIIIIII', 'IIZXIXIIIIII', 'IIZYIYIIIIII', 'IIZIZIIIIIII', 'IIZZIIIIIIII', 'IXXXXIIIIIII', 'IXXYYIIIIIII', 'IYYXXIIIIIII', 'IYYYYIIIIIII', 'XIXIIIIIIIIZ', 'YIYIIIIIIIIZ', 'XIXIIIIIIXIX', 'XIXIIIIIIYIY', 'YIYIIIIIIXIX', 'YIYIIIIIIYIY', 'XIXIIIIIIIZI', 'YIYIIIIIIIZI', 'XIXIIIIIIZII', 'YIYIIIIIIZII', 'XIXIIIIIZIII', 'YIYIIIIIZIII', 'XIXIIIIXXIII', 'XIXIIIIYYIII', 'YIYIIIIXXIII', 'YIYIIIIYYIII', 'XIXIIIXIXIII', 'XIXIIIYIYIII', 'YIYIIIXIXIII', 'YIYIIIYIYIII', 'XIXIIIIZIIII', 'YIYIIIIZIIII', 'XIXIIIXXIIII', 'XIXIIIYYIIII', 'YIYIIIXXIIII', 'YIYIIIYYIIII', 'XIXIIIZIIIII', 'YIYIIIZIIIII', 'XIXIIZIIIIII', 'YIYIIZIIIIII', 'XIXXIXIIIIII', 'XIXYIYIIIIII', 'YIYXIXIIIIII', 'YIYYIYIIIIII', 'XIXIZIIIIIII', 'YIYIZIIIIIII', 'XIXZIIIIIIII', 'YIYZIIIIIIII', 'IZIIIIIIIIIZ', 'IZIIIIIIIXIX', 'IZIIIIIIIYIY', 'IZIIIIIIIIZI', 'IZIIIIIIIZII', 'IZIIIIIIZIII', 'IZIIIIIXXIII', 'IZIIIIIYYIII', 'IZIIIIXIXIII', 'IZIIIIYIYIII', 'IZIIIIIZIIII', 'IZIIIIXXIIII', 'IZIIIIYYIIII', 'IZIIIIZIIIII', 'IZIIIZIIIIII', 'IZIXIXIIIIII', 'IZIYIYIIIIII', 'IZIIZIIIIIII', 'IZIZIIIIIIII', 'XXIIXXIIIIII', 'XXIIYYIIIIII', 'YYIIXXIIIIII', 'YYIIYYIIIIII', 'ZIIIIIIIIIIZ', 'ZIIIIIIIIXIX', 'ZIIIIIIIIYIY', 'ZIIIIIIIIIZI', 'ZIIIIIIIIZII', 'ZIIIIIIIZIII', 'ZIIIIIIXXIII', 'ZIIIIIIYYIII', 'ZIIIIIXIXIII', 'ZIIIIIYIYIII', 'ZIIIIIIZIIII', 'ZIIIIIXXIIII', 'ZIIIIIYYIIII', 'ZIIIIIZIIIII', 'ZIIIIZIIIIII', 'ZIIXIXIIIIII', 'ZIIYIYIIIIII', 'ZIIIZIIIIIII', 'ZIIZIIIIIIII'],
coeffs=[ 1.07887200e+04+0.j, -5.99228047e+02+0.j, -4.23824394e+01+0.j,
-4.23824394e+01+0.j, -1.80252102e+03+0.j, -3.01548776e+03+0.j,
-3.45178064e+02+0.j, -2.94280439e+01+0.j, -2.94280439e+01+0.j,
-9.18025376e+00+0.j, -9.18025376e+00+0.j, -1.03679640e+03+0.j,
-7.41626275e+01+0.j, -7.41626275e+01+0.j, -1.73093915e+03+0.j,
-1.02728562e+02+0.j, -1.33241035e+01+0.j, -1.33241035e+01+0.j,
-3.15193265e+02+0.j, -5.41673122e+02+0.j, -1.02728562e+02+0.j,
-1.33241035e+01+0.j, -1.33241035e+01+0.j, -3.15193265e+02+0.j,
-5.41673122e+02+0.j, 1.23563563e+00+0.j, 2.20504355e+01+0.j,
2.20504355e+01+0.j, -1.74745266e+00+0.j, -1.74745266e+00+0.j,
3.70690688e+00+0.j, 3.11840250e+01+0.j, 3.11840250e+01+0.j,
6.17817813e+00+0.j, -1.74745266e+00+0.j, -1.74745266e+00+0.j,
-3.11840250e+01+0.j, -3.11840250e+01+0.j, -3.11840250e+01+0.j,
-3.11840250e+01+0.j, 2.47127125e+00+0.j, 2.47127125e+00+0.j,
2.47127125e+00+0.j, 2.47127125e+00+0.j, -5.24235798e+00+0.j,
-5.24235798e+00+0.j, -4.41008711e+01+0.j, -4.41008711e+01+0.j,
-4.41008711e+01+0.j, -4.41008711e+01+0.j, -8.73726330e+00+0.j,
-8.73726330e+00+0.j, 3.70690688e+00+0.j, 6.61513066e+01+0.j,
6.61513066e+01+0.j, -5.24235798e+00+0.j, -5.24235798e+00+0.j,
1.11207206e+01+0.j, 9.35520750e+01+0.j, 9.35520750e+01+0.j,
1.85345344e+01+0.j, 6.17817813e+00+0.j, 1.10252178e+02+0.j,
1.10252178e+02+0.j, -8.73726330e+00+0.j, -8.73726330e+00+0.j,
1.85345344e+01+0.j, 1.55920125e+02+0.j, 1.55920125e+02+0.j,
3.08908906e+01+0.j, -2.55147281e+00+0.j, 3.60832746e+00+0.j,
3.60832746e+00+0.j, -7.65441844e+00+0.j, -1.27573641e+01+0.j,
-1.04857484e+00+0.j, -1.06688183e+01+0.j, -1.06688183e+01+0.j,
1.48290877e+00+0.j, 1.48290877e+00+0.j, -3.14572453e+00+0.j,
-1.50879875e+01+0.j, -1.50879875e+01+0.j, -5.24287422e+00+0.j,
3.60832746e+00+0.j, 3.60832746e+00+0.j, -5.10294563e+00+0.j,
-5.10294563e+00+0.j, -5.10294563e+00+0.j, -5.10294563e+00+0.j,
1.08249824e+01+0.j, 1.08249824e+01+0.j, 1.80416373e+01+0.j,
1.80416373e+01+0.j, 1.48290877e+00+0.j, 1.48290877e+00+0.j,
1.50879875e+01+0.j, 1.50879875e+01+0.j, 1.50879875e+01+0.j,
1.50879875e+01+0.j, -2.09714969e+00+0.j, -2.09714969e+00+0.j,
-2.09714969e+00+0.j, -2.09714969e+00+0.j, 4.44872630e+00+0.j,
4.44872630e+00+0.j, 2.13376366e+01+0.j, 2.13376366e+01+0.j,
2.13376366e+01+0.j, 2.13376366e+01+0.j, 7.41454383e+00+0.j,
7.41454383e+00+0.j, -7.65441844e+00+0.j, 1.08249824e+01+0.j,
1.08249824e+01+0.j, -2.29632553e+01+0.j, -3.82720922e+01+0.j,
-3.14572453e+00+0.j, -3.20064548e+01+0.j, -3.20064548e+01+0.j,
4.44872630e+00+0.j, 4.44872630e+00+0.j, -9.43717359e+00+0.j,
-4.52639625e+01+0.j, -4.52639625e+01+0.j, -1.57286227e+01+0.j,
-1.27573641e+01+0.j, 1.80416373e+01+0.j, 1.80416373e+01+0.j,
-3.82720922e+01+0.j, -6.37868203e+01+0.j, -5.24287422e+00+0.j,
-5.33440914e+01+0.j, -5.33440914e+01+0.j, 7.41454383e+00+0.j,
7.41454383e+00+0.j, -1.57286227e+01+0.j, -7.54399375e+01+0.j,
-7.54399375e+01+0.j, -2.62143711e+01+0.j, -2.55147281e+00+0.j,
3.60832746e+00+0.j, 3.60832746e+00+0.j, -7.65441844e+00+0.j,
-1.27573641e+01+0.j, -1.04857484e+00+0.j, -1.06688183e+01+0.j,
-1.06688183e+01+0.j, 1.48290877e+00+0.j, 1.48290877e+00+0.j,
-3.14572453e+00+0.j, -1.50879875e+01+0.j, -1.50879875e+01+0.j,
-5.24287422e+00+0.j, 1.77458750e+00+0.j, -2.50964571e+00+0.j,
-2.50964571e+00+0.j, 5.32376250e+00+0.j, 8.87293750e+00+0.j,
-2.81707541e+00+0.j, -2.81707541e+00+0.j, -2.81707541e+00+0.j,
-2.81707541e+00+0.j, 3.60832746e+00+0.j, 3.60832746e+00+0.j,
-5.10294563e+00+0.j, -5.10294563e+00+0.j, -5.10294563e+00+0.j,
-5.10294563e+00+0.j, 1.08249824e+01+0.j, 1.08249824e+01+0.j,
1.80416373e+01+0.j, 1.80416373e+01+0.j, 1.48290877e+00+0.j,
1.48290877e+00+0.j, 1.50879875e+01+0.j, 1.50879875e+01+0.j,
1.50879875e+01+0.j, 1.50879875e+01+0.j, -2.09714969e+00+0.j,
-2.09714969e+00+0.j, -2.09714969e+00+0.j, -2.09714969e+00+0.j,
4.44872630e+00+0.j, 4.44872630e+00+0.j, 2.13376366e+01+0.j,
2.13376366e+01+0.j, 2.13376366e+01+0.j, 2.13376366e+01+0.j,
7.41454383e+00+0.j, 7.41454383e+00+0.j, -2.50964571e+00+0.j,
-2.50964571e+00+0.j, 3.54917500e+00+0.j, 3.54917500e+00+0.j,
3.54917500e+00+0.j, 3.54917500e+00+0.j, -7.52893713e+00+0.j,
-7.52893713e+00+0.j, -1.25482286e+01+0.j, -1.25482286e+01+0.j,
-7.65441844e+00+0.j, 1.08249824e+01+0.j, 1.08249824e+01+0.j,
-2.29632553e+01+0.j, -3.82720922e+01+0.j, -3.14572453e+00+0.j,
-3.20064548e+01+0.j, -3.20064548e+01+0.j, 4.44872630e+00+0.j,
4.44872630e+00+0.j, -9.43717359e+00+0.j, -4.52639625e+01+0.j,
-4.52639625e+01+0.j, -1.57286227e+01+0.j, 5.32376250e+00+0.j,
-7.52893713e+00+0.j, -7.52893713e+00+0.j, 1.59712875e+01+0.j,
2.66188125e+01+0.j, 2.81707541e+00+0.j, 2.81707541e+00+0.j,
2.81707541e+00+0.j, 2.81707541e+00+0.j, -1.27573641e+01+0.j,
1.80416373e+01+0.j, 1.80416373e+01+0.j, -3.82720922e+01+0.j,
-6.37868203e+01+0.j, -5.24287422e+00+0.j, -5.33440914e+01+0.j,
-5.33440914e+01+0.j, 7.41454383e+00+0.j, 7.41454383e+00+0.j,
-1.57286227e+01+0.j, -7.54399375e+01+0.j, -7.54399375e+01+0.j,
-2.62143711e+01+0.j, 8.87293750e+00+0.j, -1.25482286e+01+0.j,
-1.25482286e+01+0.j, 2.66188125e+01+0.j, 4.43646875e+01+0.j])
Solving the VibrationalStructureProblem
#
In the following, we will compute the ground-state of our problem instance. To learn more about the individual components that go into the GroundStateSolver
, please refer to the corresponding tutorials.
[7]:
# for simplicity, we will use the smaller basis again
vibrational_problem = driver.run(basis=HarmonicBasis([2, 2, 2, 2]))
vibrational_problem.hamiltonian.truncation_order = 2
[8]:
from qiskit_algorithms import NumPyMinimumEigensolver
from qiskit_nature.second_q.algorithms import GroundStateEigensolver
solver = GroundStateEigensolver(
qubit_mapper,
NumPyMinimumEigensolver(filter_criterion=vibrational_problem.get_default_filter_criterion()),
)
[9]:
result = solver.solve(vibrational_problem)
print(result)
=== GROUND STATE ===
* Vibrational ground state energy (cm^-1): 2432.10695403655
The number of occupied modals for each mode is:
- Mode 0: 1.0
- Mode 1: 1.0
- Mode 2: 1.0
- Mode 3: 1.0
[10]:
import tutorial_magics
%qiskit_version_table
%qiskit_copyright
Version Information
Software | Version |
---|---|
qiskit | 1.0.1 |
qiskit_nature | 0.7.2 |
qiskit_algorithms | 0.3.0 |
System information | |
Python version | 3.8.18 |
OS | Linux |
Fri Feb 23 10:25:06 2024 UTC |
This code is a part of a Qiskit project
© Copyright IBM 2017, 2024.
This code is licensed under the Apache License, Version 2.0. You may
obtain a copy of this license in the LICENSE.txt file in the root directory
of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
Any modifications or derivative works of this code must retain this
copyright notice, and modified files need to carry a notice indicating
that they have been altered from the originals.