SimulaQron Documentation¶
Welcome to the Quantum Internet simulator SimulaQron!
SimulaQron is a distributed simulation of the end nodes in a future quantum internet with the specific goal to explore application development. Each node in the simulated network provides the illusion of having a local quantum processor to potential applications, while the nodes connect classically to allow the exchange of simulated qubits and the creation of simulated entanglement.
Key features¶
Distributed quantum internet simulation — install a local simulation program on each computer, or run all nodes on a single machine
Three simulation backends — stabilizer formalism (efficient), QuTip (default, mixed state), and ProjectQ (pure state)
Two programming interfaces — the NetQASM SDK (recommended) and a native Twisted mode for low-level access
Configurable network topologies — complete, ring, path, random tree, or custom topologies
Classical communication — built-in client/server framework for exchanging classical messages between nodes
Quick start¶
Install dependencies:
sudo add-apt-repository -y "ppa:deadsnakes/ppa" sudo apt-get install python3.12-full python3.12-dev sudo apt-get install build-essential cmake linux-headers-generic
Create a python virtual environment:
python3.12 -m venv simulaqron-venv
Activate the virtual environment:
source simulaqron-venv/bin/activate
Install SimulaQron:
pip install simulaqron
Configure SimulaQron — use the
simulaqroncommand line tool to create a defaultsimulaqron_settings.jsonfile:simulaqron set default
Configure your network — use the
simulaqroncommand line tool to create a defaultsimulaqron_network.jsonfile, which contains 5 nodes:simulaqron nodes default
Start the simulaqron backend:
simulaqron start
Write your first program using the NetQASM SDK. Save this code as
program.py:from netqasm.runtime.settings import set_simulator set_simulator("simulaqron") from netqasm.sdk.external import NetQASMConnection from netqasm.sdk import Qubit conn = NetQASMConnection("Alice") q = Qubit(conn) q.H() m = q.measure() conn.flush() # execute queued operations print(f"Qubit measurement: {int(m)}") # read measurement result conn.close()
Execute your program:
python program.py
Check the output. Output should be
Qubit measurement: 0/1. Measurement should randomly be0or1.Stop simulaqron backend. Before running another application, stop the current running backend:
pip install simulaqron
Run other more complex examples — see Examples for complete working programs.
Where to go next¶
New to SimulaQron? Start with Getting Started for installation and your first example
Want to write programs? See The NetQASM Interface for the NetQASM SDK reference
Looking for examples? See Examples — new SDK, event-based, and native-mode examples
Configuring networks and settings? See Configuring the Network and Settings.
Architecture and internals? See Overview and Apps Architecture and Interactions
Having issues when running SimulaQron? See Troubleshooting
We also have a paper describing the design of SimulaQron, freely available on arxiv.
Contents:
- Getting started
- The NetQASM interface
- SimulaQron Programming Examples
- SimulaQron Configuration
- Overview
- Troubleshooting SimulaQron
- Where do I find the logs?
- How can I increase/decrease the verbosity of the log files?
- How can I “follow” the log files on real time?
- I run my application, and nothing happens; it seems SimulaQron is stuck
- Log files say “Connection was closed cleanly”
- How can I check if there are “leftover” processes from old executions?
- How can I check if a port is taken or not?
- Installation Issues
- Architecture and Interactions of a SimulaQron App
- simulaqron package
Indices and tables¶
Index
Module Index
Search