Git Product home page Git Product logo

Comments (4)

christorange avatar christorange commented on June 8, 2024 1

首先是有通道这个概念的,只是大多数文章不会去讨论代码实现的问题。在我看到的文章里面 QC-CNN 的通道有两种处理方式,一种是我的模型这种一个 qubit 输出一个通道,一个filter 输出 qubit 数目的通道,这也是 2020 年 regetti 的文章的处理方式;还有一种就是你提到的这篇文章,他们是一个 filter 输出一个通道,对每个qubit的输出加和平均,这其实更接近经典的滤波器的实现,但是可以想见地 qubit 开销是第一种方式的几倍。我个人人为在现在的 toy model 里面这两种方式其实几乎不会有表现差异,而且在当下的框架模拟能力和真实设备的qubit数目下,第一种方式肯定也是更现实的。

我是非常想模拟多个filter的情形的,一个filter的实验完全不能证明量子卷积能对现在的大型网络有任何加成;但是在真的上手模拟后发现4qubit的QC-CNN跑起来都如此费劲,还是在简化了数据集的前提下(Hybrid QCCNN 这篇文章之所以能跑6个filter一个原因就是他们的数据集是 $3 \times 3$ 的...),就意识到现有的 qubit 模拟框架其实也是比较稚嫩的,亦或者 QC-CNN 其实根本不适合经典设备去跑,还得用真实的量子计算机,毕竟经典设备模拟的理论极限也就小几十个qubit,再加上各种软件层的性能损失,真的只能做一些 toy model 的模拟。其实这也是整个 QML 领域的现状,量子计算能真正给经典机器学习加成的时代看上去还比较遥远。

from qc-cnn.

OnePl3 avatar OnePl3 commented on June 8, 2024

非常感谢您详细的解答!
受益匪浅

from qc-cnn.

OnePl3 avatar OnePl3 commented on June 8, 2024

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训练并且更新
image

exec('qml.{}({}, wires = {})'.format(encoding_gates[i], inputs[qub * var_per_qubit + i], qub))
Model里Image Data被作为params 所以我对此有些疑惑

from qc-cnn.

christorange avatar christorange commented on June 8, 2024

weight_shapes 是描述权重矩阵形状的 tensor,角度确实是在训练中被更新的,是权重和image data作用的结果

from qc-cnn.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.