SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1804.04168 · 2018

Differentiable Learning of Quantum Circuit Born Machine

arXiv · PDF · Open in the Atlas

Code that ran

8 of 16 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 8 have no contract verdict; 0 failures of our instrument; 8 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/1804.04168.json · badge: /api/ran/1804.04168.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
GiggleLiu/QuantumCircuitBornMachine canonical (classifier label)
classifier basis: census
8 ran · 8 no recorded run
FunctionStatusWhere it lives
chowliu_tree Ran
ran on a synthesized input
GiggleLiu/QuantumCircuitBornMachine/qcbm/structure.py
code served (permissive licence) · get_code("c2c330dc6da3d838")
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, ndim 2, dtype family int; 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 empirical distribution as input
# The function expects a 1D array of probabilities/counts
# num_bit will be calculated as int(np.round(np.log(len(pdata)) / np.log(2)))
# So if len(pdata) = 16, num_bit = 4
# Let's create pdata with length that gives a reasonable num_bit
pdata = np.array([0.1, 0.15, 0.2, 0.05, 0.12, 0.08, 0.14, 0.09, 
                   0.03, 0.02, 0.01, 0.04, 0.06, 0.07, 0.02, 0.01], dtype=np.float64)

ARGS = {
    'pdata': pdata
}
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 list, ndim 2, dtype family int — a list 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
digit_basis Ran
ran on a synthesized input
GiggleLiu/QuantumCircuitBornMachine/qcbm/dataset.py
code served (permissive licence) · get_code("8dab2e5441127d0c")
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 int, shape (64,) 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 digit_basis takes a geometry parameter
# Looking at the body: it uses np.prod(geometry) to get num_bit
# geometry should be a tuple or array-like of integers

geometry = (2, 3)  # A small geometry tuple that will give num_bit=6, M=64

ARGS = {
    "geometry": geometry
}
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 int, shape (64,) — shape (64,) 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
gaussian_pdf Ran
ran on a synthesized input
GiggleLiu/QuantumCircuitBornMachine/qcbm/dataset.py
code served (permissive licence) · get_code("89836d46508787bd")
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 (16,) 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

# Analyze the function:
# gaussian_pdf takes:
# - geometry: used in digit_basis, passed to np.prod(geometry)
#   This should be a tuple/array of integers representing dimensions
# - mu: mean of the gaussian, used in arithmetic with x (array)
# - sigma: standard deviation, used in arithmetic with x (array)

# geometry should be a tuple/list of integers
# The function computes 2^(product of geometry), so keep it small
geometry = (2, 2)  # product is 4, so 2^4 = 16 elements

# mu should be a scalar that makes sense as a mean
# x ranges from 0 to 2^num_bit - 1, so mu around middle is reasonable
mu = 8.0

# sigma should be a positive scalar for standard deviation
sigma = 2.0

ARGS = {
    "geometry": geometry,
    "mu": mu,
    "sigma": sigma,
}
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 (16,) — shape (16,) 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
mix_rbf_kernel Ran
ran on a synthesized input
GiggleLiu/QuantumCircuitBornMachine/qcbm/mmd.py
code served (permissive licence) · get_code("c15932888b8cf743")
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, 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

# Test case 1: non-binary mode with small arrays
x_nonbinary = np.array([1.0, 2.0, 3.0])
y_nonbinary = np.array([1.5, 2.5])
sigma_list_nonbinary = [0.5, 1.0, 2.0]
is_binary_false = False

