开船后做cqc

I was looking for a framework to simulate quantum communications for some time ago in order to be able to execute, simulate and test the protocols I am working on. One of the requirements was to be able to simulate quantum communication using several hosts (be that in the form of separate servers, virtual machines or containers). After some attempts to use a well known quantum computing framework with the (bad) trick of sending the information of the whole state of the system from one host to a second one over the network, I reached SimulaQron + CQC. And it looked very promising from the very beginning!

一段时间之前,我一直在寻找一个模拟量子通信的框架,以便能够执行,模拟和测试我正在研究的协议。 要求之一是能够使用多个主机(以单独的服务器,虚拟机或容器的形式)模拟量子通信。 在尝试使用一种众所周知的量子计算框架,并通过网络将系统整个状态的信息从一台主机发送到另一台主机的(错误)技巧之后,我到达了SimulaQron + CQC。 从一开始它就看起来很有希望!

SimulaQron和CQC (SimulaQron and CQC)

Just a few words on the framework components, just borrowing the descriptions from the corresponding documentation pages. As you can see we are talking about two main components, SimulaQron (http://www.simulaqron.org and https://softwarequtech.github.io/SimulaQron/html/index.html) and CQC, that stands for Classical-Quantum Combiner, (https://softwarequtech.github.io/CQC-Python/index.html), both created at QUTech that is highly active in the field of quantum technologies.

在框架组件上只需说几句话,就可以借鉴相应文档页面中的描述。 如您所见,我们正在谈论两个主要组件,即SimulaQron( http://www.simulaqron.org和https://softwarequtech.github.io/SimulaQron/html/index.html )和CQC,它们代表Classical-量子组合器( https://softwarequtech.github.io/CQC-Python/index.html )都是在QUTech创建的,在量子技术领域非常活跃。

SimulaQron

SimulaQron

SimulaQron is an application level simulator for a quantum internet that allows you to program your own quantum internet applications. Explore how to realize software for a quantum internet connecting local quantum processors by quantum communication, and develop your own libraries and software engineering concepts suitable for a quantum internet.

SimulaQron是用于量子互联网的应用程序级模拟器,可让您编写自己的量子互联网应用程序。 探索如何实现通过量子通信连接本地量子处理器的量子互联网的软件,并开发适合于量子互联网的自己的库和软件工程概念。

CQC

CQC

This Python library provides a way to program a protocol on a network where the nodes listen to instructions through the classical-quantum combiner (CQC) interface. For more information on how to use this library with SimulaQron, see https://softwarequtech.github.io/SimulaQron/html/GettingStarted.html.

这个Python库提供了一种在网络上对协议进行编程的方法,其中节点通过经典量子组合器(CQC)接口侦听指令。 有关如何在SimulaQron中使用此库的更多信息,请参见https://softwarequtech.github.io/SimulaQron/html/GettingStarted.html 。

As it can be seen there is a clear relation between these two components. This relation is depicted in the following figure, taken from the previously named documentation pages

可以看出,这两个组件之间存在明确的关系。 下图描述了这种关系,取自先前命名的文档页面

Image for post

This image reflects the possibilities you have to use SimulaQron from a application program: by using the native interface directly with Twisted or by using the Python or C library that make use of the CQC Interface. As recommended in the documentation we will use the last method with the Python library for the purpose of this entry.

此图像反映了您必须从应用程序中使用SimulaQron的可能性:通过将本机接口直接与Twisted一起使用,或者使用使用CQC接口的Python或C库。 根据文档中的建议,本条目将针对Python库使用最后一种方法。

I will not go here over the procedure to install (quite easy) the components or any other detail that can be found in the documentation pages.

我不会在这里讨论安装(非常简单)组件的过程,或者在文档页面上可以找到的任何其他详细信息。

传送:当地情况 (Teleportation: the local case)

The first thing I tried to learn how this framework works was to run the classical teleportation algorithm that is included in the framework examples in github (see below). Of course previous to execute the algorithm, you have to setup the SimulaQron virtual network. Therefore the path is clear: create and start the virtual network using SimulaQron and then execute the teleportation algorithm leveraging CQC. In this local case it is easy to find the instructions in the documentation sites, even though the network creation and algorithm execution are not presented together. Let us do it here.

我试图了解该框架如何工作的第一件事是运行经典的隐形传态算法,该算法包含在github的框架示例中(请参见下文)。 当然,在执行该算法之前,您必须设置SimulaQron虚拟网络。 因此,路径很清晰:使用SimulaQron创建并启动虚拟网络,然后利用CQC执行隐形传态算法。 在这种本地情况下,即使网络创建和算法执行未一起出现,也很容易在文档站点中找到说明。 让我们在这里做。

For the network creation we can follow the instructions in https://softwarequtech.github.io/SimulaQron/html/ConfNodes.html#starting-the-simulaqron-backend with some trivial modification

对于网络创建,我们可以遵循https://softwarequtech.github.io/SimulaQron/html/ConfNodes.html#starting-the-simulaqron-backend中的说明进行一些简单的修改

$ simulaqron start --nodes Alice,Bob

This will start the ‘default’ virtual network replacing the original network in the configuration file, provided that you answer yes to the question

如果您对问题的回答为“是”,这将启动“默认”虚拟网络,替换配置文件中的原始网络。

Do you want to add/replace the network 'default' in the file  /usr/local/lib/python3.8/site-packages/simulaqron/config/network.json with a new network? (yes/no)

If you respond no, the process is aborted.

如果您回答“否”,则该过程将中止。

Note: I found some confusing behavior when using the options of the simulaqron command which are not very well described in the documentation from my point of view.

注意:在使用 simulaqron 命令 的选项时,我发现一些令人困惑的行为, 从我的角度来看,在文档中没有很好地描述 这些选项

The next step is to execute the algorithm, that you can find in https://github.com/SoftwareQuTech/CQC-Python/tree/master/examples/pythonLib/teleport, by running the run.sh script or by running the Alice and Bob python files separately (for example in separate terminals)

下一步是执行算法,您可以通过运行run.sh脚本或运行Alice在https://github.com/SoftwareQuTech/CQC-Python/tree/master/examples/pythonLib/teleport中找到该算法和Bob python文件分开(例如在单独的终端中)

$ python3 aliceTest.py

and

$ python3 bobTest.py

What you get from Alice is

你从爱丽丝那里得到的是

|-----------------------------------------------|| App Alice: Measurement outcomes are: a=0, b=0 ||-----------------------------------------------|

and for Bob

和鲍勃

|------------------------------------|| App Bob: Measurement outcome is: 0 ||------------------------------------|

The relevant point here is that this is happening in two separate processes, and the algorithm is sending (simulated) quantum information (one of the qubits of the EPR pair) over the virtual network from one process (Alice) the the other (Bob), in addition to classical information.

这里的相关点是,这是在两个单独的进程中发生的,并且该算法正在通过虚拟网络从一个进程(爱丽丝)和另一个进程(鲍勃)发送(模拟)量子信息(EPR对的量子位之一)。 ,以及经典信息。

Just to clarify that the algorithm is teleporting a |+>| state, therefore the measurement in Bob will give us 0 or 1 with equal probability.

只是为了说明该算法正在传送|+>| 状态,因此Bob的测量将以相等的概率给我们0或1。

We can now stop the network

现在我们可以停止网络

$ simulaqron stop

传送:分布式案例 (Teleportation: the distributed case)

Let us go for the real objective of this entry. It was clear for me that the distributed case was possible as well, but the instructions for creating the distributed virtual network are not clear at all in the documentation IMHO, therefore I think it was worth to explain it here.

让我们为这篇文章的真正目标而努力。 对我来说很明显,分布式案例也是可能的,但是在文档恕我直言中,创建分布式虚拟网络的说明根本不清楚,因此我认为值得在此进行解释。

I will use containers in order to create the distributed environment in my laptop, but of course you can run these containers y separate systems. In order to have all the required components I created a folder and inside it I copied the Dockerfile and the same python files as before, aliceTest.py and bobTest.py with a small modification.

我将使用容器在笔记本电脑中创建分布式环境,但是您当然可以在单独的系统中运行这些容器。 为了拥有所有必需的组件,我创建了一个文件夹,并在其中复制了Dockerfile和与以前相同的python文件,aliceTest.py和bobTest.py进行了少量修改。

In order to use a SimulaQron virtual network different than the default we need to adapt the python files to include the reference to the new virtual network (that we can call newnet) and modify in the python files the line

为了使用不同于默认值的SimulaQron虚拟网络,我们需要调整python文件以包含对新虚拟网络的引用(我们可以称为newnet ),并在python文件中修改该行

with CQCConnection("Alice") as Alice:

to include the reference to the virtual network

包括对虚拟网络的引用

with CQCConnection("Alice", network_name="newnet") as Alice:

and same for bobTest.py.

与bobTest.py相同。

The use of a different virtual network is not required, but I think it helps to keep things clear.

不需要使用其他虚拟网络,但是我认为这有助于保持思路清晰。

The Dockerfile to create the image contains the installation of SimulaQron (that includes CQC) and the copy to the image of the python files:

用于创建映像的Dockerfile包含SimulaQron的安装(包括CQC)和python文件映像的副本:

$ cat DockerfileFROM python:3WORKDIR /usr/src/appRUN pip install --no-cache-dir simulaqronCOPY . .

For the creation and management of the images and containers I am using podman because it is the preferred solution for my Fedora 31.

我使用podman创建和管理图像和容器,因为它是Fedora 31的首选解决方案。

$ sudo podman build -t teleport .STEP 1: FROM python:3STEP 2: WORKDIR /usr/src/app--> Using cache 9338ecb398d0faf388ce89b09f167a40828835812e3e0f88a9a6e4b2138307f5STEP 3: RUN pip install --no-cache-dir simulaqronCollecting simulaqron  Downloading simulaqron-3.0.15-py3-none-any.whl (113 kB)     |████████████████████████████████| 113 kB 10.2 MB/s Collecting ......STEP 4: COPY . .STEP 5: COMMIT teleport--> 2930a892a322930a892a326e89e848e4917f42016412595d239d400ea5aab32a4cf0494c7ff$ sudo podman imagesREPOSITORY                   TAG     IMAGE ID      CREATED        SIZElocalhost/teleport           latest  2930a892a326  4 minutes ago  1.1 GB

We can now run two containers in interactive mode from this image in separate terminals to realize our distributed teleportation algorithm. First let us create a new network for the containers that will make use of the embedded DNS and therefore we do not need to worry about IPs and we can use just hostnames (do not confuse the container networks with the SimulaQron networks).

现在,我们可以在单独的终端中从该图像以交互方式运行两个容器,以实现我们的分布式隐形传送算法。 首先,让我们为将使用嵌入式DNS的容器创建一个新的网络,因此我们不必担心IP,我们可以仅使用主机名(不要将容器网络与SimulaQron网络混淆)。

$ sudo podman network create teleport/etc/cni/net.d/teleport.conflist$ sudo podman network lsNAME       VERSION  PLUGINSpodman     0.4.0    bridge,portmap,firewall,tuningteleport   0.4.0    bridge,portmap,firewall,dnsname

And now we can run the containers to be able to start the SimulaQron network as well as to launch the python programs that implement the teleportation algorithm.

现在,我们可以运行容器以启动SimulaQron网络以及启动实现隐形传送算法的python程序。

$ sudo podman run -it --rm --network teleport --name Alice localhost/teleport bashroot@cccb86e7f91f:/usr/src/app# lsDockerfile  aliceTest.py  bobTest.pyroot@cccb86e7f91f:/usr/src/app#

and in a separate terminal

并在单独的终端中

$ sudo podman run -it --rm --network teleport --name Bob localhost/teleport bashroot@71b0916b25de:/usr/src/app#

Once the containers are running we have to create the SimulaQron network configuration in both nodes taking into account that we need to be consistent with the node names and ports.

容器运行后,必须考虑到我们需要与节点名称和端口保持一致,因此必须在两个节点中创建SimulaQron网络配置。

root@cccb86e7f91f:/usr/src/app# simulaqron nodes add Alice --hostname Alice.dns.podman --app-port  8000 --cqc-port 8001 --vnode-port 8002 --network-name=”newnet” -froot@cccb86e7f91f:/usr/src/app# simulaqron nodes add Bob --hostname Bob.dns.podman --app-port 9000 --cqc-port 9001 --vnode-port 9002 --network-name="newnet" -f

We execute the same network configuration commands in both containers. Before moving on, let us examine the previous commands.

我们在两个容器中执行相同的网络配置命令。 在继续之前,让我们检查一下先前的命令。

With them we create two SimulaQron nodes (Alice and Bob) in a new SimulaQron virtual network named newnet. For each of these nodes we identify the host where the node will run (hostname, taking advantage of the embedded containers DNS in the teleport container network, that use the domain dns.podman) and the ports to run the virtual network and cqc processes that must be different for each node. Finally we use the -f flag to force the writing of the config file without asking for that. Something that is not configured in the previous commands is the topology of the virtual network, that means that it will be full mesh by default. You can find more information on creating topologies in the documentation page.

通过它们,我们在名为newnet的新SimulaQron虚拟网络中创建了两个SimulaQron节点(Alice和Bob)。 对于这些节点的每我们识别该主机,其中节点将运行(主机名,服用瞬间移动容器网络在嵌入容器DNS,使用域dns.podman的优势)和端口,以运行该虚拟网络和CQC流程,每个节点必须不同。 最后,我们使用-f标志来强制编写配置文件,而无需这样做。 先前命令中未配置的是虚拟网络的拓扑,这意味着默认情况下它将是全网格的。 您可以在文档页面中找到有关创建拓扑的更多信息。

We can see the configurations created in the config file, that include the default network:

我们可以看到在配置文件中创建的配置,其中包括默认网络:

root@cccb86e7f91f:/usr/src/app# cat /usr/local/lib/python3.8/site-packages/simulaqron/config/network.json{    "default": {...    },    "newnet": {        "nodes": {            "Alice": {                "app_socket": [                    "Alice.dns.podman",                    8000                ],                "cqc_socket": [                    "Alice.dns.podman",                    8001                ],                "vnode_socket": [                    "Alice.dns.podman",                    8002                ]            },            "Bob": {                "app_socket": [                    "Bob.dns.podman",                    9000                ],                "cqc_socket": [                    "Bob.dns.podman",                    9001                ],                "vnode_socket": [                    "Bob.dns.podman",                    9002                ]            }        },        "topology": null    }

We can now start the SimulaQron virtual network in both containers (same command in both containers):

现在,我们可以在两个容器中启动SimulaQron虚拟网络(两个容器中的命令相同):

root@cccb86e7f91f:/usr/src/app# simulaqron start --nodes=Alice,Bob --name="newnet" --keep

The --keepoption forces the use of the configuration created previously.

--keep选项强制使用先前创建的配置。

And now we can run our distributed teleportation algorithm. In Alice

现在我们可以运行分布式隐形传态算法。 在爱丽丝

root@cccb86e7f91f:/usr/src/app# python aliceTest.py 

and Bob

和鲍勃

root@71b0916b25de:/usr/src/app# python bobTest.py

Once the processes are running in both containers they can communicate and execute the algorithm in a distributed form.

一旦两个容器中的进程都运行,它们就可以以分布式形式进行通信和执行算法。

Alice will show something like

爱丽丝将展示类似

|-----------------------------------------------|| App Alice: Measurement outcomes are: a=0, b=1 ||-----------------------------------------------|root@cccb86e7f91f:/usr/src/app#

and Bob something like

和鲍勃类似

|------------------------------------|| App Bob: Measurement outcome is: 1 ||------------------------------------|root@71b0916b25de:/usr/src/app#

Starting from here we can figure out how to simulate and test new distributed quantum network applications with the help of SimulaQron and CQC.

从这里开始,我们可以找出如何在SimulaQron和CQC的帮助下模拟和测试新的分布式量子网络应用程序。

翻译自: https://medium.com/@fernando.delaiglesia/simulating-distributed-quantum-teleportation-with-simulaqron-and-cqc-74c6986b04ab

开船后做cqc

http://www.taodudu.cc/news/show-3686870.html

相关文章:

  • 中国实现城域量子隐形传态为全球量子网络打基础
  • 量子叠加态和量子纠缠_从无到有的量子隐形传态。 第2部分-在真实设备上进行操作...
  • 研究人员实现传播微波的量子隐形传态实验;微软扩展Azure量子云服务 | 全球量子科技与工业快讯第五十期
  • 量子计算与量子信息之Python-qiskit实现量子隐形传态
  • 量子隐形传态在城市光纤网络中实现
  • qiskit学习——建立你的第一个量子算法:量子隐形传态
  • AMD在量子隐形传输方面取得突破; 量子隐形传态:从物理量子比特到逻辑编码空间 | 全球量子科技与工业快讯第三十五期
  • 量子隐形传态 Quantum Teleportation
  • 【量子计算】量子隐形传态的实现
  • 量子隐形传态过程的推导(Quantum teleportation)
  • 量子计算与量子信息之量子隐形传态
  • 量子隐形传态和超密编码
  • globecom是只要投稿就会被邀请成为reviewer吗?
  • 语义噪声定义
  • Non-obtrusive detection of concealed metallic objects using commodity WiFi radios-GLOBECOM2018
  • 卫星通信的会议和期刊
  • 20-GLOBECOM-Wi-Fi-CSI-based_Fall_Detection_by_Spectrogram_Analysis_with_CNN
  • IEEE 参考文献bib文件最常引用模板
  • 通信网络航天卫星国际会议
  • CCF 等级会议排名 / CORE Ranking排名 / CCF 中文期刊排名
  • 如何不花money看到ieee的文章
  • 通信类会议排名,期刊影响因子
  • 计算机领域 会议排名等级
  • 关于论文写作的期刊
  • 2023年信息与通信工程国际会议(JCICE 2023)
  • 计算机网络方向的国内外期刊及会议简报
  • Globecom 2018 投稿过程
  • GlobeCOM 2020 中稿
  • coverity_关注点:Coverity,解决Java的安全难题
  • Coverity 代码静态安全检测

开船后做cqc_用Simulaqron和CQC模拟分布式量子隐形传态相关推荐

  1. 15-5重构_重构-糟糕,我一直在向后做。

    15-5重构 by Justin Fuller 贾斯汀·富勒(Justin Fuller) 重构-糟糕,我一直在向后做. (Refactoring - oops, I've been doing it ...

  2. 学会python之后-python学会后做什么

    很多朋友可能会问,为什么要学Python, 就算学会了Python 可以用来干什么呢? 一般都会首先想到爬虫. 爬虫不是说的那种虫子哦, 爬虫其实就是 类似于百度蜘蛛,谷歌蜘蛛一样的. 会自动的爬取网 ...

  3. 每个女孩子起床后做的第一件事......

    1 假如你暴富了 (素材来源网络,侵删) ▼ 2 当客服到底有多难? (素材来源网络,侵删) ▼ 3 挺好的 (素材来源网络,侵删) ▼ 4 每个女孩子起床后做的第一件事 (素材来源网络,侵删) ▼ ...

  4. Spring Boot使用方法小札(3):应用启动后做一些事

    有时候我们需要在应用启动或者重启后做一些工作,比如删除一些临时文件或者Redis中的缓存,这在没有使用Spring Boot之前,在Spring框架下是通过ApplicationListener监听器 ...

  5. 员工福利发放 --【出差申请】后 做调整【出差日期调整申请】 ---不出差

    福利发放: (员工福利-发放计算  调存储过程  KinWelfarePaymentCalculation) -----------------调用:KinUserCalendar员工月份工作日历表- ...

  6. 研究生毕业后做前台,是不是很low

    [ 爱开发]陪伴你一起成长,一起进步 对于工作岗位,一提起前台这个职位,大多数人会认为前台无非就是接听电话,收发邮件,端茶递水等一些技术含量不高的工作,甚至一些从事前台工作者自己都会认为自己的工作毫无 ...

  7. 先做奴才,后做天才!——人生策划三法则

    我给很多城市和企业做过策划,过程中总会有人提这样的问题:"熊老师,能不能也帮我策划一下人生?"我总会这样回答:"人生只有上帝才能策划."但人生其实是可以&quo ...

  8. unity中监听文件夹并且创建文件夹后做资源更新

    unity中监听文件夹并且创建文件夹后做资源更新 有时候我们在设计的时候,可能对项目的文件内容进行监听,也可能需要在监听某个文件夹的操作,并且做出相对应的处理,例如项目资源的大小监听等,以下就提供两种 ...

  9. java 做的原神抽卡模拟小程序

    java做的原神抽卡模拟小程序 难度不大,适合学完面向对象后做着玩. import java.util.ArrayList; import java.util.Calendar; import jav ...

最新文章

  1. WICC上了全球很多家交易所,它是一种资产和流动性的代表
  2. JAVA标识符命名规则及命名规范
  3. java实现表达式求值_如何编写一个高效的Java表达式求值程序
  4. centos7与centos6区别
  5. 如果写文档发博客,你还在用Word文档你就out了,写文档神器Markdown的前世今生来了。(持续更新,欢迎关注点赞)
  6. CodeForces - 556C Case of Matryoshkas
  7. 40线性映射07——线性变换的矩阵表示、线性变换与基的关系、线性变换坐标间的关系、线性变换在不同基下矩阵之间的关系、相似矩阵
  8. 处理 ps cs3 打开提示 产品已停止 故障
  9. QPainter详解
  10. Python编程通过出生日期判断星座
  11. Thumbnails压缩图片
  12. java猜拳_java实现猜拳小游戏
  13. Contour 学习笔记(一):使用 Contour 接管 Kubernetes 的南北流量
  14. 数据分析--模型建立和评估
  15. 赶紧学会!开发者愚人节怎么写代码。。。
  16. JAVA基础知识学习全覆盖
  17. 广东省考计算机面试题,广东省考面试心得 -电脑资料
  18. 【转】右键菜单大揭密
  19. 华视电子web读取身份证信息
  20. Problem D 筛法求素数

热门文章

  1. java单元测试 规范_单元测试-java
  2. 平安康养的生意经:养老的壳,金融的核
  3. canvs之多个小球运动
  4. ABC(人工智能、大数据、云计算)的关系
  5. 达龙桌面虚拟化的安全特性
  6. android palette组件用法,android Palette使用详解
  7. FastReport使用技巧
  8. 水银滑环用什么材料做成的
  9. Broadcom WICED Wi-Fi 研究BCM943362WCD4之初始化
  10. Streamlit中文文档(笔记)