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
量子计算机编程:从入门到实践
188
|
第
11
章
11.6
超采样
对于每个分片,我们要估计已被翻转相位的子像素的数量。有了黑白子像素(表示为翻转
或不翻转的相位),我们就可以获得代表其原始成分子像素强度的每个最终像素的值。简
单地说,这个问题与第
6
章中的“量子和估计”问题完全相同。
为了利用量子和估计,我们简单地将实现绘图指令的量子程序看作在第
6
章的振幅放大中
使用的翻转子例程。将其与第
7
章的量子傅里叶变换相结合,我们可以估算出每个分片中
翻转的子像素的总数。这需要对每个分片多次运行绘图程序。
注意,在没有
QPU
的情况下,将高分辨率图像采样为低分辨率图像仍然需要对每个分片
运行多次绘图子程序,将每个采样的值
qx
和
qy
随机化。每次只会收到一个“黑”或“白”
的样本,将这些加起来,我们就会汇总出一幅近似的图像。
图
11-12
展示了量子超采样与传统超采样(传统超采样通常使用蒙特卡罗采样技术执行)
的对比结果,超采样代码如示例
11-4
所示。图中的理想采样参考展示了理想结果,
QSS
查
找表是接下来将详细讨论的工具。
QSS
查找表
采样图像(
64
像素
×64
像素)
蒙特卡罗采样结果
平均像素误差:
9%
零误差像素:
23%
理想采样参考
量子超采样结果
平均像素误差:
6%
零误差像素:
46%
全分辨率参考
(
256
像素
×256
像素)
图
11-12
:量子超采样与传统超采样的比较
量子超采样
|
189
示例代码
请在
http://oreilly-qc.github.io?p=11-4
上运行本示例。
示例
11-4
超采样
function
do_qss_image
()
{
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