Iterative Warm Start
Iterative Warm Start (IWS) is a meta algorithm built on top of FlexQAOA. It keeps the FlexQAOA circuit, including its constraint handling via XY-mixers and indicator functions, but changes how the solution is improved.
Standard QAOA improves the solution by tuning the variational parameters of the circuit with a classical optimizer. IWS instead samples the same circuit several times and feeds the measurement outcomes back into the initial state of the next iteration:
- Sample
flexqaoa.shotsshots from the circuit. - Refine the samples with the configured
postprocessor. - Reweight the measured distribution in a Boltzmann-like fashion, which favors low-energy bitstrings.
- Use the reweighted distribution as the warm-start state of the next iteration.
Over the iterations, the probability mass concentrates on high-quality solutions without making the circuit deeper. Two parameters control the warm-start update:
betascales the inverse temperature of the reweighting. A higher value gives a sharper distribution.epsilonregularizes the probabilities of the warm-start state. After the reweighting, IWS computes a probability for each bit and clamps it to the range[epsilon, 1 - epsilon]. This keeps every bit from becoming fixed to 0 or 1 too early. A higher value gives stronger regularization.
IWS runs num_parallel independent warm-start chains at the same time. Each chain can
start from its own circuit parameters (many_initial_params). The run stops when the
chains have used up the shot budget total_shots.
Because the warm start drives the improvement, the classical optimizer of the inner FlexQAOA is disabled by default. If you configure one, it runs once before the loop to tune the initial parameters. These parameters then stay fixed for all iterations.
Backend Selection
IWS has no backend of its own. It runs on the backend of the inner FlexQAOA, so you
set the backend on flexqaoa. Passing backend to IterativeWarmStart or to
run() raises an error.
from luna_quantum.algorithms import FlexQAOA, IterativeWarmStart
from luna_quantum.solve.parameters.backends import AqariosGpu
algorithm = IterativeWarmStart(
flexqaoa=FlexQAOA(optimizer=None, backend=AqariosGpu()),
total_shots=20000,
)
Tip
For runs on quantum hardware, set flexqaoa.pipeline.xy_mixer.method = "line".
This lowers the qubit connectivity requirements of the circuit.
Compatible Backends
The compatible backends are the ones of FlexQAOA.
| Backend | Default |
|---|---|
| Aqarios | |
| AqariosGpu | |
| AerSimulator | |
| IBMFakeBackend | |
| IBMQuantum |
Initialization
total_shots has no default and must be set. It must be at least flexqaoa.shots.
For the full configuration of the inner flexqaoa, see
FlexQAOA.
from luna_quantum.algorithms import FlexQAOA, IterativeWarmStart
from luna_quantum.solve.parameters.algorithms.base_params import LinearQAOAParams
from luna_quantum.solve.parameters.algorithms.quantum_gate.flexqaoa import (
NoPostprocessor,
)
algorithm = IterativeWarmStart(
flexqaoa=FlexQAOA(optimizer=None),
total_shots=20000,
num_parallel=5,
beta=10.0,
epsilon=0.1,
postprocessor=NoPostprocessor(),
many_initial_params=[
LinearQAOAParams(
delta_beta=0.5,
delta_gamma=0.5
),
LinearQAOAParams(
delta_beta=1.5,
delta_gamma=1.5
)
]
)
Per-Chain Parameters
beta and epsilon accept either one value for all chains, or a list with
exactly one value per chain (num_parallel entries).
many_initial_params sets the initial circuit parameters of the chains. It accepts:
- one entry per chain (
num_parallelentries) ofLinearQAOAParams,BasicQAOAParamsorRandomQAOAParams. - exactly two
LinearQAOAParams. The chains then use parameters that are linearly interpolated between these two. None. All chains then useflexqaoa.initial_params.
Post-Processors
| Post-Processor | Description |
|---|---|
NoPostprocessor |
No post-processing (default). |
SteepestDescentPostprocessor |
Steepest-descent local search on each sample. |
GreedyPostprocessor |
Greedy local search with optional seed and num_sweeps. |