Suggested Reading: Computing with Quantum Cats

30/05/2015

John Gribbin — Computing with Quantum
Cats: from Colossus to Qubits
 — Prometheus Books, 2014,
295 pp. ISBN 978-1-61614-921-5

(Buy at Amazon)

(Buy at Amazon)

The book presents the genesis of the various ideas that may lead, one day, to a practical quantum computer. Gribbin takes a well-documented historico-biographical approach to the topic, while avoiding getting too deep into the science part of the story. On great many occasions, he cuts short an interesting avenue with a “but that’s another story”, which I find most frustrating. Those are the good parts I want to know about!

Despite all this, the book is still worth reading. It will expose you clearly (albeit summarily) the various ideas behind quantum computing, and is a good starting point if you’re interested in quantum computing, as the book also ends with a bibliography on the topic.

The quantum cats of the title refers, of course, to the famous Schrödinger cat gedankenexperiment, but the term also to macroscopic objects exhibiting quantum behavior.


Suggested Reading: Information Gathering in Classical Greece

16/05/2015

Frank S. Russell — Information Gathering in Classical Greece — University of Michigan Press, 2002, 268 pp. ISBN 0-472-11064

(Buy at Amazon.com)

(Buy at Amazon.com)

While Amazon’s blurb speaks of cloak-and-dagger and other spy clichés, this book has little to do with a thrilling espionage novel, and is as far from an ‘easy read’ as anything can be. Well documented, Russell’s book brings us back to classical times and tells us about war, politics, oracles, and “spies” (for lack of a better term) and a lot about the Greek mind. We learn, for example, that the Greeks did not consider intelligence gathering in the same way we would today with professional spies and information-gathering network, à la NSA, but rather in a rather ad hoc way.

The narrative is really fascinating but the form itself remains difficult. First, there are quite many ancient greek words to remember (will you remember what are a proxenoi and a presbeutai in two days?), and very often we find more than half of the pages being footnotes. This excruciatingly well documented book is still a must-read for one interested in classical Greece as well as one interested in the history of espionage.


Closed for Summer (2015)

28/04/2015

Comes again the time where the semester comes to an end. Students are busy with finals and various assignments, professors are busy with marking finals and assignments. Soon it will be over and I will concentrate on research and publication. I have this thing I’ve been trying to finish for a few months now—still just a few days more, just a few days more—and new stuff I want to start. So I will neglect, like last year, the blog until September, where I will return with the normal, once-a-week or almost, posting schedule.

(Dalia, 2560×1440)

(Dalia, 2560×1440)


Yet more LaTeX indexing woes

21/04/2015

Still more indexing woes. LaTeX indexing, while superficially easy to use, turns out to be rather finicky, especially for anchor placement—that is, where the index (hyper)link actually points to.

index-woes

Let’s see what I have found to circumvent some of the difficulties.

Read the rest of this entry »


No post today

14/04/2015

Except to say that there’sn’t a post today. Things have been busy lately, so no entry for this week. ¯\_(ツ)_/¯


Beauxindex

07/04/2015

Last week I presented a simple script that helped spot almost identical index entries. Since then, I’ve sought a better index style. While I found most book use a rather plain index style, I was looking for something that used space efficiently yet was easy to read.

fancy-index

The idxlayout package will help us customize the index somewhat. It will allow us to set the number of columns, set the distance between them, maybe with a line, set font size, and decide how we want topics arranged. In the image above, I have used the singlepar layout. It is invoked by adding the itemlayout=singlepar option as a package option:

\usepackage[itemlayout=singlepar]{idxlayout}

With an extra bit of configuration somewhere else in your LaTeX source:

