Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,7 @@ cython_debug/
*.code-workspace
.github/workflows/_*.yml

uv.lock
uv.lock
docker/.env copy

*.DS_Store
60 changes: 33 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,93 +41,99 @@ pip install .[docs]
mkdocs serve
```


### Where in the stack
```mermaid
block-beta
columns 3

block:Interface
columns 1
InterfaceTitle("<i><b>Interfaces</b><i/>")
InterfaceDigital["<b>Digital Interface</b>\nQuantum circuits with discrete gates"]
InterfaceDigital["<b>Digital Interface</b>\nQuantum circuits with discrete gates"]
space
InterfaceAnalog["<b>Analog Interface</b>\n Continuous-time evolution with Hamiltonians"]
InterfaceAnalog["<b>Analog Interface</b>\n Continuous-time evolution with Hamiltonians"]
space
InterfaceAtomic["<b>Atomic Interface</b>\nLight-matter interactions between lasers and ions"]
space
end

block:IR
columns 1
IRTitle("<i><b>IRs</b><i/>")
IRDigital["Quantum circuit IR\nopenQASM, LLVM+QIR"]
IRDigital["Quantum circuit IR\nopenQASM, LLVM+QIR"]
space
IRAnalog["openQSIM"]
space
IRAtomic["openAPL"]
space
end

block:Emulator
columns 1
EmulatorsTitle("<i><b>Classical Emulators</b><i/>")
EmulatorDigital["Pennylane, Qiskit"]

EmulatorDigital["Pennylane, Qiskit"]
space
EmulatorAnalog["QuTiP, QuantumOptics.jl"]
space
EmulatorAtomic["TrICal, QuantumIon.jl"]
space
end

space
block:RealTime
columns 1
RealTimeTitle("<i><b>Real-Time</b><i/>")
space
RTSoftware["ARTIQ, DAX, OQDAX"]
RTSoftware["ARTIQ, DAX, OQDAX"]
space
RTGateware["Sinara Real-Time Control"]
space
RTHardware["Lasers, Modulators, Photodetection, Ion Trap"]
space
RTApparatus["Trapped-Ion QPU (<sup>171</sup>Yt<sup>+</sup>, <sup>133</sup>Ba<sup>+</sup>)"]
RTApparatus["Trapped-Ion QPU (<sup>171</sup>Yb<sup>+</sup>, <sup>133</sup>Ba<sup>+</sup>)"]
space
end
space

InterfaceDigital --> IRDigital
InterfaceAnalog --> IRAnalog
InterfaceAtomic --> IRAtomic

IRDigital --> IRAnalog
IRAnalog --> IRAtomic

IRDigital --> EmulatorDigital
IRAnalog --> EmulatorAnalog
IRAtomic --> EmulatorAtomic

IRAtomic --> RealTimeTitle

RTSoftware --> RTGateware
RTGateware --> RTHardware
RTHardware --> RTApparatus

classDef title fill:#d6d4d4,stroke:#333,color:#333;
classDef digital fill:#E7E08B,stroke:#333,color:#333;
classDef analog fill:#E4E9B2,stroke:#333,color:#333;
classDef atomic fill:#D2E4C4,stroke:#333,color:#333;
classDef realtime fill:#B5CBB7,stroke:#333,color:#333;

classDef highlight fill:#f2bbbb,stroke:#333,color:#333,stroke-dasharray: 5 5;


classDef title fill:#23627D,stroke:#141414,color:#FFFFFF;
classDef digital fill:#c3e1ee,stroke:#141414,color:#141414;
classDef analog fill:#afd7e9,stroke:#141414,color:#141414;
classDef atomic fill:#9ccee3,stroke:#141414,color:#141414;
classDef realtime fill:#88c4dd,stroke:#141414,color:#141414;

classDef highlight fill:#F19D19,stroke:#141414,color:#141414,stroke-dasharray: 5 5;
classDef normal fill:#fcebcf,stroke:#141414,color:#141414;

class InterfaceTitle,IRTitle,EmulatorsTitle,RealTimeTitle title
class InterfaceDigital,IRDigital,EmulatorDigital digital
class InterfaceAnalog,IRAnalog,EmulatorAnalog analog
class InterfaceAtomic,IRAtomic,EmulatorAtomic atomic
class RTSoftware,RTGateware,RTHardware,RTApparatus realtime

class Emulator highlight

class Interface normal
class RealTime normal
class IR normal

class Emulator highlight
```
The tools in this repository allow for self-hosting a server to run
quantum programs on classical emulators, highlighted in the stack diagram in red.
Expand Down
92 changes: 92 additions & 0 deletions docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Git
.git
.gitignore
.gitattributes


# CI
.codeclimate.yml
.travis.yml
.taskcluster.yml

# Docker
docker-compose.yml
Dockerfile
.docker
.dockerignore

# Byte-compiled / optimized / DLL files
**/__pycache__/
**/*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Virtual environment
.env
.venv/
venv/

# PyCharm
.idea

# Python mode for VIM
.ropeproject
**/.ropeproject

# Vim swap files
**/*.swp

# VS Code
.vscode/


.venv
60 changes: 10 additions & 50 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,62 +1,22 @@
FROM python:3.10.13-slim-bookworm as build

FROM python:3.12-slim-bookworm as build
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends build-essential gcc && \
apt-get install -y git # for installing directly from git

ARG PIP_DISABLE_PIP_VERSION_CHECK=1
ARG PIP_NO_CACHE_DIR=1

WORKDIR /python

RUN python -m venv /python/venv

ENV PATH="/python/venv/bin:$PATH"

COPY docker/requirements.txt .
RUN pip install -r requirements.txt

RUN pip install oqd-compiler-infrastructure
RUN pip install oqd-core
RUN pip install oqd-analog-emulator


########################################################################################

FROM python:3.10.13-slim-bookworm as app

RUN apt update && \
apt install -y --no-install-recommends supervisor && \
apt-get install -y git && \
apt-get install -y gcc g++ # needed from Cython


ARG PIP_DISABLE_PIP_VERSION_CHECK=1
ARG PIP_NO_CACHE_DIR=1

COPY --from=build /python/venv /python/venv

ENV PATH="/python/venv/bin:$PATH"
ENV PYTHONPATH="/app/src"

COPY . ./app
ENV PYTHONPATH="/app/src"
WORKDIR /app
RUN pip install .
#RUN pip install .[all]

#COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

########################################################################################
RUN uv venv
ENV PATH=".venv/bin:$PATH"

# RUN \
# apt update \
# && apt install wget -y \
# && wget https://julialang-s3.julialang.org/bin/linux/x64/1.9/julia-1.9.3-linux-x86_64.tar.gz -P /opt \
# && tar zxvf /opt/julia-1.9.3-linux-x86_64.tar.gz -C /opt
RUN uv pip install ".[server]"

# ENV PATH "$PATH:/opt/julia-1.9.3/bin"
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

# RUN julia -e 'using Pkg; Pkg.add(["QuantumOptics", "Configurations", "StatsBase", "DataStructures", "JSON3", "IonSim"])'
########################################################################################
Loading
Loading