Q++ — An Open-Source Quantum Language, and my T-Shirt

Open source · quantum · e-co

I built a programming language. It’s called Q++, it’s open source, and you can read every line of it right now. The code is a gift to the commons — the name and the T-shirt I made are just the personal, hand-made side of the same project.

github.com/sefunmi4/qpp-lang A quantum intermediate-representation compiler in C++ — the qppc compiler, a wavefunction runtime, and a whitepaper. Open to read, fork, and build on. Read the code →

What Q++ actually is

Q++ is C++ with a few honest patches under the hood — just enough to describe quantum bits and their logic where you need them, and nothing more. A systems programmer shouldn’t have to throw away everything they know to touch quantum computing. If you can write C++, you should be able to write for a quantum processor without learning an entirely new programming model. So Q++ extends the language you already have instead of replacing it.

Under that idea sit real design choices. You model classical and quantum pieces with qstruct, qclass, cstruct and cclass, and manage memory with qregister and cregister. You tell the runtime where work should go with task<QPU>, task<CPU>, task<AUTO> and task<MIXED>. Bitwise operators map to quantum gates — an ^ becomes a controlled-X — and when you want the metal you inject raw gate instructions with __qasm. There’s even an #explain directive that emits plain-English comments describing what the quantum instructions do, because readable code is trustable code.

The pipeline is two pieces. The compiler, qppc, parses Q++ into a typed intermediate representation carrying Quantum Intermediate Representation (QIR) metadata. The runtime, qpp-run, executes that IR on a wavefunction simulator today, with stubs in place to target real hardware through Qiskit, Cirq, Braket, Q#, NVIDIA and PsiQuantum. It’s an early prototype and I’m honest about that — partial C++ parsing, backends still stubbed, experimental control flow — but the compiler runs, the simulator runs, and the shape of the thing is real.

Why I built it in the open

I built Q++ with AI as a tool, the same way a carpenter builds with a power drill. That doesn’t make it less mine to have made, and it doesn’t make it less yours to use. I put it on GitHub because a stranger should be able to read it in ten minutes and trust it — no hidden inputs, no dark corners, just an architecture you could have looked up yourself. Same principle behind the whole e-co project: readable, documented, honest about its limits. Build like brick, not straw, so when the weather turns it holds. So take it — fork it, break it, ship something with it.

The code is open. The craft is personal.

None of this is about trademark battles or copyright fights — that whole energy is exhausting and it’s not the point. It’s simpler and more human. The code is open because ideas should move freely; that’s the gift, and I mean it. The Q++ name and the T-shirt I made are just the personal, hand-made side of the same work — the part that keeps a maker fed and keeps the project honest. Open code, personal craft; both are true at once, and neither is a war. Take the language and build something real. And if you like the shirt, that’s simply how you support the person who left the door open.

If you want to follow the build — the compiler, the runtime, the e-co platform it all connects to — the repos are open and the door is open. That’s the whole idea.

Tags:

Leave a Reply