6
$\begingroup$

In exercise 5 of the this year's IBM Quantum Challenge, you need to use the FreezeCoreTransformer (along two_qubit_reduction and z2symmetry_reduction) to reduce the number of qubits to 4 and achieve a cost of 3. I managed to figure out that the optimal array to pass to the remove_orbitals parameter was [3,4]; however, I did this by experimenting with different arrays.

In the Qiskit slack, I saw that the one body integrals of the QMolecule are supposed to give you an insight on which orbitals to freeze. However, they didn't explain how to use it to figure this out.

The molecule and one body integrals I am working with is the following.

molecule = 'Li 0.0 0.0 0.0; H 0.0 0.0 1.5474'
driver = PySCFDriver(atom=molecule)
qmolecule = driver.run()
Matrix(np.round(qmolecule.one_body_integrals, 10))

$$ \displaystyle \left[\begin{array}{cccccccccccc}-4.7385372413 & 0.1075391382 & 0.1675852953 & 0.0 & 0.0 & -0.0302628413 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.1075391382 & -1.5131757719 & 0.0343466943 & 0.0 & 0.0 & -0.0680291694 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.1675852953 & 0.0343466943 & -1.1291622926 & 0.0 & 0.0 & 0.031432226 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.0 & 0.0 & -1.1407709359 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.0 & 0.0 & 0.0 & -1.1407709359 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\-0.0302628413 & -0.0680291694 & 0.031432226 & 0.0 & 0.0 & -0.9418187042 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & -4.7385372413 & 0.1075391382 & 0.1675852953 & 0.0 & 0.0 & -0.0302628413\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.1075391382 & -1.5131757719 & 0.0343466943 & 0.0 & 0.0 & -0.0680291694\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.1675852953 & 0.0343466943 & -1.1291622926 & 0.0 & 0.0 & 0.031432226\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & -1.1407709359 & 0.0 & 0.0\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & -1.1407709359 & 0.0\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & -0.0302628413 & -0.0680291694 & 0.031432226 & 0.0 & 0.0 & -0.9418187042\end{array}\right] $$

How am I supposed to interpret this matrix to know which orbitals to freeze?

$\endgroup$

1 Answer 1

1
$\begingroup$

Lab 8 explains exactly how to do this for LiH

For more information, check out Introduction to Quantum Computing and Quantum Hardware

Lecture 22 Quantum Chemistry I: Obtaining the Qubit Hamiltonian for H2 and LiH Part 1

Lecture 23 Quantum Chemistry I: Obtaining the Qubit Hamiltonian for H2 and LiH Part 2

$\endgroup$
4
  • $\begingroup$ Thanks for your response. Lookint at the lab lecture, I'm not sure I actually used the FreezeCoreTransformer correctly. Do you know if I'm doing it right? Or how should I use it taking into consideration the one body integral? $\endgroup$
    – epelaez
    Commented Jun 7, 2021 at 15:46
  • $\begingroup$ For context, I'm using the transformer as: problem = ElectronicStructureProblem(driver, [FreezeCoreTransformer(remove_orbitals=[3,4])]) . I guess I'm missing the part in which the guy in the lab uses freeze=[0,6] in the video. However, my understanding is that this is done when freeze_core=True (the default); is this right? $\endgroup$
    – epelaez
    Commented Jun 7, 2021 at 15:54
  • 1
    $\begingroup$ Keep in mind that the lecturer uses qiskit.chemistry and not qiskit_nature - similar methods, slightly different behavior. Also, read the documentation on FreezeCoreTransformer: 1) when freeze_core is enabled, the core orbitals listed in the QMolecule are made inactive and removed; 2) additionally, unoccupied molecular orbitals can be removed via a list of indices passed to remove_orbitals. $\endgroup$ Commented Jun 7, 2021 at 16:24
  • $\begingroup$ True, I hadn't considered that part. Anyways, I think I've figured out how it works. Thanks for your help! $\endgroup$
    – epelaez
    Commented Jun 7, 2021 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.