TransWikia.com

Bundled wires in quantikz

TeX - LaTeX Asked by mavzolej on August 28, 2020

The following quantikz code

documentclass{article}
usepackage{tikz}
usetikzlibrary{quantikz}

begin{document}
begin{quantikz}
  qwbundle[alternate]{} & ctrlbundle{1} &  gate{R} \
  qw & targ{} & qw 
end{quantikz}
end{document}

results in this circuit diagram:

enter image description here

The expected output is:

enter image description here

What should I change to have three wires going into the final R gate?

As far as I understood from the package documentation, the number of wires should be automatically defined by the preceding circuit element.

One Answer

Try this (a qwbundle[alternate]{} is added after gate{R}):

documentclass{article}
usepackage{tikz}
usetikzlibrary{quantikz}

begin{document}
begin{quantikz}
  qwbundle[alternate]{} & ctrlbundle{1} &  gate{R}qwbundle[alternate]{} \
  qw & targ{} & qw 
end{quantikz}
end{document}

enter image description here

I haven't read through the package documentation, instead I just searched for qwbundle and learnt its usage from the last two examples in sec. III, upper part of page 4.

Correct answer by muzimuzhi Z on August 28, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP