# Tag Info

### 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 ...
• 4,010
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 ...
• 440
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/...
Accepted

### What is the original paper introducing the Variational Quantum Eigensolver?

A variational eigenvalue solver on a photonic quantum processor - Peruzzo et al.
• 4,010

### 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 ...
• 4,010

### 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 ...
• 12.3k

### 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 ...
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 ...
• 4,010
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 ...
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....
• 61

Top 50 recent answers are included