supermarq.benchmarks.qaoa_vanilla_proxy

Classes

QAOAVanillaProxy

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

Module Contents

class supermarq.benchmarks.qaoa_vanilla_proxy.QAOAVanillaProxy(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 follows the typical structure obtained when directly translating the objective Hamiltonian to the quantum circuit. Since the SK model is completely connected there are O(N^2) interactions that need to take place. These are implementation by pairs of CNOTs and Rz rotations between the participating qubits. This ansatz is well-suited to QPU architectures which support all-to-all connectivity.

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.

The ansatz structure is given by the form of the Hamiltonian and requires interactions between every pair of qubits. We restrict the depth of this proxy benchmark to p=1 to keep the classical simulation scalable.

Returns:

The S-K model QAOA 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 measurement counts from circuit execution.

Returns:

The QAOA Vanilla proxy benchmark score.

hamiltonian
num_qubits
params