ORMCbox fix
This commit is contained in:
parent
4dd9645738
commit
36a5556804
@ -47,7 +47,7 @@ However, \texttt{0} and \texttt{1} aren't the only states a qubit may have.
|
||||
We'll make sense of quantum bits by extending the \say{vectored} bit representation we developed in the previous section.
|
||||
First, let's look at a diagram we drew a few pages ago:
|
||||
|
||||
\begin{timetravel}
|
||||
\begin{ORMCbox}{Time Travel (Page 2)}{black!10!white}{black!65!white}
|
||||
A classical bit takes states in $\{\texttt{0}, \texttt{1}\}$, picking one at a time. \par
|
||||
We'll represent \texttt{0} and \texttt{1} as perpendicular unit vectors $\ket{0}$ and $\ket{1}$,
|
||||
show below.
|
||||
@ -72,7 +72,7 @@ First, let's look at a diagram we drew a few pages ago:
|
||||
The point marked $1$ is at $[0, 1]$. It is no parts $\ket{0}$, and all parts $\ket{1}$. \par
|
||||
Of course, we can say something similar about the point marked $0$: \par
|
||||
It is at $[1, 0] = (1 \times \ket{0}) + (0 \times \ket{1})$, and is thus all $\ket{0}$ and no $\ket{1}$. \par
|
||||
\end{timetravel}
|
||||
\end{ORMCbox}
|
||||
|
||||
The diagram in the box above can also be used to describe the state of a qubit. \par
|
||||
Like classical bits, qubits have the \textit{basis states} $\ket{0}$ and $\ket{1}$. \par
|
||||
|
@ -643,9 +643,8 @@
|
||||
|
||||
% Make a box environment.
|
||||
% These can safely be nested.
|
||||
% Args: name, title, back color, frame color.
|
||||
\newcommand{\@makeORMCbox}[4]{
|
||||
\newenvironment{#1}{
|
||||
% Args: title, back color, frame color.
|
||||
\newenvironment{ORMCbox}[3]{
|
||||
% \linehack draws a line across a tcolorbox.
|
||||
% tcolorbox only supports two sections, but
|
||||
% this hack allows us to have more.
|
||||
@ -655,7 +654,7 @@
|
||||
(0, 0) --
|
||||
(\linewidth, 0);
|
||||
|
||||
\draw[color=#4, dashed, dash phase=1mm]
|
||||
\draw[color=#3, dashed, dash phase=1mm]
|
||||
(0 - \kvtcb@leftlower-\kvtcb@boxsep, 0) --
|
||||
(\linewidth + \kvtcb@rightlower + \kvtcb@boxsep, 0);
|
||||
\end{tikzpicture} \par
|
||||
@ -664,17 +663,17 @@
|
||||
|
||||
% Keep track of the current background color.
|
||||
% Useful for transparent tikz drawings.
|
||||
\def\ORMCbgcolor{#3}
|
||||
\def\ORMCbgcolor{#2}
|
||||
|
||||
\begin{tcolorbox}[
|
||||
enhanced,
|
||||
breakable,
|
||||
colback=#3,
|
||||
colframe=#4,
|
||||
colbacktitle=#4,
|
||||
colback=#2,
|
||||
colframe=#3,
|
||||
colbacktitle=#3,
|
||||
titlerule=0.6mm,
|
||||
title={\textbf{#2}},
|
||||
title after break={\textbf{#2 (continued)}},
|
||||
title={\textbf{#1}},
|
||||
title after break={\textbf{#1 (continued)}},
|
||||
frame style={draw=none,fill=none},
|
||||
boxrule=0mm, % We need this even with hidden borders for correct spacing
|
||||
arc=0mm,
|
||||
@ -684,13 +683,24 @@
|
||||
} {
|
||||
\end{tcolorbox}
|
||||
}
|
||||
|
||||
\newenvironment{examplesolution}{
|
||||
\begin{ORMCbox}{Example Solution}{black!10!white}{black!65!white}
|
||||
} {
|
||||
\end{ORMCbox}
|
||||
}
|
||||
|
||||
\@makeORMCbox{examplesolution}{Example Solution}{black!10!white}{black!65!white}
|
||||
|
||||
\if@solutions
|
||||
\@makeORMCbox{solution}{Solution}{ored!10!white}{ored}
|
||||
\@makeORMCbox{instructornote}{Note for Instructors}{ocyan!10!white}{ocyan}
|
||||
\newenvironment{solution}{
|
||||
\begin{ORMCbox}{Solution}{ored!10!white}{ored}
|
||||
} {
|
||||
\end{ORMCbox}
|
||||
}
|
||||
\newenvironment{instructornote}{
|
||||
\begin{ORMCbox}{Note for Instructors}{ocyan!10!white}{ocyan}
|
||||
} {
|
||||
\end{ORMCbox}
|
||||
}
|
||||
\else
|
||||
\excludecomment{solution}
|
||||
\excludecomment{instructornote}
|
||||
|
Loading…
x
Reference in New Issue
Block a user