Hot answers tagged

8

I view QAOA as an algorithm for solving (approximately) a special class of problems, namely combinatorial problems and VQE as a possible subroutine to QAOA (but not necessarily as in the case of MaxCut). Let me explain The VQE - Variational Quantum Eigensolver - solves the problem of approximating the smallest eigenvalue of some Hermitian operator $H$ which ...


5

You're right in the sense that the cost unitary, which is composed of all the $Z$ and $CZ$ gates does not affect the underlying probabilities of measuring a specific state by itself, however when we apply the mixer (the layer of $Rx$ gates), the probabilities are changed, due to these added phases. Let's look at a basic example, to convince you that ...


4

The proof of the variational theorem (the theorem that the ground state energy is the lowest possible energy you can get from $\frac{\langle \psi|H|\psi\rangle}{ \langle \psi | \psi \rangle}$) is very simple: https://en.wikipedia.org/wiki/Variational_method_(quantum_mechanics) If you get a lower energy, it means you don't actually have $\frac{\langle \psi|...


3

This can actually be easily done using the Qiskit Terra qiskit.quantum.info.analysis.average.average_data function that takes the counts data returned by a backend and the desired observable defined by a dict, list, or ndarray. The doc-string for that function actually has the ZZ your looking for as an example.


3

Qiskit currently supports measurements in the computational basis from Qiskit Terra and Aer, that is, returning 1 if the qubit is in state $|1\rangle$, and 0 if the qubit is measured to be in state $|0\rangle$. However, it is relatively easy to perform a change of basis unitary to our quantum circuit just prior to measurement, in order to instead measure in ...


2

You can create the unitary gate for operator $U(\theta)=e^{-i\frac{\theta}{2}Z_{0}Z{1}}$ using two $CNOT$ operations and single rotation gate $R_z$: For operators which contain different tensor products of Pauli matrices beside the product of $Z$ you have to change basis using appropriate unitary transformation: $R_y(-\frac{\pi}{2})$ changes $X$ basis to $Z$...


2

Remember that we can expand $$ e^{i\gamma(Z\otimes Z)}=I\cos\gamma+i(Z\otimes Z)\sin(\gamma). $$ Let's call this $U$. If I calculate $$ U|+\rangle|+\rangle=\cos\gamma|+\rangle|+\rangle+i\sin\gamma|-\rangle|-\rangle. $$ For most vales of $\gamma$, this state is entangled (indeed, for $\gamma=\pi/4$, you essentially have a Bell state in the Hadamard basis). So ...


2

When $H = I_1 \otimes I_2$, $e^{-i\gamma I_1 \otimes I_2} = I_1 \otimes I_2$. Therefore, you don't have to apply any gates. Your CNOT RZ CNOT circuit represents the time evolution of Ising coupling. However, if you want to solve the Ising model problem by QAOA, you need "mixing term" like RX rotation. Rigetti grove's document is very good to understanding ...


1

If you have one parameter (one $\theta$) for both circuits then I think the first one is better... they are doing the same job, but the second one is creating extra gates. So the first one will be faster and will have fewer errors because there are fewer gates in the first circuit. But if you are obtaining the second circuit with two parameters (two ...


Only top voted, non community-wiki answers of a minimum length are eligible