Quantum Outpost

Reference

Cross-SDK Rosetta

The same canonical circuits in five SDKs, side by side. Built so you can switch SDKs without re-learning quantum, and pick by the workflow that fits — not the marketing budget behind it.

SDK at a glance

SDK Vendor Best for Weakness
Qiskit IBM Default tutorial choice; deepest ecosystem; broadest tutorial coverage Verbose; frequent breaking changes between major versions
Cirq Google Replicating Google Quantum AI papers; explicit qubit objects Smaller ecosystem; thinner tutorial layer
PennyLane Xanadu Variational + QML; gradient-friendly via parameter-shift; best chemistry workflows Heavier dependency surface (numpy/torch/tf interfaces)
Braket SDK AWS Multi-vendor cloud (IonQ, Quantinuum, Rigetti, QuEra) under one billing account No built-in QFT/Grover/etc. — primitive-level only
OpenQASM 3 OpenQASM working group Vendor-neutral interchange; reproducibility across SDKs Not a programming SDK — no high-level abstractions

Bell state |Φ⁺⟩

Two qubits, maximally entangled. The 'hello world' of quantum — every SDK should compile a 4-line version.

Tests the basics: Hadamard, CNOT, measurement, and the standard import path.

Qiskit

python

from qiskit import QuantumCircuit

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

Cirq

python

import cirq

q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit([
    cirq.H(q0),
    cirq.CNOT(q0, q1),
    cirq.measure(q0, q1, key="m"),
])

PennyLane

python

import pennylane as qml

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

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

Amazon Braket SDK

python

from braket.circuits import Circuit

bell = Circuit().h(0).cnot(0, 1)
# Measurement is implicit — sample by running on a device:
# device.run(bell, shots=1024)

OpenQASM 3

openqasm

OPENQASM 3.0;
include "stdgates.inc";

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

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

GHZ state — 3-qubit entanglement

The cascading-CNOT pattern that produces |000⟩ + |111⟩. Same structure scales to any number of qubits.

Tests multi-qubit gate composition and how each SDK handles range-style qubit selection.

Qiskit

python

from qiskit import QuantumCircuit

qc = QuantumCircuit(3, 3)
qc.h(0)
qc.cx(0, 1)
qc.cx(1, 2)
qc.measure(range(3), range(3))

Cirq

python

import cirq

qs = cirq.LineQubit.range(3)
circuit = cirq.Circuit([
    cirq.H(qs[0]),
    cirq.CNOT(qs[0], qs[1]),
    cirq.CNOT(qs[1], qs[2]),
    cirq.measure(*qs, key="m"),
])

PennyLane

python

import pennylane as qml

dev = qml.device("default.qubit", wires=3, shots=1024)

@qml.qnode(dev)
def ghz():
    qml.Hadamard(wires=0)
    qml.CNOT(wires=[0, 1])
    qml.CNOT(wires=[1, 2])
    return qml.sample()

Amazon Braket SDK

python

from braket.circuits import Circuit

ghz = Circuit().h(0).cnot(0, 1).cnot(1, 2)

OpenQASM 3

openqasm

OPENQASM 3.0;
include "stdgates.inc";

qubit[3] q;
bit[3]   c;

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

Quantum Fourier Transform (3 qubits)

The QFT is the engine inside Shor, QPE, and most algorithms with quantum advantage. Each SDK exposes it differently — note the bit-reversal SWAP.

Tests controlled-phase gates and built-in algorithm libraries.

Qiskit

python

from qiskit import QuantumCircuit
from qiskit.circuit.library import QFT

qc = QuantumCircuit(3)
qc.append(QFT(3, do_swaps=True), [0, 1, 2])

Cirq

python

import cirq

qs = cirq.LineQubit.range(3)
qft = cirq.qft(*qs, without_reverse=False)
circuit = cirq.Circuit([qft])

PennyLane

python

import pennylane as qml

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

@qml.qnode(dev)
def run_qft():
    qml.QFT(wires=[0, 1, 2])
    return qml.state()

Amazon Braket SDK

python

import math
from braket.circuits import Circuit

# Hand-rolled — Braket has no built-in QFT primitive
qft = Circuit()
qft.h(2)
qft.cphaseshift(1, 2, math.pi / 2)
qft.cphaseshift(0, 2, math.pi / 4)
qft.h(1)
qft.cphaseshift(0, 1, math.pi / 2)
qft.h(0)
qft.swap(0, 2)

OpenQASM 3

openqasm

OPENQASM 3.0;
include "stdgates.inc";

qubit[3] q;
h q[2];
ctrl @ p(pi/2)  q[1], q[2];
ctrl @ p(pi/4)  q[0], q[2];
h q[1];
ctrl @ p(pi/2)  q[0], q[1];
h q[0];
swap q[0], q[2];

Grover (2 qubits, marking |11⟩)

Smallest meaningful Grover instance: one iteration finds the marked state with probability 1.

Tests multi-qubit phase gates (CZ acts as the oracle for |11⟩) and Hadamard sandwiches.

Qiskit

python

from qiskit import QuantumCircuit

qc = QuantumCircuit(2, 2)
qc.h([0, 1])              # uniform superposition
qc.cz(0, 1)               # oracle for |11⟩
qc.h([0, 1])              # diffuser begins
qc.x([0, 1])
qc.cz(0, 1)
qc.x([0, 1])
qc.h([0, 1])              # diffuser ends
qc.measure([0, 1], [0, 1])

Cirq

python

import cirq

q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit([
    cirq.H(q0), cirq.H(q1),
    cirq.CZ(q0, q1),
    cirq.H(q0), cirq.H(q1),
    cirq.X(q0), cirq.X(q1),
    cirq.CZ(q0, q1),
    cirq.X(q0), cirq.X(q1),
    cirq.H(q0), cirq.H(q1),
    cirq.measure(q0, q1, key="m"),
])

PennyLane

python

import pennylane as qml

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

@qml.qnode(dev)
def grover2():
    qml.Hadamard(wires=0); qml.Hadamard(wires=1)
    qml.CZ(wires=[0, 1])                    # oracle for |11⟩
    qml.Hadamard(wires=0); qml.Hadamard(wires=1)
    qml.PauliX(wires=0); qml.PauliX(wires=1)
    qml.CZ(wires=[0, 1])
    qml.PauliX(wires=0); qml.PauliX(wires=1)
    qml.Hadamard(wires=0); qml.Hadamard(wires=1)
    return qml.sample()

Amazon Braket SDK

python

from braket.circuits import Circuit

grover = (
    Circuit()
    .h(0).h(1)
    .cz(0, 1)
    .h(0).h(1)
    .x(0).x(1)
    .cz(0, 1)
    .x(0).x(1)
    .h(0).h(1)
)

OpenQASM 3

openqasm

OPENQASM 3.0;
include "stdgates.inc";

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

h q[0]; h q[1];
cz q[0], q[1];
h q[0]; h q[1];
x q[0]; x q[1];
cz q[0], q[1];
x q[0]; x q[1];
h q[0]; h q[1];
c = measure q;

Honest picking guide

Built atop the same canonical circuits taught from first principles in our Algorithms track. Try them live in the browser playground.