Quantum Programming Languages For Beginners

Beginner guide
Quantum Programming Languages, Explained for Learners
Seven ways to write real quantum programs in 2026, from IBM Qiskit and Google Cirq to Xanadu PennyLane, Microsoft Q#, and Quantinuum Guppy. Each entry shows current syntax and where it fits.
7
languages covered
7
code snippets
3
glossary companions

Quantum programming languages are how you turn the ideas of quantum computing into instructions a real machine can run. You do not need to own a quantum computer to use them, because every framework on this page ships with a simulator that runs on an ordinary laptop. This guide is written for learners who can code a little and want a clear map of the field rather than a marketing tour.

The field moves quickly, so a guide written in 2024 already describes tools that have changed. We rebuilt this page in July 2026 with current syntax for seven quantum programming languages, and we flag what has been renamed or removed so you do not learn a command that no longer exists. Where a language has a deeper companion glossary on this site, we link straight to it.

A Bell-state circuit that quantum programming languages such as Qiskit and Cirq express in only a few lines of code.
A Bell state built from a Hadamard gate and a controlled-NOT. Almost every language below expresses this same short sequence, which is why it has become the standard first program.

What Quantum Programming Languages Actually Do

A quantum program is a list of operations applied to qubits, followed by measurements that read out a classical result. Quantum programming languages give you a readable way to describe that list, then hand it to a simulator or to real hardware over the cloud. In practice you write ordinary Python most of the time, and the framework builds the circuit for you behind a small set of function calls.

Two ideas do most of the work in these programs. Superposition lets a qubit hold a weighted combination of the states 0 and 1, and entanglement links qubits so that measuring one tells you something about another. A gate is a reversible operation that changes these amplitudes, and a measurement collapses the qubit to a definite 0 or 1 with a probability set by the amplitudes.

It helps to separate two layers that beginners often merge. High-level frameworks such as Qiskit and PennyLane let you think in gates and algorithms, while a low-level standard such as OpenQASM describes the same circuit in a portable text form that hardware compilers can read. You will usually start at the high level and rarely need to hand-write the assembly, but knowing the split explains why so many tools coexist.

If you want the academic view of the whole field, a recent survey of quantum programming languages classifies ten of them against a shared framework. It is heavier reading than this guide, yet it confirms the same split between high-level and hardware-facing tools.

What You Need Before You Write Your First Program

You need less mathematics than the field’s reputation suggests. Comfort with basic Python, a little linear algebra around vectors and matrices, and an intuition for probability will carry you through your first month. The rest can be learned as you go, because the simulators give you instant feedback on whether a circuit does what you expected.

A short vocabulary makes the code readable. A qubit is the quantum unit of information, a gate transforms it, a circuit is an ordered set of gates, and a shot is one run of that circuit ending in a measurement. Because outcomes are probabilistic, you run many shots and read the distribution rather than a single answer, which is the biggest habit shift from classical coding.

Qiskit, The IBM Python Framework

Qiskit, maintained by IBM, is the most widely taught of the quantum programming languages and a sensible default first choice. It is a Python library, so you install it with pip and build circuits object by object, then run them on simulators or on IBM’s cloud hardware. Its large tutorial base and active community, documented on the official Qiskit site, make it forgiving for self-taught learners.

What matters in 2026 is that Qiskit has reached the 2.x series and dropped several older habits. The legacy qiskit.execute function is gone, the classical c_if conditional was removed in favour of the if_test context, and results now flow through the V2 primitives, which group a circuit with its parameters into a Primitive Unified Bloc, or PUB. If a tutorial still calls execute, it predates this change and will not run.

from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler

qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])

# V2 primitive: run takes a list of PUBs
result = StatevectorSampler().run([qc]).result()
print(result[0].data.c.get_counts())

If you want the vocabulary before the code, our companion glossary of Qiskit terms you need to know defines the objects used above. It is the fastest way to stop guessing what a QuantumCircuit or a primitive really is.

Cirq, The Google Circuit Framework

Cirq, developed by Google, is another Python framework, but it gives you tighter control over how a circuit maps onto specific hardware qubits. That control makes it a favourite for researchers who care about gate scheduling and device topology, and it remains current and actively maintained. Beginners sometimes find it a touch more explicit than Qiskit, which is exactly why the Google Cirq documentation is a good place to see the hardware layer up close.

