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
量子计算机编程:从入门到实践
150
|
第
9
章
var
qram
=
qram_initialize
(
a
,
reg_qubits
);
qreg
.
write
(
0
);
addr
.
write
(
2
);
addr
.
hadamard
(
0x1
);
qram_load
(
addr
,
qreg
);
qreg
.
add
(
1
);
能否把叠加值
写回
QRAM
呢?这不是
QRAM
存在的目的。
QRAM
使我们能
够以传统方式
访问
被写入的数值。可以无限地存储叠加态的
持久量子存储器
将是完全不同的硬件,它的构建可能更具挑战性。
对
QRAM
的这种描述可能听起来令人费解——到底什么是
QRAM
硬件?在本书中,我们
没有描述如何在实践中构建
QRAM
(正如大多数
C++
书没有详细描述
RAM
是如何工作
的)。示例
9-2
这样的代码示例使用模拟了
QRAM
行为的简化模拟器模型运行。不过,本
书中提出的
QRAM
技术的确存在。
和许多其他量子计算硬件一样,尽管
QRAM
将是真正的
QPU
中的关键组件,但它的实现
细节可能会发生变化。对我们来说,重要的是把它看作行为方式如图
9-4
所示的
基本资源
,
以及可以使用它构建强大的应用程序。
有了可以自由支配的
QRAM
,我们可以开始构建更复杂的量子数据结构。我们特别感兴趣
的是用它能够表示向量和矩阵。
9.3
向量的编码
假设要初始化
QPU
寄存器来表示一个简单的向量,如方程式
9-1
所示。
方程式
9-1
用于初始化
QPU
寄存器的示例向量
v
=
[,
,,
]
01
23
在量子机器学习应用程序中,我们经常会碰到这种形式的数据。
要对向量数据进行编码,也许最显而易见的方法是使用适当的二进制编码,在不同的 ...
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