All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] future/QC: Cosmetic fixes and improvements
@ 2017-06-17  3:54 Akira Yokosawa
  2017-06-17  3:56 ` [PATCH 1/8] hyphen2endash: Add patterns for QC section Akira Yokosawa
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Akira Yokosawa @ 2017-06-17  3:54 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From e5738e83414b3c3d30d616543bb2f70cbb80bcca Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sat, 17 Jun 2017 10:44:54 +0900
Subject: [PATCH 0/8] future/QC: Cosmetic fixes and improvements

Hi Paul,

This patch set mostly fixes and improves LaTeX source of QC section.

Patch 1 adds patterns in hyphen2endash.sh.

Patch 2 gives consistent looks to tables as in other tables in
perfbook.

Patch 3 fixes typos in SI unit symbols and usage of math mode.

Patch 4 Adds whitespaces between numerical values and unit symbols.
This is recommended in NIST style guide (referred to in the change
log). Since this section treats topics covering quantum mechanics,
I want it to have a similar look as a scientific paper.
In other parts of perfbbok, I have quite a few places I want to add
whitespaces, but I'm not sure that matches your preference.
If you'd like such changes, I can produce patches to do so.

Patch 5 uses axis names "X-axis", "Y-axis", and "Z-axis" in the
lists of "Programming Model" section. I also tried other forms of
"x-axis", "x axis", and "X axis", but "X-axis" is my preference.

Patch 6 seems a trivial grammatical fix, but might be unnecessary.
I'm not sure.

Patch 7 gives representation of ket commonly used in quantum mechanics
papers.

Patch 8 changes the look of QC operators. Special treatment of
dagger symbol in description labels might be excessive, but
it gives better result in my point of view.

So, I'm not sure you like patches 4--8. Please try and push as
much as you like. And feel free to ask me a respin of the patches
you don't like as is.

            Thanks, Akira
--
Akira Yokosawa (8):
  hyphen2endash: Add patterns for QC section
  future/QC: Tweak appearance of tables
  future/QC: Fix typo in unit symbol and usage of math mode
  future/QC: Add narrow space before unit symbol
  future/QC: Use consistent axis names
  future/QC: Add missing 'has' in description list
  future/QC: Use \ket{} macro for |0> and |1>
  future/QC: Denote QC operators as such

 future/QC.tex              | 123 +++++++++++++++++++++++----------------------
 perfbook.tex               |   5 ++
 utilities/hyphen2endash.sh |   8 +++
 3 files changed, 76 insertions(+), 60 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/8] hyphen2endash: Add patterns for QC section
  2017-06-17  3:54 [PATCH 0/8] future/QC: Cosmetic fixes and improvements Akira Yokosawa
@ 2017-06-17  3:56 ` Akira Yokosawa
  2017-06-17  3:57 ` [PATCH 2/8] future/QC: Tweak appearance of tables Akira Yokosawa
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Akira Yokosawa @ 2017-06-17  3:56 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 6a9f25ad29b9e094ec38495f63d831aa9fca596f Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 1 Jun 2017 21:08:01 +0900
Subject: [PATCH 1/8] hyphen2endash: Add patterns for QC section

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 utilities/hyphen2endash.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/utilities/hyphen2endash.sh b/utilities/hyphen2endash.sh
index 4736c31..29e3896 100644
--- a/utilities/hyphen2endash.sh
+++ b/utilities/hyphen2endash.sh
@@ -19,6 +19,10 @@
 # Figures~\ref{foo}-\ref{bar} -> Figures~\ref{foo}--\ref{bar}
 # \co{xxx}-\{yyy} -> \co{xxx}--\co{yyy}
 # yyyy-\commityear -> yyyy--\commityear (in Legal statement)
+# nn-mm~nanosecond -> nn--mm~nanosecond
+# nn-mm~microsecond -> nn--mm~microsecond
+# nn-mm~millisecond -> nn--mm~millisecond
+# nn-mm~\emp -> nn--mm~\emp
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -46,6 +50,10 @@ cat $1 |
 	    -e 's/and[ ~]\([0-9]\+\)-\([0-9]\+\)/and~\1--\2/g' \
 	    -e 's/\(\\co{[^}]*}\)-\(\\co{[^}]*}\)/\1--\2/g' \
 	    -e 's/\([0-9]\)-\(\\commityear\)/\1--\2/g' \
+	    -e 's/\([0-9]\+\)-\([0-9]\+\)~nanosecond/\1--\2~nanosecond/g' \
+	    -e 's/\([0-9]\+\)-\([0-9]\+\)~microsecond/\1--\2~microsecond/g' \
+	    -e 's/\([0-9]\+\)-\([0-9]\+\)~millisecond/\1--\2~millisecond/g' \
+	    -e 's/\([0-9]\+\)-\([0-9]\+\)~\\emp/\1--\2~\\emp/g' \
 	    -e 's/\/\* Lines~\([0-9]\+\)--\([0-9]\+\) \*\//\/\* Lines \1-\2 \*\//g'

 # Last pattern is to preserve "Lines n-m" in comments within code snippet
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/8] future/QC: Tweak appearance of tables
  2017-06-17  3:54 [PATCH 0/8] future/QC: Cosmetic fixes and improvements Akira Yokosawa
  2017-06-17  3:56 ` [PATCH 1/8] hyphen2endash: Add patterns for QC section Akira Yokosawa
