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

  1. 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
    
  2. Create a python virtual environment:

    python3.12 -m venv simulaqron-venv
    
  3. Activate the virtual environment:

    source simulaqron-venv/bin/activate
    
  4. Install SimulaQron:

    pip install simulaqron
    
  5. Configure SimulaQron — use the simulaqron command line tool to create a default simulaqron_settings.json file:

    simulaqron set default
    
  6. Configure your network — use the simulaqron command line tool to create a default simulaqron_network.json file, which contains 5 nodes:

    simulaqron nodes default
    
  7. Start the simulaqron backend:

    simulaqron start
    
  8. 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()
    
  9. Execute your program:

    python program.py
    
  10. Check the output. Output should be Qubit measurement: 0/1. Measurement should randomly be 0 or 1.

  11. Stop simulaqron backend. Before running another application, stop the current running backend:

    pip install simulaqron
    
  12. Run other more complex examples — see Examples for complete working programs.

Where to go next

We also have a paper describing the design of SimulaQron, freely available on arxiv.

Indices and tables

  • Index

  • Module Index

  • Search