Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
量子计算机编程:从入门到实践
by
Eric R. Johnston
,
Nicholas Harrigan
,
Mercedes Gimeno-Segovia
July 2021
Beginner to intermediate
274 pages
7h 10m
Chinese
Posts & Telecom Press
Content preview from
量子计算机编程:从入门到实践
单个量子比特
|
27
2.6
实践
:
量子监听检测
为了更实际地展现控制量子比特相对相位的优势,我们用一个更复杂的程序来结束本
章。示例
2-4
使用前面介绍的简单的单量子比特
QPU
指令来完成简化的
量子密钥分发
(
quantum
key
distribution
,
QKD
)。
QKD
是量子密码学领域的核心协议,通过它能安全地
传输信息。
假设
QPU
程序员
Alice
和
Bob
正在通过能够传输量子比特的信道相互发送数据。他们偶尔
会发送示例
2-4
描述的具有特殊构造的“监听检测”量子比特,用于测试所用的信道是否
被监听。
任何试图读取“监听检测”量子比特的监听者都有
12.5%
的概率被发现。因此,即使
Alice
和
Bob
在整个传输过程中只使用了
100
个这样的量子比特,监听不被发现的可能性
也只有约百万分之一。
Alice
和
Bob
可以通过交换一些不需要加密的传统数字信息来检测他们的密钥是否被泄露。
在交换信息后,他们测试一些量子比特,方法是读取量子比特并检查读取结果是否符合预
期。如果出现不一致,就说明有人在监听。该过程如图
2-19
所示。
Alice
Bob
连接
得到
2
个随机比特
随机
比特
A
1
随机
比特
A
2
针对
A
1
随机
比特
B
2
如果
B
2
等于
A
2
,
则这个值应该
等于
A
1
针对
B
2
针对
A
2
设置值
应用
HAD
监听
应用
HAD
读取值
图
2-19
:量子监听检测程序
以下给出代码。建议尝试运行示例
2-4
中的代码,并像探索任何其他代码片段一样进行调
整和测试。
示例代码
请在
http://oreilly-qc.github.io?p=2-4
上运行本示例。 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
JAVASCRIPT之美|聽頂尖程式設計師闡述他們的思維
Anton Kovalyov
Go程序设计语言
艾伦A. A.多诺万, 布莱恩W. 柯尼汉
C++语言导学(原书第2版)
本贾尼 斯特劳斯特鲁普
监控运维实践:原则与策略
Mike Julian
Publisher Resources
ISBN: 9787115566355