Vibronic spectra

Hi.
May I ask, is it possible to use more complex molecules in Vibronic spectra demo, or was it just a demonstration on a simple example?

Cheers,
Risto

Hi @_risto,

Yes, it definitely is. Our online demos are chosen so that they don’t take too long to run (either on the servers that build them for the docs, or for users who download them). You could certainly try more complex molecules (taking into account your local compute capabilities).

Hi @nathan

Where / how can I calculate / obtain the parameters https://strawberryfields.readthedocs.io/en/stable/code/api/api/strawberryfields.apps.qchem.vibronic.gbs_params.html for an arbitrary molecule?

Hi @_risto.

In order to compute the gbs parameters for an arbitrary molecule you should follow these steps.

  1. Compute the equilibrium geometry (equilibrium atomic coordinates) for both of the initial and final electronic states in your vibronic transition. This should be done with a quantum chemistry package such as GAMESS or any other desired code.

  2. Compute the normal modes and vibrational frequencies for both of the initial and final electronic states. This should also be done with a quantum chemistry package such as GAMESS or any other desired code.

  3. Use the information obtained from steps 1 and 2, and the atomic masses to compute the Duschinsky matrix and the displacement vector for your molecule with the qchem.duschinsky function.

  4. Use the Duschinsky parameters and the normal mode frequencies to compute the gbs parameters with the qchem.vibronic.gbs_params function.

This demo helps you with the last two steps of the process. You can also have a look at this slack thread which discusses a similar question. Please also note that we have the function read_gamess in apps.qchem.utils that reads GAMESS output files and extracts the molecular normal modes and frequencies from it. Please let me know if you have any other questions or need help with getting the parameters. Good luck!

Hi @sjahangiri

Thank you. I want to obtain a vibronic spectrum of a large molecule. Can you please share step by step also how to obtain a vibronic spectrum from an arbitrary molecule using actual quantum device?
Which tutorial should I follow?

Hi @_risto.

In general, the steps are almost identical to those listed above. The only difference will be using a remote hardware device instead of a simulator. You can find a demonstration on executing a remote device with Strawberry Fields here.

However, please note that due to the limitations in the number of modes and the types of gates that the currently existing hardware devices can support, the computed vibronic spectra with hardware devices will be approximations of the actual spectra. For more details please see the examples provided in page 7 of this paper.

Please feel free to let me know if you have any further questions.

Hi @sjahangiri

Thank you for answer. Worth the shot to try. However I am having troubles finding the right commands / steps in GAMESS. Do you only need GAMESS, or also some additional software (like Avogadro)? I only found this https://medium.com/modern-physics/tutorial-on-density-functional-theory-using-gamess-5c3e988f5f01 tutorial, but I don0t think they are calculating the same thing. I have found an online tutorial how to calculate the parameters you mentioned in step 1. and 2., but that software is Spartan (Wavefunction: https://store.wavefun.com/Spartan_Software_s/12.htm) and it is not free, actually very expensive.

Hi @_risto. You can use any desired quantum chemistry code to generate the molecular parameters (optimised geometry, vibrational frequency and normal modes) or you might get them from the literature for a given molecule, if they exist. In this demo, we have the pre-computed parameters for pyrrole which has 24 modes. There is also an extensive list of available quantum chemistry software here that you might find useful.

1 Like

Hi @sjahangiri

Thank you for all the information.
So if I understand, the difference is just in how we obtain GBS parameters: calculate or use quantum hardware?
If we look at this tutorial: https://strawberryfields.ai/photonics/demos/tutorial_X8_demos.html#graph-similarity - where do we use those GBS parameters?
For this tutorial: https://strawberryfields.ai/photonics/apps/run_tutorial_vibronic.html#huh2015boson did you use your hardware or the vibronic structure program hotFCHT?
I am also confused: why did you use formic acid for first tutorial and then ethylene for the second? Why not use one molecule with all the demos & tutorials, that are connected between each other?

Hi @_risto.

Please let me provide a brief description of the problem and then I will answer the questions. In order to obtain the vibronic spectrum for a given molecule, we have three general steps to follow. First, we need some molecular parameters (optimised geometry, vibrational frequency and normal modes) that should to be obtained from electronic structure calculations/simulations. Second, we use these parameters to obtain GBS parameters that are used to program a quantum simulator/hardware. Third, we use the programmed simulator/hardware generated samples and post-process these samples to compute the vibronic spectrum.

Please note that the first part, which is about computing the molecular parameters, is beyond the scope of Strawberry Fields and therefore we do not talk much about it in our demos. We assume that the user has these parameters in hand, either computed or taken from the literature. When you have the molecular data, then you can go to the second step and use the following commands to obtain the GBS parameters as also explained in details here:

Ud, delta = qchem.duschinsky(Li, Lf, ri, rf, wf, m)
t, U1, r, U2, alpha = qchem.vibronic.gbs_params(wi, wf, Ud, delta)

Finally you can go to the third step, define a circuit and then generate samples. The important point here is that you can either use a simulator or a remote hardware for generating samples. You can have a look at this function here to get an idea about how to generate samples.

However, since the existing hardware have some limitations, you cannot use them for any random molecule. For instance, formic acid has pyrrole do not fit the limitations of the X8 device while the simplified ethylene example can be simulated (very approximately) with that device. Note that in the case of ethylene, the GBS parameters are also very simplified again since the X8 device cannot handle all the possible gate types; you basically just see the interferometer unitary (U_vibronic) and the S2gate in the circuit.

Please also note that we have used simulators (not the remote hardware) for all of the tutorial provided in the chemistry section here. We have used different molecules in these tutorials bacause each tutorial has been created to discuss one specific application of GBS that has been published in the literature and our tutorials try to reflect that.

I hope this clarifies the questions but let me provide short answers to each:

So if I understand, the difference is just in how we obtain GBS parameters: calculate or use quantum hardware?

No, we use gbs parameters to design a circuit that is then executed on a simulator or a hardware device to generate samples. These samples are then processed to compute properties such as vibronic spectra.

If we look at this tutorial: Quantum algorithms on the Xanadu quantum cloud β€” Strawberry Fields - where do we use those GBS parameters?

The gbs parameters in that example are U_vibronic and 1.0, used in S2gate(1.0).

For this tutorial: Vibronic spectra β€” Strawberry Fields did you use your hardware or the vibronic structure program hotFCHT?

We used a simulator. Please see eng=f.LocalEngine(backend="gaussian") here.

I am also confused: why did you use formic acid for first tutorial and then ethylene for the second? Why not use one molecule with all the demos & tutorials, that are connected between each other?

The choices of the molecules depend on the specific properties that we want to compute and the limitations of the hardware. Please see my explanation above.

Please feel free to let me know if you have any other questions. You might also have a look at the reference provided at the end of each tutorial page for more information.

2 Likes

Hi @sjahangiri

Thank you very much for such extended clarifications!

2 Likes