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
4 votes
0 answers
84 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
1 vote
1 answer
411 views

What is the original paper introducing the Variational Quantum Eigensolver?

My question is very simple. I am looking for original paper where Variational Quantum Eigensolver (VQE) has been introduced. After some Googling I was able to find many applications of VQE and its ...
Martin Vesely's user avatar
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 ...
Samuel Grund's user avatar
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: ...
Lima's user avatar
  • 11
3 votes
1 answer
154 views

Convexity of cost function in quantum machine learning

I have a small confusion regarding convexity of the most typical cost function considered in many QML papers: $\text{Tr}(\rho O)$, where $O$ is a Hermitian operator and $\rho$ is a quantum state. This ...
Jon Megan's user avatar
  • 525
5 votes
1 answer
395 views

Qiskit: QAOAnsatz circuit with custom Hamiltonian

I am trying to implement the Quantum Approximate Optimization Ansatz by creating a parametrized subcircuit $$V (α) = e^{−iH_M α_1} e^{−iH_D b_1} ... e^{−iH_M α_n} e^{−iH_D b_n}$$ with the custom ...
consthatza's user avatar
2 votes
2 answers
123 views

Why does VQE with pennylane and scikit-optimize gp_minimize give 'func must be scalar' error?

I am trying to replace the SPSA optimizer in the VQE tutorial of pennylane by the bayesian optimizer of scikit-opimize. When running the code below I get the error "func should return a scalar&...
qcabepsilon's user avatar
0 votes
1 answer
365 views

How can I get the counts, as well as the solution bitstring from Qiskit VQE?

I just set up a Qiskit VQE algorithm and calculated the eigenstates. However, I'm searching now, how to show up the final, most likely solution-bit-string. And/or to print the counts. I actually ...
tobias97d's user avatar
1 vote
0 answers
161 views

VQE Execution error: The ansatz must be parameterized, but has 0 free parameters

I am experiencing some problems with qiskit implementation of VQE. First of all, in initialize an ansatz in one of the following ways: ...
Vindem's user avatar
  • 85
3 votes
1 answer
194 views

Understanding QAOA from Basics/scratch

Recently after working on QAOA with finance and graph coloring problems. I have started exploring the QAOA from scratch. I would like to understand the QAOA derivation mathematically and have started ...
anonymousKet's user avatar
2 votes
0 answers
189 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
8 votes
1 answer
589 views

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

Recently I've been working on a VQE-related project, for which I'm using Qiskit's TwoLocal variational form (qiskit version 0.34.2). I noticed that I was able to simulate this circuit up to ...
Matthias's user avatar
  • 183
1 vote
0 answers
44 views

Mathematical Context of MPT formula in qiskit VQE

In the video at timestamp: 43:34, We input the mean-variance parameters. https://www.youtube.com/watch?v=UtMVoGXlz04&t=3327s Based on the formula as mentioned here in section Formulation https://...
user13034532's user avatar
3 votes
2 answers
855 views

Qiskit best programming practices - how to speed up qiskit code?

I am currently doing some experiments using Variational Quantum Eigensolver in molecular dynamics using qiskit, and noticed that the time for execution on real backend is significantly higher than the ...
Vindem's user avatar
  • 85
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 ...
Corey's user avatar
  • 127
1 vote
0 answers
55 views

Question about performing VQE with an embedded Hamiltonian

Say I have a physical Hamiltonian $\mathcal{H}$ which is $D$-dimensional and I encode it into a larger matrix $M$ which is $\Delta$-dimensional. In the cases I care about $\Delta$ is strictly greater ...
Ken Robbins's user avatar
4 votes
1 answer
936 views

What exactly makes VQE faster than classical optimization?

I have been trying to understand Variational Quantum Eigensolver (VQE), particularly from the non-linear binary programming perspective. But after reading a few resources I'm still confused about ...
user113988's user avatar
0 votes
1 answer
1k views

How to implement the VQE in qiskit using UCCSD?

