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
量子计算机编程:从入门到实践
多个量子比特
|
45
为了使相位反冲生效,需要将第
2
个寄存器初始化为
|
1
⟩
。注意,虽然在两
个寄存器之间应用了针对两个量子比特的指令,但我们并没有创建纠缠态。
因此,可以分别表示两个寄存器各自的状态。双量子比特门并不一定会在寄
存器之间产生纠缠,第
14
章将解释原因。
如果相位反冲技巧一开始让你有些摸不着头脑,不必担心,其他人也是如此,你可能需要
一段时间来适应。想要弄懂它,最简单的方法就是尝试一些有趣的例子。为了帮助你理
解,示例
3-3
提供了用于再现前面描述的两个寄存器示例的
QCEngine
代码。
示例代码
请在
http://oreilly-qc.github.io?p=3-3
上运行本示例。
示例
3-3
相位反冲
qc
.
reset
(
3
);
//
创建两个寄存器
var
reg1
=
qint
.
new
(
2
,
'Register 1'
);
var
reg2
=
qint
.
new
(
1
,
'Register 2'
);
reg1
.
write
(
0
);
reg2
.
write
(
1
);
//
使第
1
个寄存器处于叠加态
reg1
.
had
();
//
根据第
1
个寄存器的量子比特值对第
2
个寄存器执行相位旋转
qc
.
phase
(
45
,
0x4
,
0x1
);
qc
.
phase
(
90
,
0x4
,
0x2
);
相位反冲非常有助于理解第
8
章介绍的量子相位估计这一
QPU
原语的内部机制,以及第
13
章介绍的
QPU
如何帮助我们求解线性方程组。相位反冲的广泛应用源于这样一个事实:
它不仅适用于
CPHASE
运算,还适用于任何使寄存器的相位产生变化的条件运算 ...
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