Giter Site home page Giter Site logo

yyq2020 / simqn-test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ertuil/simqn

0.0 0.0 0.0 5.36 MB

A discrete time scheduler designed for Quantum Network

Home Page: https://ertuil.github.io/SimQN

License: GNU General Public License v3.0

Python 97.40% Cython 2.60%

simqn-test's Introduction

SimQN

Pytest Flake8

Welcome to SimQN's documentation. SimQN is a discrete-event-based network simulation platform for quantum networks. SimQN enables large-scale investigations, including QKD protocols, entanglement distributions protocols, and routing algorithms, resource allocation schemas in quantum networks. For example, users can use SimQN to design routing algorithms for better QKD performance. For more information, please refer to the Documents.

SimQN is a Python3 library for quantum networking simulation. It is designed to be general purpose. It means that SimQN can be used for both QKD network, entanglement distribution networks, and other kinds of quantum networks' evaluation. The core idea is that SimQN makes no architecture assumption. Since there is currently no recognized network architecture in quantum network investigations, SimQN stays flexible in this aspect.

SimQN provides high performance for large-scale network simulation. SimQN uses Cython to compile critical codes in C/C++ libraries to boost the evaluation. Also, along with the commonly used quantum state-based physical models, SimQN provides a higher-layer fidelity-based entanglement physical model to reduce the computation overhead and brings convenience for users in evaluation. Last but not least, SimQN provides several network auxiliary models for easily building network topologies, producing routing tables and managing multiple session requests.

Get Help

Installation

Install and update using pip:

pip3 install -U qns

First sight of SimQN

Here is an example of using SimQN.

    from qns.simulator.simulator import Simulator
    from qns.network.topology import RandomTopology
    from qns.network.protocol.entanglement_distribution import EntanglementDistributionApp
    from qns.network import QuantumNetwork
    from qns.network.route.dijkstra import DijkstraRouteAlgorithm
    from qns.network.topology.topo import ClassicTopology
    import qns.utils.log as log

    init_fidelity = 0.99   # the initial entanglement's fidelity
    nodes_number = 150     # the number of nodes
    lines_number = 450     # the number of quantum channels
    qchannel_delay = 0.05  # the delay of quantum channels
    cchannel_delay = 0.05  # the delay of classic channels
    memory_capacity = 50   # the size of quantum memories
    send_rate = 10         # the send rate
    requests_number = 10   # the number of sessions (SD-pairs)

    # generate the simulator
    s = Simulator(0, 10, accuracy=1000000)

    # set the log's level
    log.logger.setLevel(logging.INFO)
    log.install(s)

    # generate a random topology using the parameters above
    # each node will install EntanglementDistributionApp for hop-by-hop entanglement distribution
    topo = RandomTopology(nodes_number=nodes_number,
                          lines_number=lines_number,
                          qchannel_args={"delay": qchannel_delay},
                          cchannel_args={"delay": cchannel_delay},
                          memory_args=[{"capacity": memory_capacity}],
                          nodes_apps=[EntanglementDistributionApp(init_fidelity=init_fidelity)])

    # build the network, with Dijkstra's routing algorithm
    net = QuantumNetwork(topo=topo, classic_topo=ClassicTopology.All, route=DijkstraRouteAlgorithm())

    # build the routing table
    net.build_route()

    # randomly select multiple sessions (SD-pars)
    net.random_requests(requests_number, attr={"send_rate": send_rate})

    # all entities in the network will install the simulator and do initiate works.
    net.install(s)

    # run simulation
    s.run()

FAQ

Why choose SimQN?

SimQN is designed as a functional and easy-to-use simulator, like NS3 in classic networks, it provides numerous functions for anyone who wants to simulate a QKD network or entanglement-based network.

Compared with the existing quantum network simulators, the developers pay more attention to simulation in the network area. Currently, a network simulation can be complicated, as users may have to implement routing algorithms and multiply protocols in different layers to complete a simulation. SimQN aims to break down this problem by providing a modulized quantum node and reusable algorithms and protocols. As a result, users can focus on what they study and reuse other built-in modules. The developers believe this will significantly reduce the burden on our users. As for the physics area, SimQN can also simulate quantum noise, fidelity, and more. Thus, if you focus on the research of the quantum network area, SimQN can be a competitive choice.

How to contribute?

Welcome to contribute through Github Issue or Pull Requests. Please refer to the develop guide. If you have any questions, you are welcome to contact the developers via e-mail.

License and Authors

SimQN is an open-source project under GPLv3 license. The authors of the paper includes:

  • Lutong Chen (ertuil), School of Cyber Science and Technology, University of Science and Technology of China, China. [email protected]
  • Jian Li(infonetlijian), School of Cyber Science and Technology, University of Science and Technology of China, China.
  • Kaiping Xue (kaipingxue), School of Cyber Science and Technology, University of Science and Technology of China, China. [email protected]
  • Nenghai Yu, School of Cyber Science and Technology, University of Science and Technology of China, China.
  • Ruidong Li, Institute of Science and Engineering, Kanazawa University, Japan.
  • Qibin Sun, School of Cyber Science and Technology, University of Science and Technology of China, China.
  • Jun Lu, School of Cyber Science and Technology, University of Science and Technology of China, China.

Other contributors includes:

  • Zirui Xiao, School of Cyber Science and Technology, University of Science and Technology of China, China.
  • Yuqi Yang, School of Cyber Science and Technology, University of Science and Technology of China, China.
  • Bing Yang, School of Cyber Science and Technology, University of Science and Technology of China, China.

simqn-test's People

Contributors

ertuil avatar k1yotaka avatar yyq2020 avatar infonetlijian avatar kaipingxue avatar ytxing avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.