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
1 answer
40 views

How does the Active Space Transform work theoretically?

I have a question about the ActiveSpaceTransformer which is used in vqe calculations for a molecule of LiH in Qiskit. In the documentation the inactive Fock operator is defined.I don't understand why ...
1 vote
1 answer
23 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 (...
0 votes
1 answer
43 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 ...
2 votes
1 answer
56 views

Best tutorial about the variational quantum eigensolver (VQE)

I want to find a tutorial on VQE with a good valance between the theoretical background of the method, and it's working implementation on QPU. Covering advanced topics such as quantum error ...
1 vote
0 answers
24 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. ...
  • 11
1 vote
1 answer
43 views

Qiskit: evaluating expectation value of S^2 operator

I am trying to obtain the expectation value of the S^2 operator with respect to VQE wave function in an older version of qiskit (0.26). To that end, I tried: ...
0 votes
1 answer
74 views

Why is HF Initial point seems to be better than MP2 initial point in qiskit?

I am trying to design a custom VQE algorithm using qiskit. The main customization of the algorithm is in the minimization of expectation value of the Hamiltonian. To accomplish this, I have used the ...
  • 15
0 votes
0 answers
27 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 ...
  • 1
1 vote
0 answers
52 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 ...
  • 31
0 votes
0 answers
15 views

SPSA optimizer picking up previous iterations evaluations

I would like to write a modified SPSA which takes up an optimization history of a previous VQE simulation. Is it something that can be done? The purpose of this is to cut down the amount of time and ...
  • 1
1 vote
1 answer
60 views

Clarification on the usage of class UCC of qiskit_nature

I am trying to develop a customized VQE algorithm in which I am making use of the class UCC of qiskit_nature. I am having trouble understanding the outputs of the methods of the class. I have ...
  • 15
1 vote
0 answers
33 views

How to send another job to a device before finishing the last job?

Is there any way to create a for loop that would send a few jobs to run on a quantum computer simultaneously? I tried: ...
0 votes
1 answer
57 views

References for two-local forms in QISKIT

I am using 'Two local' form of QISKIT as a waveform ansatz in VQE to compute ground state. QISKIT documentation does not provide references to all the entangling options. Is there any other place ...
  • 35
0 votes
1 answer
188 views

Help on PySCF library

I am a student and I am trying to use qiskit nature in order to calculate the ground state energy of a molecule. My probelm is that when I try to run the simulation an error message comes out: ...
1 vote
2 answers
124 views

Why does Parity mapping allow 2 qubit reduction?

when mapping from fermionic to qubit hamiltonian, using Parity mapper allow us to reduce 2 qubit in the final hamiltonian. I would like to understand which kind of symmetries are being used and how it ...
  • 113
2 votes
1 answer
93 views

For the same operator, when I use qiskit's VQE and QAOA solutions, the results are completely different

Specifically, I can't get the correct result using QAOA,A total of 6 qubits were used in this work,this is part of my code using VQE and QAOA localsim = BasicAer.get_backend('qasm_simulator') ...
  • 21
2 votes
1 answer
103 views

Barren Plateau as a consequence of 2-design?

Initializing a parameterized quantum circuit with a unitary sampled from a uniform distribution (so sampling from the Haar distribution) or in a weaker form: a unitary which is a unitary 2-design, ...
  • 135
2 votes
2 answers
59 views

Expected Minimum Clique Coverage?

I'm curious if there is literature on this and, if there is, where to find it. Here I'm using ``clique" to mean a set of observables which all commute with each other. I also include the identity ...
3 votes
1 answer
130 views

Performance metrics in QSVM

I have implemented QSVM on breast cancer dataset using link: "https://qiskit.org/documentation/stable/0.24/tutorials/machine_learning/01_qsvm_classification.html" but unable to compute other ...
  • 187
0 votes
1 answer
133 views

Expectation value of Pauli string for VQE

One approach to get the expectation value $\langle\psi|P\psi\rangle$ of a pauli string $P\in \{I, X, Y, X\}^{\otimes n}$ is the following. Let $(a_i, |\lambda_i\rangle)$ be eigenvalue-eigenvector ...
3 votes
0 answers
36 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 ...
  • 51
1 vote
1 answer
94 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 ...
1 vote
2 answers
189 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 ...
0 votes
0 answers
104 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: ...
  • 11
3 votes
1 answer
66 views

Convexity of cost function in quantum machine learning

I have a small confusion on 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 is ...
  • 173
5 votes
1 answer
101 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 ...
  • 159
2 votes
2 answers
44 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&...
0 votes
0 answers
45 views

Find minimum eigenvalue of an Ising Hamiltonian combined with Error Mitigation

I am currently working on a variation of the Traveling Salesman Problem. For which I use the QUBO(Quadratic Unconstrained Binary Optimization). Within Qiskit there are potent functions to obtain the ...
0 votes
1 answer
77 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 ...
1 vote
0 answers
64 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: ...
  • 65
2 votes
1 answer
53 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 ...
2 votes
0 answers
62 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 ...
  • 21
6 votes
1 answer
227 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 ...
1 vote
0 answers
25 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://...
1 vote
2 answers
182 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 ...
  • 65
0 votes
1 answer
82 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 ...
  • 107
1 vote
0 answers
22 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 ...
3 votes
1 answer
202 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 ...
0 votes
0 answers
16 views

Measurement of a Hamiltonian with Junk States

TL;DR: If I encode a Hermitian matrix in a non-Hermitian matrix, does that matter for VQE? Is the entire $H$ required to be Hermitian or just the parts corresponding to physical states? Say I have a ...
0 votes
1 answer
336 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/...
0 votes
0 answers
102 views

Hardware efficient ansatz versus Alternating Layered Ansatz

I'm reading a paper Cost function dependent barren plateaus in shallow parametrized quantum circuits. There they introduce what is called Alternating Layered Ansatz (ALA). It is said that: The ...
  • 249
1 vote
1 answer
114 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 ...
  • 249
3 votes
0 answers
66 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} ...
3 votes
1 answer
142 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 ...
  • 187
3 votes
1 answer
117 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 ...
3 votes
1 answer
266 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 ...
3 votes
1 answer
75 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 $\...
1 vote
0 answers
131 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 ...
1 vote
0 answers
62 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 ...
  • 515
6 votes
1 answer
271 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 ...
  • 61