<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Quantum-Computing | </title>
    <link>http://localhost:1313/tags/quantum-computing/</link>
      <atom:link href="http://localhost:1313/tags/quantum-computing/index.xml" rel="self" type="application/rss+xml" />
    <description>Quantum-Computing</description>
    <generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Sun, 25 Jan 2026 00:00:00 +0000</lastBuildDate>
    <image>
      <url>http://localhost:1313/media/logo_hu_c0919893ee2a9c7b.png</url>
      <title>Quantum-Computing</title>
      <link>http://localhost:1313/tags/quantum-computing/</link>
    </image>
    
    <item>
      <title>Introducing Volq: A programming language for simulating quantum computation</title>
      <link>http://localhost:1313/blog/introducing-volq/</link>
      <pubDate>Sun, 25 Jan 2026 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/blog/introducing-volq/</guid>
      <description>&lt;p&gt;















&lt;figure  &gt;
  &lt;div class=&#34;flex justify-center	&#34;&gt;
    &lt;div class=&#34;w-full&#34; &gt;&lt;img src=&#34;http://localhost:1313/images/volq/volq_banner.png&#34; alt=&#34;Volq&#34; loading=&#34;lazy&#34; data-zoomable /&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Today, I want to introduce a project I&amp;rsquo;ve been working on for a while.&lt;/p&gt;
&lt;p&gt;Volq is an interpreted Domain Specific Language (DSL) that enables you to simulate quantum computing algorithms on your classical computer. You can play around with existing algorithms to better understand how they solve problems, or write your own from scratch using the easy-to-learn &lt;abbr title=&#34;Domain Specific Language&#34;&gt;DSL&lt;/abbr&gt; based on the quantum circuit model.&lt;/p&gt;
&lt;p&gt;I originally started this project to create a framework for simulating the quantum circuit model. But as time and development went on, I realised more and more that I am actually just writing a compiler for quantum computing software, or in other words, &lt;em&gt;a linear algebra compiler for generating matrices&lt;/em&gt;. That&amp;rsquo;s when I decided to pivot to writing a programming language!&lt;/p&gt;
&lt;p&gt;The backend and frontend of Volq is written 100% in Python and uses the libraries NumPy and UnitTest. The banner was created in the fabulous Google Slides (yes, seriously), because Canva wanted to charge me money to create an oval shape with dotted lines, so I thought I&amp;rsquo;d improvise.&lt;/p&gt;
&lt;h1 id=&#34;why&#34;&gt;Why?&lt;/h1&gt;
&lt;p&gt;During my third year at university, I took a module called CS3600 Quantum Computation. In this module, I learned all the mathematics behind quantum computing and about different quantum algorithms that exist, such as Deutsch-Jozsa, Bernstein Vazirani, Grover&amp;rsquo;s Algorithm and Shor&amp;rsquo;s Algorithm.&lt;/p&gt;
&lt;p&gt;I won&amp;rsquo;t lie, I struggled with the mathematics a fair bit and I always wished I could experiment with a quantum computer, so I could better understand the outputs of different quantum algorithms given different inputs. Some solutions do exist, but in my own personal opinion, I found Python libraries like IBM Qiskit or Google Cirq somewhat unintuitive without sinking a significant amount of time into them. IBM does allow you to run your own circuits on a real quantum computer for free up to 5 qubits, but this is quite a limited number of qubits such that there&amp;rsquo;s more advantages to just simulating it, and this also requires you to register an account for another service.&lt;/p&gt;
&lt;p&gt;After completing the exam for this module, I wanted to continue to learn more about quantum computing beyond the material of the CS3600 module and also to create this project to fill in this gap. I wanted to make applying gates on a basis state vector intuitive to the quantum circuit model itself, similar to slices of gates in a circuit. That way, you can spend less time learning and pick up the language very quickly.&lt;/p&gt;
&lt;h1 id=&#34;can-i-see-some-code-in-volq&#34;&gt;Can I see some code in Volq?&lt;/h1&gt;
&lt;p&gt;Sure! Here is the circuit diagram of the Deutsch-Jozsa algorithm, courtesy of Wikipedia:
















