SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1807.10781 · 2018

Machine learning method for state preparation and gate synthesis on photonic quantum computers

arXiv · PDF · Open in the Atlas

Code that ran

6 of 11 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 6 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/1807.10781.json · badge: /api/ran/1807.10781.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
XanaduAI/quantum-learning canonical (classifier label)
classifier basis: census
6 ran · 5 no recorded run
FunctionStatusWhere it lives
hex_GKP Ran
ran on a synthesized input
XanaduAI/quantum-learning/learner/states.py
code served (permissive licence) · get_code("8f2af5e7af3a07be")
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 1, dtype family float, shape (8,) 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 = {
    "mu": 0,
    "d": 3,
    "delta": 0.5,
    "cutoff": 8,
    "nmax": 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (8,) — shape (8,) 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
parse_arguments Ran
ran on a synthesized input
XanaduAI/quantum-learning/gate_synthesis.py
code served (permissive licence) · get_code("9d21c843d38ac649")
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 os
import argparse
import json
import tempfile

# Create a temporary directory for output
temp_dir = tempfile.mkdtemp()

defaults = {
    'name': 'test_simulation',
    'out_dir': temp_dir,
    'reps': 100,
    'target_params': json.dumps({'param1': 0.5, 'param2': 0.3}),
    'cutoff': 10,
    'gate_cutoff': 8,
    'depth': 3,
    'penalty_strength': 1
}

ARGS = {
    'defaults': defaults
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
parse_arguments Ran
ran on a synthesized input
XanaduAI/quantum-learning/state_learner.py
code served (permissive licence) · get_code("ff2bc666de3f55a0")
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 os
import argparse
import json

# Create a minimal defaults dictionary with all required keys
defaults = {
    'name': 'test_simulation',
    'out_dir': '/tmp/test_output',
    'reps': 100,
    'state_params': {'param1': 0.5, 'param2': 0.3},
    'cutoff': 10,
    'depth': 3,
    'penalty_strength': 1
}

ARGS = {
    'defaults': defaults
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
plot_cost Ran
ran on a synthesized input
XanaduAI/quantum-learning/learner/plots.py
code served (permissive licence) · get_code("918d02ce8c865757")
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 tuple, ndim 1, 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 torch
import numpy as np
import matplotlib.pyplot as plt

torch.manual_seed(0)

# Create a simple cost_progress array
# The function uses this array in ax.plot(), so it needs to be array-like
cost_progress = np.array([10.5, 9.2, 8.1, 7.3, 6.8, 6.2, 5.9, 5.5, 5.2, 5.0])

color = '#3f9b0b'

ARGS = {
    'cost_progress': cost_progress,
    'color': color
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
single_photon Ran
ran on a synthesized input
XanaduAI/quantum-learning/learner/states.py
code served (permissive licence) · get_code("ba6aa0d5fc7759cd")
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 1, dtype family float, shape (5,) 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 = {
    "cutoff": 5
}
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 1, dtype family float, shape (5,) — shape (5,) 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
wigner Ran
ran on a synthesized input
XanaduAI/quantum-learning/learner/plots.py
code served (permissive licence) · get_code("cf26b7cab8951f14")
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 tuple, ndim 3, 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

# Create a small density matrix (rho) - 4x4 matrix representing a quantum state
# This needs to be a valid density matrix (Hermitian, positive semidefinite)
cutoff = 4
rho = np.array([
    [0.5 + 0.0j, 0.1 - 0.1j, 0.05 + 0.05j, 0.0 + 0.0j],
    [0.1 + 0.1j, 0.3 + 0.0j, 0.1 - 0.05j, 0.02 + 0.0j],
    [0.05 - 0.05j, 0.1 + 0.05j, 0.15 + 0.0j, 0.05 + 0.0j],
    [0.0 + 0.0j, 0.02 + 0.0j, 0.05 + 0.0j, 0.05 + 0.0j]
], dtype=complex)

# Create discretized x and p quadrature value arrays
xvec = np.linspace(-3, 3, 5)
pvec = np.linspace(-3, 3, 6)

ARGS = {
    "rho": rho,
    "xvec": xvec,
    "pvec": pvec
}
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 tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
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
ON Not yet run
unverified (harvested, no recorded run)
XanaduAI/quantum-learning/learner/states.py
code served (permissive licence) · get_code("8eb0770ef5daa2e4")
How it ran

no invocation recorded.

cat_state Not yet run
unverified (harvested, no recorded run)
XanaduAI/quantum-learning/state_learner.py
code served (permissive licence) · get_code("f050e2638b889e61")
How it ran

no invocation recorded.

real_unitary_overlaps Not yet run
unverified (harvested, no recorded run)
XanaduAI/quantum-learning/gate_synthesis.py
code served (permissive licence) · get_code("07c26eb3c87d3a0b")
How it ran

no invocation recorded.

state_fidelity Not yet run
unverified (harvested, no recorded run)
XanaduAI/quantum-learning/state_learner.py
code served (permissive licence) · get_code("70829daa0cbe6342")
How it ran

no invocation recorded.

wigner_contour_plot Not yet run
unverified (harvested, no recorded run)
XanaduAI/quantum-learning/learner/plots.py
code served (permissive licence) · get_code("d590768d59081430")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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 11 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-23.

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 show how techniques from machine learning and optimization can be used to find circuits of photonic quantum computers that perform a desired transformation between input and output states. In the simplest case of a single input state, our method discovers circuits for preparing a desired quantum state. In the more general case of several input and output relations, our method obtains circuits that reproduce the action of a target unitary transformation. We use a continuous-variable quantum neural network as the circuit architecture. The network is composed of several layers of optical gates with variable parameters that are optimized by applying automatic differentiation using the TensorFlow backend of the Strawberry Fields photonic quantum computer simulator. We demonstrate the power and versatility of our methods by learning how to use short-depth circuits to synthesize single photons, Gottesman-Kitaev-Preskill states, NOON states, cubic phase gates, random unitaries, cross-Kerr interactions, as well as several other states and gates. We routinely obtain high fidelities above 99\% using short-depth circuits, typically consisting of a few hundred gates. The circuits are obtained automatically by simply specifying the target state or gate and running the optimization algorithm.

For agents

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

get_harvested_code_for_paper("1807.10781")
get_code_for_paper("1807.10781")
have("1807.10781")

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

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

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

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

Connect an agent — have() is free.