SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2501.05906 · AAAI · 2025

Q-MAML: Quantum Model-Agnostic Meta-Learning for Variational Quantum Algorithms

Shiho Kim, Junyong Lee, Jeihee Cho

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 5 have no contract verdict; 0 failures 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/2501.05906.json · badge: /api/ran/2501.05906.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
JayC1208/Q-MAML canonical (classifier label)
classifier basis not recorded on the link
5 ran · 5 no recorded run
FunctionStatusWhere it lives
convert_array Ran
ran on a synthesized input
JayC1208/Q-MAML/data.py
code served (permissive licence) · get_code("d7eaf327f929283a")
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 (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
import numpy as np

torch.manual_seed(0)

# The function takes a numpy array and converts it to a torch tensor
# If the array is float64, it converts to float32; otherwise keeps original dtype

# Test case 1: float64 array (should convert to float32)
array_float64 = np.array([[1.5, 2.5, 3.5, 4.5],
                          [5.5, 6.5, 7.5, 8.5]], dtype=np.float64)

ARGS = {
    "array": array_float64
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (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
convert_molecule Ran
ran on a synthesized input
JayC1208/Q-MAML/data.py
code served (permissive licence) · get_code("7d54b1291e82c7e8")
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 (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
import numpy as np

torch.manual_seed(0)

# The function takes an array parameter and converts it to a torch tensor
# It checks if the input is float64 and preserves that dtype, otherwise uses default

# Test case 1: numpy array with float64 dtype
array_float64 = np.array([[1.0, 2.0, 3.0, 4.0],
                          [5.0, 6.0, 7.0, 8.0]], dtype=np.float64)

ARGS = {
    "array": array_float64
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (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
create_neel_st Ran
ran on a synthesized input
JayC1208/Q-MAML/circuit.py
code served (permissive licence) · get_code("1096ab8cd530b599")
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
import math

def create_neel_st(num_qubits):
    assert num_qubits % 2 == 0
    st_01 = np.array([0.0, 1.0, 0.0, 0.0])
    st_10 = np.array([0.0, 0.0, 1.0, 0.0])
    st_01_N_2 = np.array([1.0])
    st_10_N_2 = np.array([1.0])
    for i in range(num_qubits // 2):
        st_01_N_2 = np.kron(st_01_N_2, st_01)
        st_10_N_2 = np.kron(st_10_N_2, st_10)
    return (st_01_N_2 + st_10_N_2) / math.sqrt(2)

ARGS = {
    "num_qubits": 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 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
create_neel_st_2d Ran
ran on a synthesized input
JayC1208/Q-MAML/utils.py
code served (permissive licence) · get_code("3a9e71d41d2c1664")
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 (4096,) 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
import math

# The function create_neel_st_2d takes two integer parameters: Lx and Ly
# Lx must be even (asserted in the function)
# The function constructs a 2D Néel state superposition

# Small valid values for a 2D lattice
Lx = 4  # Must be even
Ly = 3

ARGS = {
    "Lx": Lx,
    "Ly": Ly,
}
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 (4096,) — shape (4096,) 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
custom_collate_fn Ran
ran on a synthesized input
JayC1208/Q-MAML/data.py
code served (permissive licence) · get_code("a4c964558c5b148c")
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)

# Create sample data matching the expected structure
# The function expects a list of dicts with 'x' and 'y' keys
samples = [
    {
        'x': np.random.randn(4, 3).astype(np.float64),
        'y': np.random.randn(2, 5).astype(np.float64)
    },
    {
        'x': np.random.randn(4, 3).astype(np.float64),
        'y': np.random.randn(2, 5).astype(np.float64)
    }
]

ARGS = {
    'samples': samples
}
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
cost Not yet run
unverified (harvested, no recorded run)
JayC1208/Q-MAML/mol_adaptation.py
code served (permissive licence) · get_code("128ac60541bfa75b")
How it ran

no invocation recorded.

train Not yet run
unverified (harvested, no recorded run)
JayC1208/Q-MAML/mol_pretrain.py
code served (permissive licence) · get_code("a1df49500665d958")
How it ran

no invocation recorded.

train Not yet run
unverified (harvested, no recorded run)
JayC1208/Q-MAML/xyz_pretrain.py
code served (permissive licence) · get_code("2d25e9e17df1e84f")
How it ran

no invocation recorded.

validation Not yet run
unverified (harvested, no recorded run)
JayC1208/Q-MAML/mol_pretrain.py
code served (permissive licence) · get_code("ff838c924b39c15f")
How it ran

no invocation recorded.

validation Not yet run
unverified (harvested, no recorded run)
JayC1208/Q-MAML/xyz_pretrain.py
code served (permissive licence) · get_code("7e39ffd238e68366")
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

In the Noisy Intermediate-Scale Quantum (NISQ) era, using variational quantum algorithms (VQAs) to solve optimization problems has become a key application. However, these algorithms face significant challenges, such as choosing an effective initial set of parameters and the limited quantum processing time that restricts the number of optimization iterations. In this study, we introduce a new framework for optimizing parameterized quantum circuits (PQCs) that employs a classical optimizer, inspired by Model-Agnostic Meta-Learning (MAML) technique. This approach aim to achieve better parameter initialization that ensures fast convergence. Our framework features a classical neural network, called Learner, which interacts with a PQC using the output of Learner as an initial parameter. During the pre-training phase, Learner is trained with a meta-objective based on the quantum circuit cost function. In the adaptation phase, the framework requires only a few PQC updates to converge to a more accurate value, while the learner remains unchanged. This method is highly adaptable and is effectively extended to various Hamiltonian optimization problems. We validate our approach through experiments, including distribution function mapping and optimization of the Heisenberg XYZ Hamiltonian. The result implies that the Learner successfully estimates initial parameters that generalize across the problem space, enabling fast adaptation.

For agents

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

get_harvested_code_for_paper("2501.05906")
get_code_for_paper("2501.05906")
have("2501.05906")

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

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

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

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

Connect an agent — have() is free.