8000 Home · dynexcoin/DynexSDK Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Dynex [DNX] edited this page Sep 24, 2024 · 110 revisions

Getting Started with the Dynex SDK

Introduces the Dynex Neuromorphic Quantum Computing Platform (patent pending) and the Dynex SDK, describes the basics of how it works, and explains with simple examples how to use it to solve problems and how to use it for Machine Learning.

You can also join the Dynex workspace on Slack to learn more and to interact with the developer community.

Introduction

Intalling the Dynex SDK

Dynex n.Quantum Gate Circuits

Dynex n.Quantum Annealing

Dynex n.Quantum Computing in Practice

Guides

Computing on Quantum or neuromorphic systems is fundamentally different than using traditional hardware and is a very active area of research with new algorithms surfacing almost on a weekly basis. Our guides are step-by-step instructions on how to utilise neuromorphic computing with the Dynex SDK. These examples are just some of multiple possibilities to perform machine learning tasks. However, they can be easily adopted to other use cases.

Videos

The following videos are available to explain how to use the Dynex SDK:

Book

Neuromorphic Computing for Computer Scientists: A complete guide to Neuromorphic Computing on the Dynex Neuromorphic Cloud Computing Platform, Dynex Developers, 2024, 249 pages, available as eBook, paperback and hardcover

Dynex' Scientific Papers

Examples

Dynex Circuits: n.Quantum Gate Circuits

Quantum circuits provide a visual representation of the sequence of operations performed on qubits during computation. Think of quantum circuits as a recipe or set of instructions that detail what operations to perform on each qubit and when to perform them. By arranging and executing these operations in specific ways, we can implement various quantum algorithms.

import dynex
from dynex import dynex_circuit
import pennylane as qml

# Define the quantum circuit:
def circuit(params):
    qml.Hadamard(wires = 0)
    qml.CNOT(wires = [0,1])
    qml.RZ(params[0], wires = 0)
    return qml.probs(wires = [0,1])

# Input parameters:
params = [0.1]

# draw circuit:
_ = qml.draw_mpl(circuit, style="black_white", expansion_strategy="device")(params)

# Execute on Dynex:
measure = dynex_circuit.execute(circuit, params, method='measure', shots=1, mainnet=True)
print(measure)

╭────────────┬──────────┬─────────────────┬─────────────┬───────────┬────────────────┬────────────┬─────────┬────────────────╮
│   DYNEXJOB │   QUBITS │   QUANTUM GATES │   BLOCK FEE │   ELAPSED │   WORKERS READ │   CIRCUITS │   STEPS │   GROUND STATE │
├────────────┼──────────┼─────────────────┼─────────────┼───────────┼────────────────┼────────────┼─────────┼────────────────┤
│      28513 │       19 │              56 │        0.00 │      0.52 │              1 │       1000 │     256 │       34338.00 │
╰────────────┴──────────┴─────────────────┴─────────────┴───────────┴────────────────┴────────────┴─────────┴────────────────╯
╭────────────┬─────────────────┬────────────┬───────┬──────────┬──────────────┬─────────────────────────────┬───────────┬──────────╮
│     WORKER │         VERSION │   CIRCUITS │   LOC │   ENERGY │      RUNTIME │                 LAST UPDATE │     STEPS │   STATUS │
├────────────┼─────────────────┼────────────┼───────┼──────────┼──────────────┼─────────────────────────────┼───────────┼──────────┤
│ 1147..9be1 │ 2.3.5.OZM.134.L │       1000 │     0 │     0.00 │ 3.113746382s │  2024-08-07T06:41:11.13505Z │ 0 (0.00%) │  STOPPED │
├────────────┼─────────────────┼────────────┼───────┼──────────┼──────────────┼─────────────────────────────┼───────────┼──────────┤
│ 85ee..69b7 │ 2.3.5.OZM.134.L │       1000 │     0 │     0.00 │ 7.939941036s │ 2024-08-07T06:41:06.308857Z │ 0 (0.00%) │  STOPPED │
╰────────────┴─────────────────┴────────────┴───────┴──────────┴──────────────┴─────────────────────────────┴───────────┴──────────╯
[DYNEX] FINISHED READ AFTER 52.37 SECONDS
[DYNEX] SAMPLESET READY
[0 0]

Dynex Sampler: n.Quantum Annealing

The following example shows sampling of a QUBO problem using n.quantum annealing on Dynex:

import dynex
import dimod
from pyqubo import Array

N = 15
K = 3
numbers = [4.8097315016016315, 4.325157567810298, 2.9877429101815127,
           3.199880179616316, 0.5787939511978596, 1.2520928214246918,
           2.262867466401502, 1.2300003067401255, 2.1601079352817925,
           3.63753899583021, 4.598232793833491, 2.6215815162575646,
           3.4227134835783364, 0.28254151584552023, 4.2548151473817075]

q = Array.create('q', N, 'BINARY')
H = sum(numbers[i] * q[i] for i in range(N)) + 5.0 * (sum(q) - K)**2
model = H.compile()
Q, offset = model.to_qubo(index_label=True)

sampleset = dynex.sample_qubo(Q, offset, mainnet=False, num_reads=50000, annealing_time = 200);
print('Result:')
print(sampleset)