@ 2017-06-17  3:57 ` Akira Yokosawa
  2017-06-17  3:58 ` [PATCH 3/8] future/QC: Fix typo in unit symbol and usage of math mode Akira Yokosawa
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Akira Yokosawa @ 2017-06-17  3:57 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 265717d1d83c49017280b38faf56162c6d72adbf Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 1 Jun 2017 21:09:38 +0900
Subject: [PATCH 2/8] future/QC: Tweak appearance of tables

Add \centering\footnotesize.
Also adjust column width and move a \hline to where it should be.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 future/QC.tex | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/future/QC.tex b/future/QC.tex
index b90cca6..36b68ad 100644
--- a/future/QC.tex
+++ b/future/QC.tex
@@ -123,6 +123,7 @@ QC systems have been making substantial Moore's-Law-style progress
 in a number of technical areas.

 \begin{table}
+\centering\footnotesize
 \begin{tabular}{l|r|r|r}
 	&	&	& Years per \\
 System
@@ -639,7 +640,8 @@ to transport heat from a low temperature ($T_L$) to a high temperature
 \end{equation}

 \begin{table}
-\begin{tabular}{p{1.5in}|p{1.2in}}
+\centering\footnotesize
+\begin{tabular}{p{1.7in}|p{0.95in}}
 Law of Thermodynamics
 	& English Translation \\
 \hline
@@ -685,6 +687,7 @@ at low temperatures.\footnote{
 	a less daunting refrigeration barrier to QC-on-a-chip.}

 \begin{table}
+\centering\footnotesize
 \begin{tabular}{l|r|r|r}
 	&	&	& Power per watt \\
 Situation
@@ -692,7 +695,6 @@ Situation
 		& $C_P$	& waste heat (W) \\
 \hline
 \hline
-\hline
 Dry Ice
 	& $195$
 		& $1.990$
@@ -702,6 +704,7 @@ Liquid N$_2$
 	& $77$
 		& $0.356$
 			& 2.8 \\
+\hline
 Liquid H$_2$
 	& $20$
 		& $0.073$
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/8] future/QC: Fix typo in unit symbol and usage of math mode
  2017-06-17  3:54 [PATCH 0/8] future/QC: Cosmetic fixes and improvements Akira Yokosawa
  2017-06-17  3:56 ` [PATCH 1/8] hyphen2endash: Add patterns for QC section Akira Yokosawa
  2017-06-17  3:57 ` [PATCH 2/8] future/QC: Tweak appearance of tables Akira Yokosawa
@ 2017-06-17  3:58 ` Akira Yokosawa
  2017-06-17  3:59 ` [PATCH 4/8] future/QC: Add narrow space before unit symbol Akira Yokosawa
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Akira Yokosawa @ 2017-06-17  3:58 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 5c3cb7fa55bf495b500e5a42da0882f167231f77 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sat, 17 Jun 2017 00:29:40 +0900
Subject: [PATCH 3/8] future/QC: Fix typo in unit symbol and usage of math mode

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 future/QC.tex | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/future/QC.tex b/future/QC.tex
index 36b68ad..8727212 100644
--- a/future/QC.tex
+++ b/future/QC.tex
@@ -238,7 +238,7 @@ As Scott Crowder of IBM put it,
 For purposes of comparison, the oldest intact computer, the
 University of Melbourne's 1949
 CSIRAC~\cite{CSIRACMuseumVictoria,CSIRACUniversityMelbourne},
-ran at a core clock frequency of 1KHz, consumed 30kW of power,
+ran at a core clock frequency of 1kHz, consumed 30kW of power,
 weighs three metric tons,
 is constructed of 2,000 vacuum tubes, and has 768 words of RAM
 implemented with acoustic mercury delay lines.
@@ -596,7 +596,7 @@ QC computation is thermodynamically reversible, generating
 very little waste heat~\cite{Bennett:1973:LRC:1664562.1664568,RichardFeynman1986QuantumMechanicalComputers}.
 This means that in theory, quantum computers can avoid the
 Landauer limit~\cite{Landauer:1961:IHG:1661184.1661186}
-of $kT ln 2$, where $K$ is the Boltzmann constant and $T$ is the
+of $kT \ln 2$, where $k$ is the Boltzmann constant and $T$ is the
 temperature in degrees Kelvin.
 Given that the Boltzmann constant is $1.38 \times 10^{-23}$J/K,
 and given the 0.015K operating temperatures that IBM's Quantum Experience
@@ -611,7 +611,7 @@ QC is governed by an even lower limit:

 Here $\Delta E$ is the energy required to change the qubit in Joules,
 $\Delta t$ is the time taken to change the qubit in seconds, and
-$\hbar$ is Planck's constant, which is $6.62 \times 10^{-34}$J $\cdot$ s.
+$\hbar$ is Planck's constant, which is $6.62 \times 10^{-34}$J$\cdot$s.
 For the 50-nanosecond switching times of IBM's Quantum Experience
 hardware, this limit is $5.52 \times 10^{-27}$J, more than an order
 of magnitude less than the Landauer limit.
