Questions tagged [vqe]

For questions about the Variational Quantum Eigensolver, a quantum/classical hybrid algorithm that can be used to find eigenvalues of a (often large) matrix H. When this algorithm is used in quantum simulations, H is typically the Hamiltonian of some system. In this hybrid algorithm, a quantum subroutine is run inside of a classical optimization loop.

71 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
0 answers
193 views

Run VQE for parametrized quantum circuit with ancilla qubits

Let's say we have the following circuit (picture and code shown below), and now the $q_0$ is an ancilla qubit. If the system of interest has only two qubits, Is there a way to use only $q_{1,2}$ as my ...
fagd's user avatar
  • 965
4 votes
0 answers
118 views

Variational Quantum Eigensolver (VQE) by scipy minimize in cirq does not work

I tried to make a cirq program calculating an eigenvalue of the observable by VQE. Inspired by the qulacs VQE tutorial, I defined a cost function from the expectation value of the observable with ...
Weongyu Lee's user avatar
4 votes
0 answers
66 views

Ansatz for VQE demonstrating Quantum Advantage

What would be a possible ansatz quantum state in VQE (variational quantum eigensolver [1]) that would demonstrate the quantum advantage of VQE over classic computers? More specifically, I see that VQE ...
user20374's user avatar
4 votes
0 answers
67 views

Difference between Qiskit and Openfermion two body integrals

I am struggling with understanding the differences between OpenFermion and Qiskit libraries when it comes to Molecular Data, two body integrals. For example, I am working with the following ...
Eugen's user avatar
  • 41
4 votes
0 answers
78 views

How is this Variational Quantum Singular Value Decomposition paper efficient in any way?

Link to paper here. This algorithm seems neat but the unitary decomposition of the matrix M generally takes an exponential number of Pauli basis elements in the number of qubits $N$, therefore an ...
JoJo's user avatar
  • 99
4 votes
0 answers
118 views

How to optimise QAOA

I have a similarly naive question about the classical part of the optimisation in the Quantum Approximate Optimization Algorithm. Specifically, the cost function is given prescribed as \begin{align} ...
user39726's user avatar
4 votes
0 answers
58 views

If a hybrid classical+quantum algorithm can achieve quantum advantage, does this mean that the quantum part alone can?

Take for example a variational algorithm which has a classical optimization part and a quantum sampling part. In principle, the quantum part can be simulated by another classical computer given ...
Nikita Nemkov's user avatar
4 votes
0 answers
122 views

Reducing an ansatz to a shallower circuit

Given a very general hardware efficient ansatz as in Figure: and say that you already know all the rotation parameter for the gates in the red box, is there any way to build a gate sequence that ...
Enrico's user avatar
  • 473
4 votes
0 answers
73 views

How to calculate $\operatorname{Var}[H]$ in the context of VQEs?

Given a Hermitian operator $H$, I can calculate the variance of the Hamiltonian $Var[H]$ as $$ Var[H] = \langle H^2 \rangle -\langle H \rangle^2 $$ Now, $H$ can be decomposed as $$ H = \sum_i \alpha_i ...
KAJ226's user avatar
  • 13.8k
4 votes
0 answers
138 views

Is there a general proof of convergence of variational quantum eigensolvers (VQEs) to the minimum eigenvalue?

For QAOA it is known that in the large $p$ limit, the algorithm finds the minimum/maximum (see article A Quantum Approximate Optimization Algorithm). Is there in general a proof for VQE starting ...
creet's user avatar
  • 105
4 votes
0 answers
226 views

Implemented QAOA returns wrong result

I try to apply QAOA algorithm to find minimal energy state of the Hamiltonian: $H_A = \frac{1}{2}\sigma_z^1 + \frac{1}{2}\sigma_z^1\sigma_z^2$ It is expected that with p=2 my variational should ...
Masamune's user avatar
4 votes
0 answers
233 views

How to convert a qubit hamiltonian to QUBO and vice versa?

