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
0
votes
0answers
25 views

Source code for Hamiltonian measurement in qiskit [duplicate]

In variational quantum eigensolver, it is common to transform the Hamiltonian to a qubit form by Jordan-Wigner transformation, for example. After that, the algorithm needs to measure the qubit ...
1
vote
2answers
50 views

How to measure a qubit Hamiltonian in qiskit

I am using qiskit to get some measurement results of observables similar to the Hamiltonian. Can someone provide the way how qiskit measures the Hamiltonian (Jordan-Wigner transformed) when using VQE? ...
0
votes
1answer
42 views

Compute measurement values of observables by Qiskit

Is there a way to get certain measurement results by variational quantum eigensolver in qiskit? More specifically, I want to get measurement results for certain operators, like $\langle a^\dagger_ia_j\...
1
vote
1answer
21 views

How does this expression from the VQLS paper result in a CZ-gate?

I am reading the VQLS paper and equation C2 on page 10 they have: $ \delta_{ll'}^j = \beta_{ll'} + \langle0|V^\dagger A_{l'}^\dagger U(Z_j \otimes I_\bar{j}) U^\dagger A_lV|0\rangle $ Here they define ...
1
vote
1answer
36 views

Unable to use iSWAP in Qiskit TwoLocal entangling_block

I would like to use a general entangler in the entanglement_block of the TwoLocal function. The function seems to work with 'cz', 'cx', 'swap' gates, but it fails for 'iswap' gate. Below is the error ...
1
vote
1answer
31 views

What is the largest reported number of qubits used in a VQE simulation?

Numerous studies have investigated the simulation of an X-qubit circuit, demonstrating the 'classical simulation supremacy' on supercomputers. X is less than 50. However, useful VQE circuits are often ...
0
votes
1answer
34 views

Getting the current variational parameters in Qiskit

I am right now using variational quantum eigensolver (VQE) to calculate the ground state of some molecules, like H2, by qiskit. The quesiton is that how to get the current parameters of the varaional ...
2
votes
1answer
43 views

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

Suppose there is any arbitrary ansatz producing variational energy for any arbitrary Hamiltonian. What is the physical unit corresponding to the energy? Since numerical algorithms only output a ...
0
votes
1answer
71 views

What is the main advantage of using the Variational Quantum Eigensolver over a classical algorithm?

What is the main advantage of using the Variational Quantum Eigensolver (quantum computing) over a classical algorithm? I know a key fact is the speed-up, but how is this speed-up quantised.
3
votes
1answer
157 views

Complexity of estimating mean value?

The average value of an operator $O$ in the state $\left.|\psi\right>$ is $$\overline{O}=\left<\psi|O|\psi\right>$$ Now for simplicity let $\left.|\psi\right>=\left.|0\right>^n$ and ...
2
votes
1answer
52 views

VQE - How to get from expectation value to eigenvalue?

In VQE, for a single-qubit Hamiltonian, I can use a standard ansatz to make a state $\psi$ and use two products to compute the expectation value $\langle\psi|{\cal H}|\psi\rangle$. As I vary the ...
2
votes
0answers
49 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 ...
2
votes
0answers
39 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 ...
1
vote
1answer
64 views

Need some help with simulating molecules with VQE

I have studied the example of the simulation of LiH molecule in Learning Quantum Computation using Qiskit. It is available on this link: https://qiskit.org/textbook/ch-applications/vqe-molecules.html#...
1
vote
1answer
57 views

Why does the Qiskit tutorial for the Variational Quantum Linear Solver not work properly?

I am following this very nice qiskit tutorial on how to implement a simple variational quantum linear solver (VQLS). There are 3 examples implemented in the tutorial all of which are solving the $Ax=b$...
1
vote
0answers
35 views

Encoding a discrete functional in variational $n$-qubit states

So I have a discreet functional $f(x_{1},x_{2},...,x_{k})$ that I want to encode in a variational state: $|\psi(\lambda)>$. The number of variables in my functional takes values $k=9,18,30$. I want ...
1
vote
1answer
33 views

In VQE, what ansatz would be best used for a maximally entangled $n$-qubit $H$?

What ansatz would be best used for a maximally entangled n qubit H? I came across this question in the Qiskit textbook and I really don't know how I would answer it.
3
votes
1answer
63 views

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

Consider a single qubit state $|\varphi\rangle$ and a hamiltonian $H = Z$. Evaluating $\langle \varphi | H | \varphi \rangle$ corresponds to a measurement of $|\varphi\rangle$ in the computational ...
4
votes
1answer
59 views

Ansatz explanation for VQE

I have found quite a bit of information on the UCC ansatz, but I cannot really find basic explanations for the Ry and RyRz ansatzs... Are they just applying these gates to a circuit? If anyone has ...
2
votes
0answers
46 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 ...
2
votes
3answers
77 views

error when running VQE in Qiskit

I am running the code, which gets the ground state energy with different atomic distances of LiH. However, I encountered this error. The code is as follow ...
3
votes
1answer
86 views

Simulation of a helium molecule using Qskit

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

implement variational quantum eigensolver with openfermion

Can someone provide me with an example about how to implement VQE with OpenFermion, for example, use the UCCSD ansatz to get the ground state energy of LiH. I have checked some code, but none of them ...
2
votes
1answer
58 views

Qiskit: getting QAOA expectation

Suppose I run the Qiskit's QAOA algorithm. qaoa = QAOA(operator=qubit_operator, p=p, optimizer=optimizer) result = qaoa.run(quantum_instance) There is a built-in ...
2
votes
1answer
50 views

How to improve accuracy of ground energy values from a VQE

Using the Qiskit textbook I have been using a VQE to find the ground state energy of Hydrogen at different interatomic distances on a quantum machine. However, the average energy value I will always ...
3
votes
0answers
117 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 ...
3
votes
0answers
40 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 ...
1
vote
1answer
43 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 ...
1
vote
1answer
47 views

Increase maximum shots on IBM Hardware when running Quantum Variational Algorithms

I am interested to know whether there is a quick and elegant way of increasing the number of shots (more than 8192 shots) on IBM hardware when running variational algorithms like VQE or QAOA. I know ...
2
votes
2answers
66 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 ...
2
votes
1answer
49 views

Is it possible to measure “aux_operators” in built-in VQE with backend “qasm_simulator”

I am trying to measure the number operator, together with the ground state energy with the built-in VQE on Qiskit. However, if I pick the backend to be ...
4
votes
1answer
101 views

Expected value in a VQE qiskit

I'm learning VQE(variational quantum eigensolver) of qiskit, but I have a question about how it measures the expected value of the energy ($\left \langle H \right \rangle$). I saw in other question ...
2
votes
1answer
68 views

Decomposition of 2-qubit Hamiltonian into standard gate set for QAOA

I try to decompose ansatz into gate set in order to create a circuit in qiskit for QAOA algorithm. I don't understand how represent parametrized 2 qubit ansatz as circuit. $ H{_B} = \sum_{j=1}^{n} {\...
3
votes
1answer
134 views

Using Qiskit VQE for solving an eigenvalue problem

I am a new user of Qiskit and I believe there is a simple answer to my question but I have had a very hard time finding a straightforward answer. I am trying to transform a given $3 \times 3$ (...
1
vote
2answers
106 views

Creating a parameterized Operator in Qiskit

I'm trying to run a VQE for a specific custom Anzats. The Anzats is built up of an unitary matrix $U_H$, which I'm trying to created in this way: ...
1
vote
1answer
66 views

Recording the time taken by a VQE to find ground state energy

I want to record the time that a VQE solver takes to find the ground state. At the moment I am using: ...
1
vote
1answer
70 views

What are the main differences between the “unitary coupled cluster” and the “hardware efficient” ansatzes in VQE?

There are two popular initial states, in general, for VQEs: the unitary coupled cluster ansatz and the hardware efficient ansatz (for details, see here: https://quantaggle.com/algorithms/ansatz/). ...
2
votes
1answer
97 views

TypeError: 'NumPyMinimumEigensolver' object is not subscriptable

I'm trying to implement the same Jupyter notebook Jin-Sung Kim gave in his YouTube video The Variational Quantum Eigensolver — Programming on Quantum Computers — Coding with Qiskit S2E4; however, I'm ...
2
votes
1answer
71 views

Measuring Pauli strings using generators

I am trying to find the ground state of a Hamiltonian using VQE. I have decomposed the Hamiltonian into a set of Pauli strings. To decrease the number of actual measurements that has to be done, can I ...
2
votes
0answers
38 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 ...
-1
votes
1answer
47 views

Depth for UCC ansatz

I tried to understand the notion of depth vs Trotter step in a uccsd circuit for the vqe algorithm in qiskit (I use an older version, 0.15). When I tried understanding it for a small system like H2, ...
0
votes
2answers
57 views

How does VQE performs the measurement on a given Hamiltonian?

I'm trying to understand, given a specific Hamiltonian, for example $H = Z\otimes Z+X\otimes Z$, does the VQE algorithm calculates the expectation value of $Z\otimes Z$ first or does it calculates the ...
2
votes
1answer
82 views

Intuition behind the construction of an ansatz circuit

I'm learning about the VQE algorithm. When I looked at the declaration in Qiskit I saw you need to pass an ansatz which prepares the state. I looked at some commonly used ansatz functions, e.g. ...
1
vote
2answers
55 views

How to use VQE function in Qiskit

As part of a project I'm working on, I want to use VQE algorithm to calculate the minimal eigenvalue for given Hamiltonian. I use Qiskit on IBM UI online. The Hamiltonian is given as a sum of tensor ...
1
vote
1answer
43 views

Why is the VQE insensitive to noise?

I was going through the Grove documentation on the Variational Quantum Eigensolver. In one of the demonstrations with noisy gates, it is seen that resulting eigenvalue is quite close to the expected ...
4
votes
1answer
236 views

QUBO, Ising Hamiltonians and VQA

I understand that usually the combinatorial optimisation problems are turned into QUBO, which has a very simple mapping to Ising Hamiltonians. Ising Hamiltonians in turn have the desired properties of ...
1
vote
1answer
67 views

An effective way to submit all the jobs for VQE/QAOA at a time to an IBMQ machine?

In Qiskit, I am solving a VRP for 5 nodes and it creates 20 variables for a QUBO. It runs in a 65 qubit machines (any machine below that many fails). Now, in such a typical solvers for optimization (...
2
votes
1answer
104 views

Why VQE gives an incorrect ground state energy for a chain of 4 hydrogen atoms?

I am a bit hesitant to ask this very specific question, as I feel other people need not benefit from it. But since I have struggled for a while, and I think I should get some help. So I am using VQE ...
2
votes
0answers
85 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 ...
1
vote
1answer
91 views

Why do the qasm_simulator runtimes vary significantly for different IBMQ CouplingMap/NoiseModels?

I have been running VQE experiments locally using the qasm_simulator with actual IBMQBackend NoiseModels as shown in the Qiskit Textbook. I have noticed that the ...