@@ -691,7 +691,7 @@ at low temperatures.\footnote{
 \begin{tabular}{l|r|r|r}
 	&	&	& Power per watt \\
 Situation
-	& T (K)
+	& $T$ (K)
 		& $C_P$	& waste heat (W) \\
 \hline
 \hline
@@ -756,7 +756,7 @@ nothing of new materials, for but one example,
 perovskite~\cite{ZhengChen2016PerovskiteQDMOFthinFilm}.
 Other avenues include increased pressure, given that diamond anvil
 cells~\cite{Weir1959DiamondAnvilCell} can now reach
-640~GPA~\cite{LeonidDubrovinsky2012640GPaDiamondAnvilCell},
+640~GPa~\cite{LeonidDubrovinsky2012640GPaDiamondAnvilCell},
 which is almost double the estimated pressure at the center of the earth.
 Such exploration is of course pure research, but if QC is at 1940s levels
 of development, pure research should have a significant role to play.
@@ -999,7 +999,7 @@ But before this can happen, the list must be downloaded into
 the QC system.
 The competing classical system can use this time to construct
 any desired index over the data, after which the classical
-system can carry out the search in $O(log N)$ time, which
+system can carry out the search in $O(\log N)$ time, which
 is much faster than the $O(\sqrt N)$ time promised by
 Grover's algorithm.
 Of course, this would change if the data originates in the
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/8] future/QC: Add narrow space before unit symbol
  2017-06-17  3:54 [PATCH 0/8] future/QC: Cosmetic fixes and improvements Akira Yokosawa
                   ` (2 preceding siblings ...)
  2017-06-17  3:58 ` [PATCH 3/8] future/QC: Fix typo in unit symbol and usage of math mode Akira Yokosawa
@ 2017-06-17  3:59 ` Akira Yokosawa
  2017-06-17  4:00 ` [PATCH 5/8] future/QC: Use consistent axis names Akira Yokosawa
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Akira Yokosawa @ 2017-06-17  3:59 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 6f1c49625d34b4a2bd3e80a7170c3d66c6fbd707 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sat, 17 Jun 2017 00:40:34 +0900
Subject: [PATCH 4/8] future/QC: Add narrow space before unit symbol

This section should follow the style guide of NIST [1]. Section 7.2
recommends to place a white space before a unit symbol.

[1] https://www.nist.gov/pml/nist-guide-si-chapter-7-rules-and-style-conventions-expressing-values-quantities

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 future/QC.tex | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/future/QC.tex b/future/QC.tex
index 8727212..feb7851 100644
--- a/future/QC.tex
+++ b/future/QC.tex
@@ -238,7 +238,7 @@ As Scott Crowder of IBM put it,
 For purposes of comparison, the oldest intact computer, the
 University of Melbourne's 1949
 CSIRAC~\cite{CSIRACMuseumVictoria,CSIRACUniversityMelbourne},
-ran at a core clock frequency of 1kHz, consumed 30kW of power,
+ran at a core clock frequency of 1\,kHz, consumed 30\,kW of power,
 weighs three metric tons,
 is constructed of 2,000 vacuum tubes, and has 768 words of RAM
 implemented with acoustic mercury delay lines.
@@ -536,7 +536,7 @@ times of more than
 Unfortunately, the quantum states used by this work involve atomic nuclei,
 which in turn require bulky nuclear magnetic resonance (NMR) machinery
 to read and write state, and the reading and the writing takes place
-at 4K, that is, at the temperature of liquid helium.
+at 4\,K, that is, at the temperature of liquid helium.
 However, between reading and writing, the temperature of the sample may
 be raised to room temperature for extended periods without affecting
 the quantum state.
@@ -598,9 +598,9 @@ This means that in theory, quantum computers can avoid the
 Landauer limit~\cite{Landauer:1961:IHG:1661184.1661186}
 of $kT \ln 2$, where $k$ is the Boltzmann constant and $T$ is the
 temperature in degrees Kelvin.
-Given that the Boltzmann constant is $1.38 \times 10^{-23}$J/K,
-and given the 0.015K operating temperatures that IBM's Quantum Experience
-hardware runs at, this limit is indeed low: $1.43 \times 10^{-25}$J.
+Given that the Boltzmann constant is $1.38 \times 10^{-23}$\,J/K,
+and given the 0.015\,K operating temperatures that IBM's Quantum Experience
+hardware runs at, this limit is indeed low: $1.43 \times 10^{-25}$\,J.

 However, because of its thermodynamic reversibiltiy,
 QC is governed by an even lower limit:
@@ -611,9 +611,9 @@ QC is governed by an even lower limit:

 Here $\Delta E$ is the energy required to change the qubit in Joules,
 $\Delta t$ is the time taken to change the qubit in seconds, and
-$\hbar$ is Planck's constant, which is $6.62 \times 10^{-34}$J$\cdot$s.
+$\hbar$ is Planck's constant, which is $6.62 \times 10^{-34}$\,J$\cdot$s.
 For the 50-nanosecond switching times of IBM's Quantum Experience
-hardware, this limit is $5.52 \times 10^{-27}$J, more than an order
+hardware, this limit is $5.52 \times 10^{-27}$\,J, more than an order
 of magnitude less than the Landauer limit.

 Both of these limits are incredibly small, which holds out the promise
@@ -665,12 +665,12 @@ Table~\ref{tab:future:The Three Laws of Thermodynamics}.

 The nominal temperature for IBM~Q is 15~millikelvins, which certainly
 qualifies as a low $T_L$.
-Let's assume $T_H$ is 293K (room temperature),
+Let's assume $T_H$ is 293\,K (room temperature),
 in which case $C_P$ is $0.000051$.
 This in turn means that it requires \emph{at least} one watt of
 power into the refrigeration unit to transport $0.000051$~watts
 of waste heat from the 15~millikelvin IBM~Q out to room temperature.
-Put another way, 19.5kW is required to remove one watt of waste heat.
+Put another way, 19.5\,kW is required to remove one watt of waste heat.
 Thus, ``very little waste heat'' can nevertheless generate a significant
 power bill for refrigeration, albeit less than two-thirds of the power
 consumption of the CSIRAC machine discussed in
