AnswerBun.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!

Related Questions

Drawing triangles in latex

1  Asked on April 28, 2021

 

How to typeset listof (revisited)

1  Asked on April 28, 2021

   

Esperanto flag in Tikz?

2  Asked on April 28, 2021 by amelie-b-blackstone

   

Hyphenation for words with underscore

3  Asked on April 28, 2021 by towi

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir