Skip to content

Commit 65079fa

Browse files
Merge branch 'docs'
2 parents a80c88d + 55e04c4 commit 65079fa

28 files changed

Lines changed: 1001 additions & 269 deletions

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,7 @@ cython_debug/
165165
*.code-workspace
166166
.github/workflows/_*.yml
167167

168-
uv.lock
168+
uv.lock
169+
docker/.env copy
170+
171+
*.DS_Store

README.md

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,93 +41,99 @@ pip install .[docs]
4141
mkdocs serve
4242
```
4343

44-
44+
### Where in the stack
4545
```mermaid
4646
block-beta
4747
columns 3
48-
48+
4949
block:Interface
5050
columns 1
5151
InterfaceTitle("<i><b>Interfaces</b><i/>")
52-
InterfaceDigital["<b>Digital Interface</b>\nQuantum circuits with discrete gates"]
52+
InterfaceDigital["<b>Digital Interface</b>\nQuantum circuits with discrete gates"]
5353
space
54-
InterfaceAnalog["<b>Analog Interface</b>\n Continuous-time evolution with Hamiltonians"]
54+
InterfaceAnalog["<b>Analog Interface</b>\n Continuous-time evolution with Hamiltonians"]
5555
space
5656
InterfaceAtomic["<b>Atomic Interface</b>\nLight-matter interactions between lasers and ions"]
5757
space
5858
end
59-
59+
6060
block:IR
6161
columns 1
6262
IRTitle("<i><b>IRs</b><i/>")
63-
IRDigital["Quantum circuit IR\nopenQASM, LLVM+QIR"]
63+
IRDigital["Quantum circuit IR\nopenQASM, LLVM+QIR"]
6464
space
6565
IRAnalog["openQSIM"]
6666
space
6767
IRAtomic["openAPL"]
6868
space
6969
end
70-
70+
7171
block:Emulator
7272
columns 1
7373
EmulatorsTitle("<i><b>Classical Emulators</b><i/>")
74-
75-
EmulatorDigital["Pennylane, Qiskit"]
74+
75+
EmulatorDigital["Pennylane, Qiskit"]
7676
space
7777
EmulatorAnalog["QuTiP, QuantumOptics.jl"]
7878
space
7979
EmulatorAtomic["TrICal, QuantumIon.jl"]
8080
space
8181
end
82-
82+
8383
space
8484
block:RealTime
8585
columns 1
8686
RealTimeTitle("<i><b>Real-Time</b><i/>")
8787
space
88-
RTSoftware["ARTIQ, DAX, OQDAX"]
88+
RTSoftware["ARTIQ, DAX, OQDAX"]
8989
space
9090
RTGateware["Sinara Real-Time Control"]
9191
space
9292
RTHardware["Lasers, Modulators, Photodetection, Ion Trap"]
9393
space
94-
RTApparatus["Trapped-Ion QPU (<sup>171</sup>Yt<sup>+</sup>, <sup>133</sup>Ba<sup>+</sup>)"]
94+
RTApparatus["Trapped-Ion QPU (<sup>171</sup>Yb<sup>+</sup>, <sup>133</sup>Ba<sup>+</sup>)"]
9595
space
9696
end
9797
space
98-
98+
9999
InterfaceDigital --> IRDigital
100100
InterfaceAnalog --> IRAnalog
101101
InterfaceAtomic --> IRAtomic
102-
102+
103103
IRDigital --> IRAnalog
104104
IRAnalog --> IRAtomic
105-
105+
106106
IRDigital --> EmulatorDigital
107107
IRAnalog --> EmulatorAnalog
108108
IRAtomic --> EmulatorAtomic
109-
109+
110110
IRAtomic --> RealTimeTitle
111-
111+
112112
RTSoftware --> RTGateware
113113
RTGateware --> RTHardware
114114
RTHardware --> RTApparatus
115-
116-
classDef title fill:#d6d4d4,stroke:#333,color:#333;
117-
classDef digital fill:#E7E08B,stroke:#333,color:#333;
118-
classDef analog fill:#E4E9B2,stroke:#333,color:#333;
119-
classDef atomic fill:#D2E4C4,stroke:#333,color:#333;
120-
classDef realtime fill:#B5CBB7,stroke:#333,color:#333;
121-
122-
classDef highlight fill:#f2bbbb,stroke:#333,color:#333,stroke-dasharray: 5 5;
123-
115+
116+
classDef title fill:#23627D,stroke:#141414,color:#FFFFFF;
117+
classDef digital fill:#c3e1ee,stroke:#141414,color:#141414;
118+
classDef analog fill:#afd7e9,stroke:#141414,color:#141414;
119+
classDef atomic fill:#9ccee3,stroke:#141414,color:#141414;
120+
classDef realtime fill:#88c4dd,stroke:#141414,color:#141414;
121+
122+
classDef highlight fill:#F19D19,stroke:#141414,color:#141414,stroke-dasharray: 5 5;
123+
classDef normal fill:#fcebcf,stroke:#141414,color:#141414;
124+
124125
class InterfaceTitle,IRTitle,EmulatorsTitle,RealTimeTitle title
125126
class InterfaceDigital,IRDigital,EmulatorDigital digital
126127
class InterfaceAnalog,IRAnalog,EmulatorAnalog analog
127128
class InterfaceAtomic,IRAtomic,EmulatorAtomic atomic
128129
class RTSoftware,RTGateware,RTHardware,RTApparatus realtime
130+
131+
class Emulator highlight
132+
133+
class Interface normal
134+
class RealTime normal
135+
class IR normal
129136
130-
class Emulator highlight
131137
```
132138
The tools in this repository allow for self-hosting a server to run
133139
quantum programs on classical emulators, highlighted in the stack diagram in red.

docker/.dockerignore

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Git
2+
.git
3+
.gitignore
4+
.gitattributes
5+
6+
7+
# CI
8+
.codeclimate.yml
9+
.travis.yml
10+
.taskcluster.yml
11+
12+
# Docker
13+
docker-compose.yml
14+
Dockerfile
15+
.docker
16+
.dockerignore
17+
18+
# Byte-compiled / optimized / DLL files
19+
**/__pycache__/
20+
**/*.py[cod]
21+
22+
# C extensions
23+
*.so
24+
25+
# Distribution / packaging
26+
.Python
27+
env/
28+
build/
29+
develop-eggs/
30+
dist/
31+
downloads/
32+
eggs/
33+
lib/
34+
lib64/
35+
parts/
36+
sdist/
37+
var/
38+
*.egg-info/
39+
.installed.cfg
40+
*.egg
41+
42+
# PyInstaller
43+
# Usually these files are written by a python script from a template
44+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
45+
*.manifest
46+
*.spec
47+
48+
# Installer logs
49+
pip-log.txt
50+
pip-delete-this-directory.txt
51+
52+
# Unit test / coverage reports
53+
htmlcov/
54+
.tox/
55+
.coverage
56+
.cache
57+
nosetests.xml
58+
coverage.xml
59+
60+
# Translations
61+
*.mo
62+
*.pot
63+
64+
# Django stuff:
65+
*.log
66+
67+
# Sphinx documentation
68+
docs/_build/
69+
70+
# PyBuilder
71+
target/
72+
73+
# Virtual environment
74+
.env
75+
.venv/
76+
venv/
77+
78+
# PyCharm
79+
.idea
80+
81+
# Python mode for VIM
82+
.ropeproject
83+
**/.ropeproject
84+
85+
# Vim swap files
86+
**/*.swp
87+
88+
# VS Code
89+
.vscode/
90+
91+
92+
.venv

docker/Dockerfile

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,22 @@
1-
FROM python:3.10.13-slim-bookworm as build
2-
1+
FROM python:3.12-slim-bookworm as build
2+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
33

44
RUN apt-get update && \
55
apt-get upgrade -y && \
6-
apt-get install -y --no-install-recommends build-essential gcc && \
7-
apt-get install -y git # for installing directly from git
8-
9-
ARG PIP_DISABLE_PIP_VERSION_CHECK=1
10-
ARG PIP_NO_CACHE_DIR=1
11-
12-
WORKDIR /python
13-
14-
RUN python -m venv /python/venv
15-
16-
ENV PATH="/python/venv/bin:$PATH"
17-
18-
COPY docker/requirements.txt .
19-
RUN pip install -r requirements.txt
20-
21-
RUN pip install oqd-compiler-infrastructure
22-
RUN pip install oqd-core
23-
RUN pip install oqd-analog-emulator
24-
25-
26-
########################################################################################
27-
28-
FROM python:3.10.13-slim-bookworm as app
29-
30-
RUN apt update && \
316
apt install -y --no-install-recommends supervisor && \
7+
apt-get install -y git && \
328
apt-get install -y gcc g++ # needed from Cython
339

34-
35-
ARG PIP_DISABLE_PIP_VERSION_CHECK=1
36-
ARG PIP_NO_CACHE_DIR=1
37-
38-
COPY --from=build /python/venv /python/venv
39-
40-
ENV PATH="/python/venv/bin:$PATH"
41-
ENV PYTHONPATH="/app/src"
42-
4310
COPY . ./app
11+
ENV PYTHONPATH="/app/src"
4412
WORKDIR /app
45-
RUN pip install .
46-
#RUN pip install .[all]
4713

48-
#COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
49-
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
50-
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
51-
52-
########################################################################################
14+
RUN uv venv
15+
ENV PATH=".venv/bin:$PATH"
5316

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

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

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

0 commit comments

Comments
 (0)