Features · Quantum circuits

Quantum Circuit modeling in BESSER.

Model and generate quantum circuits within the same BESSER low-code workflow. Define your circuit, validate it, and generate runnable Qiskit code targeting local simulation, noise-aware testing, or real IBM Quantum hardware at the click of a button.

editor.besser-pearl.org — quantum circuit canvas
BESSER Quantum Circuit editor
See it in action

One model. Three outputs.

The same quantum circuit shown above, implemented as executable Qiskit code: local Aer simulation (left), local simulation with mock noise/error models (center), and execution on real IBM Quantum hardware (right).

AER Simulation
aer_simulation.py
import sys
import os
sys.path = [p.strip() for p in sys.path if p]
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, transpile
from qiskit.circuit import Instruction
from qiskit_aer import AerSimulator
from qiskit.circuit.library import *

# Initialize Registers

q = QuantumRegister(2, 'q')
c = ClassicalRegister(2, 'c')

# Initialize Circuit
qc = QuantumCircuit(q, c)
# Operations
qc.append(HGate(), [q[0]])
qc.append(HGate(), [q[1]])
qc.append(ZGate().control(1, ctrl_state='1'), [q[0], q[1]])
qc.append(HGate(), [q[0]])
qc.append(HGate(), [q[1]])
qc.append(XGate(), [q[0]])
qc.append(XGate(), [q[1]])
qc.append(ZGate().control(1, ctrl_state='1'), [q[0], q[1]])
qc.append(XGate(), [q[0]])
qc.append(XGate(), [q[1]])
qc.append(HGate(), [q[0]])
qc.append(HGate(), [q[1]])
qc.measure(q[0], c[0])
qc.measure(q[1], c[1])
# Draw
print(qc.draw())
# Execution (Local Aer Simulator)
print("Simulating circuit with Aer Simulator...")
simulator = AerSimulator()
transpiled_qc = transpile(qc, simulator)
result = simulator.run(transpiled_qc, shots=1024).result()
counts = result.get_counts()
print("Counts:", counts)
Noise Simulator
noise_simulator.py
import sys
import os
sys.path = [p.strip() for p in sys.path if p]
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, transpile
from qiskit.circuit import Instruction
from qiskit_aer import AerSimulator
from qiskit_ibm_runtime.fake_provider import FakeManilaV2
from qiskit.circuit.library import *

# Initialize Registers

q = QuantumRegister(2, 'q')
c = ClassicalRegister(2, 'c')

# Initialize Circuit
qc = QuantumCircuit(q, c)
# Operations
qc.append(HGate(), [q[0]])
qc.append(HGate(), [q[1]])
qc.append(ZGate().control(1, ctrl_state='1'), [q[0], q[1]])
qc.append(HGate(), [q[0]])
qc.append(HGate(), [q[1]])
qc.append(XGate(), [q[0]])
qc.append(XGate(), [q[1]])
qc.append(ZGate().control(1, ctrl_state='1'), [q[0], q[1]])
qc.append(XGate(), [q[0]])
qc.append(XGate(), [q[1]])
qc.append(HGate(), [q[0]])
qc.append(HGate(), [q[1]])
qc.measure(q[0], c[0])
qc.measure(q[1], c[1])
# Draw
print(qc.draw())
# Execution (Fake Backend - simulates real hardware noise)
print("Simulating circuit with Fake Backend (FakeManilaV2)...")
fake_backend = FakeManilaV2()
# Note: Fake backends simulate noise characteristics of real hardware
transpiled_qc = transpile(qc, fake_backend)
simulator = AerSimulator.from_backend(fake_backend)
result = simulator.run(transpiled_qc, shots=1024).result()
counts = result.get_counts()
print("Counts:", counts)
IBM Hardware
ibm_hardware.py
import sys
import os
sys.path = [p.strip() for p in sys.path if p]
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, transpile
from qiskit.circuit import Instruction
from qiskit_ibm_runtime import QiskitRuntimeService, SamplerV2 as Sampler
from qiskit.circuit.library import *

# Initialize Registers

q = QuantumRegister(2, 'q')
c = ClassicalRegister(2, 'c')


# Initialize Circuit
qc = QuantumCircuit(q, c)
# Operations