@@ -738,7 +738,7 @@ energy-hungry refrigeration systems, which means that QC
 systems need a high-value killer app.

 Of course, if the value of the killer app is sufficiently high,
-19.5kW might be considered cheap.
+19.5\,kW might be considered cheap.
 In this case, in the spirit of
 ``plenty of room at the bottom''~\cite{RichardPFeynman1959RoomAtBottom},
 we might want even lower temperatures.
@@ -747,7 +747,7 @@ For example, Bose-Einstein condensates
 form in the sub-microkelvin range, exhibiting interesting
 macro-scale quantum effects.
 It is not clear how one would construct any sort of computer from
-these condensates, nor how one would go about providing the 1.6~GW
+these condensates, nor how one would go about providing the 1.6\,GW
 required to remove one watt of waste heat from a BEC---after all,
 even Emmett Brown's fictional flux capacitor required only 1.21 gigawatts.
 However, much remains to be explored in this realm
@@ -756,7 +756,7 @@ nothing of new materials, for but one example,
 perovskite~\cite{ZhengChen2016PerovskiteQDMOFthinFilm}.
 Other avenues include increased pressure, given that diamond anvil
 cells~\cite{Weir1959DiamondAnvilCell} can now reach
-640~GPa~\cite{LeonidDubrovinsky2012640GPaDiamondAnvilCell},
+640\,GPa~\cite{LeonidDubrovinsky2012640GPaDiamondAnvilCell},
 which is almost double the estimated pressure at the center of the earth.
 Such exploration is of course pure research, but if QC is at 1940s levels
 of development, pure research should have a significant role to play.
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/8] future/QC: Use consistent axis names
  2017-06-17  3:54 [PATCH 0/8] future/QC: Cosmetic fixes and improvements Akira Yokosawa
                   ` (3 preceding siblings ...)
  2017-06-17  3:59 ` [PATCH 4/8] future/QC: Add narrow space before unit symbol Akira Yokosawa
@ 2017-06-17  4:00 ` Akira Yokosawa
  2017-06-17  4:01 ` [PATCH 6/8] future/QC: Add missing 'has' in description list Akira Yokosawa
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Akira Yokosawa @ 2017-06-17  4:00 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 3dc3bf3eddf4e368aa6fec38dab13798b9471638 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 2 Jun 2017 00:08:55 +0900
Subject: [PATCH 5/8] future/QC: Use consistent axis names

Consistently use the names of "X-axis", "Y-axis", and "Z-axis" in
these lists.
Also properly use math mode minus signs for minus degrees.

By employing "gensymb" package, we can use \degree macro instead
of \textdegree. As \degree can be used in both text and math modes,
we can simplify things.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 future/QC.tex | 38 +++++++++++++++++++-------------------
 perfbook.tex  |  1 +
 2 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/future/QC.tex b/future/QC.tex
index feb7851..cbcbef3 100644
--- a/future/QC.tex
+++ b/future/QC.tex
@@ -308,7 +308,7 @@ A qubit is said to:
 	Figure~\ref{fig:future:Qubit as Bloch Sphere}.
 \item	Collapse to a zero (\co{|0>}) or a one (\co{|1>}) if measured,
 	with probability being a function of the relative distance from
-	\co{|0>} and \co{|1>}, but projected onto the z-axis.
+	\co{|0>} and \co{|1>}, but projected onto the Z-axis.
 	Thus, a qubit on the equator of the Bloch sphere has a 50\%
 	probability of being measured as a one or as a zero, while
 	a qubit on the 45\textdegree-north latitude would have
@@ -329,40 +329,40 @@ are as follows:

 \begin{description}
 \item[H:]
-	Rotate 180{\textdegree} ($\pi$ radians) about the Bloch-sphere
-	X-Z axis, that is, about the {45\textdegree} line on the
+	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
+	X-Z axis, that is, about the 45\degree{} line on the
 	X-Z plane.  This rotates \co{|0>} to the point at which the
-	positive x-axis intersects the Bloch sphere, and rotates \co{|1>}
-	to the point at which the negative x-axis intersects the Bloch
+	positive X-axis intersects the Bloch sphere, and rotates \co{|1>}
+	to the point at which the negative X-axis intersects the Bloch
 	sphere.
 	Either way, we get a qubit that is 50\% one and 50\% zero.
 \item[S:]
-	Rotate {90\textdegree} ($\frac{\pi}{2}$ radians) about the
-	Bloch-sphere \co{Z} axis, which no effect on qubits in the
+	Rotate 90\degree{} ($\frac{\pi}{2}$ radians) about the
+	Bloch-sphere Z-axis, which no effect on qubits in the
 	\co{|0>} or \co{|1>} states.
 \item[S\textsuperscript{$\dagger$}:]
-	Rotate {-90\textdegree} ($-\frac{\pi}{2}$ radians) about the
-	Bloch-sphere \co{Z} axis, which no effect on qubits in the
+	Rotate $-90\degree$ ($-\frac{\pi}{2}$ radians) about the
+	Bloch-sphere Z-axis, which no effect on qubits in the
 	\co{|0>} or \co{|1>} states.
 	This operator is the inverse of \co{S}.
 \item[T:]
-	Rotate {45\textdegree} ($\frac{\pi}{4}$ radians) about the
-	Bloch-sphere \co{Z} axis, which no effect on qubits in the
+	Rotate 45\degree{} ($\frac{\pi}{4}$ radians) about the
+	Bloch-sphere Z-axis, which no effect on qubits in the
 	\co{|0>} or \co{|1>} states.
 \item[T\textsuperscript{$\dagger$}:]