This is my hamiltonian. Solving this by hand, Numpy Python package and VQE algorithm gives the minimum energy eigenvalue -2. If we want to find the minimum energy of this hamiltonian with Quantum ...
The Quantum Enthusiast's user avatar
4 votes
0 answers
99 views

Active areas of research for NISQ algorithms

What areas of research in NISQ algorithms have heavy focus? I'm interested in quantum chemistry algorithms because of previous work (e.g. VQEs), and I'd love to learn more about other near-term ...
C. Kang's user avatar
  • 1,716
4 votes
0 answers
330 views

Problem with measurement error mitigation using VQE

I am attempting to mitigate measurement error while running on one of IBM's real devices and am doing so by passing CompleteMeasFitter into ...
user8961's user avatar
3 votes
0 answers
45 views

How to update angles

I am struggling to understand the concept of updating angles in a parameterized algorithm. Assume I have an objective function $x^2+1$ that I want to optimize using QAOA which can handle continuous ...
34341's user avatar
  • 31
3 votes
0 answers
103 views

Minimum working example for Qiskit's AdaptVQE

I am trying to implement a simple AdaptVQE in Qiskit. Following the documentation provided by Qiskit, this should be very simple: ...
NaturalLog's user avatar
3 votes
1 answer
348 views

VQE jobs do not appear in queue

I am trying to calculate the ground state energy of some simple molecules using 'MolecularGroundStateEnergy' tools in qiskit. When I run the calculations for very small molecules (e.g. H2, HeH+) the ...
Joshua's user avatar
  • 57
3 votes
0 answers
64 views

Graph coloring to reduce the number of qubits in VQE

I am reading through the following article: https://arxiv.org/abs/1312.2579 and I really struggle to understand anything of the section "D. The standard graph-coloring method" on page 7 and "E. The ...
QCQCQC's user avatar
  • 449
2 votes
1 answer
35 views

Complexity of Variational Quantum Eigensolvers

I am doing research surrounding VQE and am a bit confused about the complexity and its comparison to classical systems. My brief research has yielded me that classical eigenvalue solving is $O(n^3)$. ...
Jonah Sachs's user avatar
2 votes
0 answers
16 views

Running VQE code using qiskit_nature on IBM computers

$\texttt{qiskit_nature}$ no longer has the $\texttt{runtime}$ feature and $\texttt{VQEClient}$ function that was used to run a VQE code on one of the IBM computers. I could not find any easy migration ...
chiral_fermion's user avatar
2 votes
0 answers
22 views

VQE on Qiskit: getting counts per Hamiltonian term

Consider a VQE calculation (using the QASM backend and on Qiskit) that involves a qubit Hamiltonian with, say, 5 terms. Is there a way for us to get the counts for each of the Hamiltonian terms that ...
srinivasa prasannaa's user avatar
2 votes
0 answers
20 views

Understanding the Role of Qiskit's VQE Code in Light of Pre-calculated Zero-Point Vibrational Energy in Gaussian Files

In the context of quantum computational chemistry, the Qiskit VQE (Variational Quantum Eigensolver) code is often used to calculate the vibrational energies of molecules, including the zero-point ...
Akash Yadav's user avatar
2 votes
0 answers
41 views

Qiskit noisy FakeManila simulator + ZNE

I am trying to run a simple VQE calculation on H2 using FakeManila noise model and ZNE for error mitigation; see code below. The problem is that I can never reach not even close the ground electronic ...
Carlos Murilo Romero Rocha's user avatar
2 votes
0 answers
61 views

Efficient gate executing the time evolution of a Hamiltonian using Runge-Kutta method

You can find a minimal working example below. In particular, I want to replace the scipy.linalg.expm() matrix exponential by a Runge Kutta time evolution method as ...
ANDREAS kruckenhauser's user avatar
2 votes
0 answers
105 views

How do you add spin up and spin down fermions to a FermiHubbardModel class in Qiskit?

I've been programming a FermiHubbardModel class with the Qiskit library for a VQE, but the class only shows input options for the U (onsite) and t (hopping) parameters when I construct a LineLattice. ...
DhilQC's user avatar
  • 21
