# The importance of the ansatz in VQE algorithm

Let's say I have a universal quantum computer that can perform anything.

In this case, any VQE algorithm can use any operation, so no ansatz is needed to implement it.

My question is, is the usage of the ansatz for the VQE algorithms because current quantum computers lack the ability to perfrom the universal quantum computations within a given coherence time?

• Could you clarify what you mean by the term "ansatz"? I would use it to mean either the trial state prepared in each iteration of a variational algorithm (including eg. the Variational Quantum Eigensolver), or, for VQE in particular, the quantum circuit used to prepare that trial state. The VQE algorithm cannot be VQE without both, so I'm not sure yet what you mean when you suggest no ansatz would be needed in a universal quantum computer. Aug 29, 2023 at 21:59
• The two things you are saying are equivalent. Because the trial state preparation is the key for the VQE algorithm and my question is whether it is necessary to prepare the quanrum circuit ansatz for solving VQE. The circuit ansatz is only limited to preparing a certain trial state but if we have a universal quantum computer, we can prepare any arbitrary state, which doesn't require any ansatz at all.
– Alex
Aug 29, 2023 at 23:45
• Even if your quantum circuit is capable of preparing any arbitrary state at all, I would still refer to that state as an ansatz. Indeed, I would call it a robust ansatz. But I understand what you are asking now, and I will prepare an answer shortly! (Sneak preview: we WILL still need an "ansatz" in your sense of the term.) Aug 29, 2023 at 23:52

Understanding the term "ansatz" here to be that functional form which limits the trial state to some subset of the full Hilbert space spanned by the problem -

For many (most?) problems of interest, the Variational Quantum Eigensolver (VQE) does rely on this reduction in space in order to be tractable, even if you have constant-depth implementations of any unitary operator on any number of qubits.

To have an unrestricted functional form (which I would personally refer to as a "robust ansatz"), you would need to have a number of free parameters equal to the number of degrees of freedom in your Hilbert space.

For example, for the common case where we may want to access any pure state over $$n$$ digital qubits, this is equal to $$2⋅2^n-2$$ parameters. (There are $$2^n$$ elements in the statevector representation, and each one has a real part and an imaginary part. But we can remove one degree of freedom for the normalization constraint, and we can remove one more by fixing the global phase.) This is, notably, exponential in the number of qubits.

Even if we are guaranteed that our quantum computer can prepare any computational state at all with great speed and fidelity, we're still going to need to feed in all these parameters to tell it which state to prepare, and the optimization routine is still going to need to tell us how to update all these parameters. So the runtime for VQE using a robust ansatz spanning the whole computational Hilbert space is exponential.

Of course, many (most?) VQE problems do not need to explore the whole computational Hilbert space. For example, the common case in second-quantized chemistry problems with fixed particle number $$η$$ considers the much smaller Hilbert space with $$2⋅{n\choose η}-2$$ degrees of freedom, which scales asymptotically like $$n^η$$, exponential in particle number.

You can reduce this further with spin-conservation, and in principle you can exploit point-group symmetries in your system to reduce it even further. That is my personal favorite line of research with VQE. But I don't think it changes the asymptotics any (someone please correct me if I'm wrong!), so ultimately one must content oneself that robust VQE and scalable VQE don't mix.

The next best thing to hope for is a scalable ansatz which guarantees $$ε$$-close fidelity with the target state. I think the traditional "hardware efficient ansatz" achieves something to that effect, but I'm not well versed in that line of research. I'd appreciate if people could comment with relevant references.

• I think what you are saying is just a terminology difference. Based on your term, if I have a robust ansatz, I don't actually need to use ansatz, right?
– Alex
Aug 30, 2023 at 0:41
• ...yyyes. If you have what I call a "robust ansatz", you presumably wouldn't need what you are calling an "ansatz". But the point I'm making is that VQE does not work well with what I call a "robust ansatz", so it really does need what you are calling an "ansatz". ^_^ Aug 30, 2023 at 0:52
• I think the reason why people try to make ansatz is because the current quantum computer has no ability to prepare any arbitrary states.
– Alex
Aug 30, 2023 at 0:55
• ...I don't think you are using the term "universal quantum computer" the way I would either. ^_^ But my own terminology aside, my answer is arguing that the "ansatz" is essential for VQE to be tractable, even for a "universal quantum computer". Aug 30, 2023 at 0:55
• The reason why you are saying that the ansatz is essential is for reducing the number of parameters. But as the system to be sumulated scales up, the number of parameters increases too, so in the end VQE doesn't look like efficient algorithm
– Alex
Aug 30, 2023 at 0:57

If you indeed had a universal fault-tolerant quantum computer then you would not be using VQE, but instead go directly to Quantum Phase Estimation to find your solution.

• This is what people usually say. I humbly think that the algorithms achieve different things, and that there are plenty of reasons why you might want to use VQE in a fault-tolerant era. One of them is even as simple as preparing the reference state for QPE! Aug 30, 2023 at 0:57
• I see the point. So, VQE is just only for the near-term implementation of quantum computers in the NISQ era, correct?
– Alex
Aug 30, 2023 at 0:59
• Yes, VQE is one of the NISQ-era hopes for quantum utility. @jecado points out that it may continue to be useful in the fault-tolerant era. Aug 30, 2023 at 1:19
• Ok I see, I have another question. Let's say we have a quantum computer that can prepare any arbitrary states using non-unitary operators. You think the non-unitary operation for the state preparation is still fine for VQE? In my opinion, since each iteration doesn't affect each other, I don't think it matters. What do you think about it?
– Alex
Aug 30, 2023 at 1:22
• When you say the quantum computer has non-unitary operators, I read that as having a noisy (ie NISQ-era) computer. Is this what you mean? Aug 30, 2023 at 1:27