# What is Ansatz?

In quantum computing, more specifically when we talk about optimization (VQE, QAOA, and similar), the term “ansatz” is widely used.

The ansatz is the first guess. A starting point.

Of course, if the starting point is good, so will the result.

Let’s make an analogy unrelated to quantum computing.

What is the equation for the curve below?

Well, the curve appears to be a third degree equation. The ansatz would be a first equation, let’s say ax³ + bx² + cx + d, and then we’re going to change the parameters [a, b, c, d] to converge to the curve shown. Note that this is not the only possible guess, we could start with a fifth degree equation or other.

The simplest example of qaoa is the Max-Cut problem. See the IBM tutorial at https://qiskit.org/textbook/ch-applications/qaoa.html.

And the ansatz, the initial circuit to solve the problem, is as follows:

It is a circuit that depends on Beta and Gamma parameters, which will be modified via classical optimization until the circuit converges to the answer of the modeled problem.

Ansatz is a word that’s a little scary at first, but once you get the idea, it’s easy to use.