-	Rotate {-45\textdegree} ($-\frac{\pi}{4}$ radians) about the
-	Bloch-sphere \co{Z} axis, which no effect on qubits in the
+	Rotate $-45\degree$ ($-\frac{\pi}{4}$ radians) about the
+	Bloch-sphere Z-axis, which no effect on qubits in the
 	\co{|0>} or \co{|1>} states.
 	This operator is the inverse of \co{T}.
 \item[X:]
-	Rotate {180\textdegree} ($\pi$ radians) about the Bloch-sphere
-	\co{X} axis, which takes \co{|0>} to \co{|1>} and vice versa.
+	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
+	X-axis, which takes \co{|0>} to \co{|1>} and vice versa.
 \item[Y:]
-	Rotate {180\textdegree} ($\pi$ radians) about the Bloch-sphere
-	\co{Y} axis, which also takes \co{|0>} to \co{|1>} and vice versa.
+	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
+	Y-axis, which also takes \co{|0>} to \co{|1>} and vice versa.
 \item[Z:]
-	Rotate 180\textdegree ($\pi$ radians) about the Bloch-sphere
-	\co{Z} axis, which has no effect on qubits in the \co{|0>} or
+	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
+	Z-axis, which has no effect on qubits in the \co{|0>} or
 	\co{|1>} states.
 \end{description}

diff --git a/perfbook.tex b/perfbook.tex
index 2de83f0..b4458f2 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -35,6 +35,7 @@
 % \usepackage[strings]{underscore}
 % \usepackage{underscore}
 \usepackage{pifont} % special character for qqz reference point
+\usepackage{gensymb} % symbols for both text and math modes such as \degree and \micro
 \usepackage{verbatimbox} % for centering verbatim listing in figure environment
 \usepackage[bottom]{footmisc} % place footnotes under floating figures/tables
 \usepackage{tabulary}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/8] future/QC: Add missing 'has' in description list
  2017-06-17  3:54 [PATCH 0/8] future/QC: Cosmetic fixes and improvements Akira Yokosawa
                   ` (4 preceding siblings ...)
  2017-06-17  4:00 ` [PATCH 5/8] future/QC: Use consistent axis names Akira Yokosawa
@ 2017-06-17  4:01 ` Akira Yokosawa
  2017-06-17  4:02 ` [PATCH 7/8] future/QC: Use \ket{} macro for |0> and |1> Akira Yokosawa
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Akira Yokosawa @ 2017-06-17  4:01 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From a9cfd4a69a028c71dbd8ac2a65ea6970cf82ced6 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sat, 17 Jun 2017 08:30:50 +0900
Subject: [PATCH 6/8] future/QC: Add missing 'has' in description list

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 future/QC.tex | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/future/QC.tex b/future/QC.tex
index cbcbef3..701c086 100644
--- a/future/QC.tex
+++ b/future/QC.tex
@@ -338,20 +338,20 @@ are as follows:
 	Either way, we get a qubit that is 50\% one and 50\% zero.
 \item[S:]
 	Rotate 90\degree{} ($\frac{\pi}{2}$ radians) about the
-	Bloch-sphere Z-axis, which no effect on qubits in the
+	Bloch-sphere Z-axis, which has no effect on qubits in the
 	\co{|0>} or \co{|1>} states.
 \item[S\textsuperscript{$\dagger$}:]
 	Rotate $-90\degree$ ($-\frac{\pi}{2}$ radians) about the
-	Bloch-sphere Z-axis, which no effect on qubits in the
+	Bloch-sphere Z-axis, which has no effect on qubits in the
 	\co{|0>} or \co{|1>} states.
 	This operator is the inverse of \co{S}.
 \item[T:]
 	Rotate 45\degree{} ($\frac{\pi}{4}$ radians) about the
-	Bloch-sphere Z-axis, which no effect on qubits in the
+	Bloch-sphere Z-axis, which has no effect on qubits in the
 	\co{|0>} or \co{|1>} states.
 \item[T\textsuperscript{$\dagger$}:]
 	Rotate $-45\degree$ ($-\frac{\pi}{4}$ radians) about the
-	Bloch-sphere Z-axis, which no effect on qubits in the
+	Bloch-sphere Z-axis, which has no effect on qubits in the
 	\co{|0>} or \co{|1>} states.
 	This operator is the inverse of \co{T}.
 \item[X:]
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 7/8] future/QC: Use \ket{} macro for |0> and |1>
  2017-06-17  3:54 [PATCH 0/8] future/QC: Cosmetic fixes and improvements Akira Yokosawa
                   ` (5 preceding siblings ...)
  2017-06-17  4:01 ` [PATCH 6/8] future/QC: Add missing 'has' in description list Akira Yokosawa
