New answers tagged

0 votes

Expected Minimum Clique Coverage?

There are already some papers that investigate the idea of converting the problem of VQE measurement optimization to minimum clique cover problem: Measurement Optimization in the Variational Quantum ...
user avatar
1 vote
Accepted

Expected Minimum Clique Coverage?

The question you ask is an interesting one, and the general answer I don't know. But I find numerics to be a useful generator of conjectures. I wrote a little python code using pennylane for this, the ...
user avatar
0 votes
Accepted

Expectation value of Pauli string for VQE

I think we could get the estimate of $\langle \psi | P | \psi \rangle $ using your method in the following way. Let's assume that we know the eigenvalue decomposition (https://en.wikipedia.org/wiki/...
user avatar
2 votes
Accepted

What is the original paper introducing the Variational Quantum Eigensolver?

A variational eigenvalue solver on a photonic quantum processor - Peruzzo et al.
user avatar
0 votes

Expectation value of pauli strings for VQE

In addition to the issue mentioned by @KAJ226 in his answer, this line of code is wrong sign = (state.count('1') % 2) * (-1) because ...
user avatar
0 votes

Expectation value of pauli strings for VQE

To measure $\langle XY \rangle$ you need to apply $H$ gate to the first qubit since $HZH = X$, and $S^\dagger$ follow by $H$ to the second qubit since $(SH)Z(HS^\dagger) = Y $. Now, Qiskit uses ...
user avatar
  • 12.3k
0 votes

Convexity of cost function in quantum machine learning

You are of course exactly right that for generic parametrized unitaries $U(\theta)$ a typical cost function will be non-convex. In fact, the problem is so bad that the presence of local minimums makes ...
user avatar
1 vote
Accepted

Qiskit: QAOAnsatz circuit with custom Hamiltonian

Assume that $U$ is given as a quantum circuit: U = QuantumCircuit(num_qubits) Then to get the state vector $\left| b \right>$ we can use ...
user avatar
1 vote

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

np.asscalar as stated by Catalina solves the described problem. Further problems (e.g. error message ...
user avatar
1 vote

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

I was able to reproduce your error. I made several tests on your code and I found that the wrapped_cost function is returning a tensor, not a scalar. However if you try to use something like np....
user avatar

Top 50 recent answers are included