2

Within quantikz package there's this possibility to put a single slice to separate two columns, through the command \slice{}.

By default it is colored in red and no standard command allows to change that.

Can someone explain me how can I overcome this problem, even by changing the package itself if necessary. Which I believe is this one.

Below a simple example; a circuit of four steps but with a slice only in the middle.

\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{quantikz}

\begin{document}
    
    \begin{quantikz}[slice style=blue]
        \gate{X} & \gate{I} & \slice{1}\gate{I} & \gate{Y}
    \end{quantikz}

\end{document}

enter image description here

1
  • 2
    Welcome to the TeX.SE. community. Please can you put a minimal working example of your idea? Thank you in advance.
    – Sebastiano
    Commented Oct 14, 2021 at 22:07

2 Answers 2

1

You can just put it in the optional argument of \slice:

\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{quantikz}

\begin{document}
    
    \begin{quantikz}[]
        \gate{X} & \gate{I} & \slice[style=blue]{1}\gate{I} & \gate{Y}
    \end{quantikz}

\end{document}

enter image description here

2

You can change it using slice/.append style, as below.

\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{quantikz}
\tikzset{slice/.append style={draw=blue}}
\begin{document}
    \begin{quantikz}
        \gate{X} & \gate{I} & \slice{1}\gate{I} & \gate{Y}
    \end{quantikz}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .