I recently got enticed by Vim's text editing model, and began my own personal descent into evil-(mode): the full-featured Vim implementation within Emacs itself.

However, even viewed purely as a text editor, Vim doesn't get everything right in my not-so-humble opinion.

The cursor in a text editor indicates the location where the next editing operation should act, both visually to the user and internally to the text editor. There are two conceptually different ways to model the cursor location. You can consider the cursor to be located *in between* two consecutive characters. Or you can consider it to be located *on top of* a particular character. Emacs, like almost every other text editor, uses the first model. If the cursoris at location 3, say, Emacs considers it to be between the 2nd and 3rd character in the text.Typing a character will insert it in between these two characters; deleting backwards will delete character 2; deleting forwards will delete character 3.

Vim also uses this cursor model in insert mode.But in normal mode, it uses the other cursor model: if the cursor is at location 3, in normal mode Vim considers it to be located *on top of* the 3rd character in the text. There are therefore two insersion commands: `i`

will start inserting text just before the 3rd character (i.e. in between characters 2 and 3); `a`

will start inserting text just after the 3rd character (i.e. in between characters 3 and 4). Similarly, `p`

pastes text before the character under the cursor, whereas `P`

pastes it after that character.

I think Vim got this one wrong.Having to keep two different cursor models in mind adds cognitive burden, for little gain.

]]>`crontab -e`

under a new user without remembering to first set `EDITOR`

.
But a few months ago, on one of those random internet walks where you start off looking up the Artin-Wedderburn theorem and, half an hour of link-following later, find yourself reading an article on worm composting without any idea how you got from one to the other, I found myself reading the Vim manual.

I already knew about the model editing and `hjkl`

keybindings. But Vim's composable commands had completely passed me by. This notion of Vim as a text editing *language*, composed of "verb" operators and "noun" motions or text objects, intrigued me. Over the following weeks and months, I found myself reading ever more blog posts and articles discussing the philosophy and design of Vim.

However, there was one thing I was never going to do. No matter how elegant the philosophy of Vim's editing commands, swapping Elisp for Vimscript was a Faustian bargain so offputting, I wasn't even tempted to fire up Vim itself out of curiosity. But there's a Goethian Gretchen to Vim's Mephistophiles: `evil-mode`

-- an implementationof Vim within Emacs itself.

Thus began my descent into Evil.

]]>
Investigate why things float or sink.

Introduce the idea of formulating and testing hypotheses.

- 1 large, waterproof container. E.g. a bucket, basin, or watertight box. A bath or sink will also work fine.
- A variety of objects of different shapes and sizes, and made out of different materials: stone, metal, plasic, wood. E.g. metal, plastic and wooden spoons of similar sizes; different size spoons; metal and plastic bottle tops; stones; corks; matchsticks.
- Plasticine or play-dough.
- A small plastic tub that fits in the big container.

Investigate what seeds and plants need to grow.

Introduce the basic idea of a controlled trial.

- cress seeds
- 4 trays (plastic food trays are perfect - remember to wash them throughly first!)
- 2 cardboard boxes (big enough for the trays to fit in)
- 4 pieces of kitchen roll, or enough cotton wool to line each tray

`undo-tree-mode`

. Trouble was, though I do all my text editing in Emacs, and always have `global-undo-tree-mode`

enabled, I'd never encountered these issues myself. And no one had ever been able to send me a recipe for reliably reproducing them. Making it fiendishly difficult to even begin to investigate what might be going on.
This post is about some recent changes to undo-tree that might finally address these issues.

]]>`newlfm`

letter, forget the builtin `\restletter`

commands. Add `\newcommand\closelfm{\closlfm\let\closlfm\relax}`

to your `letrinfo.tex`

file, put `\closelfm`

where you want to end the letter (optionally followed by a `\newpage`

), then write the additional material using standard L
I use the `newlfm`