\renewcommand{\see}[2]{\mdseries \emph{\seename} #1 }
\renewcommand{\indexsubsdelim}{~\raisebox{0.2ex}{\resizebox{1em}{0.5ex}{$\sim$}}
} % symbol(s) between subtopics 
\setkeys{ila}{columns=3} % nb columns
\setkeys{ila}{rule=0pt} % width of line between cols (0=no line)
\setkeys{ila}{columnsep=1em} % spacing between columns
\setkeys{ila}{font=footnotesize} % base font size
\setkeys{ila}{indentunit=1em} % how much to indent after first line
\setkeys{ila}{justific=standard} % raggedright is a mess!
\setkeys{ila}{initsep=0.5em plus 0.5em minus 0.1em} % rubberband length between paragraphs
\printindex

The idxlayout package isn’t very well documented, so you might have to dig in the source code itself to find values that you’re interested in changing. It produces:

maths-discretes-index

Which appears… flat.

These tweak make a much better-looking index than the makeindex default, but there are still a few things to tweak. The thing that bothered me most is that we do not really have a clear separation between the head topic and subtopics. To achieve good visual separation, we must redefine yet more variables. This time in makeindex. However, makeindex customization involves an “index style” file:

\makeindex[options=-s back-matter/index.ist]

The configurable elements are found in makeindex‘s man page. The necessary elements are set in the index.ist file, as follows:

item_0 "\n \\bfseries \\item "
item_1 "\n \\mdseries \\subitem "
item_01 "\n \\mdseries \\indexsubsdelim "
item_x1 "\n \\mdseries \\indexsubsdelim "

The item_0 variable defines the style with which a topic will be displayed. For now, in bold. The item_xy variables define the style change when you go from a level x item to a y level item. Since I want subtopic to appear “normal face”, \mdseries is inserted just before the subitem. The item_x1 seems to be also necessary to ensure that only the first topic in a paragraph is bold.

The changes produce the index as shown in the image at the beginning


Checking a LaTeX Index

31/03/2015

This week again, LaTeX. This time, the index. At the end of a document, you will usually find an index so that, if you don’t have a magical ctrl-f, you can find something fast in the book.

maths-discretes-index

In LaTeX, creating an index is really easy. You include the package makeindex, and plant \index{topic!subtopic} tags in the text (preferably just besides the word you want to index, the \index command doesn’t understand paragraphs). You add \printindex somewhere else in your document and you run pdflatex (or just latex) to get the index generated. That’s all fine except that it doesn’t provide checks. It adds to the index whatever you typed, and doesn’t give warnings if you have an entry “compression” and an entry “compresion” (because, you know, typos happen). Let’s see how we can somewhat fix that.

Read the rest of this entry »


A LaTeX Bibliography Hack

24/03/2015

Yet another LaTeX hack! This time to insert text between the bibliography/reference header and the actual references. I’ve had, I admit, no really good reason to do this, as I might have added some text before the bibliography, but it made a lot more sense to include the paragraph there.

hack-bibliographie

Read the rest of this entry »


A (simple) LaTeX Example Environment

17/03/2015

This week again, a little LaTeX. As you know, I’m putting the finishing touches to a manuscript I’ve been working on for a little bit more than a year now. Those “finishing touches” always start simple, then end up asking for quite a bit more LaTeX programming that I’d like.

latex-example-detail

This week, I worked quite a bit to repair my “example” environment that include example number, extra margin, and a different colored box around the text. This helps locate and distinguish examples from normal text. But my first version had little problems. Like equations centered not on the example text but still relative to the whole page. Bummer. Let’s see how I fixed all that.

Read the rest of this entry »


The Tosser

10/03/2015

Here’s a LEGO dice-tossing machine I built.

The two complicated parts are the reduction gear train and the flaps that re-center the dice so that the machine can pick it up correctly each time.

The gear train is composed of several gear reducers, which are composed of a small gear driving a larger gear (thus many turns of the small, driving gear, are needed for the big one to make a complete rotation). Each large gear share its spindle with a small gear that drives the next stage. The gear box yields a 243:1 reduction (which is 3^5 to 1). Otherwise the motor spins too fast and just, well, eject the dice from the machine.

The flaps are used to funnel the dice back in the middle of the tray, where it can be picked up again.

*
* *

The next step would be to use OCR to read the dice value and see if, in the long run, the tosser is a strong number generator or if it is flawed in some way. Can’t really remember where I got the 16-sided dice, but there are some to be found online.