One currency note saves confusion. The old cirq-ft module for fault-tolerant building blocks has been superseded by Qualtran, a separate Google library that is now the maintained home for that work. For a learner this only means you should reach for Qualtran, not cirq-ft, once you move past basic circuits.

import cirq

q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit(
    cirq.H(q0),
    cirq.CNOT(q0, q1),
    cirq.measure(q0, q1, key="result"),
)
result = cirq.Simulator().run(circuit, repetitions=100)
print(result.histogram(key="result"))

Our glossary of Cirq terms walks through LineQubit, Moment, and the other pieces you meet the moment you open the library. Read it beside the snippet above and the syntax stops feeling arbitrary.

Q#, The Microsoft Dedicated Language

Q#, from Microsoft, is different in kind from the frameworks above. Rather than a Python library, it is a standalone language purpose-built for quantum algorithms, and it now ships through the modern open-source Azure Quantum Development Kit. That kit, documented in the Microsoft Azure Quantum docs, replaced the older .NET-based toolchain, so tutorials that ask you to install a Visual Studio extension and write C# host code are describing a version that has been retired.

Two modern details are worth knowing early. Qubits are allocated with a use statement that guarantees they are released cleanly, and you can drive Q# straight from Python through the qsharp package, which makes it easy to mix with the tools you already know. The dedicated syntax is verbose at first, yet it reads clearly, which is why many courses use it to teach algorithm structure.

operation BellPair() : (Result, Result) {
    use (q0, q1) = (Qubit(), Qubit());
    H(q0);
    CNOT(q0, q1);
    return (M(q0), M(q1));
}

Because Q# uses its own keywords, a vocabulary sheet pays off quickly, and our glossary of Q# terms covers operations, functors, and the Resource Estimator. It is the third of the three code-facing companions this guide links to.

PennyLane, The Xanadu Differentiable Framework

PennyLane, built by Xanadu, is the framework to learn if you care about quantum machine learning. Its defining feature is automatic differentiation, which lets you compute gradients through a quantum circuit and train it the way you would train a neural network. Xanadu reports more than thirty-five thousand active users on the PennyLane project site, and it stays current with its Catalyst compiler and recent integrations with high-performance computing systems.

For a beginner the appeal is that PennyLane feels like the machine-learning tools you may already use. You define a circuit as a function, wrap it in a decorator, and PennyLane treats it as a differentiable node inside a normal Python program. That design makes hybrid models, where a classical optimiser tunes a quantum circuit, unusually approachable.

import pennylane as qml

dev = qml.device("default.qubit", wires=2)

@qml.qnode(dev)
def bell():
    qml.Hadamard(wires=0)
    qml.CNOT(wires=[0, 1])
    return qml.probs(wires=[0, 1])

print(bell())

OpenQASM 3, The Portable Assembly Standard

OpenQASM is not tied to one vendor, and that is the point. It is a low-level text format that describes a circuit in a portable way, so a program written once can target many machines through their own compilers. Think of it as the assembly language of the quantum world, sitting under the friendlier frameworks rather than competing with them.

The current release is OpenQASM 3, with a 3.1 revision already in progress under an open technical committee that publishes the live OpenQASM specification. Version 3 added real classical control flow, so a circuit can branch on a mid-run measurement, which is essential for error correction. You will rarely write it by hand as a beginner, yet reading it demystifies what your high-level code compiles down to.

OPENQASM 3.0;
include "stdgates.inc";

qubit[2] q;
bit[2] c;

h q[0];
cx q[0], q[1];
c = measure q;

Silq, The High-Level Academic Language

Silq came out of ETH Zurich as a research answer to a real annoyance. Its headline feature is automatic uncomputation, which quietly frees the temporary qubits a routine borrows, so you write less bookkeeping than the mainstream frameworks demand. The team behind the ETH Zurich Silq project designed it after studying Q# and Qiskit, and they describe the goal as a higher-level feel closer to classical code.

