Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
92 views

Reusing Parameters for Multiple Runs with Qiskit's SPSA Optimization

I am using Qiskit's SPSA optimization algorithm to find the ground state energy of various lattices (Fermi-Hubbard model) by running different circuits through it and having the algorithm modify the ...
1 vote
1 answer
310 views

Knapsack problem formulation

I would like to use a knapsack problem formulation based on Lucas paper. Namely, I try to implement the following math formula for Hamiltonian $H =H_A + H_B$, where $$H_{B} = -B\sum_{i=1}^{n}v_{i}x_{i}...
2 votes
1 answer
82 views

Implementing cphase gate on IonQ through Amazon Braket

I am implementing a VQE algorithm where I need controlled phase gate as part of ansatz circuit. I am using Amazon Braket service. Ionq processor however does not support c-phase gate or phase gate. ...
1 vote
1 answer
50 views

Getting a numeric result from the variational quantum eigensolver

I am confused about how the VQE is able to print out a decimal number for the ground state energy of a molecule. For example, for $\text{LiH}$, the ground state energy I get for an interatomic ...
0 votes
0 answers
381 views

Hamiltonian & QubitMappingType cannot be imported from qiskit.chemistry.core

I'm trying to implement the same Jupyter notebook in The Variational Quantum Eigensolver — Programming on Quantum Computers — Coding with Qiskit S2E4;however,I found a problem: Error: ...
1 vote
0 answers
46 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 ...
0 votes
1 answer
237 views

QVA with local Hadamard Overlap

I am trying to implement in Qiskit the quantum variational linear solver given here (https://arxiv.org/pdf/1909.05820.pdf) with a local Hadamard overlap test and failing substantially. The cost is not ...
1 vote
1 answer
100 views

Pennylane variational classifier demo - need for padding

In the variational classifier demo from Pennylane, the data loading is performed with ...
7 votes
1 answer
939 views

How can I run a VQE on one of IBMQ's Quantum Computers

I have implemented a VQE based on Qiskit's VQE function and want to run that on an actual quantum computer. My understanding was, that an IBMQ backend can be passed into the function as a Quantum ...
2 votes
0 answers
50 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 ...
5 votes
2 answers
193 views

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

I'm not very familiar with variational algorithms, but I've heard people say that they're "heuristic" and it's difficult to measure their performance via complexity analysis. Why is this the ...
3 votes
0 answers
49 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 ...
2 votes
0 answers
107 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 ...
1 vote
1 answer
113 views

Is Qiskit's Estimator Primitive running PauliStrings in Parallel?

I am trying to run the following code: ...
2 votes
0 answers
84 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 ...
5 votes
1 answer
738 views

Simulation of a helium molecule using Qiskit

I am trying to compute the ground state energy of He-He using VQE. For this purpose I have utilized Qiskit and have written the following script: ...
0 votes
1 answer
294 views

Remove Orbitals in FreezeCoreTransformer (qiskit)

In Qiskit's VQE tutorial, the FreezeCoreTransformer is used and some orbitals are removed. In the particular case of LiH, they remove [-2,-3] orbitals. Why are the orbitals indexed in this way? How ...
4 votes
0 answers
182 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 ...
2 votes
0 answers
85 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 ...
1 vote
0 answers
113 views

Help me to find error in finding Cost Function for SSVQE algorithm [closed]

Q: Build SSVQE's cost function using the following observable: $$O=2II−2XX+3YY−3ZZ\,.$$ This cost function should take in parameters as input. Use the included variational form, with reference states $...
3 votes
2 answers
342 views

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 ...
4 votes
0 answers
75 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 ...
4 votes
0 answers
125 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 ...
3 votes
0 answers
193 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: ...
7 votes
2 answers
257 views

Quantum annealing - studies showing empirical evidence for better performance in comparison with classical computers

Currently, it is not known wheter quantum anneling or algorithms like VQE and QAOA for general purpose quantum computers bring about any increase in computational power. However, there are some ...
5 votes
1 answer
127 views

Recent experimental demonstrations of variational quantum algorithms?

I am interested in the recent experimental demonstrations of variational quantum algorithms. Can someone please provide me with a list of references of recent experimental demonstrations of ...
4 votes
2 answers
163 views

Is there a way I can create an ansatz such that the number of 1 is same in all the superposition states? [duplicate]

So I am working with a variational quantum algorithm and I realised that it would be very beneficial if I could create an ansatz where all the states in the superposition have same numbers of 1s. For ...
0 votes
0 answers
84 views

Compute molecular vibrational energy of CO2 molecule using VQE

I have to compute the molecular vibrational energy of CO2 molecules using VQE, but I am not progressing; Code on the qiskit website does not work. Does anyone have any working code to find vibrational ...
1 vote
2 answers
464 views

Expectation value of Pauli strings for VQE

I am studying VQE and have boiled it down to a matter of determining the expectation value of Pauli strings: $$\langle H \rangle = \sum_i \alpha_i \langle\psi|\hat{P_i}|\psi\rangle.$$ I have been ...
1 vote
0 answers
34 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)...
0 votes
1 answer
214 views

