当前位置:网站首页>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
释放,结束身体并结束操作。
}
}
}
边栏推荐
- FFmpeg multimedia file processing (FFMPEG logging system)
- FFmpeg多媒体文件处理(ffmpeg处理流数据的基本概念)
- 【NVIDIA】Tesla V100安装NVIDIA-Driver驱动程序适配CUDA-Toolkit-11.6
- Data Mining-06
- 陈强教授《机器学习及R应用》课程 第十六章作业
- Record the system calls and C library functions used in this project-2
- IDEA Gradle 常遇问题(二)(持续更新)
- CPU-MIPS32 instruction architecture (unlocked pipeline microprocessor)
- NFS pays special attention to the problem of permissions
- 基于 R 语言的判别分析介绍与实践 LDA和QDA
猜你喜欢
How to solve the 0x80070005 error when the computer is reinstalled and the system is restored
FPGA-近日工作总结
乐东消防救援大队应邀为干部开展消防安全培训
FPGA中串口通信的时钟频率和波特率计数
Map mixed density function and quantile added line
从NPU-SLAM-EDA技术分析
5G China unicom AP:B SMS ASCII 转码要求
gin's middleware and routing grouping
uni-app - uview Swiper 轮播图组件点击跳转链接(点击后拿到 item 行数据, 取出数据做操作)
某高校的R语言数据分析期末作业
随机推荐
ftplib+ tqdm 上传下载进度条
ARM board adds routing function
某高校的R语言数据分析期末作业
GIN Bind模式获取参数和表单验证
5G China unicom AP:B SMS ASCII Transcoding Requirements
R语言kaggle 游戏数据探索与可视化
Jenkins API groovy calling practice: Jenkins Core Api & Job DSL to create a project
ArcEngine(九)图形绘制
Professor Chen Qiang's "Machine Learning and R Application" course Chapter 15 Homework
The sword refers to the offer, cuts the rope 2
jenkins api create custom pipeline
IDEA Gradle 常遇问题(二)(持续更新)
面试攻略系列(三)-- 高级开发工程师面试问些啥?
43. The sword refers to Offer 1 ~ 1 the number of occurrences of n integers (recursive, mathematics)
FFmpeg multimedia file processing (FFMPEG logging system)
jenkins api创建自定义pipeline
FPGA-在ISE中错误总结(更新中)
IDEA Gradle 常遇问题(一)
error Trailing spaces not allowed no-trailing-spaces 9:14 error Unexpected trailing comma
乐东消防救援大队应邀为干部开展消防安全培训