L^{a}T_{e}X package for all letters I write, personal and professional. It has some nice advantages over the standard `letter`

document class: you can have a database of different sender and recipient addresses, signatures and letterheads; it's easy to create custom letterheads that include images; you can have the correct letterhead and signature selected automatically based on sender or recipient. And many other features I don't make use of.

I have a love-hate relationship with this package, though. It has some quirks/bugs, especially to do with page layout and spacing. And whilst the documentation is extensive, it's not always the clearest. Whenever I need to do anything slightly different to what I've done before with `newlfm`

, getting it to do what I want typically involves hours of effort and frustration the first time around, and I often ending up resorting to ugly kludges to get the letter written without wasting too much time. (This probably says more about my limitations, than those of the package.) Nonetheless, once you have a letter layout configured just the way you want, writing new letters with the same layout with `newlfm`

is a breeze.

I was recently writing a cover letter to accompany the revisions I was submitting to one of my research papers. I wanted to attach the detailed response to the referees' comments after the letter (which contained a lot of mathsso was best written in L^{a}T_{e}X too). The easy thing would have been to write the cover letter using `newlfm`

, write the review response as a separate L^{a}T_{e}X document using some other document class, and stitch the two PDFs together using the pdftk command-line tool (or similar). But having to write these as two separate documents bugged me. I was already writing the cover letter in L^{a}T_{e}X. Why not just write the detailed referee response in the same L^{a}T_{e}X document?

- Rule 1
- Never consult a list of rules regarding being scooped.
- Rule 2
- Be happy: it implies \(\geq 1\) other person is interested in the problem you solved.
- Rule 3
- You hear about the other author's paper before it's posted on the arXiv, and are on friendly terms with them. Politely ask if they'd be willing to post to the arXiv simultaneously. This is a win-win: both papers will look more important and get more attention. If they don't agree, go to Rule 6. In either case, cite the other paper and be generous in crediting them.
- Rule 4
- You agree to post simultaneously, but then they ask for more time. Be generous and give them plenty of extra time. You will feel good. When you post yours, cite the other paper and be generous in crediting them.
- Rule 5
- You agree to post simultaneously, but then you need more time. Go home, have a beer, tell them you're not going to make the agreed date and let them post first. When you post yours, cite the other paper and be generous in crediting them.
- Rule 6
- The other results appear on the arXiv before yours, but you can post your results soon enough that it's clearly independent work. Go ahead and post them. You'll still get credit for the work. Cite the other paper and be generous in crediting them.
- Rule 7
- You're not ready to post soon without stressing about it, but the differences in your results are interesting and you're motivated to work on them. Work on those, post your paper when you have interesting new results. Be happy, smile. You've advanced science a few more steps. Cite the other paper and be generous in crediting them.
- Rule 8
- Your results are very similar, and the differences aren't interesting enough to you. Get your mind off it---crying, sex, indulging, smoking, hallucinating, and swimming in the North Sea may help. After doing \(\geq 1\) of those activities, look at the differences with fresh eyes. If they look interesting now, go back to Rule 7. If not, let this one go. There are infinitely many new and interesting problems to work on: go and work on one of those.
- Rule 9
- It happens - do not get stressed about it.

Once I started my six months leave, I didn't need to look up the statistics to quickly realise how few men were taking any parental leave at all. It was a rare baby singing, music, swimming or soft-play class where I wasn't the only man present. I never found that an issue. To their credit, all the mothers I met made me feel as accepted and welcome as any other parent of a young baby, and I made some really good friends. There's honour among thieves...and solidarity amongst sleep-deprived parents of any gender!

So how do I feel about it having done it? Two things struck me particularly forcefully over the six months.

]]>The answer is no doubt well-known to anyone who works on quantum stabilizer codes, and we could have just googled for the result. It seemed like a nice, self-contained mathematical question, though. So rather than googling, we tried to figure it out for ourselves at the blackboard.