@ 2017-06-17  4:02 ` Akira Yokosawa
  2017-06-17  4:04 ` [PATCH 8/8] future/QC: Denote QC operators as such Akira Yokosawa
  2017-06-17  4:32 ` [PATCH 0/8] future/QC: Cosmetic fixes and improvements Paul E. McKenney
  8 siblings, 0 replies; 10+ messages in thread
From: Akira Yokosawa @ 2017-06-17  4:02 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 1d0506d2cc0dcfc983a2aedcc011cf9f9cc9be1f Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 15 Jun 2017 00:23:16 +0900
Subject: [PATCH 7/8] future/QC: Use \ket{} macro for |0> and |1>

|0> and |1> can be typeset properly by using \ket{} macro of
"braket" package. Note that \ket{} can only be used in math mode.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 future/QC.tex | 28 ++++++++++++++--------------
 perfbook.tex  |  1 +
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/future/QC.tex b/future/QC.tex
index 701c086..fa4084e 100644
--- a/future/QC.tex
+++ b/future/QC.tex
@@ -306,9 +306,9 @@ A qubit is said to:
 \begin{enumerate}
 \item	Be represented by a Bloch sphere, as shown in
 	Figure~\ref{fig:future:Qubit as Bloch Sphere}.
-\item	Collapse to a zero (\co{|0>}) or a one (\co{|1>}) if measured,
+\item	Collapse to a zero ($\ket{0}$) or a one ($\ket{1}$) if measured,
 	with probability being a function of the relative distance from
-	\co{|0>} and \co{|1>}, but projected onto the Z-axis.
+	$\ket{0}$ and $\ket{1}$, but projected onto the Z-axis.
 	Thus, a qubit on the equator of the Bloch sphere has a 50\%
 	probability of being measured as a one or as a zero, while
 	a qubit on the 45\textdegree-north latitude would have
@@ -331,39 +331,39 @@ are as follows:
 \item[H:]
 	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
 	X-Z axis, that is, about the 45\degree{} line on the
-	X-Z plane.  This rotates \co{|0>} to the point at which the
-	positive X-axis intersects the Bloch sphere, and rotates \co{|1>}
+	X-Z plane.  This rotates $\ket{0}$ to the point at which the
+	positive X-axis intersects the Bloch sphere, and rotates $\ket{1}$
 	to the point at which the negative X-axis intersects the Bloch
 	sphere.
 	Either way, we get a qubit that is 50\% one and 50\% zero.
 \item[S:]
 	Rotate 90\degree{} ($\frac{\pi}{2}$ radians) about the
 	Bloch-sphere Z-axis, which has no effect on qubits in the
-	\co{|0>} or \co{|1>} states.
+	$\ket{0}$ or $\ket{1}$ states.
 \item[S\textsuperscript{$\dagger$}:]
 	Rotate $-90\degree$ ($-\frac{\pi}{2}$ radians) about the
 	Bloch-sphere Z-axis, which has no effect on qubits in the
-	\co{|0>} or \co{|1>} states.
+	$\ket{0}$ or $\ket{1}$ states.
 	This operator is the inverse of \co{S}.
 \item[T:]
 	Rotate 45\degree{} ($\frac{\pi}{4}$ radians) about the
 	Bloch-sphere Z-axis, which has no effect on qubits in the
-	\co{|0>} or \co{|1>} states.
+	$\ket{0}$ or $\ket{1}$ states.
 \item[T\textsuperscript{$\dagger$}:]
 	Rotate $-45\degree$ ($-\frac{\pi}{4}$ radians) about the
 	Bloch-sphere Z-axis, which has no effect on qubits in the
-	\co{|0>} or \co{|1>} states.
+	$\ket{0}$ or $\ket{1}$ states.
 	This operator is the inverse of \co{T}.
 \item[X:]
 	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
-	X-axis, which takes \co{|0>} to \co{|1>} and vice versa.
+	X-axis, which takes $\ket{0}$ to $\ket{1}$ and vice versa.
 \item[Y:]
 	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
-	Y-axis, which also takes \co{|0>} to \co{|1>} and vice versa.
+	Y-axis, which also takes $\ket{0}$ to $\ket{1}$ and vice versa.
 \item[Z:]
 	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
-	Z-axis, which has no effect on qubits in the \co{|0>} or
-	\co{|1>} states.
+	Z-axis, which has no effect on qubits in the $\ket{0}$ or
+	$\ket{1}$ states.
 \end{description}

 \begin{figure}[tb]
@@ -390,11 +390,11 @@ Similarly, the probability of collapse to one is:
 Thus, one (limited) way to think of a qubit is as a fixed-point number
 ranging between zero and one, inclusive, based on these probabilities
 of collapse.
-Constants may be formed by starting with (say) a \co{|0>} qubit and
+Constants may be formed by starting with (say) a $\ket{0}$ qubit and
 applying sequences of \co{H}, \co{S}, and \co{T} operations.
 For example, the constant $0.14$ can be formed by applying an
 \co{H}, \co{T}\textsuperscript{$\dagger$}, and another \co{H}
-operation on a \co{|0>} qubit as shown in
+operation on a $\ket{0}$ qubit as shown in
 Figure~\ref{fig:future:QC Program as Quantum Experience Score},
 in a manner not entirely unlike constant formation on classic
 computers with small immediate fields.
diff --git a/perfbook.tex b/perfbook.tex
index b4458f2..0b7cff1 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -46,6 +46,7 @@
 \usepackage{epigraph}
 \setlength{\epigraphwidth}{2.6in}
 \usepackage[xspace]{ellipsis}
+\usepackage{braket} % for \ket{} macro in QC section

 % custom packages

-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 8/8] future/QC: Denote QC operators as such
  2017-06-17  3:54 [PATCH 0/8] future/QC: Cosmetic fixes and improvements Akira Yokosawa
                   ` (6 preceding siblings ...)
  2017-06-17  4:02 ` [PATCH 7/8] future/QC: Use \ket{} macro for |0> and |1> Akira Yokosawa
@ 2017-06-17  4:04 ` Akira Yokosawa
  2017-06-17  4:32 ` [PATCH 0/8] future/QC: Cosmetic fixes and improvements Paul E. McKenney
  8 siblings, 0 replies; 10+ messages in thread
From: Akira Yokosawa @ 2017-06-17  4:04 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From e5738e83414b3c3d30d616543bb2f70cbb80bcca Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 15 Jun 2017 07:39:05 +0900
Subject: [PATCH 8/8] future/QC: Denote QC operators as such

QC operators H, S, T, etc. are not necessarily monospace.

Instead of \co{}, use newly defined macro \qop{} for QC operators.
Current definition of \qop{} is {\sffamily #1}, which is
automatically boldified in a description label. Another candidate
of the definition would be {\ttfamily #1} for people who prefer
monospace font.

Dagger symbols need special treatment in description labels.
We need to explicitly boldify them. However, the math mode dagger
symbol does not have its own bold typeface.

We can use \bm{} command defined in "bm" package here.
In this case, it overwrites the symbol multiple times slightly
offset against each other.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 future/QC.tex | 30 +++++++++++++++---------------
 perfbook.tex  |  3 +++
 2 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/future/QC.tex b/future/QC.tex
index fa4084e..a9095cb 100644
--- a/future/QC.tex
+++ b/future/QC.tex
@@ -328,7 +328,7 @@ The basic non-entangling operators supported by IBM's Quantum Experience
 are as follows:

 \begin{description}
-\item[H:]
+\item[\qop{H}\,:]
 	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
 	X-Z axis, that is, about the 45\degree{} line on the
 	X-Z plane.  This rotates $\ket{0}$ to the point at which the
@@ -336,31 +336,31 @@ are as follows:
 	to the point at which the negative X-axis intersects the Bloch
 	sphere.
 	Either way, we get a qubit that is 50\% one and 50\% zero.
-\item[S:]
+\item[\qop{S}\,:]
 	Rotate 90\degree{} ($\frac{\pi}{2}$ radians) about the
 	Bloch-sphere Z-axis, which has no effect on qubits in the
 	$\ket{0}$ or $\ket{1}$ states.
-\item[S\textsuperscript{$\dagger$}:]
+\item[\qop{S}$^{\bm{\dagger}}$:]
 	Rotate $-90\degree$ ($-\frac{\pi}{2}$ radians) about the
 	Bloch-sphere Z-axis, which has no effect on qubits in the
 	$\ket{0}$ or $\ket{1}$ states.
-	This operator is the inverse of \co{S}.
-\item[T:]
+	This operator is the inverse of \qop{S}.
+\item[\qop{T}\,:]
 	Rotate 45\degree{} ($\frac{\pi}{4}$ radians) about the
 	Bloch-sphere Z-axis, which has no effect on qubits in the
 	$\ket{0}$ or $\ket{1}$ states.
-\item[T\textsuperscript{$\dagger$}:]
+\item[\qop{T}$^{\bm{\dagger}}$:]
 	Rotate $-45\degree$ ($-\frac{\pi}{4}$ radians) about the
 	Bloch-sphere Z-axis, which has no effect on qubits in the
 	$\ket{0}$ or $\ket{1}$ states.
-	This operator is the inverse of \co{T}.
-\item[X:]
+	This operator is the inverse of \qop{T}.
+\item[\qop{X}\,:]
 	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
 	X-axis, which takes $\ket{0}$ to $\ket{1}$ and vice versa.
-\item[Y:]
+\item[\qop{Y}\,:]
 	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
 	Y-axis, which also takes $\ket{0}$ to $\ket{1}$ and vice versa.
-\item[Z:]
+\item[\qop{Z}\,:]
 	Rotate 180\degree{} ($\pi$ radians) about the Bloch-sphere
 	Z-axis, which has no effect on qubits in the $\ket{0}$ or
 	$\ket{1}$ states.
@@ -391,9 +391,9 @@ Thus, one (limited) way to think of a qubit is as a fixed-point number
 ranging between zero and one, inclusive, based on these probabilities
 of collapse.
 Constants may be formed by starting with (say) a $\ket{0}$ qubit and
-applying sequences of \co{H}, \co{S}, and \co{T} operations.
+applying sequences of \qop{H}, \qop{S}, and \qop{T} operations.
 For example, the constant $0.14$ can be formed by applying an
-\co{H}, \co{T}\textsuperscript{$\dagger$}, and another \co{H}
+\qop{H}, \qop{T}$^\dagger$, and another \qop{H}
 operation on a $\ket{0}$ qubit as shown in
 Figure~\ref{fig:future:QC Program as Quantum Experience Score},
 in a manner not entirely unlike constant formation on classic
@@ -417,9 +417,9 @@ However, QC provides a powerful capability covered in the next section.

 \paragraph{Entanglement}

-QC has the \co{CNOT} or \emph{controlled-NOT} operator that
+QC has the \qop{CNOT} or \emph{controlled-NOT} operator that
 \emph{entangles} the pair of qubits operated on.
-Different uses of \co{CNOT} can force the two qubits to have the same
+Different uses of \qop{CNOT} can force the two qubits to have the same
 value, opposite values, or other combinations of values (roughly speaking)
 defined by a Bloch-sphere vector.
 Entanglement can be used to implement constraints
@@ -427,7 +427,7 @@ on the relationships of the entangled variables to each other, which
 could potentially make QC handle large optimization problems very
 efficiently.

-Multiple \co{CNOT} operations can (in theory) entangle arbitrarily
+Multiple \qop{CNOT} operations can (in theory) entangle arbitrarily
 large numbers of qubits, which could replace very large numbers of
 classic-computing data structures representing relationships between
 different entities with entanglement of the qubits
diff --git a/perfbook.tex b/perfbook.tex
index 0b7cff1..ad24285 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -80,6 +80,8 @@
 \renewcommand{\path}[1]{\nolinkurl{#1}} % workaround of interference with mathastext
 }{}

+\usepackage{bm} % for bold math mode fonts --- should be after math mode font choice
+
 \IfLmttForCode{
 \AtBeginEnvironment{verbatim}{\renewcommand{\ttdefault}{lmtt}}
 \AtBeginEnvironment{verbbox}{\renewcommand{\ttdefault}{lmtt}}
@@ -118,6 +120,7 @@
 \newcommand{\tco}[1]{\texttt{\detokenize{#1}}} % for code in tabular environment
 % \tco{} will break at spaces but not at underscores
 \newcommand{\nf}[1]{\textnormal{#1}} % to return to normal font
+\newcommand{\qop}[1]{{\sffamily #1}} % QC operator such as H, T, S, etc.

 \newcommand{\Epigraph}[2]{\epigraphhead[65]{\rmfamily\epigraph{#1}{#2}}}

-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/8] future/QC: Cosmetic fixes and improvements
  2017-06-17  3:54 [PATCH 0/8] future/QC: Cosmetic fixes and improvements Akira Yokosawa
                   ` (7 preceding siblings ...)
  2017-06-17  4:04 ` [PATCH 8/8] future/QC: Denote QC operators as such Akira Yokosawa
@ 2017-06-17  4:32 ` Paul E. McKenney
  8 siblings, 0 replies; 10+ messages in thread