I am new to VQE and want to see the whole circuit of UCCSD in VQE implementation. I saw the code post here Visualize full UCC circuit in qiskit I tried to import all packages but have no idea with one/...
Fei Hua's user avatar
1 vote
1 answer
337 views

What are "unbounded loss functions" and "unbounded operators"?

I am reading this paper: Quantum Generative Training Using Rényi Divergences. In it, the authors mention the following multiple times: "...an unbounded loss function can circumvent the existing ...
karolyzz's user avatar
  • 289
4 votes
0 answers
119 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
3 votes
1 answer
455 views

Variational quantum eigensolver in qiskit

I have implemented a hybrid quantum NN on a dataset to perform classification. Now I want to apply quantum PCA to my dataset to find the eigenvalues. After going through a few qiskit tutorials, I ...
user14924's user avatar
  • 317
3 votes
1 answer
270 views

VQE from scratch, what have I got wrong?

I've been working on a code to run VQE with a grouped measurement. For some reason, my expectation values are slightly off from those computed by pennylane, the software I decided to use for this ...
Cuhrazatee's user avatar
3 votes
1 answer
2k views

Qiskit - Simpler way to create a Hamiltonian

I am looking for an efficient way to create a Hamiltonian in Qiskit. Following are my desired input and outputs input: 'ZZI' output: Z^Z^I, where Z and I are operators. Here is how I am doing it ...
boniface316's user avatar
3 votes
1 answer
108 views

Cliffords to Transform into Common Eigenbasis

Say I have the following Hamiltonian (given in terms of Pauli operators): \begin{equation} H=aX_1Z_2+bZ_1X_2. \end{equation} Both Pauli terms commute with each other. I want to make a measurement of $\...
Ken Robbins's user avatar
1 vote
0 answers
298 views

Ground state compute issue by qiskit

I use the following code to calculate the ground state for the LiH molecule in an active space. I come across two problems. The first is I found that the Hartree Fock state gave energy that is far ...
ironmanaudi's user avatar
1 vote
0 answers
79 views

Confusion about the objective function of VQEs and QAOAs

I am a bit puzzled on how the objective function of the VQEs and QAOAs. Of course, the parametrised state is constructed differently in these two algorithms but they do share a common objective to be ...
Marion's user avatar
  • 645
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 ...
Tom's user avatar
  • 71
6 votes
1 answer
2k views

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

It is said that the Ising Model using spin variables $s ∈ \{−1, 1\}$ $$H(s)=\sum_{i}h_is_i+\sum_{i<j}J_{ij}s_is_j,$$ and a Quadratic Unconstrained Binary Optimization (QUBO) problem with binary ...
26118in's user avatar
  • 508
3 votes
2 answers
987 views

How to express real matrices as linear combinations of unitaries?

I am working on using Variational Quantum Linear Solver (VQLS) for some tasks. Here, we need to represent matrix A as a linear combination of unitaries. $$ {\bf A} = \Sigma^n_{i=1} c_iA_i $$ My ...
Sajal's user avatar
  • 63
1 vote
0 answers
97 views

Why the partial derivative of cost function is written in this form?

I am reading a paper about QCNN and BP problem. And in the paper there is a part illustrating the relation between the trainability and variance of the cost. The cost function is written as, $C(\theta)...
QubitTy's user avatar
  • 133
12 votes
1 answer
460 views

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

I have seen the recent paper "Training Variational Quantum Algorithms Is NP-Hard (Phys. Rev. Lett. 127, 120502)" and the authors stated that training the classical optimization in ...
Chao-Hua Yu's user avatar
2 votes
1 answer
93 views

Does the formula $\sum_k f_k{\rm Tr}(O_k U\rho_k U^\dagger)$ have any physical meaning, in the context of variational quantum algorithms?

I am reading a review about the variational quantum algorithm. And there is a definition of the cost function: $C(\theta)=\sum_k f_k (Tr[O_k U(\theta)\rho_kU^\dagger(\theta)])$ Where $U(\theta)$ is a ...
QubitTy's user avatar
  • 133
