当前位置:网站首页>Q_04_06 把它放在一起:传送
Q_04_06 把它放在一起:传送
2022-08-09 13:02:00 【MOVCat】
把它放在一起:传送
让我们回到在量子电路中定义的远距传感电路的例子。下面显示的是一个实现远距传送的教科书量子电路,包括量子部分,测量和经典控制的校正操作。
我们现在可以将这个量子电路中的每个步骤转换为Q#。首先,我们开始定义一个新的操作,同时执行两个量子位msg的远距传送:
operation Teleport(msg : Qubit, there : Qubit) : () {
body {
接下来,我们here用一个using块来分配一个量子位:
using (register = Qubit[1]) {
let here = register[0]; 然后我们可以通过使用H和CNOT操作在here和there创建纠缠对:
H(here);
CNOT(here, there); 然后我们使用下一个 operatornameCNOT
和Hgates来移动我们的消息量子位:
CNOT(msg, here);
H(msg); 最后,我们使用M来执行测量并将它们馈送到经典控制中,如if语句所示:
// Measure out the entanglement. if (M(msg) == One) { Z(there); } if (M(here) == One) { X(there); } 这完成了我们的teleportation操作符的定义,所以我们可以here释放,结束身体并结束操作。
}
}
} 边栏推荐
- R语言kaggle 游戏数据探索与可视化
- Unicom network management protocol block diagram
- NFS 特别注意权限的问题
- GET POST PUT DELETE request in GIN
- 正则表达式-re模块
- Yocto 可以下载的第三方库
- An Offer 21. Adjust the array in order to make odd in even the front (loop invariant)
- The sword refers to Offer 57 - II. and is a continuous positive sequence of s (sliding window)
- jenkins api create custom pipeline
- Professor Chen Qiang "application in machine learning and R" course chapter 17
猜你喜欢

FPGA中串口通信的时钟频率和波特率计数

5G China unicom AP:B SMS ASCII Transcoding Requirements

Map mixed density function and quantile added line

How to solve the 0x80070005 error when the computer is reinstalled and the system is restored

电脑重装系统还原0x80070005错误如何解决

5G Unicom Network Management Design Ideas

搭建大型分布式服务(二)搭建会员服务

render解析
![[极客大挑战 2019]Upload](/img/ed/062a89797c790189d9bd77b50335b0.png)
[极客大挑战 2019]Upload

FFmpeg多媒体文件处理(ffmpeg处理流数据的基本概念)
随机推荐
WPF 实现带蒙版的 MessageBox 消息提示框
记录本项目中用到的系统调用与C库函数-2
联通网管协议框图
剑指offer,剪绳子2
Unity3d_API_GPS_LocationService
【奖励公示】第23期 2022年7月奖励名单公示:社区明星评选 | 新人奖 | 博客同步 | 推荐奖
Anta and Huawei Sports Health jointly verify the champion running shoes and lead Chinese sports with innovation
Unicom network management protocol block diagram
NFS 特别注意权限的问题
剑指 Offer 57 - II. 和为s的连续正数序列(滑动窗口)
5G China unicom 直放站 网管协议 实时性要求
Realization of RTSP Protocol
JS本地存储 sessionStorage和localStorage
农村区县域农业电商如何做?数字化转型如何进行?
【FPGA教程案例48】图像案例8——基于FPGA的RGB图像转化为HSV图像的实现,通过MATLAB进行辅助验证
乐东消防救援大队应邀为干部开展消防安全培训
43. The sword refers to Offer 1 ~ 1 the number of occurrences of n integers (recursive, mathematics)
[FPGA Tutorial Case 48] Image Case 8 - Realization of Converting RGB Image to HSV Image Based on FPGA, Assisted Verification by MATLAB
Periodic sharing of Alibaba Da Tao system model governance
力扣解法汇总1413-逐步求和得到正数的最小值