[DYNEX] PRECISION SET TO 0.001
[DYNEX] SAMPLER INITIALISED
[DYNEX|TESTNET] *** WAITING FOR READS ***
╭────────────┬─────────────┬───────────┬───────────────────────────┬─────────┬─────────┬────────────────╮
│   DYNEXJOB │   BLOCK FEE 
8000
│ ELAPSED   │ WORKERS READ              │ CHIPS   │ STEPS   │ GROUND STATE   │
├────────────┼─────────────┼───────────┼───────────────────────────┼─────────┼─────────┼────────────────┤
│         -1 │           0 │           │ *** WAITING FOR READS *** │         │         │                │
╰────────────┴─────────────┴───────────┴───────────────────────────┴─────────┴─────────┴────────────────╯

[DYNEX] FINISHED READ AFTER 0.00 SECONDS
[DYNEX] SAMPLESET READY
Result:
   0  1  2  3  4  5  6  7  8  9 10 11 12 13 14   energy num_oc.
0  0  1  0  0  0  0  0  1  0  0  1  0  0  0  0 2.091336       1
['BINARY', 1 rows, 1 samples, 15 variables]

Tools for Quantum Algorithm Development on Dynex

Dynex's platform supports a variety of tools for creating and working with both n.quantum gate circuits and n.quantum annealing models:

Dynex SDK

For quantum gate circuits, support for tools such as Qiskit, Cirq, Pennylane, and OpenQASM are seamlessly integrated into the Dynex platform, enabling users to leverage these advanced quantum gate circuit languages. This enables the execution of well-known quantum algorithms like Shor's algorithm for efficient problem-solving in number theory, Grover's algorithm for database search, Simon's algorithm for finding hidden periods, or the Deutsch-Josza algorithm for determining the parity of a function.

For n.quantum annealing, tools like Dimod offer a shared API for samplers and provide classes for quadratic and higher-order models. PyQUBO allows the easy creation of QUBOs or Ising models from flexible mathematical expressions, complete with automatic constraint validation and parameter tuning. AutoQUBO by Fujitsu Research automates the conversion of Python functions to QUBO representations, facilitating the use of Ising machines on the Dynex platform to solve combinatorial optimization problems. Qubolite, developed by the Lamarr Institute, is a lightweight toolbox in NumPy for creating, analyzing, and solving QUBO instances, incorporating cutting-edge research algorithms.

This comprehensive support ensures that both quantum gate circuits and quantum annealing models can be efficiently executed on the Dynex neuromorphic computing platform.

Quantum Machine Learning

The Dynex platform integrates neuromorphic computing with popular machine learning frameworks such as TensorFlow and PyTorch, enabling the creation of hybrid models and advanced learning techniques like transfer and federated learning. Examples include the Quantum-Support-Vector-Machine (QSVM) and Mode-assisted unsupervised learning of restricted Boltzmann machines (MA-QRBM), showcasing how neuromorphic dynamics can solve complex problems in optimization, sampling, and machine learning. The platform also supports Quantum-Boltzmann-Machines (QBMs) for generative models and quantum annealing to sample from probability distributions. These integrations are backed by significant scientific research, demonstrating the potential of neuromorphic computing to enhance machine learning and optimization tasks.

Special Purpose Quantum Computing

The Dynex platform leverages neuromorphic quantum computing to enhance a range of computational problems. The Q-CFD project integrates quantum computing into Computational Fluid Dynamics (CFD) using OpenFoam, while Q-SISR formulates super-resolution as a sparse coding optimization problem, demonstrating improved accuracy. Q-FOLDING utilizes quantum optimization for RNA and protein folding tasks. The Scikit-Learn plugin integrates seamlessly with the Dynex platform to enhance feature selection in machine learning workflows. Additionally, the QBoost algorithm, inspired by a collaboration between Google and D-Wave, optimizes binary classifiers using quantum adiabatic methods on the Dynex Neuromorphic Platform. These projects highlight the versatility and advanced capabilities of Dynex in tackling complex computational challenges across various domains.

Pricing

Free prototyping and testing

A free sampler designed for prototyping and testing, enabling users to sample computing problems locally on their machines before deploying to the Dynex Neuromorphic Computing cloud is available. This tool is particularly useful for developers and researchers who are in the initial stages of project development, allowing them to fine-tune and test their code in a controlled, cost-free environment. By providing this capability, we aim to facilitate seamless code development and ensure that your applications are fully optimized and error-free prior to scaling up operations on the cloud. This not only enhances development efficiency but also helps in significantly reducing potential overheads associated with live deployments.

Customers can also experience the power of Dynex n.quantum computing with just one click by trying out a variety of examples for free. Simply register an account to access these advanced computational capabilities. The user-friendly platform makes it easy to get started, allowing exploration of the potential of neuromorphic quantum computing through practical, real-world examples.

Dynex subscription plans

Dynex' subscription model is designed to provide users with continuous access to its advanced neuromorphic computing platform. This model allows businesses and researchers to leverage Dynex’s powerful computing capabilities through a recurring payment structure, offering a scalable and cost-effective solution for complex computational needs. Subscribers can choose from various tiers, each tailored to different usage requirements and budgets, ensuring that users only pay for the computing power they need. This subscription model not only simplifies budgeting and planning but also ensures that users can consistently rely on Dynex for high-performance computing resources without the need for large upfront investments. Each tier provides progressively more powerful computing capabilities and enhanced support features to meet the diverse needs of our users, from individual developers to large enterprises.

Clone this wiki locally
0