2 votes
0 answers
169 views

What are the important parameters when it comes to VQE algorithms in qiskit?

So I wrote an algorithm for a quadratic problem (qubo) and try to solve it. My question is why I don't get the correct results when running my algorithm on a quantum computer like IBM_manila. In the ...
Hirschi's user avatar
  • 21
2 votes
0 answers
67 views

What is the input for the interpret of Quantum Variational Regressors?

I'm trying to implement my first variational regressor using qiskit. I would like to understand how the interpret of a CircuitQNN works. I need to define an interpret that works on the amplitudes of a ...
Roberto Schiattarella's user avatar
2 votes
0 answers
95 views

Save output, wavefunction file and orbital information in Qiskit

I am going through LiH ground state energy calculation. I would like to know how to save the output file in Qiskit as one would do in classical computing using software like Gaussian or Psi4. Can ...
Rag's user avatar
  • 31
2 votes
0 answers
73 views

What's the importance of a relationship with Gibbs state in the context of VarQITE or variational algorithms?

Trying to figure out VarQITE or variational algorithm, I ran into the Gibbs state. What's the importance of a relationship with Gibbs state in this context. Why can we just use the arbitrary state ...
John Parker's user avatar
  • 1,091
2 votes
0 answers
207 views

How can a density matrix be prepared on a quantum register?

I am currently trying to implement the VQSE algorithm. There the biggest eigenvalues and their corresponding eigenvectors of a density matrix $\rho$ are computed. In contrast to VQE, the matrix $\rho$ ...
Kalle's user avatar
  • 21
2 votes
0 answers
35 views

Measurement on a specific basis and proof of circuit output

I am trying to understand a proof from Practical optimization for hybrid quantum-classical algorithms. In particular, I need clarifications on how do you perform the measurement on a different basis ...
Enrico's user avatar
  • 473
2 votes
0 answers
342 views

Calculating energy function with 1&2-RDM (reduced density matrix) in Qiskit

I am now working on designing quantum error mitigation with variational quantum eigensolvers (VQE). I need to get the 1&2-RDM from Qiskit, which has already been realized by Openchemist pakages ...
ironmanaudi's user avatar
2 votes
0 answers
97 views

How to implement the Mixer of Quantum Alternating Operator Ansatz for Max-Independent-Set

I am trying to implement the Mixer of the Max-Independent Set from The Quantum Alternating Operator Ansatz. From this paper: https://arxiv.org/pdf/1709.03489.pdf in Chapter 4.2 page 15 to 17. For ...
Hannah's user avatar
  • 529
2 votes
0 answers
136 views

Wrong Expectation value when implementing a VQE for the Heisenberg Hamiltonian

I tried to implement an extended Heisenberg-Hamiltonian as an extra exercise further than my homework. My Hamiltonian is the following: $H = \sum_{NN} \sigma_x\sigma_x + \sigma_z\sigma_z$ I try to ...
Schrödinger314's user avatar
2 votes
2 answers
582 views

VQE Cirq example

Is my understanding correct that in this example the Hamiltonian measurement is not performed through measuring individual Pauli operators because all its terms are mutually commuting? So, for each ...
mavzolej's user avatar
  • 1,921
1 vote
0 answers
24 views

How to combine a VQE circuit with normal qiskit quantum circuit without parameters and give the measured set of qubits to the estimator?

I want to use a parameterized quantum-circuit which is $\text{CNOT}$ with another quantum-circuit that has no parameters, then after a series of gates on the second quantum-circuit, I want to measure ...
Syed Shahmir Kazmi's user avatar
1 vote
1 answer
67 views

How can I Combine Qiskit's VQE Tutorial and TSP Simulator to solve the TSP on a real backend efficiently?

I have a university project where I am trying to solve the Traveling Salesman Problem by using a real quantum backend, rather than just the VQE simulator, as in this tutorial. I found this code on ...
Aidan's user avatar
  • 61
1 vote
0 answers
61 views