If you just want to see the simple final answer, skip to the end. But then you'll miss all the fun and the main point of this post. The way we came up with the solution makes for a nice toy example of the convoluted, messy and inelegant process by which mathematical results are really proven. Before they get polished up into the simple, elegant, pristine proofs "from The Book" that are all you ever get to see in textbooks and research papers. The unspoken (or at least unpublished) reality is that elegant proofs invariably emerge after following numerous blind alleys, unjustified intuitive leaps, and inelegant, round-the-houses arguments. All of which get simplified away in time for publication. (Or maybe that's just my proofs!)

Instead of just explaining the elegant final answer, I'm going to explain the inelegant process we went through to reach it.

]]>Dear Diane,

When I first moved to Hackney, I was proud to tell people I had you as my MP. As one of the few voices on the Labour backbenches consistently voting according to conscience, defying the party whip when it was at odds with your principles and your constituents' interests, you stood out from the crowd of political apparatchiks toting the party line. On issues ranging from the Iraq war, to defending the NHS from privatisation, to resisting the incoming tide of government mass surveillance, your voting record aligned even more closely with my views than the overall Labour party line. Though I've been a lifelong Labour voter, I was even happier to be a Diane Abbot voter.

You campaigned for remaining in the EU. Your constituents voted overwhelmingly remain, the joint-second highest remain vote (with Lambeth) after Gibraltar. You know that opposing a hard Brexit and fighting to keep the UK in the common market is in the best interests of your constituents, not just economically but also socially. You know that, for 40 years, the strongest bulwark against dismantling of social protections, civil liberties, and workers' rights in the UK has been European legislation. You know that fighting to retain as much of that as possible is fighting to prevent Theresa May's race to the very bottom in pandering to Trump, legitimising corporate tax evasion, liberating corporations to exploit employees, and dismantling and privatising the services that provide a safety net to so many in the UK.

]]>A couple of months ago, the statistic that only 1% of men had taken up shared parental leave was splashed all over the British media. (Shared Parental Leave was introduced in the UK in 2015, and essentially allows parents to share 12 months of leave however they like. Taking it consecutively, simultaneously, alternating blocks of leave between both parents, or a mixture of the above are all permitted.)

My Family Care, the company that carried out the survey on which this statistic was based, apparetly asked Human Resources directors at 200 businesses what percentage of men in their company had taken shared parental leave in the year since it was introduced. But, as Radio's 4's excellent More or Less programme pointed out, they forgot to ask what percentage of those men were actually elligible for parental leave in the first place! Most of them won't have had children at all in the last year. Some of them won't even have any children!! Ooops.

(If you know me personally, and think you recognise something you've said, you don't! These aren't direct quotes. I've paraphrased things that have been said to me multiple times by many different people.)

]]>There are various ways to fight this deluge of spam. The most common is to use a filter that tries to recognise and delete the spam (or, more usually, move it to a spam box for later perusal). This is quite effective. A small amount of spam will not be recognised as such (false-negatives), and will end up in your inbox anyway. But the amount of spam will usually be cut down to a manageable amount, rendering email usable again.

The problem with the filtering approach is the false-positives: legitimate mail that gets mis-identified as spam. Even if it's moved to a spam box rather than deleted, when you're searching through hundreds of spam emails you're almost certain to miss the one or two legitimate mails hiding amongst them, and you'll delete them along with the spam. (At least, that's what I found myself doing.)

A second approach is to use techniques such as domain blocking, real-time blacklists, and other methods of blocking whole groups of addresses known to send spam. But this is really just a variation on filtering (filters usually take the sender's address into account when deciding whether an email is spam or not, as well as the body).

I didn't want to run the risk of someone sending me an email, me deleting it accidentally, and them never knowing that I didn't received it. So I chose to use a third approach: white-list plus challenge/response (plus a number of other features of the impressive TMDA system).

]]>- Quantum information theory
- Many-body physics
- Complexity theory
- Hamiltonian complexity
- Hamiltonian simulation
- CP maps (a.k.a. quantum channels)
- Entanglement theory
- Probability theory
- Algebraic geometry
- Learning any other interesting new maths I come across…

