# Tag Info

7

"but for me quantum supremacy would mean that no classical algorithm can exist at all that solves the problem in a better way than a quantum algorithm." If that were the case, then "quantum supremacy" would almost not exist at all. Even Shor's algorithm for factoring numbers in polynomial time would not be considered "superior" ...

6

These papers might help: Classical Optimizers for Noisy Intermediate-Scale Quantum Devices Collective optimization for variational quantum eigensolvers Also look at these optimizers from Pennylane.

5

There is actually a nice way in Qiskit to transform a matrix of an optimization problem into an qubit operator that can be translated into a quadratic program. I'll put here the example, note this is possible for many optimization problems, find every one here in case you want to test something else! For example here it is done for MaxCut and TSP, it could ...

5

We don't really need $B = \sum \sigma_j^x$ in our QAOA algorithm. As long as you pick it in such a way that it doesn't commute with $C$. One of the reason is if they are commute, then they share a common eigenvector. Then if you run into this type of situation, you will never get out, and you will be stuck in this state. You can think of $U(\beta, B)$ as a ...

4

$\langle \psi_p(\gamma,\beta)|H|\psi_p(\gamma,\beta)\rangle$ is basically the function evaluation step during the optimization. If you use a gradient-free optimizer, then it uses this information to drive its search. Depending on the optimizer if it needs them to update the parameters. You seem confused between the simulation and measurement part. $\langle ... 4 You need to add the number of qubits for the initial state, this worked for me : n_qubits = 2 #or whatever you want for your example qaoa_mes = QAOA(H, p=p, optimizer=optimizer, initial_state = Zero(n_qubits), quantum_instance=Aer.get_backend("qasm_simulator")) You can also pass a list for the initial point, for example : qaoa_mes = QAOA(H, p=p, ... 4$\gamma$should still go from$[0, 2\pi]$, as$U1$also has domain on$[0, 2\pi]$. See https://qiskit.org/documentation/stubs/qiskit.circuit.library.U1Gate.html.$U1$is cyclic mod$2\pi$so in general one cannot distinguish$U1(x \pm 2\pi)$4 You can definitely run this on a real quantum computer! In your snippet above you mixed circuits and operators. A circuit is only used for the ansatz of your ground state, not for representing the operators. The website you provided talks about the Hamiltonian in terms of the Pauli X and Z matrices;$\hat\sigma^x$and$\hat\sigma^z$. If you want to compute ... 3 I will give you a partial answer cocerning using quantum machine learning methods in NISQ era. As any other quantum algorithm, QML algorithms can be used on current NISQ processors. However, there is a problem with noise leading to quick decoherence of qubits. Especially entangled qubits (which are crucial for quantum computing) are very sussceptible to ... 3 The Quantum Approximate Optimization Algorithm is closely related to the Quantum Adiabatic Algorithm. Let's say we have a simple Hamiltonian (in our case$H_B$) with a known ground state and another Hamiltonian$H_C$, whose ground state we want to calculate. Consider the time-dependent Hamiltonian H(t) = \left(1-\frac{t}{T}\right)H_B(t) + \... 3 It can actually and this is done by adding penalties to include the constraints in the cost function. See this article on formulations of different problems. There also exist an adaptation for constrained problems. See this articla on the Quantum Alternating Operator Ansatz. 3 If you decomposed your Hamiltonian into Pauli strings, and it has 100 different terms, then yes you can use one machine to do the quantum subroutine to evaluate the expectation for each of the term. $$\langle H \rangle = \sum_{i} h_i \langle P_i \rangle$$ So you can evaluate$\langle P_1 \rangle$on one machine and$\langle P_2 \rangle$on another machine..... 3 If you use infinite depth then QAOA can be consider as quantum annealer on gate-based. The authors of QAOA original paper probably deduce it from quantum annealing. What I mean by infinite depth is you take$p \to \infty$in the operator $$U(\beta, \gamma) = \Pi_{i=1}^p U_B(\beta_i)U_C(\gamma_i)$$ Your are right about the commutation problem. However, ... 3 A precursor to the canonical QAOA is the Quantum Adiabatic Algorithm (QAA). Since we want to end up in the ground state of the Cost Hamiltonian ($H_C$) but don't know how to construct it, we exploit adiabaticity by starting with the ground state$|+\rangle^{\otimes n}$of the (mixing) Hamiltonian$H_M = \sum_i \sigma_i^x$. Now, if we slowly change a ... 3 You can use a cirq.DensePauliString to represent a tensor product of Paulis: gate = cirq.DensePauliString("IIZZIZ") a, b, c, d, e, f = cirq.LineQubit.range(6) op1 = gate(a, b, c, d, e, f) It can be a bit tedious to specify all those identities, and to manage making sure you pass the right qubit into the right position, so I'd recommend directly ... 2 Yes, some works have been in this area. Here is an example: "Quantum Circuit Learning" https://arxiv.org/abs/1803.00745 and also this paper, "Learning to learn with quantum neural networks via classical neural networks" https://arxiv.org/abs/1907.05415 and also this paper, "Experimental pairwise entanglement estimation for an N-... 2 Consider a nearest-neighbor Ising Hamiltonian $$H = \sum_{i=1}^n J_i \sigma_i^z \sigma_{i+1}^z.$$ Let$X = \sum_{i=1}^n \sigma_i^x$. The QAOA ansatz is $$|\mathbf{\beta}, \mathbf{\gamma}\rangle = \exp\left(-i\beta_1 X \right)\exp\left(-i\gamma_1 H \right) \dots \exp\left(-i\beta_p X \right)\exp\left(-i\gamma_p H \right) |+\rangle^{\otimes n}$$ The ... 2 We don't in general. There are instances where$p=2,3$or$4$might still be not enough. QAOA is an approximate algorithm as the name suggested, so you don't expect it to find the exact answer. You should take a look at this paper: Quantum Approximate Optimization Algorithm: Performance, Mechanism, andImplementation on Near-Term Devices 2 Until a better solution is provided, I hope this suggestion is helpful. Reducing MaxCut to Max-2SAT is straightforward (https://cs.stackexchange.com/a/93492/115012) And there are many free, highly optimized MaxSAT solvers. 2 Since$\sigma_z^1 = I \otimes Z$and$\sigma_z^1 \otimes \sigma_z^2 = Z \otimes Z$are commute with one another, that is $$[\sigma_z^1 , \sigma_z^1 \otimes \sigma_z^2 ] = \sigma_z^1 \cdot \sigma_z^1 \otimes \sigma_z^2 - \sigma_z^1 \otimes \sigma_z^2 \cdot \sigma_z^1 = \boldsymbol{0}$$ we have that $$e^{i\gamma_1 H_a} = e^{i \gamma \frac{1}{2}(\sigma_z^1 +... 2 QAOA was first introduced as a quantum algorithm to tackle combinatorial optimization problems. Hence, there is a direct translation of these to Hamiltonians with I and Z operators. And you always see the mixer as just X operators because the equal-superposition state (obtained by Hadamard transform on | 0\rangle^{\otimes N}) is a ground state of ... 2 You should be able to use: result['eigenstate'] That should spit out something like (if you are using 4 qubits): {'0001': 27, '0010': 20, '0011': 1821, '0100': 25, '0101': 591, '0110': 46, '0111': 5347, '1001': 18, '1010': 2, '1011': 226, '1101': 11, '1111': 58} 2 In QAOA we are looking for a ground state of a Hamiltonian H. This means that we want to find a quantum state |\psi\rangle for which a energy is minimal, or in other words, a state asociated with a minimal eigenvalue. Suppose that |\psi\rangle is our eigenstate, hence$$ H|\psi\rangle = \lambda|\psi\rangle,$$where$\lambda$is respective eigenvalue. ... 2 Yes. Just pick$K=I-B$. It is hermitian,$B'=B+K=I$and thus$(B')^2=I$, and$K$commutes with$B$. 2 Probably the easiest way to understand this is to pretend that the mixer is NOT there and see what happens. So, let's assume you have some initial state$\lvert \psi \rangle = \sum_x \psi_x \lvert x \rangle$and you want to use QAOA to find the ground state of some cost Hamiltonian$H_C$. I'm using the notation$\big\{\lvert x \rangle : x \in \{\pm 1\}^n \...

