<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: kristian koci</title>
    <description>The latest articles on DEV Community by kristian koci (@kkoci).</description>
    <link>https://dev.to/kkoci</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F147375%2F1e323e10-f7e5-4f15-bdbc-ddc1e687b5cd.jpeg</url>
      <title>DEV Community: kristian koci</title>
      <link>https://dev.to/kkoci</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kkoci"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>kristian koci</dc:creator>
      <pubDate>Thu, 17 Sep 2026 00:14:54 +0000</pubDate>
      <link>https://dev.to/kkoci/-jck</link>
      <guid>https://dev.to/kkoci/-jck</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kkoci/i-built-three-tools-for-quantinuums-guppy-stack-along-the-way-i-found-six-real-bugs-2cp4" class="crayons-story__hidden-navigation-link"&gt;I built three tools for Quantinuum's guppy stack. Along the way I found six real bugs.&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kkoci" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F147375%2F1e323e10-f7e5-4f15-bdbc-ddc1e687b5cd.jpeg" alt="kkoci profile" class="crayons-avatar__image" width="320" height="320"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kkoci" class="crayons-story__secondary fw-medium m:hidden"&gt;
              kristian koci
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                kristian koci
                
                
              
              &lt;div id="story-author-preview-content-4662353" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kkoci" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F147375%2F1e323e10-f7e5-4f15-bdbc-ddc1e687b5cd.jpeg" class="crayons-avatar__image" alt="" width="320" height="320"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;kristian koci&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kkoci/i-built-three-tools-for-quantinuums-guppy-stack-along-the-way-i-found-six-real-bugs-2cp4" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Sep 15&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kkoci/i-built-three-tools-for-quantinuums-guppy-stack-along-the-way-i-found-six-real-bugs-2cp4" id="article-link-4662353"&gt;
          I built three tools for Quantinuum's guppy stack. Along the way I found six real bugs.
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/debugging"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;debugging&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/python"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;python&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/softwaredevelopment"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;softwaredevelopment&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/kkoci/i-built-three-tools-for-quantinuums-guppy-stack-along-the-way-i-found-six-real-bugs-2cp4#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>I built three tools for Quantinuum's guppy stack. Along the way I found six real bugs.</title>
      <dc:creator>kristian koci</dc:creator>
      <pubDate>Tue, 15 Sep 2026 22:57:25 +0000</pubDate>
      <link>https://dev.to/kkoci/i-built-three-tools-for-quantinuums-guppy-stack-along-the-way-i-found-six-real-bugs-2cp4</link>
      <guid>https://dev.to/kkoci/i-built-three-tools-for-quantinuums-guppy-stack-along-the-way-i-found-six-real-bugs-2cp4</guid>
      <description>&lt;h1&gt;
  
  
  I built three tools for Quantinuum's guppy/HUGR stack. Along the way I found six real bugs.
&lt;/h1&gt;

&lt;p&gt;I've been working with &lt;a href="https://github.com/Quantinuum/guppylang" rel="noopener noreferrer"&gt;guppylang&lt;/a&gt; — Quantinuum's Python-embedded quantum programming language, compiling to HUGR, running on their Selene simulator and trapped-ion hardware. It's a young ecosystem, and I wanted to build things that were actually useful, not just demos. That meant treating correctness as the whole point, not&lt;br&gt;
an afterthought — every formula cited to its source, every claim about compiler behavior verified by actually compiling code and inspecting the output, not assumed from docs.&lt;/p&gt;

&lt;p&gt;That discipline turned out to matter more than expected. Building three fairly ordinary developer tools surfaced six real, confirmed bugs — four in guppylang itself, two in Google's Qualtran (a widely-used quantum resource-estimation library) — none of which I was looking for going in.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three tools
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/kkoci/Qshelf" rel="noopener noreferrer"&gt;qshelf&lt;/a&gt;&lt;/strong&gt; — a tested package registry of quantum algorithm implementations for guppylang/HUGR (QFT, Grover, QAOA, VQE-H2), each verified against an independent mathematical reference (exact linear algebra, &lt;code&gt;scipy.linalg.expm&lt;/code&gt;, exact diagonalization), not just "it ran without crashing."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/kkoci/Estimand" rel="noopener noreferrer"&gt;Estimand&lt;/a&gt;&lt;/strong&gt; — a fault-tolerant resource estimator for guppy/HUGR programs. Given a compiled guppy circuit, it estimates physical qubit count, runtime, and error probability under a surface-code scheme. It's an adapter, not a resource-estimation engine — it extracts a gate-count summary from real guppy control flow (conditionals, nested loops, cross-function calls, even &lt;code&gt;CallIndirect&lt;/code&gt;) and feeds it to&lt;br&gt;
Qualtran's already-published cost models. Verified end-to-end against unmodified QFT and Grover implementations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/kkoci/qmatchpoint" rel="noopener noreferrer"&gt;qmatchpoint&lt;/a&gt;&lt;/strong&gt; — wires PyMatching (an established, peer-reviewed decoder) to the syndrome bits a guppy QEC circuit produces, since nothing in the guppylang/HUGR/Selene stack currently does decoding.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bugs
&lt;/h2&gt;

&lt;p&gt;Building qshelf against real algorithm math found four guppylang issues: a wrong unitary from &lt;code&gt;iqft&lt;/code&gt; compiled standalone vs. combined with &lt;code&gt;qft&lt;/code&gt;, a wrong unitary from multi-controlled Z (later fixed upstream), a rejected generic array-length type, and a rejected &lt;code&gt;numpy.ndarray&lt;/code&gt; closure (reclassified as a feature request).&lt;/p&gt;

&lt;p&gt;The more interesting ones came from Estimand. Its whole job is turning guppy programs into gate counts, then trusting Qualtran's surface-code math to do the rest — so I went and checked that math against the actual cited papers (Beverland et al. 2022, Litinski 2019 x2), rather than trusting the citation. Two real discrepancies turned up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CompactDataBlock&lt;/code&gt;'s tile-count formula was missing an additive constant from its own cited paper (&lt;code&gt;arxiv.org/abs/1808.02892&lt;/code&gt;, Fig. 9) — confirmed by a maintainer, and by the time I got around to fixing it, main had already drifted to a &lt;em&gt;different&lt;/em&gt; wrong version of the same formula. &lt;a href="https://github.com/quantumlib/Qualtran/pull/1949" rel="noopener noreferrer"&gt;PR here&lt;/a&gt;, awaiting review.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;make_beverland_et_al()&lt;/code&gt;'s magic-state factory error model silently used Beverland's threshold constant instead of Litinski's own, inside a component that's otherwise a faithful reimplementation of Litinski's paper. Turned into a longer, still-open discussion about whether the whole preset should more faithfully reproduce Beverland's actual architecture choices (data block, factory grid-search) rather than borrowing Litinski's  defaults.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this was the goal going in. It's just what happens when "does this actually match what it claims to implement" is a mandatory question, not an optional one, and I think that's a more useful takeaway than any of the three tools individually — verification discipline finds real things, even (especially) in mature, widely-used libraries.&lt;/p&gt;

&lt;p&gt;Repos linked above if any of it's useful, and happy to talk through any of the decisions behind them.&lt;/p&gt;

</description>
      <category>debugging</category>
      <category>python</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