That'll do for now.

You can find a (possibly not-quite-up-to-date) list of my publications on this web site with links to the papers, as well as the slides from some of my talks. For a more up-to-date list, try the arXiv.

I can be reached by email at toby@dr-qubit.org, associated with this PGP key:

4096R/0xA96F4A674DC39B79 BB74 FB42 4C64 4CB7 3571 39AA A96F 4A67 4DC3 9B79

As of 2 August 2013, I transitioned from an old 1024-bit DSA key to this new 4096-bit RSA key. I will be signing all software releases with the new key. Please also use the new key for all correspondence. See the transition statement to certify the transition, and for more details.

Note that I use FLOSS spam-reduction software called TMDA to protect my addresses from junk-mail.

If you've never exchanged any email with me previously, you'll receive a message asking you to verify your email address. By simply replying to the message (literally just hit "Reply" then "Send"), your original message will be delivered. You'll only have to confirm your address once ever. All subsequent email from that address will be delivered directly.

*James D. Watson, Emilio Onorati, Toby S. Cubitt*
arXiv:2102.05145\[quant-ph\] [88 pages]

*Tamara Kohler, Stephen Piddock, Johannes Bausch, Toby Cubitt*
arXiv:2101.12319\[quant-ph\] [22 pages]

*Tamara Kohler, Stephen Piddock, Johannes Bausch and Toby Cubitt*
arXiv:2003.13753\[quant-ph\] [31 pages]

*Laura Clinton, Johannes Bausch and Toby Cubitt*
arXiv:2003.06886\[quant-ph\] [63 pages]

*Johannes Bausch, Toby Cubitt, Charles Derby and Joel Klassen*
arXiv:2003.07125\[quant-ph\] [23 pages]

*Johannes Bausch, Toby S. Cubitt and James D. Watson*
Nature Communications **12(1)**, 1, (2021)
arXiv:1910.01631\[quant-ph\] [64 pages]

*Tamara Kohler and Toby Cubitt*
J. High Energy Phys. **2019**:17 (2019)
arXiv:1810.08992\[hep-th\] [62 pages]

*Carlos E. González-Guillén and Toby S. Cubitt*
arXiv:1810.06528\[quant-ph\] [35 pages]

*Johannes Bausch, Toby Cubitt, Angelo Lucia and David Perez-Garcia*
Phys. Rev. X 10, 031038 (2020)
arxiv:1810.01858\[quant-ph\] [54 pages]

*Toby Cubitt, David Perez-Garcia and Michael Wolf*
Scientific American, Volume 319, Issue 4, October 2018
(Cover article; selected for 2018 "Scientific American Articles of the Year" special issue, and for 2019 "Best Writing on Mathematics" Princeton University Press anthology.)

*Tamara Kohler and Toby Cubitt*
J. Stat. Phys. **176**:1 p228–261 (2019)
arxiv:1807.01715\[cond-mat.stat-mech\] [44 pages]

*Toby Cubitt, Ashley Montanaro and Stephen Piddock*
Proc. Natl. Acad. Sci. **115**:38 p9497–9502 (2018)
arXiv:1701.05182\[quant-ph\] [82 pages]

*Toby S. Cubitt, David Perez-Garcia and Michael M. Wolf*
arXiv:1603.00825\[quant-ph\]

*Imdad S. B. Sardharwalla, Toby S. Cubitt, Aram W. Harrow and Noah Linden*
arXiv:1602.07963\[quant-ph\]

*Johannes Bausch, Toby S. Cubitt, Angelo Lucia, David Perez-Garcia and Michael M. Wolf*
Proc. Natl. Acad. Sci. **115**:1, p19–23 (2018) [18 pages]
arXiv:1512.05687\[quant-ph\]