From: Paul E. McKenney @ 2017-06-17  4:32 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Sat, Jun 17, 2017 at 12:54:47PM +0900, Akira Yokosawa wrote:
> >From e5738e83414b3c3d30d616543bb2f70cbb80bcca Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Sat, 17 Jun 2017 10:44:54 +0900
> Subject: [PATCH 0/8] future/QC: Cosmetic fixes and improvements
> 
> Hi Paul,
> 
> This patch set mostly fixes and improves LaTeX source of QC section.
> 
> Patch 1 adds patterns in hyphen2endash.sh.
> 
> Patch 2 gives consistent looks to tables as in other tables in
> perfbook.
> 
> Patch 3 fixes typos in SI unit symbols and usage of math mode.
> 
> Patch 4 Adds whitespaces between numerical values and unit symbols.
> This is recommended in NIST style guide (referred to in the change
> log). Since this section treats topics covering quantum mechanics,
> I want it to have a similar look as a scientific paper.
> In other parts of perfbbok, I have quite a few places I want to add
> whitespaces, but I'm not sure that matches your preference.
> If you'd like such changes, I can produce patches to do so.
> 
> Patch 5 uses axis names "X-axis", "Y-axis", and "Z-axis" in the
> lists of "Programming Model" section. I also tried other forms of
> "x-axis", "x axis", and "X axis", but "X-axis" is my preference.
> 
> Patch 6 seems a trivial grammatical fix, but might be unnecessary.
> I'm not sure.
> 
> Patch 7 gives representation of ket commonly used in quantum mechanics
> papers.
> 
> Patch 8 changes the look of QC operators. Special treatment of
> dagger symbol in description labels might be excessive, but
> it gives better result in my point of view.
> 
> So, I'm not sure you like patches 4--8. Please try and push as
> much as you like. And feel free to ask me a respin of the patches
> you don't like as is.

