Skip to content

Bloqade SDK

This pattern uses the Bloqade SDK for building and simulating digital quantum circuits targeting QuEra's neutral-atom quantum computers.

Overview

Bloqade is QuEra's open-source Python SDK that provides:

  • Gate-based circuit construction via the SQUIN domain-specific language
  • Local simulation with the PyQrack backend
  • Compiler infrastructure for targeting neutral-atom hardware
  • Additional dialect support (QASM2, Stim) for interoperability

When to Use Bloqade

  • Building gate-based quantum circuits for neutral-atom hardware
  • Prototyping with local simulation before hardware runs
  • Research and experimentation with digital quantum computing
  • Educational purposes and learning neutral-atom programming

Setup

Step 1: Install Bloqade

pip install bloqade

For specific dialect support:

pip install bloqade-circuit[cirq,qasm2,stim]

Step 2: Write a Circuit

Circuits are written as Python functions decorated with @squin.kernel:

from bloqade import squin

@squin.kernel
def ghz(n: int):
    q = squin.qalloc(n)
    squin.gate.h(q[0])
    for i in range(1, n):
        squin.gate.cx(q[i - 1], q[i])
    return squin.broadcast.measure(q)

Example Workflow

Local Simulation

Use the PyQrack simulator to validate circuits locally:

from bloqade import squin
from bloqade.pyqrack import StackMemorySimulator

@squin.kernel
def ghz(n: int):
    q = squin.qalloc(n)
    squin.gate.h(q[0])
    for i in range(1, n):
        squin.gate.cx(q[i - 1], q[i])
    return squin.broadcast.measure(q)

sim = StackMemorySimulator(min_qubits=4)

# Run the circuit and get measurement results
result = sim.run(ghz, args=(4,))

# Or inspect the state vector directly
state = sim.state_vector(ghz, args=(4,))

Hardware Submission

Coming Soon in Bloqade

Direct hardware submission from Bloqade to Gemini-class digital QPUs is under active development. See the Bloqade documentation for the latest status.

In the meantime, you can submit circuits to hardware using QLAM Shell or QLAM Core.

Integration with QLAM

While Bloqade's built-in hardware submission is in development, you can use Bloqade for circuit construction and simulation alongside QLAM Shell or QLAM Core for hardware submission:

  • Circuit development — Use Bloqade's SQUIN dialect and PyQrack simulator to build and validate circuits
  • Hardware submission — Use QLAM Shell or QLAM Core to submit compiled circuits to Gemini-class QPUs
  • Authentication — See the Authentication Guide for configuring access

Tips

  1. Start with simulation — Validate your circuits locally with PyQrack before submitting to hardware

  2. Use SQUIN for new circuits — SQUIN supports Python control flow (loops, conditionals) that the compiler unrolls automatically, making circuits more concise

  3. Explore other dialects — QASM2 and Stim are available for interoperability with existing circuit definitions

Next Steps