*Johannes Bausch, Toby Cubitt and Maris Ozols*
Annales Henri Poincaré, **18**:11, p3449–3513 (2017) [63 pages]
arXiv:1605.01718\[quant-ph\]
(Winner of 2018 AHP-Birkhauser Prize for "most remarkable paper published in Annales Henri Poincaré".)

*G. De las Cuevas, T. S. Cubitt, J.I. Cirac, M. M. Wolf and D. Perez-Garcia*
J. Math. Phys. 57, 071902 (2016) [8 pages]
arXiv:1512.05709\[quant-ph\]

*Johannes Bausch and Toby S. Cubitt*
J. Linear Alg. **504**, p64–107 (2016) [50 pages]
arXiv:1411.7380\[math.PR\]

*Toby Cubitt and Ashley Montanaro*
SIAM J. on Computing, **45**:2, p268–316 (2016) [50 pages]
arXiv:1311.3161\[quant-ph\]

*Gemma de las Cuevas and Toby S. Cubitt*
Science, **351**:6278, p1180-1183 (2016) [47 pages]
arXiv:1406.5955\[cond-mat.stat-mech\]

*F. G. S. L. Brandao, T. S. Cubitt, A. Lucia, S. Michalakis and D. Perez-Garcia*
J. Math. Phys. **56**, 102202 (2015) [17 pages]
arXiv:1505.02776\[quant-ph\]

*Toby S. Cubitt, David Perez-Garcia and Michael M. Wolf*
arXiv:1502.04573\[quant-ph\] (full version, 127 pages)

*Toby S. Cubitt, David Perez-Garcia and Michael M. Wolf*
Nature, **528**, p207–211, (2015)
arXiv:1502.04135\[quant-ph\] (short version)

*T. Cubitt, M. Kastoryano, A. Montanaro and K. Temme*
J. Math. Phys. **56**, 102204 (2015) [14 pages]
arXiv:1504.06143\[quant-ph\]

*Toby S. Cubitt, Angelo Lucia, Spyridon Michalakis, and David Perez-Garcia*
Phys. Rev. A **91**, 040302 (2015)
arXiv:1409.7809\[quant-ph\]

*D. Elkouss, S. Strelchuck, W. Matthews, M. Ozols, D. Perez-Garcia and T. S. Cubitt*
Nature Communications **6**, 7739 (2015) [11 pages]
arXiv:1408.5115\[quant-ph\]

*M. Schwarz, T. S. Cubitt and Frank Verstraete*
arXiv:1311.6474\[quant-ph\]

*Toby Cubitt and Ashley Montanaro*
IEEE 55th Annual Symposium on Foundations of Computer Science (FOCS), p120–129 (2014)
arXiv:1311.3161\[quant-ph\]

*Toby Cubitt, Laura Mancinska, David Roberson, Simone Severini, Dan Stahlke and Andreas Winter*
IEEE Trans. Inform. Theory **60**, 7330 (2014) [15 pages]
arXiv:1310.7120\[quant-ph\]

*Toby S. Cubitt, Angelo Lucia, Spyridon Michalakis, and David Perez-Garcia*
Commun. Math. Phys. **337**, 1275 (2015) [38 pages]
arXiv:1303.4744\[quant-ph\]