ARGS = {
    "x": x_nonbinary,
    "y": y_nonbinary,
    "sigma_list": sigma_list_nonbinary,
    "is_binary": is_binary_false
}
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, 2) — shape (3, 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
nearest_neighbor Ran
ran on a synthesized input
GiggleLiu/QuantumCircuitBornMachine/qcbm/structure.py
code served (permissive licence) · get_code("2d0e7e62df60ffa6")
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, ndim 2, dtype family int; 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

# Test with 2D geometry (square lattice 3x4)
geometry_2d = (3, 4)

# Test with 1D geometry
geometry_1d = (5,)

# Choose one for the main ARGS
ARGS = {
    "geometry": (3, 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 list, ndim 2, dtype family int — a list 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
packnbits Ran
ran on a synthesized input
GiggleLiu/QuantumCircuitBornMachine/qcbm/utils.py
code served (permissive licence) · get_code("2fd9cd9af463a0e3")
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 (2, 1) 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

# Create a small binary array to test packnbits
# Shape: (2, 8) - 2 rows, 8 bits per row
arr = np.array([
    [1, 0, 1, 1, 0, 0, 1, 0],
    [0, 1, 0, 1, 1, 0, 0, 1]
], dtype=int)

# axis=-1 means pack along the last axis (the 8 bits)
axis = -1

ARGS = {
    "arr": arr,
    "axis": axis
}
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 (2, 1) — shape (2, 1) 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
random_tree Ran
ran on a synthesized input
GiggleLiu/QuantumCircuitBornMachine/qcbm/structure.py
code served (permissive licence) · get_code("fc1adc75bcf655c2")
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, ndim 2, dtype family int; 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

ARGS = {
    "num_bit": 5
}
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 list, ndim 2, dtype family int — a list 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
sample_from_prob Ran
ran on a synthesized input
GiggleLiu/QuantumCircuitBornMachine/qcbm/utils.py
code served (permissive licence) · get_code("cc49b9c021f56bea")
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 int, shape (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

np.random.seed(0)

# x: array-like collection of items to sample from
x = np.array([10, 20, 30, 40, 50])

# pl: probability distribution (will be normalized in the function)
pl = np.array([0.1, 0.2, 0.3, 0.2, 0.2])

# num_sample: number of samples to draw
num_sample = 3

ARGS = {
    "x": x,
    "pl": pl,
    "num_sample": num_sample
}
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 int, shape (3,) — shape (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
binary_basis Not yet run
unverified (harvested, no recorded run)
GiggleLiu/QuantumCircuitBornMachine/qcbm/dataset.py
code served (permissive licence) · get_code("488057d9b1a2e184")
How it ran

no invocation recorded.

get_demo_circuit Not yet run
unverified (harvested, no recorded run)
GiggleLiu/QuantumCircuitBornMachine/qcbm/blocks.py
code served (permissive licence) · get_code("e83f43fa53ec0261")
How it ran

no invocation recorded.

load_barstripe Not yet run
unverified (harvested, no recorded run)
GiggleLiu/QuantumCircuitBornMachine/qcbm/testsuit.py
code served (permissive licence) · get_code("b4dd9f32a054c9e4")
How it ran

no invocation recorded.

load_gaussian Not yet run
unverified (harvested, no recorded run)
GiggleLiu/QuantumCircuitBornMachine/qcbm/testsuit.py
code served (permissive licence) · get_code("c8400675a9a26354")
How it ran

no invocation recorded.

rx Not yet run
unverified (harvested, no recorded run)
GiggleLiu/QuantumCircuitBornMachine/qcbm/qclibs.py
code served (permissive licence) · get_code("f271a28e0e68712d")
How it ran

no invocation recorded.

ry Not yet run
unverified (harvested, no recorded run)
GiggleLiu/QuantumCircuitBornMachine/qcbm/qclibs.py
code served (permissive licence) · get_code("883c7a3b8701ce37")
How it ran

no invocation recorded.

rz Not yet run
unverified (harvested, no recorded run)
GiggleLiu/QuantumCircuitBornMachine/qcbm/qclibs.py
code served (permissive licence) · get_code("d5d4ec4b42991282")
How it ran

no invocation recorded.

unpacknbits Not yet run
unverified (harvested, no recorded run)
GiggleLiu/QuantumCircuitBornMachine/qcbm/utils.py
code served (permissive licence) · get_code("70bb2377321f84ea")
How it ran

no invocation recorded.

Also present in other papers' code

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

Quantum circuit Born machines are generative models which represent the probability distribution of classical dataset as quantum pure states. Computational complexity considerations of the quantum sampling problem suggest that the quantum circuits exhibit stronger expressibility compared to classical neural networks. One can efficiently draw samples from the quantum circuits via projective measurements on qubits. However, similar to the leading implicit generative models in deep learning, such as the generative adversarial networks, the quantum circuits cannot provide the likelihood of the generated samples, which poses a challenge to the training. We devise an efficient gradient-based learning algorithm for the quantum circuit Born machine by minimizing the kerneled maximum mean discrepancy loss. We simulated generative modeling of the Bars-and-Stripes dataset and Gaussian mixture distributions using deep quantum circuits. Our experiments show the importance of circuit depth and gradient-based optimization algorithm. The proposed learning algorithm is runnable on near-term quantum device and can exhibit quantum advantages for generative modeling.

For agents

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

get_harvested_code_for_paper("1804.04168")
get_code_for_paper("1804.04168")
have("1804.04168")

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

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

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

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

Connect an agent — have() is free.