The all look good, so I queued and pushed them, thank you!  I also
queued a change to fix my failure to define "qubit" at first use.

It would be good to have a consistent and professional look, so please
do feel free to make similar fixes elsewhere.

I am going to have to make myself some sort of cheat sheet to get
all this right, though!  ;-)

							Thanx, Paul

>             Thanks, Akira
> --
> Akira Yokosawa (8):
>   hyphen2endash: Add patterns for QC section
>   future/QC: Tweak appearance of tables
>   future/QC: Fix typo in unit symbol and usage of math mode
>   future/QC: Add narrow space before unit symbol
>   future/QC: Use consistent axis names
>   future/QC: Add missing 'has' in description list
>   future/QC: Use \ket{} macro for |0> and |1>
>   future/QC: Denote QC operators as such
> 
>  future/QC.tex              | 123 +++++++++++++++++++++++----------------------
>  perfbook.tex               |   5 ++
>  utilities/hyphen2endash.sh |   8 +++
>  3 files changed, 76 insertions(+), 60 deletions(-)
> 
> -- 
> 2.7.4
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-06-17  4:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-17  3:54 [PATCH 0/8] future/QC: Cosmetic fixes and improvements Akira Yokosawa
2017-06-17  3:56 ` [PATCH 1/8] hyphen2endash: Add patterns for QC section Akira Yokosawa
2017-06-17  3:57 ` [PATCH 2/8] future/QC: Tweak appearance of tables Akira Yokosawa
2017-06-17  3:58 ` [PATCH 3/8] future/QC: Fix typo in unit symbol and usage of math mode Akira Yokosawa
2017-06-17  3:59 ` [PATCH 4/8] future/QC: Add narrow space before unit symbol Akira Yokosawa
2017-06-17  4:00 ` [PATCH 5/8] future/QC: Use consistent axis names Akira Yokosawa
2017-06-17  4:01 ` [PATCH 6/8] future/QC: Add missing 'has' in description list Akira Yokosawa
2017-06-17  4:02 ` [PATCH 7/8] future/QC: Use \ket{} macro for |0> and |1> Akira Yokosawa
2017-06-17  4:04 ` [PATCH 8/8] future/QC: Denote QC operators as such Akira Yokosawa
2017-06-17  4:32 ` [PATCH 0/8] future/QC: Cosmetic fixes and improvements Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.