Install the requirements: pip install -r requirements.txt
(preferably in a virtual environment).
- Run
python main.py --help
to see all the options. - Run
python main.py
to train and evaluate aQ-Dense
model on the MNIST 8x8 dataset.
Quantum Denoising Diffusion Models
License: MIT License
Got error while trying to train with 32x32 MNIST
python main.py --data mnist_32x32
Traceback (most recent call last): File "/mnt/working/quantum-diffusion/src/main.py", line 175, in <module> train() File "/mnt/workinge/quantum-diffusion/src/main.py", line 103, in train batch_loss, _ = diff(x=x, y=y, T=args.tau, verbose=True) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "/mnt/working/quantum-diffusion/src/models.py", line 63, in forward return self.run_training_step_noise(x, **kwargs) File "/mnt/working/quantum-diffusion/src/models.py", line 136, in run_training_step_noise predicted_noise = self.net.forward(x=batches_noisy) File "/mnt/working/quantum-diffusion/src/nn/qdense.py", line 53, in forward x = self.qnode(x) File "/usr/local/lib/python3.10/dist-packages/pennylane/qnode.py", line 842, in __call__ self.construct(args, kwargs) File "/usr/local/lib/python3.10/dist-packages/pennylane/qnode.py", line 751, in construct self._tape = make_qscript(self.func)(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/pennylane/tape/qscript.py", line 1371, in wrapper result = fn(*args, **kwargs) File "/mnt/working/quantum-diffusion/src/nn/qdense.py", line 36, in _circuit qml.AmplitudeEmbedding( File "/usr/local/lib/python3.10/dist-packages/pennylane/templates/embeddings/amplitude.py", line 128, in __init__ features = self._preprocess(features, wires, pad_with, normalize) File "/usr/local/lib/python3.10/dist-packages/pennylane/templates/embeddings/amplitude.py", line 205, in _preprocess raise ValueError( ValueError: Features must be of length 64 or smaller to be padded; got length 1024.
Seems like dimension errs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.