&lt;figure  &gt;
  &lt;div class=&#34;flex justify-center	&#34;&gt;
    &lt;div class=&#34;w-full&#34; &gt;&lt;img src=&#34;http://localhost:1313/images/volq/deutsch-jozsa-circuit-diagram.png&#34; alt=&#34;Deutsch-Jozsa Circuit Diagram&#34; loading=&#34;lazy&#34; data-zoomable /&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;/figure&gt;

And here&amp;rsquo;s the corresponding Volq code, using a balanced function in the oracle:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;QUBITS 9
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;RUNS 1000
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;INIT
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;APPLY X8
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;APPLY H0 H1 H2 H3 H4 H5 H6 H7 H8
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;APPLY CNOT8,0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;APPLY CNOT8,1
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;APPLY CNOT8,2
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;APPLY CNOT8,3
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;APPLY CNOT8,4
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;APPLY CNOT8,5
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;APPLY CNOT8,6
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;APPLY CNOT8,7
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;APPLY H0 H1 H2 H3 H4 H5 H6 H7
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;MEASURE ALL
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As you can see, the programming language is intuitive by sticking closely to the circuit diagram. Rather than learning how to create distinct circuit objects with code, this is all handled under the hood for the user, along with the number of shots and measurement.&lt;/p&gt;
&lt;p&gt;This isn&amp;rsquo;t perfect though, and I&amp;rsquo;m looking forward to making improvements in the future to make it even more intuitive. This includes a sub-DSL for oracles (e.g. &lt;code&gt;ALL 0 EXCEPT 0110&lt;/code&gt;) so that the option for running them in one line is there, and creating shorthands for applying the same operator on many qubits at once (e.g. &lt;code&gt;H@&lt;/code&gt; for a uniform superposition across the whole circuit, or &lt;code&gt;X[0,3]&lt;/code&gt; for applying Pauli X across the first 4 qubits!).&lt;/p&gt;
&lt;h1 id=&#34;how-long-do-you-plan-to-work-on-it-for&#34;&gt;How long do you plan to work on it for?&lt;/h1&gt;
&lt;p&gt;It would be ideal to reach a v1.0.0 release within the next 12 months, but I work in cyber security and have a lot of other things happening on the side too, so I&amp;rsquo;m expecting it to realistically take a maximum of up to 24 months. I&amp;rsquo;ll likely be working on the project on and off, and also I will be doing a lot of independent research into how compilers and parsers work under the hood, which will take a lot of time and won&amp;rsquo;t be visible in the Git commit history.&lt;/p&gt;
&lt;p&gt;At the time of writing, Volq is currently in alpha status. The focus during the alpha is adding most of the core features of the quantum circuit model to the &lt;abbr title=&#34;Domain Specific Language&#34;&gt;DSL&lt;/abbr&gt; and following the mathematics by the book; inefficient, but perfectly correct. My intentions for beta development include polishing everything up to a high standard and focusing on optimisation of operator generation to accelerate circuit execution, which would ultimately allow for larger quantum circuits.&lt;/p&gt;
&lt;h1 id=&#34;how-can-i-look-at-the-source-code-and-try-it-out&#34;&gt;How can I look at the source code and try it out?&lt;/h1&gt;
&lt;p&gt;First of all, thanks for scrolling down to the bottom of the page, or perhaps even reading to the end. Also the word &amp;ldquo;quantum&amp;rdquo; was mentioned 15 times in this article, I&amp;rsquo;m sorry.&lt;/p&gt;
&lt;p&gt;The repository for Volq is on my GitHub, which I&amp;rsquo;ve linked below.&lt;/p&gt;
&lt;h3 id=&#34;link-to-volq-on-github&#34;&gt;
&lt;/h3&gt;</description>
    </item>
    
  </channel>
</rss>
