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
量子计算机编程:从入门到实践
208
|
第
12
章
结果如图
12-10
所示。
图
12-10
:步骤
3
:要开始实现
a
x
,我们将
work
寄存器中的所有量子比特乘以
2
,条件是
precision
寄存器中最低权重的量子比特值为
1
在
QPU
编程中,使用条件门作为
if
/
then
的等价操作是非常有用的,这是因
为“条件”一次性针对所有可能值得到了高效的计算。
舒尔分解算法
|
209
12.3.4
步骤
4
:
条件乘
4
如果
precision
寄存器的次高权重的量子比特值为
1
,则意味着
x
的二进制值也需要在
work
寄存器上再乘以
2
两次。因此,如图
12-11
所示,我们执行两个量子比特移位,即两
个
rollLeft()
操作,并以
precision
寄存器的
0x2
量子比特的值作为条件。
图
12-11
:步骤
4
的
QPU
指令
现在
work
寄存器中有
a
x
的值,不过
x
的值被编码在
precision
寄存器的前两个量子比特
中。在这个例子中,
precision
处于
x
的可能值的均匀叠加态,我们将在
work
中得到相应
的
a
x
值的叠加值。
尽管已经执行了所有必需的乘以
2
的运算,但我们似乎还没有采取任何措施去处理函数的
mod
部分,以完成函数
a
x
mod(
N
)
的实现。其实,对于已探讨过的特殊例子,我们的电路
能够自动处理模。后文将进一步解释。
图
12-12
显示了如何通过叠加的方式计算 ...
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