Comments (4)
首先是有通道这个概念的,只是大多数文章不会去讨论代码实现的问题。在我看到的文章里面 QC-CNN 的通道有两种处理方式,一种是我的模型这种一个 qubit 输出一个通道,一个filter 输出 qubit 数目的通道,这也是 2020 年 regetti 的文章的处理方式;还有一种就是你提到的这篇文章,他们是一个 filter 输出一个通道,对每个qubit的输出加和平均,这其实更接近经典的滤波器的实现,但是可以想见地 qubit 开销是第一种方式的几倍。我个人人为在现在的 toy model 里面这两种方式其实几乎不会有表现差异,而且在当下的框架模拟能力和真实设备的qubit数目下,第一种方式肯定也是更现实的。
我是非常想模拟多个filter的情形的,一个filter的实验完全不能证明量子卷积能对现在的大型网络有任何加成;但是在真的上手模拟后发现4qubit的QC-CNN跑起来都如此费劲,还是在简化了数据集的前提下(Hybrid QCCNN 这篇文章之所以能跑6个filter一个原因就是他们的数据集是
from qc-cnn.
非常感谢您详细的解答!
受益匪浅
from qc-cnn.
weight_shapes = {"weights": (n_layers, 2 * n_qubits)}
qnode = qml.QNode(circuit, dev, interface='torch', diff_method='best')
self.ql1 = qml.qnn.TorchLayer(qnode, weight_shapes)
我想问下weight_shapes是不是就对应着 类似旋转角度 它被torch训练并且更新
exec('qml.{}({}, wires = {})'.format(encoding_gates[i], inputs[qub * var_per_qubit + i], qub))
Model里Image Data被作为params 所以我对此有些疑惑
from qc-cnn.
weight_shapes 是描述权重矩阵形状的 tensor,角度确实是在训练中被更新的,是权重和image data作用的结果
from qc-cnn.
Related Issues (7)
- 运行的相关问题 HOT 2
- 博主你好,我想问一些问题 HOT 1
- Why this happen?What should I do to solve it? HOT 3
- I have some questions HOT 5
- Make work for RGB HOT 1
- How to do it for custom dataset HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qc-cnn.