Damavand is a quantum circuit simulator. It can run on laptops or High Performance Computing architectures, such CPU distributed architectures or multi GPU distributed architectures.

Overview

damavand-main

Damavand is a code that simulates quantum circuits. In order to learn more about damavand, refer to the documentation.

Development status

  1. Core features:
  • single node CPU ✔️
  • single node GPU ✔️
  • multiple nodes CPU ✔️
  • single node multiple GPUs ✔️
  • multiple nodes multiple GPUs ✔️
  1. Documentation 🛠️ (under construction)
  2. README.md 🛠️ (under construction)
  3. pypi 🛠️ (under construction)

Installation

From pypi

pip3 install damavand

From sources

git clone https://github.com/MichelNowak1/damavand.git
cd damavand/
python3 setup.py install

Example

Damavand can be executed with different "apply methods". These refer to the algorithms used to update a quantum state by applying a given quantum gate. The different apply methods are:

  1. brute_force brute matrix vector multiplication (requires a lot of memory).
  2. shuffle smart implementation of matrix vector multiplication where the matrix is the result of a series of kronecker products (requires less memory but is still a bit slow).
  3. "multithreading" runs on a single node multi CPUs.
  4. "gpu" runs on a single node single GPU.
  5. "distributed_cpu" runs on a multiple nodes multiple CPUs.
  6. "distributed_gpu" runs on a single node multiple GPUs or on multiple nodes multiple GPUs.

The default "apply_method" is "multithreading". this can be changes by providing it as an option to the Circuit builder, as shown in the following example:

from damavand import Circuit

# initialize MPI
from mpi4py import MPI

num_qubits = 1
circuit = Circuit(num_qubits, apply_method="distributed_gpu")

circuit.add_hadamard_gate(0)

circuit.forward()
circuit.measure()

num_samples=10
circuit.sample(num_samples)

Slurm workload run:

Here is a simple slurm example that shows how to run a simulation on 2 nodes, with multithreading.

#!/bin/bash

#SBATCH --job-name=two_nodes
#SBATCH --qos=qos_cpu-dev
#SBATCH --ntasks=2
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=40
#SBATCH --output=two_nodes.listing
#SBATCH --time=5:00

module purge

module load openmpi/3.1.4
module load cuda/10.2

srun python3 two_nodes.py

Run sbatch run.sh to lounch the script

Pennylane Integration

Damavand is linked to pennylane PennyLane, a library with many tools to approach qubit based and continuous-variable based quantum architectures.

The plugin that allows this can be found here.

With this plugin, one can use pennylane with the damavand.qubit backend.

dev = qml.device("damavand.qubit", wires=10, apply_method="gpu")

Sun rising on mount damavand

damavand-sunrise

You might also like...
Buildomat manages the provisioning of ephemeral UNIX systems on which to run software builds
Buildomat manages the provisioning of ephemeral UNIX systems on which to run software builds

B U I L D O M A T a software build labour-saving device Buildomat manages the provisioning of ephemeral UNIX systems (e.g., instances in AWS EC2) on w

TAT agent is an agent written in Rust, which run in CVM or Lighthouse instances.

TAT agent is an agent written in Rust, which run in CVM, Lighthouse or CPM 2.0 instances. Its role is to run commands remotely without ssh login, invoked from TencentCloud Console/API. Commands include but not limited to: Shell, PowerShell, Python. TAT stands for TencentCloud Automation Tools. See more info at https://cloud.tencent.com/product/tat.

Rust Keeper bots that run various functions, from liquidations, to orderbook cranks, and more.

The zo-keeper (pronounced "zoo keeper") repository runs large scale instructions that secure the 01 network, and allow it to operate in a fully decentralized manner.

Telegram bot help you to run Rust code in Telegram via Rust playground
Telegram bot help you to run Rust code in Telegram via Rust playground

RPG_BOT (Rust Playground Bot) Telegram bot help you to run Rust code in Telegram via Rust playground Bot interface The bot supports 3 straightforward

Rust library that can be reset if you think it's slow

GoodbyeKT Rust library that can be reset if you think it's slow

Uindex is a data store, for data that can be parsed as sentences in some context-free language.
Uindex is a data store, for data that can be parsed as sentences in some context-free language.

Uindex - Universal index Uindex is a data store, for data that can be parsed as sentences in some context-free language.

Rustcat is a port listener that can be used for different purposes.
Rustcat is a port listener that can be used for different purposes.

⚙️ Rustcat ⚙️ -- Basic Netcat Alternative -- About Rustcat is a port listener that can be used for different purposes.

QueingSimulator is an application that can be used to build intuitions about behavior of synchronous request/reply systems

Queueing Simulator QueingSimulator is an application that can be used to build intuitions about behavior of synchronous request/reply systems (such as

`fugit` provides a comprehensive library of `Duration` and `Instant` for the handling of time in embedded systems, doing all it can at compile time.

fugit fugit provides a comprehensive library of Duration and Instant for the handling of time in embedded systems, doing all it can at compile time. T

Releases(v0.2.0)
Owner
MichelNowak
MichelNowak
Run LLaMA inference on CPU, with Rust 🦀🚀🦙

LLaMA-rs Do the LLaMA thing, but now in Rust ?? ?? ?? Image by @darthdeus, using Stable Diffusion LLaMA-rs is a Rust port of the llama.cpp project. Th

Rustformers 2.7k Apr 17, 2023
Run LLaMA inference on CPU, with Rust 🦀🚀🦙

LLaMA-rs Do the LLaMA thing, but now in Rust ?? ?? ?? Image by @darthdeus, using Stable Diffusion LLaMA-rs is a Rust port of the llama.cpp project. Th

Rustformers 2.7k Apr 17, 2023
Yellhole is a lightweight tumblelog which can run on e.g. fly.io for cheap.

Yellhole A Hole To Yell In Yellhole is a lightweight tumblelog which can run on e.g. fly.io for cheap. Features Runs on a single node. Use a CDN if yo

Coda Hale 8 Dec 15, 2022
uefi update 4 amd cpu's

Description UEFI is the successor to the BIOS. It provides an early boot environment for OS loaders, hypervisors and other low-level applications. Whi

Revons Community 1 Mar 14, 2022
Define safe interfaces to MMIO and CPU registers with ease

regi regi lets you define safe interfaces to MMIO and CPU registers with ease. License Licensed under either of Apache License, Version 2.0 or MIT lic

Valentin B. 2 Feb 10, 2022
Multi-device clipboard sharing.

share-clip 多设备剪切板共享 特性 采用 Rust 实现。便捷/高性能 基于 Redis(可轻松支持广域网/局域网的共享) 自动发现同身份下的机器 全数据 RSA 分段加密 (出于性能及其他原因考虑替换为 XSalsa20Poly1305 加密) 支持文本和图片 支持共享提示(macOS

null 59 Dec 21, 2022
Yet another multi-purpose discord bot

virus yet another multi-purpose discord bot

miten 2 Jan 11, 2022
sentry - yet another multi-purpose discord bot

sentry - yet another multi-purpose discord bot

miten 1 Feb 17, 2022
Remedy is a multi-threaded rust-imap-maildir synchronization program

remedy Remedy is a multi-threaded rust-imap-maildir synchronization program. Please note that remedy is under heavy development. Current features: IMA

Tomas Jasek 2 Oct 9, 2022
This is a public snapshot of Fly's init code. It powers every Firecracker microvm we run for our users.

Fly Init This is a public snapshot of Fly's init code. It powers every Firecracker microvm we run for our users. It is Rust-based and we thought makin

fly.io 186 Dec 30, 2022