SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1605.05775 · 2016

Supervised Learning with Quantum-Inspired Tensor Networks

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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; 1 failure of our instrument; 2 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/1605.05775.json · badge: /api/ran/1605.05775.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
jemisjoky/torchmps community (classifier label)
classifier basis not recorded on the link
7 ran · 2 no recorded run
FunctionStatusWhere it lives
batch_broadcast Ran
ran on a synthesized input
jemisjoky/torchmps/torchmps/utils2.py
code served (permissive licence) · get_code("7b9df8e53d1a0e52")
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. 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

torch.manual_seed(0)

# Create test tensors with distinct batch and non-batch dimensions
# Tensor 1: batch shape (2, 3), non-batch shape (4,)
tensor1 = torch.randn(2, 3, 4)

# Tensor 2: batch shape (3,), non-batch shape (5, 6)
tensor2 = torch.randn(3, 5, 6)

# Tensor 3: batch shape (1, 3), non-batch shape (7,)
tensor3 = torch.randn(1, 3, 7)

tens_list = [tensor1, tensor2, tensor3]
num_nonbatch = [1, 2, 1]

ARGS = {
    "tens_list": tens_list,
    "num_nonbatch": num_nonbatch,
}
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 tuple — a tuple 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
bundle_tensors Ran
ran on a synthesized input
jemisjoky/torchmps/torchmps/utils2.py
code served (permissive licence) · get_code("7950b65a7130fbd0")
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 3, dtype family float, shape (3, 2, 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 torch
from torch import Tensor

torch.manual_seed(0)

# Test case 1: Sequence of tensors with same shape
tensor1 = torch.randn(2, 4)
tensor2 = torch.randn(2, 4)
tensor3 = torch.randn(2, 4)
tensors_same_shape = [tensor1, tensor2, tensor3]

# Test case 2: Single tensor (already a Tensor, not a sequence)
single_tensor = torch.randn(2, 4)

# Test case 3: Sequence of tensors with different shapes
tensor_diff1 = torch.randn(2, 4)
tensor_diff2 = torch.randn(3, 5)
tensors_diff_shape = [tensor_diff1, tensor_diff2]

# Choose the main test case: sequence of same-shaped tensors
ARGS = {
    "tensors": tensors_same_shape,
    "dim": 0
}
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 3, dtype family float, shape (3, 2, 4) — shape (3, 2, 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
init_mlp_embed Ran
ran on a synthesized input
jemisjoky/torchmps/torchmps/embeddings.py
code served (permissive licence) · get_code("9a1b40162ff1c63e")
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 TrainableEmbedding. 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
from torch import nn

torch.manual_seed(0)

# Define the arguments for init_mlp_embed
output_dim = 8
num_layers = 2
hidden_dims = [16]
data_domain = None  # Will use default unit_interval

ARGS = {
    "output_dim": output_dim,
    "num_layers": num_layers,
    "hidden_dims": hidden_dims,
    "data_domain": data_domain,
}
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 TrainableEmbedding — a TrainableEmbedding output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TrainableEmbedding 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
init_tensor Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jemisjoky/torchmps/torchmps/utils.py
code served (permissive licence) · get_code("f83a05b4d32e7e40")
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 4, dtype family float, shape (3, 4, 5, 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 torch

torch.manual_seed(0)

# The function takes:
# - shape: tuple of ints describing tensor shape
# - bond_str: string with unique characters, must contain 'l' and 'r' for certain init methods
# - init_method: string or tuple describing initialization

# Test case 1: random_eye initialization
# Shape is 4D tensor, bond_str has 'l' and 'r' plus other indices
shape = (3, 4, 5, 2)
bond_str = "lrxy"  # must have 'l' and 'r', all unique
init_method = ('random_eye', 1e-3)

ARGS = {
    "shape": shape,
    "bond_str": bond_str,
    "init_method": init_method,
}
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 4, dtype family float, shape (3, 4, 5, 2) — shape (3, 4, 5, 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
onehot Ran
ran on a synthesized input
jemisjoky/torchmps/torchmps/utils.py
code served (permissive licence) · get_code("d22a951c7ff816cf")
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 (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 torch

torch.manual_seed(0)

# Create a small batch of labels
# labels should be a sequence/list of integers in range [0, max_value-1]
labels = [0, 2, 1, 3]

# max_value should be an integer larger than any label value
max_value = 4

ARGS = {
    "labels": labels,
    "max_value": max_value,
}
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 (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
onehot_embed Ran
ran on a synthesized input
jemisjoky/torchmps/torchmps/embeddings.py
code served (permissive licence) · get_code("f1717c4b3a7545dd")
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 3, dtype family float, shape (2, 4, 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 torch

torch.manual_seed(0)

# Construct arguments for onehot_embed function
# The function takes:
# - tensor: a tensor containing categorical indices
# - emb_dim: the embedding dimension size

# Create a small tensor with categorical indices
# Shape: (2, 4) - batch of 2, sequence length 4
# Values should be valid indices (0 to emb_dim-1)
tensor = torch.randint(0, 5, (2, 4))

# Embedding dimension
emb_dim = 5

ARGS = {
    "tensor": tensor,
    "emb_dim": emb_dim,
}
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 3, dtype family float, shape (2, 4, 5) — shape (2, 4, 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
trig_embed Ran
ran on a synthesized input
jemisjoky/torchmps/torchmps/embeddings.py
code served (permissive licence) · get_code("e6176d2c30b420f2")
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 3, dtype family float, shape (2, 4, 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 torch
from math import sqrt, pi

torch.manual_seed(0)

# The function takes data (a tensor with values in unit interval [0,1])
# and emb_dim (embedding dimension)
# It performs trigonometric embedding operations on the data tensor

# Create a small data tensor with values in [0, 1]
data = torch.rand(2, 4)  # batch_size=2, feature_dim=4, values in [0,1]

# Define the arguments dictionary
ARGS = {
    "data": data,
    "emb_dim": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 2) — shape (2, 4, 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
batch_to Not yet run
unverified (harvested, no recorded run)
jemisjoky/torchmps/torchmps/utils2.py
code served (permissive licence) · get_code("779b51d23d61621d")
How it ran

no invocation recorded.

svd_flex Not yet run
unverified (harvested, no recorded run)
jemisjoky/torchmps/torchmps/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from raghavian/mltn, is pointer only (licence: NONE) · get_code("144c7ce7d4014523")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from raghavian/mltn, and GitHub detected no licence in that repository when it was checked. 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. No invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 6 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
init_tensor 2 other papers
2 later
2004.10076 (2020-04)
Tensor Networks for Medical Image Classification
2011.06982 (2020-11)
Multi-layered tensor networks for image classification
svd_flex 2 other papers
2 later
2004.10076 (2020-04)
Tensor Networks for Medical Image Classification
2011.06982 (2020-11)
Multi-layered tensor networks for image classification
onehot 1 other paper
1 later
2004.10076 (2020-04)
Tensor Networks for Medical Image Classification

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

Tensor networks are efficient representations of high-dimensional tensors which have been very successful for physics and mathematics applications. We demonstrate how algorithms for optimizing such networks can be adapted to supervised learning tasks by using matrix product states (tensor trains) to parameterize models for classifying images. For the MNIST data set we obtain less than 1% test set classification error. We discuss how the tensor network form imparts additional structure to the learned model and suggest a possible generative interpretation.

For agents

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

get_harvested_code_for_paper("1605.05775")
get_code_for_paper("1605.05775")
have("1605.05775")

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

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

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

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

Connect an agent — have() is free.