*M. Schwarz, K. Temme, F. Verstraete, D. Perez-Garcia and T. S. Cubitt*
Phys. Rev. A, **88**, 032321 (2013) *(Editors' suggestion)*
arXiv:1211.4050\[quant-ph\]

*Michael M. Wolf, Toby S. Cubitt and David Perez-Garcia*
arXiv:1111.5425\[quant-ph\]

*Jianxin Chen, Toby S. Cubitt, Aram W. Harrow and Graeme Smith*
Phys. Rev. Lett. **107**, 250504 (2011) *(Editor's suggestion)*
arXiv:1109.0540\[quant-ph\]
(highlighted in APS *Physics* article)

*Toby S. Cubitt, Jens Eisert and Michael M. Wolf*
Phys. Rev. Lett. **108**, 120503 (2012) *(Editor's suggestion)*
arXiv:1005.0005\[quant-ph\]
(highlighted in *Science* NOW article and in APS *Physics* article)

*T. S. Cubitt, D. Leung, W. Matthews and A. Winter*
IEEE Trans. Inform. Theory **57**:8, 5509–5523 (2011) [15 pages]
arXiv:1003.3195\[quant-ph\]

*Jianxin Chen, Toby S. Cubitt, Aram W. Harrow and Graeme Smith*
IEEE International Symposium on Information Theory (ISIT), p2695–2697 (2010)

*Toby S. Cubitt and Graeme Smith*
IEEE Trans. Inform. Theory **58**:3, 1953–1961 (2012) [9 pages]
arXiv:0912.2737\[quant-ph\]

*T. S. Cubitt, D. Leung, W. Matthews and A. Winter*
Phys. Rev. Lett. **104**, 230503 (2010)
arXiv:0911.5300\[quant-ph\]

*Toby S. Cubitt, Jens Eisert and Michael M. Wolf*
Commun. Math. Phys. **310**, 383–417 (2012) [35 pages]
arXiv:0908.2128\[quant-ph\]

*Toby S. Cubitt, Jianxin Chen and Aram W. Harrow*
IEEE Trans. Inform. Theory **57**:12, 8114–8126 (2011) [8 pages]
arXiv:0906.2547\[quant-ph\]

*Joonwoo Bae, Toby S. Cubitt and Antonio Acín*
Phys. Rev. A **79**, 032304 (2009)
arXiv:0806.1606\[quant-ph\]

*Toby S. Cubitt, Mary Beth Ruskai and Graeme Smith*
J. Math. Phys. **49**, 102104 (2008) [27 pages]
arXiv:0802.1460\[quant-ph\]

*Toby S. Cubitt, Aram W. Harrow, Debbie Leung, Ashley Montanaro and Andreas Winter*
Commun. Math. Phys. **284**, 281–290 (2008) [9 pages]
arXiv:0712.3628\[quant-ph\]

*M. M. Wolf, J. Eisert, T. S. Cubitt and J.I. Cirac*
Phys. Rev. Lett. **101**, 150402 (2008)
arXiv:0711.3172\[quant-ph\]

*Toby S. Cubitt, Ashley Montanaro and Andreas Winter*
J. Math. Phys. **49**, 022107 (2008)
arXiv:0706.0705\[quant-ph\]

*T. S. Cubitt and J.I. Cirac*
Phys. Rev. Lett. **100**, 180406 (2008)
arXiv:quant-ph/0701053

*David Fattal, Toby S. Cubitt, Yoshihisa Yamamoto, Sergey Bravyi and Isaac L. Chuang*
arXiv:quant-ph/0406168

*T. S. Cubitt, F. Verstraete and J.I. Cirac*
Phys. Rev. A **71**, 052308 (2005) [12 pages]
arXiv:quant-ph/0404179

*T. S. Cubitt, F. Verstraete, W. Dür, J.I. Cirac*
Phys. Rev. Lett. **91**, 037902 (2003)
arXiv:quant-ph/0302168
(highlighted in *Science* NOW article)

I'm a nationality-confused European, born and raised in Luxembourg but technically British.

I went to the European school in Luxembourg, graduating with the European Baccalaureate in 1998. From there, I hopped across the Channel to Churchill College, Cambridge, studying physics under the Natural Sciences Tripos at the University of Cambridge.

After graduating in 2002, I decided to see what the other end of Europe was like, and moved to the Max Planck Institute for Quantum Optics just outside Munich, Germany to do a PhD in quantum information theory under the wonderful Ignacio Cirac.