Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
hanakl committed Nov 26, 2024
1 parent 11b2e76 commit b11a679
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 3 deletions.
Empty file added docs/src/backendsimulator.md
Empty file.
16 changes: 16 additions & 0 deletions docs/src/discreteeventsimulator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# [Discrete Event Simulator](@id sim)

```@meta
DocTestSetup = quote
using QuantumSavory
end
```

## Overview

imulating quantum processes requires robust tools for **Discrete Event Simulator**. In QuantumSavory, we use `ConcurrentSim.jl` and `ResumableFunctions.jl` to model complex, asynchronous processes.

This simulation framework enables protocols to handle dynamic interactions, such as waiting for resources to become available.

### **ConcurrentSim.jl** and **ResumableFunctions.jl**
QuantumSavory simulations are structured using [`ConcurrentSim.jl`](https://github.com/JuliaDynamics/ConcurrentSim.jl). A process is defined as a `@resumable` function that yields events, allowing for efficient resource allocation and the expression of protocols that pause until specific conditions are met. These features are essential for implementing waiting mechanisms, such as waiting for messages or changes in a quantum state.
19 changes: 16 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ end

A multi-formalism simulator for noisy quantum communication and computation hardware with support for symbolic algebra, multiple simulation backends, a variety of noise models, discrete event simulation, optimization, and visualization.

We are also preparing a [getting started manual](@ref manual).
To install QuantumSavory, see: [getting started manual](@ref manual).

The rest of the documentation is [structured](https://diataxis.fr/) as follows:

Expand All @@ -19,7 +19,17 @@ The rest of the documentation is [structured](https://diataxis.fr/) as follows:

Depending on your learning style, you might prefer to start at different locations in the above documentation.

Below we demo some of the results of the How-To guides.

### Capabilities

QuantumSavory offers advanced features such as:

- **Hardware Parameter Database**: Detailed records of quantum hardware metrics, enabling realistic simulations and performance benchmarking.
- **Noise Processes Zoo**: A collection of noise models for simulating quantum systems under realistic and complex conditions.
- **Protocols and Circuits Compendium**: Pre-designed quantum circuits and protocols for rapid prototyping and optimization of applications.


Below we show some of the results of the How-To guides.

#### A simulation of a quantum repeater:

Expand All @@ -42,4 +52,7 @@ Below we demo some of the results of the How-To guides.
This is software is still in a fairly unstable alpha state! The documentation is extremely barebones and current users are expected to read the source code.

A good place to start is the How-To pages.
For instance, the [implementation of a first generation repeater](@ref First-Generation-Quantum-Repeater).
For instance, the [implementation of a first generation repeater](@ref First-Generation-Quantum-Repeater).

### Get Involved
We welcome contributions from experts and students alike, whether by improving the codebase or suggesting new useful features. Your input will help us refine QuantumSavory and support better quantum simulations.
45 changes: 45 additions & 0 deletions docs/src/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,48 @@ DocTestSetup = quote
end
```

## Getting Started
### Installation
To use QuantumSavory, make sure you have Julia version 1.10 installed. You can download and install Julia from [the official Julia website](https://julialang.org/downloads/).

Once Julia is setup, QuantumSavory can be installed with the following command in your in your Julia REPL:
```bash
$ julia
julia> ]
pkg> add QuantumSavory
```
#### Optional Dependencies
There are optional packages that you need to install to use the full plotting feature.
- **Makie**: For plotting of registers and processes.
- **GeoMakie**: Enables plotting on a real-world map as a background.

## Basic Demo
Here’s a simple example to demonstrate how you can set up a simulation to generate a set of registers with qubit slots. For more advanced examples and detailed guide, see[How-To Guides](@ref) and [Tutorials](@ref) sections.


```
using QuantumSavory
# This is a network of three registers, each with 2, 3, and 4 Qubit slots.
net = RegisterNet([Register(2), Register(3), Register(4)])
# initialize slots and entangle them
initialize!(net[1,1])
initialize!(net[2,3], X₁)
initialize!((net[3,1],net[4,2]), X₁⊗Z₂)
# apply CNOT gate
apply!((net[2,3],net[3,1]), CNOT)
```

If you have `Makie` and `GeoMakie` installed, you can plot the above network:
```
using GLMakie
GLMakie.activate!()
# generate background map
map_axis = generate_map()
fig, ax, plt, obs = registernetplot_axis(map_axis, net, registercoords=[Point2f(-71, 42), Point2f(-111, 34), Point2f(-122, 37)])
fig
```

0 comments on commit b11a679

Please sign in to comment.