supermarq.benchmarks.qaoa_fermionic_swap_proxy

Definition of the Fermionic SWAP QAOA benchmark within the Supermarq suite.

Classes

QAOAFermionicSwapProxy

Proxy of a full Quantum Approximate Optimization Algorithm (QAOA) benchmark.

Module Contents

class supermarq.benchmarks.qaoa_fermionic_swap_proxy.QAOAFermionicSwapProxy(num_qubits: int)

Bases: supermarq.benchmark.Benchmark

Proxy of a full Quantum Approximate Optimization Algorithm (QAOA) benchmark.

This benchmark targets MaxCut on a Sherrington-Kirkpatrick (SK) model. Device performance is given by the Hellinger fidelity between the experimental output distribution and the true distribution obtained via scalable, classical simulation.

The ansatz for this QAOA problem utilizes the fermionic SWAP network which is able to perform all of the required O(N^2) interactions in linear circuit depth. This ansatz is especially well-suited to QPU architectures which only support nearest-neighbor connectivity. See https://doi.org/10.3390/electronics10141690 for an example of this ansatz used in practice.

When a new instance of this benchmark is created, the ansatz parameters will be initialized by:

  1. Generating a random instance of an SK graph

  2. Finding approximately optimal angles (rather than random values)

circuit() cirq.Circuit

Generate a QAOA circuit for the Sherrington-Kirkpatrick model.

This particular benchmark utilizes a quantum circuit structure called the fermionic swap network. We restrict the depth of this proxy benchmark to p=1 to keep the classical simulation scalable.

Returns:

The S-K model QAOA cirq.Circuit.

score(counts: collections.abc.Mapping[str, float]) float

Compare the experimental output to the output of noiseless simulation.

The implementation here has exponential runtime and would not scale. However, it could in principle be done efficiently via https://arxiv.org/abs/1706.02998, so we’re good.

Parameters:

counts – A dictionary containing the measurement counts from circuit execution.

Returns:

The QAOA Fermionic SWAP proxy benchmark score.

hamiltonian
num_qubits
params