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
0 answers
11 views

How can i get the superposition of 8 bits from 26 bits outputs in qiskit

the only idea i see is get state vector from density_matrix for example, i have the circult: ...
2 votes
1 answer
13 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?
0 votes
1 answer
32 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 (...
  • 214
0 votes
1 answer
20 views

How to assign new parameters to an existing quantum circuit?

Say I have a quantum circuit like this This is an ansatz for solving linear equation provided in the Qiskit's textbook In the textbook, it was shown how to find the optimal parameters of this ansatz ...
0 votes
0 answers
42 views

Combinatorial optimization problems solving using VQE

I'm studying about the variational quantum algorithms and I would like to know about the usage of VQE for solving combinatorial optimization problems. VQE can find the ground state energy of a given ...
  • 141
2 votes
2 answers
63 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 ...
0 votes
1 answer
55 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
28 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
71 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” ...
4 votes
1 answer
136 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 ...
0 votes
1 answer
60 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 ...
1 vote
1 answer
81 views

Commutativity of XY gate

My question is a simple one: Can 2 XY gates commute ? XY gate is a 2-qubit XX+YY interaction also sometimes referred to as iSwap gate.
1 vote
2 answers
97 views

Variational Quantum Algorithms and Quantum Advantage

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 ...
  • 111
0 votes
0 answers
42 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 ...
  • 69
1 vote
0 answers
75 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 ...
0 votes
0 answers
88 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........
1 vote
1 answer
72 views

Qiskit VQE output

When running Qiskit vqe.compute_minumum_eigenvalue() a dictionary of various values are returned. Within this dictionary are two parameters called ...
1 vote
1 answer
44 views

Evaluate a gradient with a specific backend (Qiskit)

I'm following the tutorial on gradients in Qiskit. Suppose I have the following: ...
2 votes
1 answer
79 views

How VQE is scalable if the dimension of the Pauli basis of the given Hamiltonian grows exponentially with the number of qubits?

For a given Hamiltonian operator $H$, It's possible to approximate its smallest eigenvalue using VQE. Any Hamiltonian is a Hermitian operator. Therefore, for a system with $n$ qubits, the set $S$ of ...
  • 1,604
4 votes
1 answer
61 views

gradient estimations on variational quantum algorithms

Other than the two famous parameter-shift rule and finite difference method, is there any other (perhaps simple) methods to estimate gradients of a cost function in variational quantum algorithms?
  • 413
1 vote
1 answer
91 views

How to upload a program in Qiskit runtime

I'm trying to use qiskit runtime to run my own version of VQE (the idea is to later run other algorithms). I understand that to use the ...
0 votes
0 answers
35 views

Adding controllable noise to VQE to find ground state energy

I am wanting to add noise to my code which uses VQE to find ground state energy for LiH at various inter atomic distances. The code I am wanting to add to is the code found from the qiskit text book. ...
1 vote
1 answer
68 views

unexpected keyword argument in qiskit vqe

I want to find the estimate of the ground state energy of my Hamiltonian H that is implemented as PauliSumOp in my variable <...
0 votes
1 answer
99 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
54 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
79 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
253 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 ...
2 votes
0 answers
46 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. ...
  • 21
1 vote
1 answer
61 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
134 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 ...
  • 25
1 vote
0 answers
48 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 ...
  • 11
1 vote
0 answers
90 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
19 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 ...
  • 11
2 votes
1 answer
168 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 ...
  • 25
1 vote
0 answers
44 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
126 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
496 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: ...
2 votes
2 answers
413 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 ...
  • 123
2 votes
1 answer
119 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
160 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, ...
  • 167
2 votes
2 answers
79 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
194 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
310 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
48 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 ...
  • 69
1 vote
1 answer
146 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
289 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
161 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
83 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 ...
  • 413
5 votes
1 answer
158 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 ...
  • 331
2 votes
2 answers
59 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&...

1
2 3 4 5