<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sina Asadiyan on Medium]]></title>
        <description><![CDATA[Stories by Sina Asadiyan on Medium]]></description>
        <link>https://medium.com/@sinaasadiyan?source=rss-bb72a6fe72a0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6BI7XRdU-4Z6Nhj9.jpg</url>
            <title>Stories by Sina Asadiyan on Medium</title>
            <link>https://medium.com/@sinaasadiyan?source=rss-bb72a6fe72a0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 20:06:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sinaasadiyan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Parallel Data Processing in Quantum Machine Learning]]></title>
            <link>https://medium.com/@sinaasadiyan/we-taught-a-quantum-classifier-to-read-the-whole-dataset-at-once-1b76727da777?source=rss-bb72a6fe72a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b76727da777</guid>
            <category><![CDATA[qml]]></category>
            <category><![CDATA[quantum-computer]]></category>
            <category><![CDATA[quantum]]></category>
            <category><![CDATA[quantum-computing]]></category>
            <dc:creator><![CDATA[Sina Asadiyan]]></dc:creator>
            <pubDate>Sat, 05 Sep 2026 08:48:07 GMT</pubDate>
            <atom:updated>2026-09-09T06:59:12.101Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Most quantum machine learning still feeds data to the circuit one sample at a time. That’s a strange thing to do on a machine built for superposition.</strong></p><p>Quantum computing has a signature move. You put a register into a superposition of every possible input, you let an oracle act on all of them at the same time, and then you use interference to squeeze out the one global property you actually care about. Deutsch–Jozsa does it. Bernstein–Vazirani does it. It is, more or less, the reason anyone got excited about quantum algorithms in the first place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4c00ZmJWZMYov6A4tC78MQ.png" /><figcaption>The three-stage shape shared by foundational quantum algorithms</figcaption></figure><p>Superposition, oracle, interference — the three-stage architecture underlying Deutsch–Jozsa, Bernstein–Vazirani, and friends. Hold onto this shape; the whole paper is an argument that QML training should have it too.</p><p>Now look at how we train a variational quantum classifier.</p><p>We take training sample #1, encode it into a circuit, run the circuit, measure, get a prediction. Then sample #2. Then sample #3. All the way to sample #N. We average the N losses, hand the number to a classical optimizer, get new parameters, and do the whole thing again.</p><p>We built a machine that processes exponentially many inputs in parallel, and then we use it as a very expensive for-loop.</p><p>That gap is what our paper is about. It’s on arXiv ([2508.12006](<a href="https://arxiv.org/abs/2508.12006">https://arxiv.org/abs/2508.12006</a>)) and published in <strong>Scientific Reports</strong>, with my co-authors Mehdi Ramezani, Abolfazl Bahrampour, Saeed Bagheri Shouraki, and Alireza Bahrampour at Sharif University of Technology.</p><h3>The cost of the for-loop</h3><p>Here’s the accounting that motivated us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KdUh--qyCJlXdfubyCc3fQ.png" /><figcaption>Architecture of a parameterized quantum circuit classifier</figcaption></figure><p>In a conventional variational quantum classifier (VQC), evaluating the loss function over a dataset of size <strong>N</strong> takes <strong>N </strong>separate circuit executions — one per sample. That alone is a linear cost per training step.</p><p>But there’s a second factor. For the model to have enough expressive capacity on a larger dataset, the number of trainable parameters generally has to grow with the data too. This is not a quantum-specific fact; it’s the same scaling intuition that governs every large model people train today. Under that assumption, the circuit itself has complexity O(<strong>N</strong>).</p><p><strong>N </strong>executions, each costing O(<strong>N</strong>), gives you <strong>O(N²)</strong> for a single loss-function evaluation. Per training step. That quadratic wall is a real obstacle to scaling QML to anything resembling a serious dataset, and it eats a good chunk of the theoretical advantage you were hoping to get.</p><p>So the question we asked was simple: can we make the <em>whole dataset </em>the thing the circuit acts on, instead of one sample?</p><h3>Why nobody had just done this already</h3><p>Let me be honest about something, because I think it’s the most interesting part of the story.</p><p>The idea of putting all your training samples into a superposition is not clever. It’s the first thing anyone with a quantum background would think of. So why isn’t it the standard approach?</p><p>The usual answer is state preparation overhead. That answer is wrong, or at least incomplete. The real obstacle is the <strong>readout bottleneck</strong>.</p><p>Conventional QML cost functions are averages of <em>per-sample</em> losses. To compute one, you need each individual prediction <em>h</em>(x⁽ⁱ⁾) so you can push it through a nonlinear loss ℓ and then sum. But if you measure a superposition circuit directly, you don’t get the individual predictions. You get the aggregate — essentially (1/N)·Σᵢ <em>h</em>(x⁽ⁱ⁾) — and there is no way to feed an average into a nonlinear function and recover the average of that function. The information you needed is already gone.</p><p>This is why “just superpose everything” has historically gone nowhere. You can build the superposition. You just can’t read a usable loss out of it.</p><p>&gt; The fix isn’t a better measurement. It’s a different loss function.</p><h3>Reformulating the objective</h3><p>Our way around the bottleneck is to stop trying to reconstruct the per-sample loss at all, and instead define a <strong>single global loss </strong>that a superposition circuit can actually report.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uEJzdLO5FldEwdRs3_LANA.png" /><figcaption>The integrated parallel architecture and its encoder block</figcaption></figure><p><em>(a) The integrated framework: n register qubits index the dataset, m feature qubits hold the data, and a single label qubit at the bottom collects the verdict for all N samples. (b) Inside the encoder — each index state |i⟩ is mapped to its own input vector, building the superposition over the entire training set.</em></p><p>The architecture uses three groups of qubits:</p><p>- <strong>m feature qubits</strong>, encoding a real-valued input vector — same as any base VQC.<br>- <strong>n = log₂N register qubits</strong>, indexing every training sample.<br>- <strong>one label qubit</strong>, which collects the verdict for the entire dataset.</p><p>The flow goes like this. Hadamards on the register put it into a uniform superposition over all <em>N </em>indices. An encoder block maps each index state |i⟩ to its corresponding input vector |x⁽ⁱ⁾⟩ — so now the register and the data are entangled, and the full training set exists inside the circuit at once. The variational block then acts on this global state, exactly as it would on a single sample.</p><p>The trick is in the ordering. We index the dataset <strong>sorted by class</strong>: for binary classification, the first <em>N</em>/2 indices are class 0, the rest are class 1. That means the most significant register qubit *is* the ground-truth label. It’s free — a stable sort by label, no additional asymptotic cost.</p><p>Now the interference module has something to compare against. Two CCNOT gates, controlled on the classification qubit and the most significant register qubit, flip the label qubit. If the model’s prediction agrees with the ground truth encoded in the register, the label qubit lands in |1⟩.</p><p>Do this across the superposition and the probability of measuring the label qubit in |1⟩ becomes precisely t<strong>he fraction of the dataset that is correctly classified</strong>. That’s the loss:<br><strong>L(θ) = − log P(|1⟩)</strong></p><p>One Number. One circuit execution. The whole dataset.</p><p>For multi-class problems with C = 2ᵏ classes, the same idea extends: partition the dataset into 2ᵏ contiguous blocks so the <em>k </em>most significant register qubits carry the class label, then use 2ᵏ multi-controlled NOT gates — each checking one ground-truth pattern against the predicted pattern — all targeting that same single label qubit. Still one readout.</p><p><strong>The complexity, end to end: </strong>state preparation is O(<em>N</em>) at fixed feature dimension, the variational block is O(<em>N</em>), and there is no summation over data points because there is no per-sample anything. Total: <strong>O(N)</strong>, against O(<em>N</em>²) for the sequential baseline. Circuit executions per cost-function evaluation drop from <em>N </em>to <strong>1</strong>.</p><h3>Does it still classify?</h3><p>A speedup that costs you accuracy isn’t a speedup. So the entire experimental burden here is proving <em>equivalence</em>, not superiority.</p><p>We ran the integrated framework against a conventional base circuit on four synthetic binary datasets — Semicircles, Checkerboard, Circles, and Corners, each chosen to stress a different kind of decision boundary — plus a four-class Checkerboard. Every run used 128 training and 64 test samples, balanced across classes, averaged over 10 independent runs, optimized with SPSA (200 iterations for binary, 400 for four-class). The base circuit is a standard ZZFeatureMap encoder with a TwoLocal ansatz and data reuploading, 32 trainable parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rDIIg3wasWMTUXLs0zNlVA.png" /><figcaption>Mean training cost trajectories for both methods</figcaption></figure><p><em>Training loss for the conventional base circuit (Method 1) and the integrated circuit (Method 2), averaged over 10 runs with ±1σ bands. The parallel wrapper doesn’t destabilize training — the two descend along comparable paths.</em></p><p>The results:</p><p>- <strong>Binary tasks:</strong> the integrated circuit reached test accuracies of <strong>76–82%</strong>, against <strong>77–82%</strong>for the conventional circuit. Differences of one to three percentage points — inside the statistical uncertainty.<br>- <strong>Four-class task:</strong> both methods landed around <strong>60%</strong> test accuracy, against 25% for random guessing.<br>- <strong>Convergence:</strong> the loss trajectories and the train/test accuracy curves of the two methods track each other throughout training. The parallel wrapper doesn’t just end up in the same place — it takes the same path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dZH7QTQzVPV8KmfksnGAVQ.png" /><figcaption>Mean train and test accuracy trajectories for both methods</figcaption></figure><p><em>Train/test accuracy across the four binary datasets. Method 2 (orange) tracks Method 1 (blue) throughout — same destination, same route, at one circuit execution per cost evaluation instead of 128.</em></p><p>We are explicitly <em>not </em>claiming better accuracy. We’re claiming the same accuracy for a fraction of the quantum circuit-evaluation cost. When a good base circuit already exists, our framework wraps it and makes it cheaper to train.</p><h3>What this does not claim</h3><p>I want to be precise about the boundaries, because quantum ML has an over-claiming problem and I’d rather not contribute to it.</p><p><strong>This is not a reduction in measurement shots.</strong> Resolving the dataset-averaged probability P(|1⟩) to a given precision takes a shot budget comparable to the conventional method. The asymptotic gain comes from circuit-evaluation count and circuit depth, not from shot count.</p><p><strong>This is not a wall-clock speedup on a classical simulator. </strong>Quite the opposite: simulating an (m+n)-qubit state is <em>more </em>expensive than simulating the baseline, because the state vector is bigger. The advantage materializes on real quantum hardware, where the superposition over the log₂N register qubits is prepared physically rather than emulated.</p><p><strong>The scale is proof-of-concept, and deliberately so.</strong> 128 samples is small. It’s small for two unavoidable reasons: demonstrating the speedup directly needs qubit counts and coherence times that NISQ hardware doesn’t have yet, and <em>validating </em>it classically becomes intractable exactly as the datasets get interesting, because simulation cost is exponential. Within those constraints, the right thing to prove is that the framework preserves classification performance — which is the precondition that makes the O(<em>N</em>²) → O(<em>N</em>) reduction meaningful in the first place.</p><p><strong>Hardware will take a bite.</strong> The multi-controlled operations in the register logic decompose into native two-qubit gates, which adds depth and invites noise. That affects fidelity and runtime. It doesn’t change the asymptotic scaling, but it’s real.</p><h3>Why I think this direction matters</h3><p>There’s a reflex in this field to answer every limitation — barren plateaus, weak expressivity, poor generalization — by proposing an entirely new model. We took the opposite bet.</p><p>The base circuit in our experiments is completely ordinary. We didn’t improve it. We changed the <em>architecture of training around it</em>: how the data gets in, and how the loss comes out. Everything else stayed the same, and the circuit executions per training step dropped by close to a factor of <em>N</em>.</p><p>That suggests a lot of the inefficiency in QML isn’t in the models. It’s in the scaffolding — in the sequential, sample-by-sample habits we imported wholesale from classical machine learning without asking whether a quantum computer wants to work that way.</p><p>It doesn’t. It wants superposition, an oracle, and interference. We just gave the training loop the same shape as the algorithms that made quantum computing interesting in the first place.</p><p>Paper: <em>Parallel Data Processing in Quantum Machine Learning</em>— Sina Asadiyan Zargar, Mehdi Ramezani, Abolfazl Bahrampour, Saeed Bagheri Shouraki, Alireza Bahrampour (Sharif University of Technology).</p><p>📄 arXiv: [arxiv.org/abs/2508.12006](<a href="https://arxiv.org/abs/2508.12006">https://arxiv.org/abs/2508.12006</a>)<br>📖 <em>Scientific Reports</em>: https://doi.org/10.1038/s41598-026-65756-2</p><p>💻 Code: [github.com/sinaasadiyan/Parallel-Data-Processing-in-Quantum-Machine-Learning](<a href="https://github.com/sinaasadiyan/Parallel-Data-Processing-in-Quantum-Machine-Learning">https://github.com/sinaasadiyan/Parallel-Data-Processing-in-Quantum-Machine-Learning</a>)<br>📦 Archived release: [doi.org/10.5281/zenodo.20929210](<a href="https://doi.org/10.5281/zenodo.20929210">https://doi.org/10.5281/zenodo.20929210</a>)</p><p><em>If you work on variational quantum algorithms and think the readout argument is wrong, I’d genuinely like to hear it — comments are open.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b76727da777" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>