Skip to main content

NAREF

Neutral Atom Renewable Energy Forecasting

This file showcases quantum and classical reservoirs in a simple example.

import naref
from naref.classical.hyper import HyperC
from naref.quantum.hyper import HyperQ
from naref.quantum import QRC
from naref.classical import CRC
from naref import data
qrc = QRC(
    sample_len=8,
    nb_atoms=9,
    N_samples=1024,
    inp_duration=1000,
    reset_rate=0,
    geometry="grid_lattice_centred",
    atom_distance=15,
    input_type="mackey",
    test_len=data.real_test_len,
    train_len=data.real_train_len,
    verbose=True)

qrc.build_model(data.mackey[:250], data.mackey[250:280])
qrc.show_test_prediction()
qrc.show_train_prediction()

qrc.get_error_train()
qrc.get_error_test()
Building Quantum Reservoir...
10 training steps finished, training time : 24.890s
20 training steps finished, training time : 24.411s
30 training steps finished, training time : 24.441s
40 training steps finished, training time : 25.471s
50 training steps finished, training time : 25.757s
60 training steps finished, training time : 25.194s
70 training steps finished, training time : 24.324s
80 training steps finished, training time : 24.378s
90 training steps finished, training time : 31.824s
100 training steps finished, training time : 29.980s
110 training steps finished, training time : 28.739s
120 training steps finished, training time : 27.935s
130 training steps finished, training time : 30.140s
140 training steps finished, training time : 31.482s
150 training steps finished, training time : 33.550s
160 training steps finished, training time : 33.109s
170 training steps finished, training time : 31.198s
180 training steps finished, training time : 32.346s
190 training steps finished, training time : 34.320s
200 training steps finished, training time : 37.271s
210 training steps finished, training time : 37.513s
220 training steps finished, training time : 33.800s
230 training steps finished, training time : 35.306s
240 training steps finished, training time : 34.594s
Training finished. Total training time: 731.384s
Train error (Mean absolute error regression loss):  5.165748453421183e-15
10 testing steps finished, testing time : 36.515s
20 testing steps finished, testing time : 34.390s
Test error (Mean absolute error regression loss):  0.014927562760331666

png

png

0.014927562760331666
crc = CRC(
    sample_len=8,
    nb_neurons=9)
crc.build_model(data.mackey[:250], data.mackey[250:280])
crc.show_test_prediction()
crc.show_train_prediction()
crc.get_error_test()
Building Classical Reservoir...

png

png

0.047504000683266046
crc.get_error_train()
0.05308248069948858
crc = CRC(
    sample_len=8,
    nb_neurons=15)
crc.build_model(data.mackey[:500], data.mackey[500:530])
crc.show_test_prediction()
crc.show_train_prediction()
crc.get_error_test()
Building Classical Reservoir...

png

png

0.009784391178625047
crc.get_error_train()
0.008250889994704327

Metadata

Release files for naref 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for naref 0.0.4
File Size Uploaded Provenance Actions
naref-0.0.4.tar.gz 18.3 kB Without provenance Details for naref-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for naref 0.0.4
File Interpreter ABI Platform Actions
naref-0.0.4-py3-none-any.whl Python 3 none any Details for naref-0.0.4-py3-none-any.whl

Total release size: 39.7 kB

Release files / naref-0.0.4.tar.gz

Download URL naref-0.0.4.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6441ad7e25e6acfbb2420bcc190f0501db1261406f754fac94d9be4e168d511e
BLAKE2b-256 checksum
How to use checksums
8a26882490ee65995a5844ec38fb51176430b9ffcceaf8c5f156b7643d2761ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / naref-0.0.4-py3-none-any.whl

Download URL naref-0.0.4-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8928d68d114d4003100af4203eaad78e0ac8659d065300167d518bf71fe14f4
BLAKE2b-256 checksum
How to use checksums
0a585c36827298e5769bfeed9b003fc986ed7cafd65daad15c52a88cf70795fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Security for naref 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page