REVIEW 3 major objections 5 minor 1 cited by
Circuit Partitioning Using Large Language Models for Quantum Compilation and Simulations
T0 review · 3 major / 5 minor · reviewed 2026-08-15 · deepseek-v4-flash
Pith's one-line read A fine-tuned large language model reproduces the quick partition of quantum circuits 53.4% of the time, while off-the-shelf models score 0%.
desk verdict Modest but real result: LoRA fine-tuned LLMs imitate BQSKit quick partition at 53% exact match; the 100% equivalence claim is unverified as written. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The carrying mechanism is the quick partition algorithm, a one-pass greedy procedure that walks through the gates in execution order and assigns each gate to the earliest active block that shares its qubits and has room, inserting barrier instructions between blocks. To make the task learnable, the paper trains on a reduced form of QASM: comments and measurement instructions are removed, floating-point parameters are replaced by symbolic placeholders, and circuits are capped at 6000 tokens. The fine-tuning uses low-rank adaptation on the attention and feed-forward weights, with prompts that specify the goal ('create barriers for efficient processing') and an end marker ('End of barrier creation') so that extra generated text can be discarded. Equivalence of non-matching outputs is checked by removing the inserted barriers and recalculating the operation cycle of the circuit.
What would settle it
Restore the original floating-point parameters and measurement instructions to the held-out circuits, run the fine-tuned model on them, and compare exact-match accuracy; if the rate falls well below 53.4%, the token simplification was load-bearing. Separately, verify the claimed 100% equivalence with an independent exact statevector comparison; a single counterexample would refute the equivalence claim.
Extended reading notes
Core claim
On its own terms, the paper claims that a carefully fine-tuned open-weight large language model can imitate the quick partition algorithm for quantum circuits. The best configuration reached 53.39% exact-match accuracy on held-out circuits, while the same model under one-shot and five-shot prompting produced no correct partitions at all: it tended to repeat the input code. Accuracy tracked model capacity, from 15.45% for the smallest tested model to 53.39% for the largest, and the paper reports that every generated partition, whether or not it matched the reference, was equivalent to the original circuit in 100% of instances under the paper's equivalence check. The conclusion is that LLMs can perform a non-trivial structural manipulation of quantum code if they are fine-tuned for it.
Load-bearing premise
The load-bearing premise is that the simplified, symbol-only, measurement-free circuits used for training and testing preserve the difficulty of the real partitioning task, and that the paper's equivalence check correctly detects whether two circuits are semantically identical.
Editorial extensions
If this is right
- Fine-tuning, not few-shot prompting, is what enables an LLM to learn a circuit transformation such as partitioning; one-shot and five-shot setups simply reproduce the input.
- Exact-match accuracy scales with model capacity among the tested models, rising from 15.45% for the smallest model to 53.39% for the largest.
- A partitioned output that differs from quick partition can still preserve the original circuit's behavior, which means the model has learned something beyond memorizing the reference output.
- The same input/output fine-tuning pipeline can be pointed at other partitioners or at a downstream objective such as CNOT-gate reduction, because the method only needs paired circuit text.
Reading between the lines
- If the symbolic token replacement is what makes the task learnable, then the model is likely learning gate connectivity and dependency structure rather than numeric rotation angles; fine-tuning on un-symbolized circuits would test this directly.
- If the 100% equivalence claim survives a stronger oracle such as exact statevector comparison, then an LLM partitioner could be used as a fast preprocessing front-end for synthesis tools even when it does not reproduce the reference partition.
- The roughly 50% exact-match ceiling suggests the model has learned the algorithm's overall shape but not its tie-breaking rules; augmenting training data with per-gate partition assignments, not just final barrier placement, could close the gap.
- A training objective that rewards semantic equivalence and downstream gate count, rather than exact match to the heuristic, could let the LLM discover partitions that improve on the quick partition algorithm it was taught.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper studies whether large language models can learn to mimic the quick partition heuristic from the Berkeley Quantum Synthesis Toolkit for quantum circuit partitioning. The authors construct a dataset from MQT Bench by removing comments and measurement instructions, replacing floating-point parameters with symbolic tokens, and keeping only circuits whose token count is below 6000. They then fine-tune several open-source LLMs (Llama-3.1-8B/70B, Mistral-7B, CodeLlama-7B, Phi-3-mini) with LoRA. Off-the-shelf models with 1-shot and 5-shot prompting fail entirely (0% exact match accuracy), whereas the best fine-tuned model (Llama-3.1-70B) achieves 53.4% exact match with the quick partition output on a held-out test set. The paper additionally claims that for the non-matching outputs, the partitioned circuit is equivalent to the original circuit in 100% of cases, verified by 'removing the partitions and recalculating the operation cycle.'
Significance. If the central results hold, the paper provides a useful data point for using fine-tuned open-source LLMs as components of a quantum compilation toolchain, and it contributes the first explicit algorithmic description of BQSKit's quick partition (Algorithm 1). The multi-model comparison and the honest reporting that few-shot prompting yields 0% exact match are strengths. However, the significance is limited by two gaps: the evaluation is performed on a heavily preprocessed representation (symbolic parameters, no measurements, <6000 tokens) without evidence of transfer to real QASM code, and the 100% equivalence claim for non-matching outputs rests on an unspecified 'operation cycle' check. If a rigorous equivalence check were provided, the paper could be a solid empirical contribution; as it stands, the advertised safety property is not established.
major comments (3)
- [Section IV (and abstract/conclusion)] The 100% equivalence claim is not supported by the described verification. The paper states only 'The equivalence is checked by removing the partitions and recalculating the operation cycle.' As written, this does not establish unitary equivalence: if 'operation cycle' is a scheduling-depth metric, two circuits with different unitaries can still have equal operation cycles, and two circuits with the same unitary can differ in depth. Moreover, removing barriers and appending blocks can reorder gates on disjoint qubits; such a reordering is unitary-preserving in that specific case, but the paper never states this or provides a formal check. Because the conclusion ('even imperfect partition generation is safe') is explicitly built on this 100% claim, and no code or data artifact is released to reproduce it, this is a load-bearing gap. The authors should either (a) define 'operation cycle' precisely and justify that equality of operation cycles plus the specific barrier-removal operation implies unitary equivalence, or (b) replace the claim with a direct unitary-equivalence check (e.g., comparing the unitary matrices of the original and partitioned circuits for all basis states on the test set) and report the resulting counts.
- [Section III-A] The preprocessing replaces floating-point parameters with symbols, removes measurement instructions, and excludes circuits above 6000 tokens. These transformations change the task: the model never sees actual measurement operations or the original floating-point constants, so the reported 53.4% accuracy and the 100% equivalence are measured on a transformed representation, not on the original QASM circuits. The paper acknowledges the token constraint but does not justify that the symbolic substitution is structure-preserving for the partition task, nor that the absence of measurements does not affect the validity of the 'equivalent to the original code' claim. Please provide either an argument and a small-scale validation on original circuits (e.g., on the circuits that fit within the context window) or explicitly reframe all claims as applying to the preprocessed representation.
- [Section IV, Tables I and II] The exact-match accuracy numbers are reported without the number of test circuits, confidence intervals, or information about how the 80/20 split was randomized. For instance, Llama-3.1-8B (51.69%) and Mistral-7B (49.09%) differ by 2.6 percentage points; without knowing the test-set size, it is impossible to tell whether this difference is meaningful. Table I is also ambiguous: the 'Correct Code' column reports 95% and 100% for the 1-shot and 5-shot baselines, yet the accuracy is 0%; this is because the models simply repeat the input, so 'correct' there must mean 'valid QASM text', not 'correctly partitioned.' Please state the test-set size, report statistical significance or exact counts, and rename the columns to avoid conflating 'valid code' with 'correct partition.'
minor comments (5)
- [Section II] Section II contains a full duplicated copy of the Related Work subsection (including a second Figure 1 and its caption), with typos such as 'Quest uses the scan partitioner.' This is a formatting error that should be fixed.
- [Table I] The 'Repeated Code' column for the 1-shot row reads '95% 95% 0%;' this appears to be a typo. Also, the caption and the text should clarify that 'Correct Code' in the table means syntactically valid QASM, not the correct partition.
- [Algorithm 1] In lines 13-14 of Algorithm 1, 'q← locations of qubits in SQ' is set but never used after line 15, and the operation 'Block additions to qubit q' is a side effect without a corresponding pseudocode representation. Please rewrite the algorithm so that the state update is explicit.
- [Throughout] 'over-the-shelf' should be 'off-the-shelf' (abstract, Section I); 'ChatGTP-4o mini' should be 'ChatGPT-4o mini' (Section II-B); reference [4] 'M. AI' should be 'Meta AI' and reference [27] 'M. AI' should be 'Mistral AI'.
- [Section IV] The sentence 'The 1-shot and 5-shot approaches produce the correct code 95% and 100% of the time respectively, but this comparison with our proposed approach is without merit as the LLM simply repeats the correct input' is self-contradictory and should be rephrased to say that the models echo the input rather than producing a partition.
Circularity Check
No circularity: the fine-tuning accuracy is measured on held-out circuits against an external reference, and no load-bearing self-citation or definitional reduction was found.
full rationale
The paper's central empirical claim is that a LoRA-fine-tuned LLM reproduces the output of BQSKit's quick partitioner on held-out circuits. The training/test split is explicit: 80% of token-eligible circuits were used for fine-tuning and 20% were held out, and accuracy is defined as exact agreement with the quick-partitioner output on those held-out circuits. No test-set information is used to fit the model, so the 53.4% accuracy figure is an external measurement rather than a fitted input renamed as a result. The few-shot comparison is also legitimate: the paper reports that off-the-shelf models simply repeat the input and therefore achieve 0% correct partitions, which is an empirical observation about generalization, not a circular construction. The paper's secondary claim that non-matching generated circuits are equivalent to the original circuit in 100% of instances is supported only by an underspecified check, described as 'removing the partitions and recalculating the operation cycle.' That is a correctness or verification concern, not circularity, because the equivalence claim is not derived from the training target or from a self-citation; it is a separate assertion whose evidence is currently unclear. No load-bearing self-citation chain appears in the derivation: the BQSKit reference supplies the external partitioner used to build labels, and the LLM references are external model sources. The introduction's speculative framing about transforming quantum computing is overclaiming relative to the measured results, but overclaiming is not circular reasoning. Therefore, no circular step meeting the required evidentiary standard can be identified, and the appropriate score is 0.
Assumptions & free parameters
free parameters (6)
- LoRA rank r =
8
- LoRA scaling factor =
32
- LoRA dropout =
0.05
- Learning rate =
1e-4
- Epochs =
10
- Max token size =
6000
assumptions (3)
- domain assumption Quick partition algorithm as described in Algorithm 1 is a faithful description of BQSKit's quick partitioner.
- domain assumption The transformed symbolic representation of QASM, where floating-point numbers are replaced by symbols and measurement instructions are removed, retains enough information for the partitioning task.
- standard math LoRA fine-tuning preserves or sufficiently adapts the model's capability for this task.
Cite this review
Pith. "Pith review of Circuit Partitioning Using Large Language Models for Quantum Compilation and Simulations." pith.science (2026). https://pith.science/paper/46ULQL7Q
@misc{pith2026250507711,
author = {Pith},
title = {Pith review of: Circuit Partitioning Using Large Language Models for Quantum Compilation and Simulations},
year = {2026},
howpublished = {\url{https://pith.science/paper/46ULQL7Q}},
note = {Machine review of arXiv:2505.07711}
}
read the original abstract
We are in the midst of the noisy intermediate-scale quantum (NISQ) era, where quantum computers are limited by noisy gates, some of which are more error-prone than others and can render the final computation incomprehensible. Quantum circuit compilation algorithms attempt to minimize these noisy gates when mapping quantum algorithms onto quantum hardware but face computational challenges that restrict their application to circuits with no more than 5-6 qubits, necessitating the need to partition large circuits before the application of noisy quantum gate minimization algorithms. The existing generation of these algorithms is heuristic in nature and does not account for downstream gate minimization tasks. Large language models (LLMs) have the potential to change this and help improve quantum circuit partitions. This paper investigates the use of LLMs, such as Llama and Mistral, for partitioning quantum circuits by capitalizing on their abilities to understand and generate code, including QASM. Specifically, we teach LLMs to partition circuits using the quick partition approach of the Berkeley Quantum Synthesis Toolkit. Through experimental evaluations, we show that careful fine-tuning of open source LLMs enables us to obtain an accuracy of 53.4% for the partition task while over-the-shelf LLMs are unable to correctly partition circuits, using standard 1-shot and few-shot training approaches.
Figures
Forward citations
Cited by 1 Pith paper
-
QAgent: An LLM-based Multi-Agent System for Autonomous OpenQASM programming
QAgent, a multi-agent LLM system, increases OpenQASM generation pass rates by up to 71.6% over static few-shot baselines, but the evaluation has potential data overlap and missing error bars.
Reference graph
Works this paper leans on
-
[1]
Quantum Computing in the NISQ era and beyond,
J. Preskill, “Quantum Computing in the NISQ era and beyond,” Quantum, vol. 2, p. 79, Aug. 2018. [Online]. Available: https: //doi.org/10.22331/q-2018-08-06-79
-
[2]
Towards optimal topology aware quantum circuit synthesis,
M. G. Davis, E. Smith, A. Tudor, K. Sen, I. Siddiqi, and C. Iancu, “Towards optimal topology aware quantum circuit synthesis,” in 2020 IEEE International Conference on Quantum Computing and Engineer- ing (QCE). IEEE, 2020, pp. 223–234
work page 2020
-
[3]
Chatgpt: A conversational language model,
OpenAI, “Chatgpt: A conversational language model,” https://openai. com/chatgpt, 2023, accessed: 2024-11-15
work page 2023
-
[4]
Llama 3: Large language model meta ai,
M. AI, “Llama 3: Large language model meta ai,” https://ai.facebook. com/, 2024, accessed: 2024-11-15
work page 2024
-
[5]
Berkeley quantum synthesis toolkit (bqskit) v1,
E. Younis, C. C. Iancu, W. Lavrijsen, M. Davis, E. Smith, and USDOE, “Berkeley quantum synthesis toolkit (bqskit) v1,” 4 2021. [Online]. Available: https://www.osti.gov//servlets/purl/1785933
arXiv 2021
-
[6]
Quantum computing with Qiskit,
A. Javadi-Abhari, M. Treinish, K. Krsulich, C. J. Wood, J. Lishman, J. Gacon, S. Martiel, P. D. Nation, L. S. Bishop, A. W. Cross, B. R. Johnson, and J. M. Gambetta, “Quantum computing with Qiskit,” 2024
2024
-
[7]
Quest: sys- tematically approximating quantum circuits for higher output fidelity,
T. Patel, E. Younis, C. Iancu, W. de Jong, and D. Tiwari, “Quest: sys- tematically approximating quantum circuits for higher output fidelity,” in Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems , 2022, pp. 514–528
2022
-
[8]
Qgo: Scalable quantum circuit optimization using automated synthesis,
X.-C. Wu, M. G. Davis, F. T. Chong, and C. Iancu, “Qgo: Scalable quantum circuit optimization using automated synthesis,” arXiv preprint arXiv:2012.09835, 2020
arXiv 2012
Show all 32 references
-
[9]
Leap: Scaling numerical optimization based synthesis using an incremental approach,
E. Smith, M. G. Davis, J. Larson, E. Younis, L. B. Oftelie, W. Lavrijsen, and C. Iancu, “Leap: Scaling numerical optimization based synthesis using an incremental approach,” ACM Transactions on Quantum Com- puting, vol. 4, no. 1, pp. 1–23, 2023
2023
-
[10]
Quantum supremacy using a programmable superconducting processor,
F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, R. Biswas, S. Boixo, F. G. Brandao, D. A. Buell et al. , “Quantum supremacy using a programmable superconducting processor,” Nature, vol. 574, no. 7779, pp. 505–510, 2019
2019
-
[11]
Eliminating redundant computation in noisy quantum computing simulation,
G. Li, Y . Ding, and Y . Xie, “Eliminating redundant computation in noisy quantum computing simulation,” in 2020 57th ACM/IEEE Design Automation Conference (DAC). IEEE, 2020, pp. 1–6
2020
-
[12]
Quantum circuit simulation with fast tensor decision diagram,
Q. Zhang, M. Saligane, H.-S. Kim, D. Blaauw, G. Tzimpragos, and D. Sylvester, “Quantum circuit simulation with fast tensor decision diagram,” in 2024 25th International Symposium on Quality Electronic Design (ISQED). IEEE, 2024, pp. 1–8
2024
-
[13]
Massively parallel approximate simulation of hard quantum circuits,
I. L. Markov, A. Fatima, S. V . Isakov, and S. Boixo, “Massively parallel approximate simulation of hard quantum circuits,” in 2020 57th ACM/IEEE Design Automation Conference (DAC) . IEEE, 2020, pp. 1–6
2020
-
[14]
Pareto- efficient quantum circuit simulation using tensor contraction deferral,
E. Pednault, J. A. Gunnels, G. Nannicini, L. Horesh, T. Magerlein, E. Solomonik, E. W. Draeger, E. T. Holland, and R. Wisnieff, “Pareto- efficient quantum circuit simulation using tensor contraction deferral,” arXiv preprint arXiv:1710.05867 , 2017
-
[15]
Attention is all you need,
A. Vaswani, “Attention is all you need,” Advances in Neural Information Processing Systems, 2017
2017
-
[16]
D. E. Rumelhart, G. E. Hinton, and R. J. Williams, “Learning internal representations by error propagation, parallel distributed processing, explorations in the microstructure of cognition, ed. de rumelhart and j. mcclelland. vol. 1. 1986,” Biometrika, vol. 71, no. 599-607, p. 6, 1986
1986
-
[17]
Long short-term memory,
S. Hochreiter, “Long short-term memory,” Neural Computation MIT- Press, 1997
1997
-
[18]
Improving language understanding by generative pre- training,
A. Radford, “Improving language understanding by generative pre- training,” 2018
2018
-
[19]
Llama: Open and efficient foundation language models,
H. Touvron, T. Lavril, G. Izacard, X. Martinet, M.-A. Lachaux, T. Lacroix, B. Rozi `ere, N. Goyal, E. Hambro, F. Azhar et al. , “Llama: Open and efficient foundation language models,” arXiv preprint arXiv:2302.13971, 2023
2023 arXiv
-
[20]
Common crawl,
C. C. Foundation, “Common crawl,” https://commoncrawl.org, 2024, accessed: 2024-11-17
2024
-
[21]
Exploring the limits of transfer learning with a unified text-to-text transformer,
C. Raffel, N. Shazeer, A. Roberts, K. Lee, S. Narang, M. Matena, Y . Zhou, W. Li, and P. J. Liu, “Exploring the limits of transfer learning with a unified text-to-text transformer,” Journal of machine learning research, vol. 21, no. 140, pp. 1–67, 2020
2020
-
[22]
The pile: An 800gb dataset of diverse text for language modeling,
L. Gao, S. Biderman, S. Black, L. Golding, T. Hoppe, C. Foster, J. Phang, H. He, A. Thite, N. Nabeshima et al. , “The pile: An 800gb dataset of diverse text for language modeling,” arXiv preprint arXiv:2101.00027, 2020
2020 arXiv
-
[23]
Glu variants improve transformer,
N. Shazeer, “Glu variants improve transformer,” arXiv preprint arXiv:2002.05202, 2020
2002 arXiv
-
[24]
Roformer: En- hanced transformer with rotary position embedding,
J. Su, M. Ahmed, Y . Lu, S. Pan, W. Bo, and Y . Liu, “Roformer: En- hanced transformer with rotary position embedding,” Neurocomputing, vol. 568, p. 127063, 2024
2024
-
[25]
The llama 3 herd of models,
A. Dubey, A. Jauhri, A. Pandey, A. Kadian, A. Al-Dahle, A. Letman, A. Mathur, A. Schelten, A. Yang, A. Fan et al. , “The llama 3 herd of models,” arXiv preprint arXiv:2407.21783 , 2024
2024 arXiv
-
[26]
Measuring massive multitask language understanding,
D. Hendrycks, C. Burns, S. Basart, A. Zou, M. Mazeika, D. Song, and J. Steinhardt, “Measuring massive multitask language understanding,” arXiv preprint arXiv:2009.03300 , 2020
2009 arXiv
-
[27]
Mistral large 2 model release,
M. AI, “Mistral large 2 model release,” July 2024, mistral Large 2, a 123-billion parameter model with a 128k context window and multilingual support, was introduced as a flagship offering for advanced AI applications. Available for research and commercial use under specific l...
2024
-
[28]
Code llama: Open foundation models for code,
B. Roziere, J. Gehring, F. Gloeckle, S. Sootla, I. Gat, X. E. Tan, Y . Adi, J. Liu, R. Sauvestre, T. Remez et al. , “Code llama: Open foundation models for code,” arXiv preprint arXiv:2308.12950 , 2023
2023 arXiv
-
[29]
Mamba: Linear-time sequence modeling with selective state spaces,
A. Gu and T. Dao, “Mamba: Linear-time sequence modeling with selective state spaces,” arXiv preprint arXiv:2312.00752 , 2023
2023 arXiv
-
[30]
Mqt bench: Benchmarking software and design automation tools for quantum computing,
N. Quetschlich, L. Burgholzer, and R. Wille, “Mqt bench: Benchmarking software and design automation tools for quantum computing,” Quan- tum, vol. 7, p. 1062, 2023
2023
-
[31]
Lora: Low-rank adaptation of large language models,
E. J. Hu, Y . Shen, P. Wallis, Z. Allen-Zhu, Y . Li, S. Wang, L. Wang, and W. Chen, “Lora: Low-rank adaptation of large language models,” arXiv preprint arXiv:2106.09685 , 2021
2021 arXiv
-
[32]
Phi-3 technical report: A highly capable language model locally on your phone,
M. Abdin, J. Aneja, H. Awadalla, A. Awadallah, A. A. Awan, N. Bach, A. Bahree, A. Bakhtiari, J. Bao, H. Behl et al., “Phi-3 technical report: A highly capable language model locally on your phone,” arXiv preprint arXiv:2404.14219, 2024
2024 arXiv
Reviewed August 15, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.