SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1011.3245 · 2010

The Computational Complexity of Linear Optics

arXiv · PDF · Open in the Atlas

Code that ran

5 of 10 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 4 have no contract verdict; 1 failure of our instrument; 5 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/1011.3245.json · badge: /api/ran/1011.3245.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
steinbrecher/bosonic community (classifier label)
classifier basis not recorded on the link
4 ran · 5 no recorded run
ifftech/boson-sampling reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
expi Ran
ran on a synthesized input
steinbrecher/bosonic/bosonic/nonlinear.py
code served (permissive licence) · get_code("3b73c08caf5e744d")
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 complex, 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 numpy as np

ARGS = {
    "x": np.pi
}
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 complex, 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
gen_submatrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ifftech/boson-sampling/bosonsampling.py
pointer only (licence: GPL-3.0) · get_code("f4c88ca76b2fd461")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, ifftech/boson-sampling, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

haar_rand Ran
ran on a synthesized input
steinbrecher/bosonic/bosonic/util.py
code served (permissive licence) · get_code("24ddd0267270e64b")
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 (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

def haar_rand(m):
    """Returns haar-random matrix of dimension m x m
    The haar-random algorithm is taken from this paper:
    http://home.lu.lv/~sd20008/papers/essays/Random%20unitary%20[paper].pdf
    and is a direct adaptation of the following Mathematica code:

    RR:=RandomReal[NormalDistribution[0,1]];
    RC:=RR+I*RR;
    RG[n_]:=Table[RC,{n},{n}];
    RU[n_]:=Orthogonalize[RG[n]];
    RU[n_]:=Module[{Q,R,r,L},
      {Q,R}=QRDecomposition[RG[n]];
      r=Diagonal[R];
      L=DiagonalMatrix[r/Abs[r]];
      Q.L
    ];
    """
    z = np.random.randn(m, m) + 1j * np.random.randn(m, m)
    Q, R = np.linalg.qr(z)
    r = np.diag(R)
    L = np.diag(r / np.abs(r))
    return Q.dot(L)

ARGS = {
    "m": 4
}
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 (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
memoize Ran
ran on a synthesized input
steinbrecher/bosonic/bosonic/util.py
code served (permissive licence) · get_code("8b84c06d0cdfba50")
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 function. 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

# The function `memoize` takes a single parameter `f` which should be a callable.
# It wraps the function to cache results based on arguments.
# The function needs to be hashable in its arguments (since they're used as dict keys).

def simple_function(x, y):
    """A simple deterministic function with hashable arguments."""
    return x + y

ARGS = {
    'f': simple_function
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
phase_two Ran
ran on a synthesized input
steinbrecher/bosonic/bosonic/reck.py
code served (permissive licence) · get_code("2f08644219cf9c37")
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 (2, 2) 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

theta1 = np.pi / 4
theta2 = np.pi / 3

ARGS = {
    "theta1": theta1,
    "theta2": theta2
}
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 (2, 2) — shape (2, 2) 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
build_fock_nonlinear_layer Not yet run
unverified (harvested, no recorded run)
steinbrecher/bosonic/bosonic/nonlinear.py
code served (permissive licence) · get_code("8fd6070639e89281")
How it ran

no invocation recorded.

build_fock_nonlinear_layer_variable Not yet run
unverified (harvested, no recorded run)
steinbrecher/bosonic/bosonic/nonlinear.py
code served (permissive licence) · get_code("a0749c12c8375c4c")
How it ran

no invocation recorded.

build_phi_layer Not yet run
unverified (harvested, no recorded run)
steinbrecher/bosonic/bosonic/clements.py
code served (permissive licence) · get_code("c9cdbf7b6a6b4f6d")
How it ran

no invocation recorded.

embedded_mzi Not yet run
unverified (harvested, no recorded run)
steinbrecher/bosonic/bosonic/reck.py
code served (permissive licence) · get_code("1a07337ddb562c94")
How it ran

no invocation recorded.

mzi Not yet run
unverified (harvested, no recorded run)
steinbrecher/bosonic/bosonic/reck.py
code served (permissive licence) · get_code("eb4ee215c6af7d81")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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 give new evidence that quantum computers -- moreover, rudimentary quantum computers built entirely out of linear-optical elements -- cannot be efficiently simulated by classical computers. In particular, we define a model of computation in which identical photons are generated, sent through a linear-optical network, then nonadaptively measured to count the number of photons in each mode. This model is not known or believed to be universal for quantum computation, and indeed, we discuss the prospects for realizing the model using current technology. On the other hand, we prove that the model is able to solve sampling problems and search problems that are classically intractable under plausible assumptions. Our first result says that, if there exists a polynomial-time classical algorithm that samples from the same probability distribution as a linear-optical network, then P^#P=BPP^NP, and hence the polynomial hierarchy collapses to the third level. Unfortunately, this result assumes an extremely accurate simulation. Our main result suggests that even an approximate or noisy classical simulation would already imply a collapse of the polynomial hierarchy. For this, we need two unproven conjectures: the "Permanent-of-Gaussians Conjecture", which says that it is #P-hard to approximate the permanent of a matrix A of independent N(0,1) Gaussian entries, with high probability over A; and the "Permanent Anti-Concentration Conjecture", which says that |Per(A)|>=sqrt(n!)/poly(n) with high probability over A. We present evidence for these conjectures, both of which seem interesting even apart from our application. This paper does not assume knowledge of quantum optics. Indeed, part of its goal is to develop the beautiful theory of noninteracting bosons underlying our model, and its connection to the permanent function, in a self-contained way accessible to theoretical computer scientists.

For agents

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

get_harvested_code_for_paper("1011.3245")
get_code_for_paper("1011.3245")
have("1011.3245")

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

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

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

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

Connect an agent — have() is free.