Closed i2000s closed 7 years ago
I would first like to get a version on CTAN before making that undertaking. According to the upload page, we can mark version numbers of the package. So disambiguation between the version based on XY-pic and TikZ can easily be done.
It would be helpful for us to see how much of the underlying engine in qcircuit can be rewritten without having to change the user interface. If this is too difficult, we may have to go back to the drawing board.
Given discussions 11 August 2014, we may go back to the drawing board. @jarthurgross has some ideas about this, and we will act in consulation with him.
A followup idea on how to implement this package in TikZ (inspired by a Stackexchange thread):
\tikzset{
X-box/.style = {draw,fill=white,minimum size= 0.5 cm, text width= a cm, align=center},
operator/.style = {draw,fill=white,minimum height=7em,text width=b cm, align=center},
...
}
...
\newcommand{\x-gate}[1]{\node[X-box] (place_a) {X} };
\newcommand{\operator}[1]{\node[operator] (place_b) {#1} };
\newcommand{\qcircuit}[1]{
\matrix[row sep=0.4cm, column sep=0.8cm] (circuit) { #1}
\begin{pgfonlayer}{background}
\draw[thick] (Starting_point_with_decorations) -- (Box_1.west) (Point_1) -- (Box_M.west); % Draw the background line.
...
\end{gpfonlayer} };
When a user want to draw a q-circuit, he will just use
\qcircuit{ \x-gate & \operator{$\ket{\psi}$} \\
\y-gate & & }
basically the same UI style as the original package defines.
One thing I worry about though is the UX (user experience) - @jarthurgross had observed the current style is not very user friendly.
This being said, I like the idea of a wrapper.
I would suggest that any rewrite in TikZ should have a different package name. I recommend "qcircuitz", with the "z" at the end to signify TikZ. Also, the syntax should allow for specifying keys in the natural way, e.g.,
\qcircuit[measurement=meter, gateheight=12pt]{
You don't want to use a white background to "paste over" the wires in the background. It can cause incompatibilities if someone wants the circuit background to match the color behind the gates (think of a powerpoint presentation, for example). It is better to actually have wires end at gates and let the gate background color be a variable.
A tentative prototype has been implemented in a new repo--qcircuitz. Maybe more discussions about the design and technical details can go there.
Anyone plan to do it or not? Seems not not that hard though...