Set expectations honestly before you invest time here. Silq is an academic language rather than an industrial toolchain, its most recent book-length treatment is the 2021 Packt title, and momentum is quieter than the vendor-backed options. It is worth a look for the ideas it demonstrates, though it is not the language most learners will ship projects in.

// Silq puts a qubit in superposition and measures it
def main() {
    x := H(0:B);        // Hadamard on a fresh qubit
    return measure(x);  // classical 0 or 1
}

Guppy, The Quantinuum Python-Embedded Language

Guppy is the newest entry here, released as open source by Quantinuum in 2025 for its Helios generation of hardware. It is embedded in Python and looks like Python, yet it is statically compiled and strongly typed, so it catches mistakes such as violating the no-cloning rule before the program ever runs. That safety net is unusual among quantum programming languages and makes it interesting even while it is young.

The reason Guppy exists is that circuits alone are no longer enough. Modern devices support quantum kernels with real control flow, where the next gate depends on a measurement taken mid-program, which is what advanced error correction needs. Guppy expresses that naturally, and the Quantinuum Guppy documentation pairs it with an open-source emulator called Selene for testing without hardware.

from guppylang import guppy
from guppylang.std.quantum import qubit, h, cx, measure

@guppy
def bell() -> tuple[bool, bool]:
    a, b = qubit(), qubit()
    h(a)
    cx(a, b)
    return measure(a), measure(b)

How To Choose Your First Quantum Programming Language

Pick by goal, not by hype. If you want the broadest tutorials and the gentlest on-ramp, start with Qiskit, since it has the largest teaching community among quantum programming languages. If your interest is machine learning, PennyLane will feel most natural, and if you want to understand how hardware runs your circuit, Cirq rewards the extra explicitness.

The others fill specific slots. Reach for Q# when you want a dedicated language that teaches algorithm structure cleanly, read OpenQASM when you need to see the portable layer underneath, and try Silq or Guppy when you are curious about where language design is heading. Whichever you choose, install its simulator first and run the Bell state above before touching real hardware, because the feedback loop is where the learning happens.

Books And Glossaries To Learn Alongside

Code makes more sense with a little theory beside it. If you want the concepts under all of these tools, our guide to what quantum computing is explains qubits, gates, and algorithms without assuming a physics degree. It is the natural companion to the hands-on material here.

For deeper reading we keep a curated hub of the field’s standard texts. The quantum books collection gathers introductions from Nielsen and Chuang through Rieffel and Polak, so you can match a book to your level. The three glossaries linked earlier, covering Qiskit, Cirq, and Q#, give you the exact vocabulary each framework uses.

Keep up with quantum, one email at a time
Join our newsletter for plain-English updates on the tools and research covered in this guide.
Free to join, and you can unsubscribe at any time. Emails are handled by Substack; see our privacy policy.

Common Questions About Quantum Programming Languages

Do I need a quantum computer to learn quantum programming languages

No, and this is the most common misconception. Every framework here includes a simulator that runs on a normal laptop, so you can write, run, and debug real circuits before you ever queue a job on hardware. Most learners spend months on simulators, because they are faster and never wait in a hardware queue.

Which language should a complete beginner start with

Start with Qiskit if you have no strong reason to do otherwise. It has the largest set of tutorials, an active community, and free access to IBM hardware, which lowers the friction of your first real run. You can branch into PennyLane or Cirq once you know what a circuit and a measurement feel like in code.

How much mathematics do quantum programming languages require

Less than most people fear at the start. Basic linear algebra, a feel for probability, and working Python are enough to build and understand your first circuits. Deeper mathematics helps when you design algorithms, but you can pick it up gradually rather than as a prerequisite.

Are Python frameworks really programming languages

It is a fair question, and the honest answer is that the field uses the phrase loosely. Qiskit, Cirq, and PennyLane are Python libraries that act as embedded languages, while Q#, Silq, and Guppy are closer to standalone or purpose-built languages, and OpenQASM is a hardware-facing standard. This guide covers all of them because a learner meets them under the same banner.

Stay current

See today’s quantum computing news on Quantum Zeitgeist for the latest breakthroughs in qubits, hardware, algorithms, and industry deals.

Avatar of Kyrlynn D

Latest Posts by Kyrlynn D: