Tutorials
qcr:2606.06253.1

Vibrational Structure Problems in Qiskit Nature

This Qiskit Nature tutorial addresses the vibrational-structure problem, computing the quantized vibrational energy levels of molecules, the complement to the electronic-structure problem and an important task for predicting infrared and Raman spectra. Where electronic structure concerns the molecule's electrons, vibrational structure concerns how the nuclei oscillate around their equilibrium positions, governed by a potential energy surface that can be expanded into a vibrational Hamiltonian. The tutorial shows how to set up a VibrationalStructureProblem in Qiskit Nature: providing the molecular force field or potential expansion, choosing a basis for the vibrational modes, and building the second-quantized bosonic Hamiltonian that describes the coupled anharmonic oscillators. It explains how this bosonic problem is mapped onto qubits so that quantum algorithms such as VQE can estimate the vibrational energy levels. By extending the chemistry workflow from electrons to nuclear motion, the tutorial broadens the range of molecular properties accessible to quantum computation and shows how Qiskit Nature handles bosonic as well as fermionic problems. It is a focused guide to vibrational quantum chemistry in Qiskit.
Chemistry
Qubit
Circuit-based
Uploaded 2 days ago
17
Views
GitHub390
Citing this entry? Use this QCR ID
Uploaded by
QL
QCR Librarian

Overview

qiskit-community/qiskit-nature
390233
In [ ]:
# --- Setup cell added by QCR (not part of the original tutorial) ---
# Source: qiskit-community/qiskit-nature @ 0.8, Apache License 2.0.
# Installs the example's dependencies. If a later cell still reports a missing
# package, restart the runtime/kernel and run again from the top.
%pip install -q qiskit-nature==0.8.0 pyscf qiskit-algorithms

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 are the harmonic mass-weighted normal coordinates.

must be mapped to an operator that acts on the states of a given set of qubits in order to calculate its eigenfunctions on quantum hardware. In electronic structure calculations, the mapping is achieved by expressing the non-relativistic electronic Hamiltonian in second quantization, \textit{i.e.} by projecting it onto the complete set of antisymmetrized occupation number vectors (ONV) generated by a given (finite) set of orbitals. To encode the vibrational Hamiltonian in an analogous second quantization operators, we expand the potential with the -body expansion as follows:

where is the electronic energy of the reference geometry, the one-mode term represents the variation of the PES upon change of the -th normal coordinate from the equilibrium position. Similarly, the two-body potential represents the change in the exact PES upon a simultaneous displacement along the -th and -th coordinates. Often, including terms up to three-body in the -body expansion is sufficient to obtain an accuracy of about 1~cm. We highlight that the many-body expansion of the potential operator defining the Watson Hamiltonian contains arbitrarily high coupling terms. This is a crucial difference compared to the non-relativistic electronic-structure Hamiltonian that contains only pairwise interactions.

A flexible second quantization form of the Watson Hamiltonian is obtained within the so-called n-mode representation. Let us assume that each mode is described by a -dimensional basis set defined as follows:

The -mode wave function can be expanded in the product basis as the following CI-like expansion:

The many-body basis function are encoded within the so-called -mode second quantization as occupation-number vectors (ONVs) as follows:

The ONV defined above is, therefore, the product of mode-specific ONVs, each one describing an individual mode. Since each mode is described by one and only one basis function, the occupation of each mode-specific ONV is one. From a theoretical perspective, each mode can be interpreted as a distinguishable quasi-particle (defined as phonons in solid-state physics). Distinguishability arises from the fact that the PES is not invariant by permutation of two modes, also in this case unlike the Coulomb interaction between two equal particles. From this perspective, a molecule can be interpreted as a collection of indistinguishable particles that interact through the PES operator.

Based on this second-quantization representation we introduce a pair of creation and annihilation operators per mode \textit{and} per basis function defined as:

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 and .

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 . So far Qiskit gives the possibility to approximate the PES with a quartic force field. The advantage of such form for the PES is that the anharmonic force fields (, , ) can be calculated by finite-difference approaches. For methods for which the nuclear energy Hessian can be calculated analytically with response theory-based methods (such as HF and DFT), the quartic force field can be calculated by semi-numerical differentiation as: 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.

In [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',
#                  '',
#                  ''
In [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 , two-body integrals ...

In the simplest case, the functions are the harmonic-oscillator eigenfunctions for each mode. The main advantage of this choice is that the integrals of a PES expressed as a Taylor expansion are easy to calculate with such basis. A routine for computing these integrals is implemented in Qiskit.

The bosonic operator, , is then created and must be mapped to a qubit operator. The direct mapping introduced in the first section of this tutorial can be used is Qiskit as follows:

In [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

In [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:

In [5]:
qubit_mapper = DirectMapper()
qubit_op = qubit_mapper.map(main_op)

print(qubit_op)
4854.200029687493 * IIIIIIII
- 618.5645973437502 * IIIIIIIZ
- 1860.5306717187502 * IIIIIIZI
- 349.48563468750024 * IIIIIZII
- 25.864048912543417 * IIIIXXII
- 25.864048912543417 * IIIIYYII
- 1049.719110937499 * IIIIZIII
- 111.85586312500007 * IIIZIIII
- 342.57516687500015 * IIZIIIII
- 111.85586312500007 * IZIIIIII
- 342.57516687500015 * ZIIIIIII
+ 1.2356356250000005 * IIIIIZIZ
+ 22.050435542190833 * IIIIXXIZ
+ 22.050435542190833 * IIIIYYIZ
+ 3.706906875000002 * IIIIZIIZ
+ 3.706906875000002 * IIIIIZZI
+ 66.1513066265725 * IIIIXXZI
+ 66.1513066265725 * IIIIYYZI
+ 11.120720625000006 * IIIIZIZI
- 2.551472812500001 * IIIZIIIZ
- 7.654418437500004 * IIIZIIZI
- 1.0485748437500004 * IIIZIZII
- 10.668818275707867 * IIIZXXII
- 10.668818275707867 * IIIZYYII
- 3.1457245312500017 * IIIZZIII
- 7.654418437500005 * IIZIIIIZ
- 22.963255312500017 * IIZIIIZI
- 3.1457245312500017 * IIZIIZII
- 32.006454827123605 * IIZIXXII
- 32.006454827123605 * IIZIYYII
- 9.437173593750005 * IIZIZIII
- 2.551472812500001 * IZIIIIIZ
- 7.654418437500004 * IZIIIIZI
- 1.0485748437500004 * IZIIIZII
- 10.668818275707867 * IZIIXXII
- 10.668818275707867 * IZIIYYII
- 3.1457245312500017 * IZIIZIII
+ 1.7745875000000009 * IZIZIIII
+ 5.323762500000003 * IZZIIIII
- 7.654418437500005 * ZIIIIIIZ
- 22.963255312500017 * ZIIIIIZI
- 3.1457245312500017 * ZIIIIZII
- 32.006454827123605 * ZIIIXXII
- 32.006454827123605 * ZIIIYYII
- 9.437173593750005 * ZIIIZIII
+ 5.323762500000003 * ZIIZIIII
+ 15.97128750000001 * ZIZIIIII

To have a different number of modals per mode:

In [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)
10788.71998265624 * IIIIIIIIIIII
- 599.2280473437502 * IIIIIIIIIIIZ
- 42.382439413480455 * IIIIIIIIIXIX
- 42.382439413480455 * IIIIIIIIIYIY
- 1802.5210217187503 * IIIIIIIIIIZI
- 3015.487755468749 * IIIIIIIIIZII
- 345.17806437499996 * IIIIIIIIZIII
- 29.42804386641884 * IIIIIIIXXIII
- 29.42804386641884 * IIIIIIIYYIII
- 9.18025376111823 * IIIIIIXIXIII
- 9.18025376111823 * IIIIIIYIYIII
- 1036.7963999999984 * IIIIIIIZIIII
- 74.16262749999993 * IIIIIIXXIIII
- 74.16262749999993 * IIIIIIYYIIII
- 1730.9391493749995 * IIIIIIZIIIII
- 102.72856234375004 * IIIIIZIIIIII
- 13.324103454983607 * IIIXIXIIIIII
- 13.324103454983607 * IIIYIYIIIIII
- 315.1932645312502 * IIIIZIIIIIII
- 541.6731217187498 * IIIZIIIIIIII
- 102.72856234375004 * IIZIIIIIIIII
- 13.324103454983597 * XIXIIIIIIIII
- 13.324103454983597 * YIYIIIIIIIII
- 315.1932645312502 * IZIIIIIIIIII
- 541.6731217187498 * ZIIIIIIIIIII
+ 1.2356356250000005 * IIIIIIIIZIIZ
+ 22.050435542190833 * IIIIIIIXXIIZ
+ 22.050435542190833 * IIIIIIIYYIIZ
- 1.7474526590263566 * IIIIIIXIXIIZ
- 1.7474526590263566 * IIIIIIYIYIIZ
+ 3.706906875000002 * IIIIIIIZIIIZ
+ 31.184025000000005 * IIIIIIXXIIIZ
+ 31.184025000000005 * IIIIIIYYIIIZ
+ 6.178178125000002 * IIIIIIZIIIIZ
- 1.7474526590263566 * IIIIIIIIZXIX
- 1.7474526590263566 * IIIIIIIIZYIY
- 31.184025000000013 * IIIIIIIXXXIX
- 31.184025000000013 * IIIIIIIYYXIX
- 31.184025000000013 * IIIIIIIXXYIY
- 31.184025000000013 * IIIIIIIYYYIY
+ 2.471271250000001 * IIIIIIXIXXIX
+ 2.471271250000001 * IIIIIIYIYXIX
+ 2.471271250000001 * IIIIIIXIXYIY
+ 2.471271250000001 * IIIIIIYIYYIY
- 5.24235797707907 * IIIIIIIZIXIX
- 5.24235797707907 * IIIIIIIZIYIY
- 44.100871084381666 * IIIIIIXXIXIX
- 44.100871084381666 * IIIIIIYYIXIX
- 44.100871084381666 * IIIIIIXXIYIY
- 44.100871084381666 * IIIIIIYYIYIY
- 8.737263295131783 * IIIIIIZIIXIX
- 8.737263295131783 * IIIIIIZIIYIY
+ 3.706906875000002 * IIIIIIIIZIZI
+ 66.1513066265725 * IIIIIIIXXIZI
+ 66.1513066265725 * IIIIIIIYYIZI
- 5.24235797707907 * IIIIIIXIXIZI
- 5.24235797707907 * IIIIIIYIYIZI
+ 11.120720625000006 * IIIIIIIZIIZI
+ 93.55207500000002 * IIIIIIXXIIZI
+ 93.55207500000002 * IIIIIIYYIIZI
+ 18.534534375000007 * IIIIIIZIIIZI
+ 6.178178125000003 * IIIIIIIIZZII
+ 110.25217771095417 * IIIIIIIXXZII
+ 110.25217771095417 * IIIIIIIYYZII
- 8.737263295131783 * IIIIIIXIXZII
- 8.737263295131783 * IIIIIIYIYZII
+ 18.53453437500001 * IIIIIIIZIZII
+ 155.920125 * IIIIIIXXIZII
+ 155.920125 * IIIIIIYYIZII
+ 30.89089062500001 * IIIIIIZIIZII
- 2.551472812500001 * IIIIIZIIIIIZ
+ 3.608327455463727 * IIIIIZIIIXIX
+ 3.608327455463727 * IIIIIZIIIYIY
- 7.654418437500004 * IIIIIZIIIIZI
- 12.757364062500006 * IIIIIZIIIZII
- 1.0485748437500004 * IIIIIZIIZIII
- 10.668818275707867 * IIIIIZIXXIII
- 10.668818275707867 * IIIIIZIYYIII
+ 1.4829087651944997 * IIIIIZXIXIII
+ 1.4829087651944997 * IIIIIZYIYIII
- 3.1457245312500017 * IIIIIZIZIIII
- 15.087987500000002 * IIIIIZXXIIII
- 15.087987500000002 * IIIIIZYYIIII
- 5.242874218750002 * IIIIIZZIIIII
+ 3.608327455463727 * IIIXIXIIIIIZ
+ 3.608327455463727 * IIIYIYIIIIIZ
- 5.102945625000002 * IIIXIXIIIXIX
- 5.102945625000002 * IIIXIXIIIYIY
- 5.102945625000002 * IIIYIYIIIXIX
- 5.102945625000002 * IIIYIYIIIYIY
+ 10.82498236639118 * IIIXIXIIIIZI
+ 10.82498236639118 * IIIYIYIIIIZI
+ 18.04163727731863 * IIIXIXIIIZII
+ 18.04163727731863 * IIIYIYIIIZII
+ 1.4829087651944997 * IIIXIXIIZIII
+ 1.4829087651944997 * IIIYIYIIZIII
+ 15.087987500000006 * IIIXIXIXXIII
+ 15.087987500000006 * IIIXIXIYYIII
+ 15.087987500000006 * IIIYIYIXXIII
+ 15.087987500000006 * IIIYIYIYYIII
- 2.097149687500001 * IIIXIXXIXIII
- 2.097149687500001 * IIIXIXYIYIII
- 2.097149687500001 * IIIYIYXIXIII
- 2.097149687500001 * IIIYIYYIYIII
+ 4.4487262955835 * IIIXIXIZIIII
+ 4.4487262955835 * IIIYIYIZIIII
+ 21.337636551415734 * IIIXIXXXIIII
+ 21.337636551415734 * IIIXIXYYIIII
+ 21.337636551415734 * IIIYIYXXIIII
+ 21.337636551415734 * IIIYIYYYIIII
+ 7.4145438259724985 * IIIXIXZIIIII
+ 7.4145438259724985 * IIIYIYZIIIII
- 7.654418437500005 * IIIIZIIIIIIZ
+ 10.824982366391183 * IIIIZIIIIXIX
+ 10.824982366391183 * IIIIZIIIIYIY
- 22.963255312500017 * IIIIZIIIIIZI
- 38.27209218750002 * IIIIZIIIIZII
- 3.1457245312500017 * IIIIZIIIZIII
- 32.006454827123605 * IIIIZIIXXIII
- 32.006454827123605 * IIIIZIIYYIII
+ 4.4487262955835 * IIIIZIXIXIII
+ 4.4487262955835 * IIIIZIYIYIII
- 9.437173593750005 * IIIIZIIZIIII
- 45.26396250000001 * IIIIZIXXIIII
- 45.26396250000001 * IIIIZIYYIIII
- 15.728622656250007 * IIIIZIZIIIII
- 12.757364062500006 * IIIZIIIIIIIZ
+ 18.04163727731863 * IIIZIIIIIXIX
+ 18.04163727731863 * IIIZIIIIIYIY
- 38.27209218750002 * IIIZIIIIIIZI
- 63.786820312500026 * IIIZIIIIIZII
- 5.242874218750002 * IIIZIIIIZIII
- 53.34409137853934 * IIIZIIIXXIII
- 53.34409137853934 * IIIZIIIYYIII
+ 7.414543825972498 * IIIZIIXIXIII
+ 7.414543825972498 * IIIZIIYIYIII
- 15.728622656250007 * IIIZIIIZIIII
- 75.43993750000001 * IIIZIIXXIIII
- 75.43993750000001 * IIIZIIYYIIII
- 26.21437109375001 * IIIZIIZIIIII
- 2.551472812500001 * IIZIIIIIIIIZ
+ 3.608327455463727 * IIZIIIIIIXIX
+ 3.608327455463727 * IIZIIIIIIYIY
- 7.654418437500004 * IIZIIIIIIIZI
- 12.757364062500006 * IIZIIIIIIZII
- 1.0485748437500004 * IIZIIIIIZIII
- 10.668818275707867 * IIZIIIIXXIII
- 10.668818275707867 * IIZIIIIYYIII
+ 1.4829087651944997 * IIZIIIXIXIII
+ 1.4829087651944997 * IIZIIIYIYIII
- 3.1457245312500017 * IIZIIIIZIIII
- 15.087987500000002 * IIZIIIXXIIII
- 15.087987500000002 * IIZIIIYYIIII
- 5.242874218750002 * IIZIIIZIIIII
+ 1.7745875000000009 * IIZIIZIIIIII
- 2.509645710117766 * IIZXIXIIIIII
- 2.509645710117766 * IIZYIYIIIIII
+ 5.323762500000003 * IIZIZIIIIIII
+ 8.872937500000004 * IIZZIIIIIIII
- 2.8170754092577175 * IXXXXIIIIIII
- 2.8170754092577175 * IXXYYIIIIIII
- 2.8170754092577175 * IYYXXIIIIIII
- 2.8170754092577175 * IYYYYIIIIIII
+ 3.608327455463727 * XIXIIIIIIIIZ
+ 3.608327455463727 * YIYIIIIIIIIZ
- 5.102945625000002 * XIXIIIIIIXIX
- 5.102945625000002 * XIXIIIIIIYIY
- 5.102945625000002 * YIYIIIIIIXIX
- 5.102945625000002 * YIYIIIIIIYIY
+ 10.82498236639118 * XIXIIIIIIIZI
+ 10.82498236639118 * YIYIIIIIIIZI
+ 18.04163727731863 * XIXIIIIIIZII
+ 18.04163727731863 * YIYIIIIIIZII
+ 1.4829087651944997 * XIXIIIIIZIII
+ 1.4829087651944997 * YIYIIIIIZIII
+ 15.087987500000006 * XIXIIIIXXIII
+ 15.087987500000006 * XIXIIIIYYIII
+ 15.087987500000006 * YIYIIIIXXIII
+ 15.087987500000006 * YIYIIIIYYIII
- 2.097149687500001 * XIXIIIXIXIII
- 2.097149687500001 * XIXIIIYIYIII
- 2.097149687500001 * YIYIIIXIXIII
- 2.097149687500001 * YIYIIIYIYIII
+ 4.4487262955835 * XIXIIIIZIIII
+ 4.4487262955835 * YIYIIIIZIIII
+ 21.337636551415734 * XIXIIIXXIIII
+ 21.337636551415734 * XIXIIIYYIIII
+ 21.337636551415734 * YIYIIIXXIIII
+ 21.337636551415734 * YIYIIIYYIIII
+ 7.4145438259724985 * XIXIIIZIIIII
+ 7.4145438259724985 * YIYIIIZIIIII
- 2.509645710117766 * XIXIIZIIIIII
- 2.509645710117766 * YIYIIZIIIIII
+ 3.5491750000000017 * XIXXIXIIIIII
+ 3.5491750000000017 * XIXYIYIIIIII
+ 3.5491750000000017 * YIYXIXIIIIII
+ 3.5491750000000017 * YIYYIYIIIIII
- 7.528937130353299 * XIXIZIIIIIII
- 7.528937130353299 * YIYIZIIIIIII
- 12.54822855058883 * XIXZIIIIIIII
- 12.54822855058883 * YIYZIIIIIIII
- 7.654418437500005 * IZIIIIIIIIIZ
+ 10.824982366391183 * IZIIIIIIIXIX
+ 10.824982366391183 * IZIIIIIIIYIY
- 22.963255312500017 * IZIIIIIIIIZI
- 38.27209218750002 * IZIIIIIIIZII
- 3.1457245312500017 * IZIIIIIIZIII
- 32.006454827123605 * IZIIIIIXXIII
- 32.006454827123605 * IZIIIIIYYIII
+ 4.4487262955835 * IZIIIIXIXIII
+ 4.4487262955835 * IZIIIIYIYIII
- 9.437173593750005 * IZIIIIIZIIII
- 45.26396250000001 * IZIIIIXXIIII
- 45.26396250000001 * IZIIIIYYIIII
- 15.728622656250007 * IZIIIIZIIIII
+ 5.323762500000003 * IZIIIZIIIIII
- 7.528937130353299 * IZIXIXIIIIII
- 7.528937130353299 * IZIYIYIIIIII
+ 15.97128750000001 * IZIIZIIIIIII
+ 26.618812500000015 * IZIZIIIIIIII
+ 2.8170754092577175 * XXIIXXIIIIII
+ 2.8170754092577175 * XXIIYYIIIIII
+ 2.8170754092577175 * YYIIXXIIIIII
+ 2.8170754092577175 * YYIIYYIIIIII
- 12.757364062500006 * ZIIIIIIIIIIZ
+ 18.04163727731863 * ZIIIIIIIIXIX
+ 18.04163727731863 * ZIIIIIIIIYIY
- 38.27209218750002 * ZIIIIIIIIIZI
- 63.786820312500026 * ZIIIIIIIIZII
- 5.242874218750002 * ZIIIIIIIZIII
- 53.34409137853934 * ZIIIIIIXXIII
- 53.34409137853934 * ZIIIIIIYYIII
+ 7.414543825972498 * ZIIIIIXIXIII
+ 7.414543825972498 * ZIIIIIYIYIII
- 15.728622656250007 * ZIIIIIIZIIII
- 75.43993750000001 * ZIIIIIXXIIII
- 75.43993750000001 * ZIIIIIYYIIII
- 26.21437109375001 * ZIIIIIZIIIII
+ 8.872937500000003 * ZIIIIZIIIIII
- 12.548228550588828 * ZIIXIXIIIIII
- 12.548228550588828 * ZIIYIYIIIIII
+ 26.61881250000001 * ZIIIZIIIIIII
+ 44.36468750000001 * ZIIZIIIIIIII

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.

In [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
In [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()),
)
In [9]:
result = solver.solve(vibrational_problem)
print(result)
=== GROUND STATE ===
 
* Vibrational ground state energy (cm^-1): 2432.106954036546
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
In [10]:
import tutorial_magics

%qiskit_version_table
%qiskit_copyright

Version Information

Qiskit SoftwareVersion
qiskit-terra0.24.0.dev0+2b3686f
qiskit-aer0.11.2
qiskit-ibmq-provider0.19.2
qiskit-nature0.6.0
System information
Python version3.9.16
Python compilerGCC 12.2.1 20221121 (Red Hat 12.2.1-4)
Python buildmain, Dec 7 2022 00:00:00
OSLinux
CPUs8
Memory (Gb)62.50002670288086
Thu Apr 06 08:54:06 2023 CEST

This code is a part of Qiskit

© Copyright IBM 2017, 2023.

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.

Join the Discussion

Comments (0)

No comments yet. Be the first to share your thoughts!

Indexed by QCR Librarian

This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.

Versions

v1 Latest
Jun 17, 2026
qcr:2606.06253.1

Cite all versions? Use the base QCR ID to always reference the latest version of this entry.

Tools used

Qiskit

Keywords

vibrational-structure
quantum-chemistry
qiskit
spectroscopy
bosonic

You may also like5