2

There was an issue that was fixed with QAOA https://github.com/Qiskit/qiskit-aqua/pull/1316 whereby using all zeros as an initial point was changed since the optimizer could easily get stuck there. Given the version you have the easiest way to change things would just be to pass an initial point that is non-zero. I.e. instead of [0,0] which it uses with the ...

2

In QAOA you do not implement Hamiltonian $H$ itself but gate defined as $U = \mathrm{e}^{iHt}$. Since Hamiltonian $H$ is always Hermitian, operator $U$ is always unitary. You can see proof of this here. Concerning implementation of QAOA circuits, I would recommed this article. It contains discussion how to convert QUBO to Hamiltonian and in the appendix, ...

2

First of all, QAOA can be regarded as an application of VQE. (Take a look at this answer.) Therefore, we can consider their performance to be similar enough to talk about them together. Although for some particular cases, a quantum computer isn't even needed for QAOA, but let's consider only the cases in which quantum circuits are used. Briefly, it is not ...

2

This is because $\sqrt{K^2}$ is not the matrix whose entries are the square root of those of $K^2$, but the matrix such that $\left(\sqrt{K^2}\right)^2=K^2$. You can compute this matrix by, for instance, performing an SVD decomposition on your matrix using numpy, like this: import numpy as np def geometric_difference(kernel_1, kernel_2): u, s, v = np....

1

Lena's answer doesn't work as we've noted in the comments underneath: the stable_set.get_operator() takes in a numpy adjacency matrix which is not what I'm inputting. Instead I've written a function which takes the qubo_array I've got and creates a QuadracticProgram exactly. To do the particular program I was after manually is done as so: mdl = Model('...

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