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
量子计算机编程:从入门到实践
量子超采样
|
187
// x=10
处的垂直线
qacc
.
cnot
(
qx
);
qacc
.
add
(
tx
*
4
);
qacc
.
not
(
~
10
);
qacc
.
cphase
(
180
);
qacc
.
not
(
~
10
);
qacc
.
subtract
(
tx
*
4
);
qacc
.
cnot
(
qx
);
请注意,在此程序中,变量
tx
和
ty
是数字,用于指出着色器正在处理图像的哪个分片。
我们通过将
qx
和
(tx * 4)
相加来得到要绘制的那个子像素的绝对值
x
。由于
tx
和
ty
不是
量子值,因此可以很容易地计算出来。以这种方式将图像分片,我们将更容易执行之后的
超采样。
11.5
更有趣的图像
利用更复杂的着色程序,我们可以针对
QSS
算法做一个更有趣的测试。为了测试和比较不
同的超采样方法,我们使用环形带产生一些非常高频的细节,如图
11-11
所示。我们采取
与之前同样的做法,将相位编码的图像分割成分片。
图
11-11
:一种具有高频细节的图像,通常被渲染为
256
像素×
256
像素(如本图所示)
看上去我们必须走一些捷径或者使用一些特殊技巧来生成这种图像。然而,
这与传统计算机图形学早期所需的黑客技巧和解决方法并没有太大区别。
现在我们有了更高分辨率的相位编码图像,可以应用
QSS
算法了。在这个例子中,完整图
像以
256
像素×
256
像素绘制。我们将使用
4096
个分片,每个分片由
4
子像素×
4
子像素
组成,并对单个分片中的所有子像素进行超采样,从而生成最终采样图像的一个像素点。
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