In this note, I will first introduce the basic idea of QAOA and some of explicit applications of QAOA. This note is organized in the following way:
The basic idea of QAOA
Applicate into several problem
Max Cut Problem
Traverse Ising model
The binary linear least squares (BLLS) problem
Development for QAOA
Relation to the Quantum Adiabatic
From the QAOA to a Quantum Alternating Operator Ansatz
Since QAOA is an approximation algorithm, it does not deliver the 'best' result, but rather the 'good enough' one, characterized by a lower bound of the approximation ratio.
Reference
An Introduction to Quantum Optimization Approximation Algorithm. Qingfeng Wang, Tauqir Abdullah 2018
Quantum approximate optimization for hard problems in linear algebra. Ajinkya Borle, Vincent E. Elfving and Samuel J. Lomonaco. SciPost Phys. Core 4, 031 (2021)
Application of the quantum approximate optimization algorithm to combinatorial optimization problems.
PONTUS VIKSTÅL, 2020
The basic idea of Quantum Approximation Optimization Algorithm (QAOA)
The solution to the problem are encoded into the quantum state ∣ψ(βopt ,γopt )⟩
We uses a unitary U(β,γ) to prepare a quantum state ∣ψ(β,γ)⟩.
The goal of the algorithm is to find optimal parameters (βopt ,γopt)
This part of the optimization is performed by a classical computer
This algorithm is based on two unitaries U(C,γ),U(B,β) and an integer p≥1.
The two unitaries corresponds to some rotations on our qubits
The integer p denotes the depth of our circuit.
The first unitary operator depends on an angle γ and a Hamiltonian of cost function
U(C,γ)=e−iγH^C=(i,j)∈E∏e−iγH^C⟨ij⟩
where
γ lies between 0 and 2π.
H^C=21∑1≤i<j≤nwij(1−sisj) The Hamiltonian of cost function encode the problem
The second unitary operator depends on an angle γ and a Hamiltonian H^B U(B,β)===e−iβBe−iβ∑j=1nσjxj=1∏ne−iβσjx
where
choosing H^B to be H^B=∑iσ^ix
The total evolution operator become
U^(β,γ)=k=1∏pU(βk)U(γk)=k=1∏pe−iβkH^Be−iγkH^C
where
for each level k we apply the unitary U(C,γk) followed by the unitary U(B,βk)
total number of level are p
the final variational "QAOA" state is obtained
∣∣∣ψp(γ,β)⟩=U(B,βp)U(C,γp)⋯U(B,β2)U(C,γ2)U(B,β1)U(C,γ1)∣+⟩⊗n
where
the state depends on the angles γ=(γ1,γ2,…,γp) and β=(β1,β2,…,βp)
The starting state is the superposition of all possible states in the computational basis with equal probability
∣+⟩⊗n≡H⊗n∣0⟩⊗n=2n1z∈{0,1}n∑∣z⟩
The expectation value of H^C in this state
Fp(γ,β)≡⟨ψp(γ,β)∣∣∣H^C∣∣∣ψp(γ,β)⟩
Let Mp be the maximum of Fmax over the angles
Fmax=γ,βmaxFp(γ,β)
To maximize the expectation value above, find good angles γ=(γ1,γ2,…,γp) and β=(β1,β2,…,βp) by querying a classical optimizer. Several classical optimizers has been implemented.
Consider cost function C as a operator, then act on the basis state ∣z⟩C∣z⟩=⟨jk⟩∑C⟨jk⟩(z)∣z⟩=C(z)∣z⟩
where
C⟨jk⟩∣z⟩==21(−sj⊗sk+I)∣z⟩{∣z⟩,0, if edge ⟨jk⟩ is a cut, that is, sj⊗sk∣z⟩=−I if edge ⟨jk⟩ is not a cut, that is, sj⊗sk∣z⟩=I
To be continued
2.2. Traverse Ising model
Traverse filed Ising model (TFIM) describe 1D chain with n interacting spin, the Hamiltonian of the model
H=j=1∑nJjσjzσj+1z+j=1∑nhjσjx
where
interacting strength Jj
the external magnetic field hj
σjz and σjx are Pauli matrixs
To solve traverse filed Ising model with QAOA, we use the Hamiltonian of TFIM as H^CH^C=H^
Thus
e−iγHC=e−iγH=e−iγ(∑j=1nσjzσj+1z+∑j=1nσjx)=e−iγ∑j=1nσjxe−iγ∑j=1nσjzσj+1z
Choosing H^B to be
H^B=j∑σ^jx
evolution operator become
U^=U(β)U(γ)=e−iβH^Be−iγH^C=(e−iβ∑j=1nσjx)(e−iγ∑j=1nσjxe−iγ∑j=1nσjzσj+1z)=e−i(β+γ)∑j=1nσjxe−iγ∑j=1nσjzσj+1z=e−iβ′∑j=1nσjxe−iγ∑j=1nσjzσj+1z
where
denote β′=β+γ as new β
The expectation value contains two parts.
⟨H⟩=⟨ψ∣j=1∑nσjzσj+1z+j=1∑nσjx∣ψ⟩=⟨ψ∣j=1∑nσjzσj+1z∣ψ⟩+⟨ψ∣j=1∑nσjzσj+1z∣ψ⟩=⟨H1⟩+⟨H2⟩
2.2.1. example: 2-qubit system
The general form of final state of 2-qubit system
∣ψ⟩=a00∣00⟩+a01∣01⟩+a10∣10⟩+a11∣11⟩
where
The coefficients {a00,a01,a10,a01} are given by the probability distribution from the circuit result.
The expectation value of first part.
⟨ψ∣H1∣ψ⟩=====⟨ψ∣j=0∑1σ0zσ1z∣ψ⟩(a00⟨00∣+a01⟨01∣+a10⟨10∣+a11⟨11∣)(σ0zσ1z+σ1zσ0z)(a00∣00⟩+a01∣01⟩+a10∣10⟩+a11∣11⟩)(a00⟨00∣+a01⟨01∣+a10⟨10∣+a11⟨11∣)σ0zσ1z(a00∣00⟩+a01∣01⟩+a10∣10⟩+a11∣11)⟩+(a00⟨00∣+a01⟨01∣+a10⟨10∣+a11⟨11∣)σ1zσ0z(a00∣00⟩+a01∣01⟩+a10∣10⟩+a11∣11)⟩(a00⟨00∣+a01⟨01∣+a10⟨10∣+a11⟨11∣)(a00∣00⟩−a01∣01⟩−a10∣10⟩+a11∣11)⟩+(a00⟨00∣+a01⟨01∣+a10⟨10∣+a11⟨11∣)(a00∣00⟩−a01∣01⟩−a10∣10⟩+a11∣11)⟩2(a002−a012−a102+a012)
For second part, we apply H gate to the circuit to get the new state
H∣ψ⟩===H(a00∣00⟩+a01∣01⟩+a10∣10⟩+a11∣11⟩)(a00+a01+a10+a11)∣00⟩+(a00−a01+a10−a11)∣01⟩+(a00+a01−a10−a11)∣10⟩+(a00−a01−a10+a11)∣11⟩b00∣00⟩+b01∣01⟩+b10∣10⟩+b11∣11⟩
where we denote
b00=(a00+a01+a10+a11)
b01=(a00−a01+a10−a11)
b10=(a00+a01−a10−a11)
b11=(a00−a01−a10+a11)
The H gate also make σx⟶Hσz, Thus the expectation value of second part.
⟨H2⟩=====(b00⟨00∣+b01⟨01∣+b10⟨10∣+b11⟨11∣)(σ0z+σ1z)(b00∣00⟩+b01∣01⟩+b10∣10⟩+b11∣11⟩)(b00⟨00∣+b01⟨01∣+b10⟨10∣+b11⟨11∣)(σ0z)(b00∣00⟩+b01∣01⟩+b10∣10⟩+b11∣11⟩)+(b00⟨00∣+b01⟨01∣+b10⟨10∣+b11⟨11∣)(σ1z)(b00∣00⟩+b01∣01⟩+b10∣10⟩+b11∣11⟩)b002+b012−b102−b112+b002−b012+b102−b1122b002−2b1122(a00a01+a00a10+a11a01+a11a10)
In last step, we transform notation from b to a. We can find this result is the same with
⟨H2⟩=(a00⟨00∣+a01⟨01∣+a10⟨10∣+a11⟨11∣)(σ0x+σ1x)(a00∣00⟩+a01∣01⟩+a10∣10⟩+a11∣11)⟩=2(a00a01+a00a10+a11a01+a11a10)
Which we calculate directly without change of basis.
2.3. BLLS problem
Reference
Quantum approximate optimization for hard problems in linear algebra. Ajinkya Borle, Vincent E. Elfving and Samuel J. Lomonaco. SciPost Phys. Core 4, 031 (2021)
The binary linear least squares (BLLS) problem
3. Development
3.1. History
QAOA was first proposed by Farhi etal in 2014. (arXiv:1411.4028)
they applied QAOA on MaxCut problem
they showed the complexity of problem depends on p rather than n.
they showed the relationship between QAOA and quantum adiabatic algorithm (QAA)
QAOA can exhibit a form of Quantum Supremacy. 2016 (arXiv:1602.07674)