2 votes
0 answers
70 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
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 ...
Rag's user avatar
  • 31
2 votes
1 answer
94 views

How to know state corresponding to -1 or 1 for multi qubits VQE?

I was hoping someone can explain to me how to get -1 and 1 for a 2-qubit VQE with $\langle XY\rangle$, since we have 4 states $|00\rangle,|01\rangle,|10\rangle,|11\rangle$? For the case of 1 qubit, it ...
cometta's user avatar
  • 205
3 votes
1 answer
468 views

Do VQE and QAOA use the same Hamiltonian?

In this paper, it talks about the 2-local Hamiltonian in the form: $H = \sum_{(u,v)\in E} H_{uv} + \sum_{k \in v} H_k $ It also says the Ising model, Heisenberg model, XY model and QAOA are in the ...
peachnuts's user avatar
  • 1,423
4 votes
3 answers
368 views

Generally, could VQE be used to prepare the highest energy state?

When I learned about the variational method in quantum mechanics and the variational quantum eigensolver (VQE), I was told that this method is used to prepare the ground state of a quantum system. I ...
ZR-'s user avatar
  • 2,408
2 votes
0 answers
77 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,161
2 votes
1 answer
274 views

From general Hamiltonian to Ising Hamiltonian

I would like to convert my qubit hamiltonian fom the HeH+ system that I have obtained using Qiskit to an Ising or QUBO model. I have seen multiples examples from QUBO to Qubit Hamiltonian but on the ...
bjail66's user avatar
  • 155
1 vote
1 answer
346 views

Active space chosen for VQE in qiskit

I encountered a problem when learning from the qiskit tutorial about solving electronic structure problem with VQE. Under the "Running VQE on a Statevector Simulator" part, the code provided ...
ironmanaudi's user avatar
3 votes
1 answer
166 views

Trouble when implement a self designed gradient in qiskit

everyone! I have trouble when implement a self-designed gradient to the VQE algorithm. The following code will pop the 'ListOp' object is not callable exception to the last line of the code when ...
ironmanaudi's user avatar
4 votes
0 answers
63 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
1 vote
1 answer
88 views

Why the last IBMQ job of my VQE have just one circuit?

I am running a VQE over the H2 molecule on ibmq_quito and I set a callback function to save all jobs id's of all iterations. When I check the penultimate job (and the previous ones), I have 2 circuits ...
bjail66's user avatar
  • 155
14 votes
1 answer
1k views

Why exactly are variational algorithms considered promising?

There is obviously a great deal of work happening at the moment on variational quantum algorithms. However, I'm struggling to understand why exactly are they considered promising? Looking through some ...
Nikita Nemkov's user avatar
4 votes
1 answer
325 views

Variational Quantum Linear Solver (Hadamard test): circuit question

Trying to understand the circuit/algorithm for VQLS and I found this diagram to show the high-level idea of doing the Hadamard test in this tutorial. But I am not quite sure why we need the two ...
John Parker's user avatar
  • 1,161
5 votes
1 answer
275 views

Is VQE or one of its variations enough to help with medicine development?

One of the reasons quantum computing is often hyped in media is because of how it'll help with vaccine and medicine development. For example, this article in Financial Express and this other in ...
epelaez's user avatar
  • 2,965
2 votes
0 answers
221 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
3 votes
1 answer
296 views

How to find the expectation value of several circuits using Qiskit aqua operator logic?

I am using the method from this SE answer to calculate the expectation value using qiskit aqua operator logic which works well for a single circuit. Here is a simplified code snippet to demonstrate ...
thespaceman's user avatar
1 vote
0 answers
211 views

Are inconsistent results between different VQE runs justified?

I made this post a while ago, where I learned I could use qiskit's VQE to calculate (or approximate) the Transverse Field Ising Hamiltonian and other similar Hamiltonians. After working with my code ...
EventicTortoise's user avatar
4 votes
2 answers
344 views

How do I identify a VQE job run in real hardware?

I am running a VQEUCCFactory for H2 on a real hardware device. ...
bjail66's user avatar
  • 155