qc.append(HGate(), [q[0]])
qc.append(HGate(), [q[1]])
qc.append(ZGate().control(1, ctrl_state='1'), [q[0], q[1]])
qc.append(HGate(), [q[0]])
qc.append(HGate(), [q[1]])
qc.append(XGate(), [q[0]])
qc.append(XGate(), [q[1]])
qc.append(ZGate().control(1, ctrl_state='1'), [q[0], q[1]])
qc.append(XGate(), [q[0]])
qc.append(XGate(), [q[1]])
qc.append(HGate(), [q[0]])
qc.append(HGate(), [q[1]])
qc.measure(q[0], c[0])
qc.measure(q[1], c[1])

# Draw
print(qc.draw())
# Execution (IBM Quantum Hardware)
print("Running circuit on IBM Quantum Hardware...")
# Initialize the service (requires IBMQ account setup)
# To save your credentials: QiskitRuntimeService.save_account(channel="ibm_quantum", token="YOUR_TOKEN")
service = QiskitRuntimeService()

# Get the least busy backend that can handle this circuit
backend = service.least_busy(operational=True, simulator=False, min_num_qubits=qc.num_qubits)
print(f"Using backend: {backend.name}")

# Transpile for the target backend
transpiled_qc = transpile(qc, backend)

# Run using the Sampler primitive
sampler = Sampler(mode=backend)
job = sampler.run([transpiled_qc], shots=1024)
print(f"Job ID: {job.job_id()}")

# Wait for results
result = job.result()
# Get quasi-distribution from the first pub result
pub_result = result[0]
counts = pub_result.data.c.get_counts()
print("Counts:", counts)
Capabilities

Everything you need to model a quantum circuit.

Walkthrough

Watch it end to end

Build a quantum circuit on the canvas, then generate runnable Qiskit code targeting local AER simulation or real IBM Quantum hardware.

editor.besser-pearl.org — model → generate

Hardware-agnostic metamodel

The B-UML quantum metamodel represents quantum circuits and hybrid quantum-classical applications independently of any specific target hardware or execution backend. Both pure quantum and hybrid circuit structures are supported, making it adaptable across a wide range of quantum computing contexts.

  • Abstract representation of quantum circuit architectures
  • Supports pure quantum and hybrid quantum-classical structures
  • Hardware-independent
Read the docs

Rich gate catalog

The metamodel supports a wide range of gate types, from single-qubit and multi-qubit gates to measurement, barrier and reset operations. Each gate type comes with its own set of parameters to fully define its behavior.

  • Single-qubit: H, X, Y, Z, S, T, Rx, Ry, Rz, etc.
  • Multi-qubit: CNOT, CZ, SWAP, Toffoli, etc.
  • Operations: Measure, Barrier, Reset, etc.
Read the docs

1 model, 3 execution targets

The Qiskit generator supports three execution targets: local AER simulation, noise-aware mock simulation, and direct execution on real IBM Quantum hardware. The same B-UML model is used to generate code for any of the three targets.

  • Local AER simulation
  • Noise-aware simulation
  • Real IBM Quantum hardware execution
Read the docs

Visual quantum circuit editor

The BESSER Web Modeling Editor supports the quantum circuit diagram type directly in the browser. Gates, qubits, classical registers and hybrid components can all be dragged and dropped onto the canvas. Qiskit code can then be generated directly from the editor.

  • No installation needed
  • Drag and drop gates, qubits, registers and hybrid components
  • Generate code directly from the editor
Try it here

Real-time gate placement validation

As you build your circuit in the BESSER Web Modeling Editor, gate placement is validated in real time. The editor actively prevents invalid operations — such as applying a multi-qubit gate to an insufficient number of qubits, placing a gate on an already-measured qubit, or connecting incompatible register types — so errors are caught at the point of interaction rather than at generation or execution time.

  • Blocks multi-qubit gates placed on an incorrect qubit count
  • Prevents gate placement after qubit measurement
  • Flags incompatible classical and quantum register wiring
Read the docs

From model to complete code

Beyond the circuit definition itself, the Qiskit generator produces the full execution-ready scaffolding for the chosen target. This includes backend selection and configuration, transpilation and optimisation passes suited to the target device, job submission, result retrieval and classical post-processing of measurement outcomes — giving you a runnable script with no manual wiring required.

  • Backend selection, configuration and transpilation passes
  • Job submission and result retrieval
  • Classical post-processing of measurement outcomes
Read the docs