# Tools

### Things that make my work easier

This is a list of some of the tools that I use on a regular basis that have come to be an essential part of my workflow.

## Writing papers

I use LaTeX for typesetting and TexStudio as the editor. Some of my notes on writing LaTeX can be found here. References are managed using Bibtex. I also use JabRef, which is a simple GUI frontend for Bibtex reference database. My major reference database can be found in my Archive repo. Ideas with references and notes are organized using Docear in terms of mindmaps.

Most papers and codes are kept in private repositories on [email protected] and Bitbucket. My coauthors and I use Git to allow us to work remotely on a paper and merge our changes. If a coauthor is not comfortable with Git, papers are kept on Dropbox. You can find my notes and tutorial on combining cloud storage service and Git in collaborating on paper writing here.

I keep abreast of the literature using the QuantumInformation subreddit and an arXiv mobile app to subscribe some journal and preprint articles. If you prefer to collect various RSS feeds from certain journals and arXiv on a standalone app, Inoreader (an RSS feed reader) might be a good tool. I also have a few alerts set up on Google Scholar, which I also use for finding specific papers. See the post on Searching the Scientific Literature.

## Presentations and multimedia

Lately, I write most presentations in Powerpoint. I use texpoint to typeset equations onto slides.
Beamer is also a good friend to generate PDF slides. For more free-style, my colleagues also use Prezi, Browsercast with Math anywhere plugin and a few other editors for presentations.

For drawn diagrams and graphics, I mainly use Inkscape. Inkscape has a builtin LaTeX render for LaTeX-formatted equations. The TexText Inkscape plugin can also help write LaTeX equations on Graphics while having an advanced interface to allow customized preambles. I also use Illustrator to edit graphics if my collaborators prefer. In case there is a font problem, the Mac font repository from Potyt might have the missed fonts installed on Mac/Apple devices which many of my collaborators use. Equations can be put into Illustrator by using MathMagic Pro (not free) or any software that can generate equations in eps or pdf standalone files.

For 3D modeling and animations, I am starting with Blender and have used Pov-Ray before.

My notes:

## Code

Most of my coding is done with Matlab because most of collaborators use it and my university–UNM–provides it for free to me as the original home of Matlab. I also use the following:

1. The Jupyter notebook (formerly IPython and IJulia notebook). For interactive running and debugging. And for organizing, recording, and sharing code with animations and mathematics. It supports multiple programming language kernels.
2. Github, BitBucket, GitLab and Coding. For collaborative code development.
3. Matlab is still my main programming language as most of my collaborators do. The program comes with a good UI.
4. Eclipse for C and Java programming IDE. Used for Arduio and others.
5. Atom for editing files in markdown and all other languages. Julia has a Juno plugin for Atom, but now I program Julia mostly in the JuliaPro version with the builtin Juno IDE.
6. Vim for plain programming. GNU Nano is also a simple plain editor without complicated short-keys which I use in Linux.

Related notes:

## Plotting

Matlab, Matplotlib, PyPlot.jl (Matplotlib-based), Plots.jl, VisClaw and a few others. To prepare high-quality figures for publications, independence of what programming language I use for the calculations, I usually export the minimal sets of data for plotting in Matlab dataset or HDF5 formation, and then write a script for plotting. When Matlab is used for making up the final plots, packages like matlab2tikz, epsclean and export_fig could be helpful to export the figures in Tikz code or eps/pdf formats. Compared to the 2D Matplotlib-based programs, I find Matlab is particularly good on handling 3D plots if the OpenGL engine works on your computer. One live example of making plots for one of my publications is here.

If you want to have an interactive interface for people to play around with your data and visualize the result in their preferential language, plotly looks promising for that purpose.

For making quantum circuit diagrams, qcircuit developed by CQuIC fellows has been the standard way in LaTeX with xy-pic and ifpdf packages. I also prototyped a package called qcircuitz (suggested by Dr. Steve Flammia) to provide some macros in Tikz for people who prefer to use the powerful PGF/TikZ package including PGFPlots for graphics in LaTeX. While prototyping the package, I found qpic is also made on a similar direction yet with a Python interface which looks pretty good.

## Notes and productivity

1. OneNote from MicroSoft.
2. NValt. For managing plain-text notes.
3. Omnifocus. For managing all the non-research stuff I do.
4. Gitit. Wiki software could be useful for internal collaboration within a group.

## Websites

1. Jekyll. For building this website and a few others on GitHub. If you find it useful, feel free to use my website as a template for your site. It is built on top of Carl Boettiger’s LabNotebook project with customization on citation formats, travis-CI automation and a few other features.
2. Coda.
3. Wordpress. I have participated the development of the CQuIC website using Wordpress. In making the CQuIC website, I have customized the bibtexbrowser toolkit so that it is now compatible with APS citation and common standards widely adapted in the physics society for listing publications on a Wordpress website.

## Computers

Being a quantum information scientist, I have been developing a deep interest in both software and hardware of computers and artificial intelligence. Sometimes, I also need to do hard computing jobs on nanophotonics and many-body quantum simulations. So, I run Linux on Lenovo Thinkpads, workstations from my work place, cloud servers and clusters. The reason I use Thinkpads as my personal computers is mainly because it has a strong traditional Linux community support. Otherwise, running Linux will be extremely painful to handle hardware driver issues and to optimize performance. Specifically, I run Ubuntu on my personal computers for work. I also use OneNote on Windows to take notes and synchronize them on OneDrive. My current working machines include a Thinkpad P50 mobile workstation (CPU i7-6700HQ, GPU M1000M, 64GB RAM) and a Thinkpad Tablet 2 (for notes taking mainly). I use a 64GB RAM for simulating large quantum systems and for virtual machines to run Windows OS (Windows Insider free preview version) inside of Linux sometimes in case of editing my notes and synchronizing my Youdao wordbook. In the past or as backups, I also have convenient Thinkpad X61 Tablet (fixed from a trashed one in a low cost and worked like a tank) and X200 Tablet to combine the notes taking, travelers’ computer and hard-computing functions in one.

To reduce power consuming and increase battery life using Linux on Thinkpads, I use TLP on top of acpi_call (you may want tp-smapi instead if the CPU was produced earlier than the Ivy Bridge times) and acpi-bat to set up battery charging thresholds and save power usage. I only need to edit the TLP config file at /etc/default/tlp, run sudo tlp start for the first time and forget about it. I was also using powertop with the --auto-tune switch and disabled a few options for power saving on battery (see the corresponding notes on the system administration page). Linux kernel is not very good on power management and driver compatibility for closed-source designed hardware, and there is usually a delay of support on most advanced hardware. For example, Skylake mobile CPUs were not supported until Linux kernel v4.4 (half a year after the CPU release) and continuously get worse performance than under Windows OS on deep-sleeping optimization of mobile device modules for a long time (you can find the PC-state using powertop). Be sure to consider this factor when you want to install Linux on a new computer.

For workstations, I have configured a Dell Precision 7910 computer for CQuIC (machine is purchased from Dell that the university policy allows). There may be better choices. Again, Ubuntu OS was installed for its being popular in the research center. TORQUE/PBS was installed to manage computing job submissions and scheduling. I have also experiences of using CentOS on a cluster in the earlier days which along side with Scientific Linux OS may be a better choice for dedicated high-performance computing.