Usage of qiskit API MatrixOp.to_pauli_op()

I am quite confused with the MatrixOp.to_pauli_op() API. I have a hamiltonian, and it is given as input to a API MatrixOp. ...
Manu's user avatar
  • 483
1 vote
0 answers
25 views

Why is quantum annealing not used in optimization for variational quantum algorithms?

I have been learning about variational quantum algorithms and encountered that none of the articles talk about using quantum annealers for optimization of the parameters ? I have however encountered ...
Chetan Waghela's user avatar
1 vote
1 answer
78 views

Need help regarding building a custom VQE

I want to write code for a custom Variational Quantum Eigensolver (VQE) capable of computing eigenvalue(s) for non-Hermitian systems, based on this paper. I have formulated a cost function (provided ...
Bravyi's user avatar
  • 11
1 vote
0 answers
26 views

Is there a way to find the computational resources required to perform a simulation of n- qubits in Cirq similar to qsim?

I’m trying to model basic spin chains in 1D using VQE (ideal circuit) with cirq and qsim. The models have between 10-20 sites and varying interactions (nearest neighbour, next to nearest neighbour etc)...
lake_apricot's user avatar
1 vote
0 answers
37 views

Efficient classical simulation technique to execute this specific quantum circuit

I have a quantum circuit similar to the ones used in VQE methods. One difference is that the angles of the $R_y$ rotations are limited in the range $[0, 0.2]$ (and chosen randomly). In my case, I have ...
stopper's user avatar
  • 443
1 vote
0 answers
98 views

VQE for Vibrational ground state energy

I was reading this article. In this article, they calculated the vibrational energy of CO2 and NH3 molecules using VQE, and I checked qiskit documentation for finding Vibrational energy using qiskit. ...
Akash Yadav's user avatar
1 vote
0 answers
71 views

Ground state returned by VQE is not an eigenstate?

With my VQE algorithm, I want to obtain both the ground state energy and its corresponding ground eigenstate. However, the state I reach using VQE is usually very different from the true ground ...
user22395's user avatar
1 vote
0 answers
79 views

I am optimising a variational quantum circuit to learn a distribution $p(x)$, but it doesn't converge over a training set $\mathcal{X}$?

I am training a variational quantum circuit to learn distributions: given data $s(\vec{\lambda})$, what is the probability distribution for the parameterisation $\vec{\lambda}$, i.e. the posterior ...
JoJo's user avatar
  • 99
1 vote
0 answers
284 views

qiskit.algorithms.optimizers callback function for all optimizers

I am aware that VQE and VQC factory supports callback functions which can allow us to store intermediate values during optimization through callbacks in its arguments. However my loss function is ...
Manas Sajjan's user avatar
1 vote
0 answers
205 views

getting error while simulating LiH using VQE

I wrote code again using updated qiskit nature libraries but I am facing error , I need help to finding solution so that we can run this code on latest version of qiskit. I am attaching code below........
Piyush Saklani's user avatar
1 vote
1 answer
127 views

Calculating state fidelity and space complexity of Minimum Eigen Optimizers (VQE, QAOA and Grover Optimizer) in qiskit

I'm a beginner in using Qiskit and my Computer Science background is not extensive. But I understand the Quantum Physics aspects of it relatively well. I solved a QUBO problem in Qiskit using VQE (...
Janani Ananthanarayanan's user avatar
1 vote
0 answers
71 views

Difference between using CircuitSampler vs Execute methods on obtaining expectation value

For a hybrid, VQE-type optimization in qiskit, in order to compute the expectation value of a Hamiltonian, we can use CircuitSampler on some Pauli sum operators, as well as Execute method on a list of ...
WQian's user avatar
  • 11
1 vote
0 answers
160 views

Interpreting VQE and QAOA based solutions in portfolio optimization

I am going through portfolio optimization using Qiskit. It really looks interesting. The module has both VQE and QAOA algorithms for optimizing the portfolios. In the VQE based solution the ...
Rag's user avatar
  • 31