Skip to main content
Share Your Experience: Take the 2024 Developer Survey
21 votes
Accepted

Is VQE a class of algorithms or a specific algorithm?

I view QAOA as an algorithm for solving (approximately) a special class of problems, namely combinatorial problems and VQE as a possible subroutine to QAOA (but not necessarily as in the case of ...
Marsl's user avatar
  • 929
12 votes
Accepted

Intuition behind the construction of an ansatz circuit

Interesting question! An ansatz circuit is a parameterized circuit, say $V(\theta)$ where $\theta$ are a set of parameters, used to prepare a trial state for your problem: $$ |\Psi(\theta)\rangle = V(\...
Cryoris's user avatar
  • 2,943
10 votes
Accepted

How to calculate an Expected Value of some operator acting on qubits?

Qiskit currently supports measurements in the computational basis from Qiskit Terra and Aer, that is, returning 1 if the qubit is in state $|1\rangle$, and ...
Josh Izaac's user avatar
10 votes

What is the complexity of estimating the expectation value of an observable?

If you want to extract the exact value then would need infinite number of samples. However, assume no hardware noise, based in the Chebyshev's inequality you would need to do $O(1/\epsilon^2)$ to get ...
KAJ226's user avatar
  • 13.9k
10 votes
Accepted

What does the paper "Training Variational Quantum Algorithms Is NP-Hard (Phys. Rev. Lett. 127, 120502)" mean?

The paper doesn't address very much the "fully classical" approach to their problems, so I don't think they are making a judgment one way or another about quantum advantage with VQA. But ...
jecado's user avatar
  • 1,186
9 votes

Why exactly are variational algorithms considered promising?

"As far as I understand there aren't many rigorous results on performance of these algorithms, similar to many classic machine learning approaches." You are correct in that, unlike Grover's ...
user1271772 No more free time's user avatar
8 votes
Accepted

Circuit for VQE Expectation Value Finding

Let's denote $P$ as a Pauli tensor product term (Pauli term: e.g. $Z \otimes Z$, $X \otimes X$ or $Y \otimes X \otimes X$), then note that $P$ is a Hermitian matrix whose expectation value is real, ...
Davit Khachatryan's user avatar
8 votes

List of problems that can be reduced to finding the ground state of a Hamiltonian

Welcome to Quantum Computing StackExchange. In general, finding the ground state energy of a k-local Hamiltonian is QMA-hard for k ≥ 2. That means, any problem in the complexity class QMA can be ...
Egretta.Thula's user avatar
7 votes
Accepted

What's the point of VQE if classical computers can solve for eigenvalues easily?

The computational advantage of using quantum computers can be reached if the classical resources (memory; number of operations), required to solve a particular problem, grow exponentially in a certain ...
mavzolej's user avatar
  • 1,971
7 votes
Accepted

VQE - How to get from expectation value to eigenvalue?

First, note that we can only measure in the computational basis in quantum computing (at least at the moment). But this is not a problem since \begin{align} \langle \psi | H | \psi \rangle = \langle \...
KAJ226's user avatar
  • 13.9k
7 votes
Accepted

How to express real matrices as linear combinations of unitaries?

You can select a basis of unitary matrices with respect to which you can decompose your matrix. For example, if your matrix $A$ is $2^n\times 2^n$, then you can select the Pauli basis $$ \sigma_y,\...
DaftWullie's user avatar
  • 58.8k
7 votes
Accepted

How to show mathematically the equivalency between Ising Model and QUBO?

The relation between "Ising" and binary variables is following $$ x_i = \frac{1 + s_i}{2}, $$ where $s_i$ is a spin and $x_i$ is a binary variable. Clearly setting $s_i = -1$ leads to $x_i = ...
Martin Vesely's user avatar
6 votes
Accepted

Is there a mistake in the VQE Ansatz in Cirq's tutorial?

You're right in the sense that the cost unitary, which is composed of all the $Z$ and $CZ$ gates does not affect the underlying probabilities of measuring a specific state by itself, however when we ...
Jack Ceroni's user avatar
6 votes

How to add several parameters in qiskit circuit?

You can create an arbitrary number of parameters in your circuit by using the qiskit.circuit.Parameter class. Here's a brief example ...
Cryoris's user avatar
  • 2,943
6 votes
Accepted

Do VQE and QAOA use the same Hamiltonian?

2-local forms As I have seen the term, 2-local Hamiltonians are those Hamiltonians $\hat H$ which can be written as a sum of independent qubit operators $\hat H = \sum_i \sum_j \hat O_{ij}$, where ...
jecado's user avatar
  • 1,186
6 votes
Accepted

Best tutorial about the variational quantum eigensolver (VQE)

The best review of VQE that I have came across is the following: The Variational Quantum Eigensolver: a review of methods and best practices Chapter 8 covers a good amount of material on error ...
KAJ226's user avatar
  • 13.9k
6 votes

Why is it hard to prove complexity bounds for variational algorithms?

Looking for a solution by following a heuristic criteria means that you are proceeding by intuition, which has no proof of being correct nor efficient. You propose a heuristic, you show the results, ...
Daniele Cuomo's user avatar
5 votes
Accepted

Qiskit statevector_simulator returns different results

VQE has an initial_point parameter, which is the starting point it uses for the optimization. In the absence on one being provided (or suggested via the variational form) it will pick a random one. ...
Steve Wood's user avatar
  • 1,488
5 votes

Creating a custom VariationalForm in Qiskit

You can plug any parameterized QuantumCircuit into the VQE. Parameterized means it contains Parameter objects e.g. as rotation ...
Cryoris's user avatar
  • 2,943
5 votes

VQE restart from a previous computation

You can use a callback function to save the parameters for each iterations of your vqe algorithm and even store the mean, std. Below an example: ...
NABAT's user avatar
  • 121
5 votes
Accepted

Ansatz explanation for VQE

In term of the $RY$ Ansatze, from my understanding, this is because many systems of interest, the Hamiltonian contains only real terms. And if we have real Hamiltonian, then the decomposition of the ...
KAJ226's user avatar
  • 13.9k
5 votes
Accepted

What is the physical unit of the energy calculated using VQE on Qiskit?

Short answer: The units of your result will be the same as the units of your input problem to VQE (units of your Hamiltonian coefficients). Long answer: In a VQE calculation, some problem Hamiltonian ...
Durd3nT's user avatar
  • 561
5 votes
Accepted

Does the gradient commute with the partial trace?

In brief: it is because differentiation and (partial) traces are linear operations, so we can pull them through each other. Physically, one might interpret this as the fact that it doesn't matter ...
Banach space fan's user avatar
4 votes

How to explain that I get a value lower than the smallest possible through minimization procedure in VQE?

The proof of the variational theorem (the theorem that the ground state energy is the lowest possible energy you can get from $\frac{\langle \psi|H|\psi\rangle}{ \langle \psi | \psi \rangle}$) is ...
Randy Hyatt's user avatar
4 votes
Accepted

How to prepare Unitary Coupled Cluster ansatz for VQE in a circuit?

You can create the unitary gate for operator $U(\theta)=e^{-i\frac{\theta}{2}Z_{0}Z{1}}$ using two $CNOT$ operations and single rotation gate $R_z$: For operators which contain different tensor ...
C-Roux's user avatar
  • 888
4 votes
Accepted

Measuring Pauli strings using generators

Here I am going to show why $\langle Z_1 Z_3 \rangle$ generally cannot be estimated from $\langle Z_1 Z_2 \rangle$ and $\langle Z_2 Z_3 \rangle$. Let's start with an arbitrary three-qubit state: \...
Davit Khachatryan's user avatar
4 votes

Creating a parameterized Operator in Qiskit

If I follow this correctly, the problem is that operator does not currently support parameters. This is a reported issue https://github.com/Qiskit/qiskit-terra/issues/4751
luciano's user avatar
  • 5,803
4 votes
Accepted

What does the identity operator represent when computing $\langle\varphi|I\otimes Z|\varphi\rangle$?

When you have $\langle \varphi | I \otimes Z | \varphi \rangle $ It means you are calculating the expectation of the operator $I \otimes Z$ with respect to some state $|\varphi \rangle$. Since $I$ is ...
KAJ226's user avatar
  • 13.9k
4 votes

Set the bounds for ansatz parameters in VQE

You can set the attribute parameters_bounds of a circuit to the desired intervals like below: ...
NABAT's user avatar
  • 121
4 votes
Accepted

Why am I able to simulate such high qubit numbers on my laptop?

The AerSimulator backend supports a variety of simulation methods, each of which supports a different set of instructions and has a different memory requirements. ...
Egretta.Thula's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible