# Introduction

## Variational Quantum Eigensolver (VQE)

The Variational Quantum Eigensolver, or VQE, is a method that uses both quantum and classical computers to find the lowest energy state, or ground state, of a molecule. Here's how it works:

**Quantum Part**: A quantum computer creates a possible solution, called a trial wavefunction.**Classical Part**: A classical computer then tweaks this wavefunction bit by bit to get as close as possible to the molecule's true lowest energy state.

This technique is grounded in a basic physics rule—the variational principle—which tells us that any trial wavefunction will give an energy that is at least the ground state energy. VQE is really useful in quantum chemistry for figuring out molecular structures and in solving certain types of math problems that involve finding minimum values.

### What is an Eigensolver?

To understand eigensolvers, we need a bit of background in linear algebra, the math dealing with vectors and matrices:

**Eigenvalues**: These are special numbers that scale vectors in linear transformations.**Eigenvectors**: These are vectors that point in the same direction after a linear transformation as before it.

An eigensolver is a tool that finds these special numbers and their corresponding vectors for any given matrix. This is crucial for understanding systems in physics and other sciences.

In quantum mechanics, we use eigensolvers to work out the fundamental properties of particles and systems, like finding the different energy levels of an atom or molecule through something called the Time-Dependent Schrödinger Equation (TDSE). This equation describes how the state of a quantum system changes over time and includes terms that account for the system's motion and interactions at the microscopic level.

To simplify the complexity of quantum systems and make calculations feasible, physicists use approximations like:

**Born-Oppenheimer Approximation**: Assumes that the movement of atomic nuclei and electrons in a molecule can be treated separately.**Hartree-Fock Approximation**: Treats electrons as independent from each other.**Density Functional Theory (DFT)**: Simplifies calculations related to electron interactions within a molecule.

### What is a Hamiltonian?

In quantum physics, the Hamiltonian is an important concept—it represents the total energy of a system. It's an operator (a kind of function) that tells us how a quantum system changes over time and what its energy is. The Hamiltonian's properties ensure that the energy calculations it provides are reliable (real numbers) and that the energy states it describes are independent of each other (orthogonal).

The Hamiltonian is a sum of operators that represent different parts of a system, like kinetic energy, potential energy, and interactions between particles. In quantum chemistry, the Hamiltonian is used to describe the energy of electrons in a molecule.

### What is an Ansatz?

In quantum computing, an ansatz is a guess or proposal for a quantum state that might solve a problem. For VQE, the ansatz is a trial wavefunction that we think will give us the ground state energy of a molecule. The ansatz is a crucial part of the VQE algorithm because it determines how well we can approximate the ground state energy.

The Hamiltonian is encoded in a quantum circuit, a series of quantum gates that manipulate qubits to create a specific state. The ansatz is designed to be flexible so that we can adjust it to get closer to the true ground state energy. The wavefunction is then measured to get the energy of the system, which is used to update the ansatz in the next iteration.