Skip to content

Commit 1d54216

Browse files
committed
update
1 parent 9301170 commit 1d54216

File tree

3 files changed

+113
-0
lines changed

3 files changed

+113
-0
lines changed

doc/src/week16/clean.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
doconce clean
3+
rm -rf *.pdf *.tex ipynb*.tar.gz *.html ._*.html *~ reveal.js Trash README.txt

doc/src/week16/make.sh

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#!/bin/sh
2+
set -x
3+
4+
function system {
5+
"$@"
6+
if [ $? -ne 0 ]; then
7+
echo "make.sh: unsuccessful command $@"
8+
echo "abort!"
9+
exit 1
10+
fi
11+
}
12+
13+
if [ $# -eq 0 ]; then
14+
echo 'bash make.sh slides1|slides2'
15+
exit 1
16+
fi
17+
18+
name=$1
19+
rm -f *.tar.gz
20+
21+
opt="--encoding=utf-8"
22+
# Note: Makefile examples contain constructions like ${PROG} which
23+
# looks like Mako constructions, but they are not. Use --no_mako
24+
# to turn off Mako processing.
25+
opt="--no_mako"
26+
27+
rm -f *.aux
28+
29+
30+
html=${name}-reveal
31+
system doconce format html $name --pygments_html_style=perldoc --keep_pygments_html_bg --html_links_in_new_window --html_output=$html $opt
32+
system doconce slides_html $html reveal --html_slide_theme=beige
33+
34+
# Plain HTML documents
35+
36+
html=${name}-solarized
37+
system doconce format html $name --pygments_html_style=perldoc --html_style=solarized3 --html_links_in_new_window --html_output=$html $opt
38+
system doconce split_html $html.html --method=space10
39+
40+
html=${name}
41+
system doconce format html $name --pygments_html_style=default --html_style=bloodish --html_links_in_new_window --html_output=$html $opt
42+
system doconce split_html $html.html --method=space10
43+
44+
# Bootstrap style
45+
html=${name}-bs
46+
system doconce format html $name --html_style=bootstrap --pygments_html_style=default --html_admon=bootstrap_panel --html_output=$html $opt
47+
#system doconce split_html $html.html --method=split --pagination --nav_button=bottom
48+
49+
# IPython notebook
50+
system doconce format ipynb $name $opt
51+
52+
# Ordinary plain LaTeX document
53+
system doconce format pdflatex $name --minted_latex_style=trac --latex_admon=paragraph $opt
54+
system doconce ptex2tex $name envir=minted
55+
# Add special packages
56+
doconce subst "% Add user's preamble" "\g<1>\n\\usepackage{simplewick}" $name.tex
57+
doconce replace 'section{' 'section*{' $name.tex
58+
pdflatex -shell-escape $name
59+
pdflatex -shell-escape $name
60+
mv -f $name.pdf ${name}.pdf
61+
cp $name.tex ${name}.tex
62+
63+
64+
65+
66+
# Publish
67+
dest=../../pub
68+
if [ ! -d $dest/$name ]; then
69+
mkdir $dest/$name
70+
mkdir $dest/$name/pdf
71+
mkdir $dest/$name/html
72+
mkdir $dest/$name/ipynb
73+
fi
74+
cp ${name}*.pdf $dest/$name/pdf
75+
cp -r ${name}*.html ._${name}*.html reveal.js $dest/$name/html
76+
77+
# Figures: cannot just copy link, need to physically copy the files
78+
if [ -d fig-${name} ]; then
79+
if [ ! -d $dest/$name/html/fig-$name ]; then
80+
mkdir $dest/$name/html/fig-$name
81+
fi
82+
cp -r fig-${name}/* $dest/$name/html/fig-$name
83+
fi
84+
85+
cp ${name}.ipynb $dest/$name/ipynb
86+
ipynb_tarfile=ipynb-${name}-src.tar.gz
87+
if [ ! -f ${ipynb_tarfile} ]; then
88+
cat > README.txt <<EOF
89+
This IPython notebook ${name}.ipynb does not require any additional
90+
programs.
91+
EOF
92+
tar czf ${ipynb_tarfile} README.txt
93+
fi
94+
cp ${ipynb_tarfile} $dest/$name/ipynb
95+
96+
97+
98+

doc/src/week16/week16.do.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
TITLE: Quantum Computing, Quantum Machine Learning and Quantum Information Theories
2+
AUTHOR: Morten Hjorth-Jensen {copyright, 1999-present|CC BY-NC} at Department of Physics, University of Oslo & Department of Physics and Astronomy and Facility for Rare Isotope Beams, Michigan State University
3+
DATE: May 15, 2024
4+
5+
6+
!split
7+
===== Plan for the week of May 13-17 =====
8+
!bblock
9+
o Summary of course
10+
o Discussion and work on project 2
11+
!eblock
12+

0 commit comments

Comments
 (0)