qiskit-nature accessing circuit

There are some very nice examples on how to handle circuits using qiskit. However, once we get to the qiskit-nature documentation, it feels like a complete new world for the untrained eye. I am ...
1 vote
0 answers
41 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 ...
1 vote
0 answers
122 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. ...
0 votes
1 answer
49 views

Recovering phases in $2n$-bit binary representation of n-qubit Paulis

I am currently going through a paper discussing Pauli sampling strategies for VQE: https://arxiv.org/abs/1908.06942 I want to code and test their strategy. They explain how to create a circuit ...
1 vote
0 answers
92 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 ...
0 votes
3 answers
587 views

How to represent Beam-Splitter and Kerr gates as basic quantum logic gates?

I want to know how to convert these exponential forms to tensor products of well known logic gates (like the ones built into Qiskit). My goal is to program the Beam-splitter-Kerr ansatz circuit for ...
3 votes
1 answer
483 views

How does VQE work?

Here is the VQE overview from Peruzzo et al. 2013 I am trying to understand in detail how each step works, assuming at first one qubit and a Hamiltonian of the form: \begin{equation}\tag{1} H = \...
0 votes
1 answer
73 views

Creating a parameterized Operator in Qiskit that cannot be decomposed into Qiskit supported gates

I am trying to create a custom ansatz to use the built-in Qiskit VQE() function. My ansatz is composed of single qubit gates and a hamiltonian gate which cannot be decomposed into Qiskit supported ...
3 votes
2 answers
543 views

Callback function in VQE do not return the intermediate values of the parameters

I tried to save all the intermediate values of the parameters when running the built-in VQE in qiskit. The callback function can save the mean values and counts, however it seems only save the very ...
7 votes
1 answer
5k views

How to add several parameters in qiskit circuit?

I want to construct an ansatz circuit in Qiskit, so I need some parameters to act on the gates (e.g. RX(a), RY(b)). In the Qiskit tutorials I find a way to implement a parameter: ...
0 votes
1 answer
229 views

How the number of function evaluations is calculated in Qiskit when running VQE

I want to understand how the number of function evaluation is calculated by Qiskit when running VQE algorithms. Here is some code I used in order to test this: ...
3 votes
2 answers
305 views

How to derive quantum advantages for VQAs, if the underlying classical optimization is hard to solve?

This is probably a dumb question but here it goes: Variational Quantum Algorithms (VQAs) are the leading proposal to derive quantum advantage use NISQ devices. VQAs employ classical optimization ...
2 votes
1 answer
136 views

SPSA: maxiter (int) – The maximum number of iterations. Note that this is not the maximal number of function evaluations

This is from classical optimization algo. used for VQE. May I know what is the difference between maxiter and the number of function evaluation difference?
3 votes
1 answer
780 views

How grouping of Pauli strings is handled in Qiskit when running VQE?

When performing a VQE algorithm, the electronic problem Hamiltonian of the physical system under study needs to be mapped to a qubit Hamiltonian written as a sum of tensor products of Pauli operators (...
4 votes
1 answer
378 views

What is the expectation value for the ground state of $ H = \sum_i Z_i Z_{i+1} + \sum_i X_i $?

What is the expectation value for the ground state of $ H = \sum_i Z_i Z_{i+1} + \sum_i X_i $ ? In Eq. 15b this provides a solution in k space. The minimum would be reached for $E = -4$. But for ...
2 votes
2 answers
226 views

Simplest 2-site VQE Ansatz to generate all states?

For 1-site I was able to use an Rx gate followed by an Ry gate to generate every possible state. For two-sites, I initially tried to apply this to each qubit but realized this doesn't work because it ...
2 votes
1 answer
378 views

Applications of pauli operator grouping for simultaneous measurement in VQE

I have read some papers talking about Pauli operator grouping for simultaneous measurement in VQE. I was wondering can this "simultaneous measurement" approach be used in other variational ...
0 votes
1 answer
264 views

Error when importing qiskit_nature.algorithms.(GroundStateEigensolver, NumPyMinimumEigensolverFactory)

I'm trying to import the following elements: from qiskit_nature.algorithms import (GroundStateEigensolver, NumPyMinimumEigensolverFactory) But it shows the error: AttributeError: module 'sklearn....
0 votes
1 answer
90 views

BOBYQA optimizer IndexError

I'm trying to implement BOBYQA optimizer for my VQE job. Though, I'm facing the below issue. Can anyone help in pointing out what the actual cause of this issue is and how to solve this: ...
1 vote
1 answer
104 views

Only use the specific parameters (angles) in variational quantum eigensolver

I’m following the tutorial (https://qiskit.org/textbook/ch-applications/vqe-molecules.html) to construct the VQE circuit. In this tutorial, it used the classical optimizer like “COBYLA, SPSA, SLSQP” ...