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
量子计算机编程:从入门到实践
84
|
第
5
章
5.8
反计算
尽管临时量子比特通常是必要的,但它们往往会与
QPU
寄存器纠缠在一起。更准确地说,
临时量子比特往往处于纠缠态。这就引出了两个相关的问题。第一个问题是,临时量子比
特很少恢复为全零状态。这是一个坏消息,因为我们需要重置临时量子比特,才能使它们
在
QPU
的后续运算中重复可用。
你可能会想:“这不是问题!我会在必要的时候执行读操作和非操作,就像我在前几章中
学到的那样。”但这会导致第二个问题。因为使用临时量子比特几乎总会导致它们与输出
寄存器中的量子比特纠缠在一起,如图
5-17
所示,所以对它们执行读操作会对输出状态造
成破坏性影响。第
3
章讲过,就处于纠缠态的量子比特而言,对其中任何一个执行操作都
会不可避免地影响其他量子比特。以图
5-17
中的场景为例,若想在
QPU
中再次使用临时
量子比特,必须将其重置为
|
0
⟩
,而这样做势必会破坏寄存器
a
中一半的量子态!
幸运的是,有一个技巧可以解决上述问题,那就是
反计算
(
uncomputing
)。反计算的思想
是反向执行导致临时量子比特处于纠缠态的运算,将其返回到初始的
|
0
⟩
态。在取绝对值
的示例中,这意味着反向执行涉及
a
和临时量子比特的所有
abs(a)
逻辑。太棒了!临时量
子比特恢复了
|
0
⟩
态。不幸的是,这样做会完全抹去为计算绝对值而做的所有艰苦工作。
如果会导致所做工作付诸东流,那么恢复临时量子比特的初始状态有何意义呢?受量子
比特的不可复制性约束,我们甚至不能在反计算之前将
a
中存储的值复制到另一个寄存器
中。然而,反计算并非弄巧成拙的原因是,
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