SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.04197 · 2020

Quantum Approximate Optimization of Non-Planar Graph Problems on a Planar Superconducting Processor

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2004.04197.json · badge: /api/ran/2004.04197.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
CDL-Quantum/Hackathon2020 community (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
FunctionStatusWhere it lives
costfunc Ran
ran on a synthesized input
CDL-Quantum/Hackathon2020/QBC/quantum_aware_optims.py
code served (permissive licence) · get_code("707500ea9d026c5c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# circuit_evals: a list of float expectation values
circuit_evals = [0.5, -0.3, 0.8, 0.2]

# proportions: a list of float mixing coefficients
proportions = [0.25, 0.25, 0.25, 0.25]

ARGS = {
    "circuit_evals": circuit_evals,
    "proportions": proportions,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
evaluate_circuits Ran
ran on a synthesized input
CDL-Quantum/Hackathon2020/QBC/quantum_aware_optims.py
code served (permissive licence) · get_code("c77b4bca9d49ce87")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from collections.abc import Iterable

torch.manual_seed(0)

# Create mock quantum circuit classes
class QuantumCircuit(nn.Module):
    """Mock quantum circuit that returns a single tensor"""
    def __init__(self, output_size=4):
        super().__init__()
        self.output_size = output_size
    
    def forward(self, params):
        # Returns a single tensor
        return torch.randn(self.output_size)

class IterableQuantumCircuit(nn.Module):
    """Mock quantum circuit that returns an iterable of tensors"""
    def __init__(self, num_outputs=3, output_size=4):
        super().__init__()
        self.num_outputs = num_outputs
        self.output_size = output_size
    
    def forward(self, params):
        # Returns a list of tensors
        return [torch.randn(self.output_size) for _ in range(self.num_outputs)]

# Create parameters (small tensor)
params = torch.randn(2, 4)

# Create a list of quantum circuits - mix of single-output and iterable-output circuits
qcircuits = [
    QuantumCircuit(output_size=4),
    IterableQuantumCircuit(num_outputs=2, output_size=4),
    QuantumCircuit(output_size=4),
]

ARGS = {
    "params": params,
    "qcircuits": qcircuits,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_dic_from_matrix Ran
ran on a synthesized input
CDL-Quantum/Hackathon2020/Bridge42/drafts/dwave-test.py
code served (permissive licence) · get_code("bcf05906fb3ac7a7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function get_dic_from_matrix takes a matrix and iterates through all indices
# using product(*[range(s) for s in matrix.shape]), checking if matrix[i] is truthy
# and building a dictionary of non-zero/non-false elements.
# The matrix needs to support:
# - .shape attribute
# - indexing with tuples (matrix[i])
# - truthiness checking

# Create a small numpy array with some non-zero values
matrix = np.array([
    [1, 0, 2],
    [0, 0, 3],
    [4, 0, 0]
])

ARGS = {
    "matrix": matrix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
kronecker Ran
ran; our contract draft was wrong, not the code
CDL-Quantum/Hackathon2020/QBC/quantum_aware_optims.py
code served (permissive licence) · get_code("bcb2a85323de4b3a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (8, 15) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create two small 2D tensors for the kronecker product
# matrix1 will be 2x3, matrix2 will be 4x5
matrix1 = torch.randn(2, 3)
matrix2 = torch.randn(4, 5)

ARGS = {
    "matrix1": matrix1,
    "matrix2": matrix2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (8, 15) — shape (8, 15) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
number_of_photons Ran
ran on a synthesized input
CDL-Quantum/Hackathon2020/Pasqathon/functions.py
code served (permissive licence) · get_code("d638c9719e5c6e17")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - Takes parameter 'i' which gets converted to tuple(i)
# - Then sums the resulting tuple and compares to n
# - Parameter 'n' has default value 6
# - The function expects i to be iterable and contain numeric values

# Create a valid argument for 'i': 
# It should be an iterable of numbers that will be summed
# Let's create a list/tuple of integers where the sum exceeds 6
i_value = [1, 2, 3, 4]  # sum is 10, which is > 6

# Create a value for 'n' - can use default or override it
n_value = 6

ARGS = {
    "i": i_value,
    "n": n_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rvs Ran
ran on a synthesized input
CDL-Quantum/Hackathon2020/Pasqathon/functions.py
code served (permissive licence) · get_code("181aa869e064f824")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

def rvs(dim=3):
    np.random.seed()
    random_state = np.random
    H = np.eye(dim)
    D = np.ones((dim,))
    for n in range(1, dim):
        x = random_state.normal(size=(dim - n + 1,))
        D[n - 1] = np.sign(x[0])
        x[0] -= D[n - 1] * np.sqrt((x * x).sum())
        Hx = np.eye(dim - n + 1) - 2.0 * np.outer(x, x) / (x * x).sum()
        mat = np.eye(dim)
        mat[n - 1:, n - 1:] = Hx
        H = np.dot(H, mat)
    D[-1] = (-1) ** (1 - dim % 2) * D.prod()
    H = (D * H.T).T
    return H

ARGS = {
    "dim": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 3) — shape (3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
squared_dist_sum Ran
ran on a synthesized input
CDL-Quantum/Hackathon2020/AB/binary_cluster.py
code served (permissive licence) · get_code("0359bb7e76347dab")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct arguments for squared_dist_sum
# The function expects:
# - feature_vecs: array-like where indices can be used to access rows
# - feature_index: iterable of indices to loop over

# Create small feature vectors (3 vectors of dimension 4)
feature_vecs = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0],
    [9.0, 10.0, 11.0, 12.0]
], dtype=np.float64)

# Create feature index with valid indices
feature_index = [0, 1, 2]

ARGS = {
    "feature_vecs": feature_vecs,
    "feature_index": feature_index
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
truncate_samples Ran
ran on a synthesized input
CDL-Quantum/Hackathon2020/Pasqathon/functions.py
code served (permissive licence) · get_code("4b16c2f379176fdd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family int, shape (4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function truncate_samples takes samples as input
# It expects samples to be an iterable of bitstrings (tuples or array-like objects)
# Each bitstring represents photon counts, and the function filters out samples
# where the sum of photons is > 6

# Create sample data: a list of bitstrings (tuples/arrays representing photon counts)
# Each sample should be iterable and support sum() operation
samples = np.array([
    [1, 0, 1, 0],      # sum = 2, keep
    [2, 1, 1, 0],      # sum = 4, keep
    [3, 2, 1, 1],      # sum = 7, filter out (> 6)
    [1, 1, 1, 1],      # sum = 4, keep
    [5, 2, 0, 0],      # sum = 7, filter out (> 6)
    [2, 2, 1, 0],      # sum = 5, keep
])

ARGS = {
    "samples": samples
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (4, 4) — shape (4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
kronecker 1 other paper
1 later
2009.01269 (2020-09)
Can Single Neurons Solve MNIST? The Computational Power of Biological Dendritic Trees

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We demonstrate the application of the Google Sycamore superconducting qubit quantum processor to combinatorial optimization problems with the quantum approximate optimization algorithm (QAOA). Like past QAOA experiments, we study performance for problems defined on the (planar) connectivity graph of our hardware; however, we also apply the QAOA to the Sherrington-Kirkpatrick model and MaxCut, both high dimensional graph problems for which the QAOA requires significant compilation. Experimental scans of the QAOA energy landscape show good agreement with theory across even the largest instances studied (23 qubits) and we are able to perform variational optimization successfully. For problems defined on our hardware graph we obtain an approximation ratio that is independent of problem size and observe, for the first time, that performance increases with circuit depth. For problems requiring compilation, performance decreases with problem size but still provides an advantage over random guessing for circuits involving several thousand gates. This behavior highlights the challenge of using near-term quantum computers to optimize problems on graphs differing from hardware connectivity. As these graphs are more representative of real world instances, our results advocate for more emphasis on such problems in the developing tradition of using the QAOA as a holistic, device-level benchmark of quantum processors.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2004.04197")
get_code_for_paper("2004.04197")
have("2004.04197")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2004.04197.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2004.04197.svg)](https://syntology.ai/paper/2004.04197)

Connect an agent — have() is free.