Questions tagged [quantikz]
{quantikz} is a useful package for drawing quantum circuit diagrams.
42
questions
0
votes
0
answers
19
views
Quantikz gategroup, stepsize isn't functioning properly
I would like the dashed line to extend to the right of the last Hadamard gate on the top register. Everything is, more or less, happening in the top 3 registers
\begin{tikzpicture}
\node[scale=0.88]{
\...
1
vote
1
answer
48
views
Quantikz: Annotation Text Above Gate
For a given gate symbol in the quantikz package, I would like to be able to place text above or below the gate in addition to the gate label.
Shifting the text up and using \n to force multiple lines ...
0
votes
0
answers
19
views
How to make quantikz brace not thick
How can get a normal (not thick) vertical brace (left of M), just like the horizontal brace at the bottom?
\documentclass[
fontsize=11pt,
class=scrreprt,
border={0mm 0mm 0mm 0mm},
]{standalone}
\...
0
votes
2
answers
45
views
Quantikz horizontal alignment for qwbundle
How can I achieve proper horizontal alignment for the "n" in the MWE?
Couldn't find anything in the docs... https://ctan.mc1.root.project-creative.net/graphics/pgf/contrib/quantikz/quantikz....
1
vote
0
answers
82
views
Permuting empty wires in quantikz2
I want to be able to draw some circuits with weaving wires. The quantikz2 tikzlibrary (here) has the \permute gate which almost does what I want, but there is a problem is if a row has an empty wire.
...
3
votes
1
answer
93
views
How do I use both quantikz and zx-calculus packages?
I am a long-time consumer of the discussions in this great forum. This is my first question, so please correct me if I do not follow some protocols.
In my attempt to use both the packages zx-calculus ...
0
votes
1
answer
92
views
The \slice{} command from quantikz doesn't work
I have tried writting some circuits and wanted to put slices to better explain what was going on after every gate. The problem is that when I tried to use the command the slices end up on the same ...
0
votes
1
answer
109
views
quantikz/tikz slice text placement
For the slice element of quantikz, I would like to place the text at the bottom, for example I can do this with the A1 and B1 text as
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\...
3
votes
1
answer
74
views
How to use your own styles in Quantikz?
I am using the quantikz package to draw a quantum circuit and I am failing to insert my "own" gate (BS) as a quantum gate. The gate noisy is a working example of what I want to insert in the ...
0
votes
0
answers
77
views
quantikz - drawing circuit with output in the middle
I'm currently trying to draw this circuit in the quantikz package:
This is what I have so far (+ the output):
\begin{quantikz}
\lstick{$\ket{x_1}$} & \gate{NOT} & \gate[2]{NAND} & ...
0
votes
0
answers
71
views
Quantikz: how to draw zig-zag lines connecting gates on different wires?
I want to draw a zig-zag line between two gates on different wires (to represent entanglement) using quantikz. So far I've only managed to join the gates using a straight wire by making use of a ...
0
votes
0
answers
66
views
Starting with a quantum gate in quantikz
I am trying to start a quantikz circuit with a gate extending over multiple wires to get a diagram like the following:
This is made with the following quantikz code:
\begin{quantikz}
\gate[...
2
votes
1
answer
56
views
Conflict between quantikz, cleveref and gather environments
I am writing an article in which I need a quantum circuit figure, and want to use the quantikz package for the purpose. However, I got a series of errors upon loading quantikz. I have pinpointed the ...
1
vote
2
answers
248
views
Trying to draw a quantum circuit, a basic one
In the beginning, it can start with 'n' input and the same number of output but could not make output lines. I am actually now quite sure about the details of these codes, that's why could not ...
1
vote
1
answer
127
views
Setting default font size in quantikz
How do I change the default font size of all text inside a quantikz environment? There isn't anything in the docs.
\documentclass[border=1cm]{standalone}
\usepackage{quantikz}
\begin{document}
\begin{...
0
votes
0
answers
47
views
Overlapping bell pairs in quantikz
Does anyone know how to draw overlapping Bell/qubits pairs using quantikz as shown below?
Really appreciate it.
0
votes
0
answers
108
views
Quantikz: uncontrolled long gate going crazy
I am trying to draw a circuit for the Grover algorithm (the one like in Nielsen and Chuang) by using Quantikz.
Nevertheless, the circuit for the oracle goes crazy: it has weird italic text and also ...
0
votes
1
answer
123
views
How to remove the line from \gategroup command in quantikz
Within quantikz package there's the possibility to wrap a circuit within a box, through the command
\gategroup[]{}
By default, such a group plots the perimeter. The options allow to make the perimeter ...
2
votes
2
answers
378
views
Annotating quantikz circuit
I'm trying to annotate certain parts of my quantikz circuit and drawing boxes around some gates:
\documentclass{article}
\usepackage{graphicx}
\usepackage{amssymb,amsfonts,dsfont}
\usepackage{tikz}
\...
1
vote
1
answer
227
views
Quantikz remove left wire of gate box
I'm trying to draw a circuit with quantikz using the code:
\documentclass{article}
\usepackage{graphicx}
\usepackage{amssymb,amsfonts,dsfont}
\usepackage{tikz}
\usetikzlibrary{quantikz}
\begin{...
0
votes
1
answer
58
views
Drawing electrical circuit and quantum circuit in same tikpicture environment
I want to include an electrical circuit symbol (capacitor) and quantikz meter in the same tikzpicture environment, but this doesn't draw the quantikz symbol. What am I missing?
\documentclass{article}
...
0
votes
2
answers
119
views
Quantikz draw kink on wire
I want to draw a kink on a wire using quantikz. I'm using the second block of code on p.14 of the quantikz docs,
\documentclass{article}
\usepackage{amssymb,amsfonts,dsfont}
\usepackage{tikz}
\...
0
votes
1
answer
435
views
Quantikz formatting gate boxes
I'm trying to draw a circuit in quantikz and using examples from the manual.
\documentclass{article}
\usepackage{graphicx}
\usepackage{amssymb,amsfonts}
\usepackage{tikz}
\usetikzlibrary{quantikz}
\...
1
vote
1
answer
291
views
Quantikz draw strike on double wire and arrow on vertical wires
I'm trying to draw this circuit using quantikz. I don't know how to draw the strike symbol on the double wire, or the down arrow from the \meter:
\documentclass{article}
\usepackage{graphicx}
\...
0
votes
1
answer
184
views
How to create gate symbol in quantikz?
I want to define a gate in quantikz with my own shape. Let's say I want a triangular gate or $\odot$ (instead of the usual CNOT or the square with letter). How can this be achieved? I looked at the ...
0
votes
0
answers
119
views
quantum circuits in tikz (quantikz) modifying of a command, or how to address nodes
Sorry I am not very familiar with this.
I am using quantikz package to draw quantum circuits.
There is an otherwise undocumented feature
\begin{tikzcd}
& \makeebit[-60][blue]{test} & \qw & ...
3
votes
1
answer
554
views
Drawing Two CNOT gates
I'm new to LaTeX and the tikz package in general.
Here is what I have so far:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{quantikz}
\begin{document}
\begin{center}
\begin{quantikz}
...
1
vote
2
answers
601
views
How to draw simple wires in quantikz
I want to make a way to redirect a line of a quantum circuit to other.
The perfect idea that i have is to use something similar to,
\begin{quantikz}
& \gate{H} & \gate[swap]{} & \qw & \...
0
votes
1
answer
283
views
Customize bold and thin lines in quantikz
I need to write a circuit in thin lines where an operation is exception to this. For example
\begin{quantikz}[thin lines]
& \qw & \ctrl{1} & \qw\\
& \qw & \targ{} & \qw
\end{...
0
votes
1
answer
144
views
quantikz - moving the $\psi_0$ down like the other $\psi$
I would really appreciate if someone can help me move $psi_0 to the bottom like the rest of the $psi$. Below is the code I used.
\documentclass{report}
\usepackage{lscape}
\usepackage{dsfont}
\...
1
vote
2
answers
577
views
Quantum algorithm circuit with Quantikz
I'm trying with no results to use latex for drawing the famous “Deutsch algorithm”:.
For this use case, I've tried like every latex package for quantum circuits. The one with which I was able to ...
2
votes
1
answer
750
views
Quantikz gategroup not working
I am trying to re-write the Grover search algorithm using quantikz. I was trying to highlight the inner group of operations (basically the whole circuit except for first and last column) using \...
2
votes
2
answers
525
views
How to change \slice{} color on quantikz
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 ...
0
votes
0
answers
231
views
Quantikz \ctrlbundle causing the document not to compile?
I'm trying to compile the following code:
\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{quantikz}
\begin{document}
\begin{quantikz}
\qwbundle[alternate]{} & \...
2
votes
2
answers
2k
views
How to draw a circuit using quantikz?
How can one draw this complicated-looking circuit with quantikz?
Edit: Here is my attempt:
\documentclass[english]{revtex4}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{tikz}
\...
6
votes
1
answer
537
views
Draw measurement on a set of wires using quantikz
I want to draw this circuit (Bernstein-Vazirani Algorithm) using the quantikz package.
I could not draw the measurement on a set of wires like the figure. Here is my attempt:
\begin{center}
\begin{...
2
votes
1
answer
137
views
How can the alternate bundle be used with the meter in quantikz?
The quantikz package handles the [alternate] fine when it is placed before a normal gate.
\documentclass{standalone}
\usepackage{braket,tikz}
\usetikzlibrary{quantikz}
\begin{document}
\begin{...
3
votes
1
answer
252
views
What is the recommended way for typesetting the Fredkin gate in quantikz?
The obvious thing to try was
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{quantikz}
\begin{document}
\begin{quantikz}
& \ctrl{1} & \qw \\
& \swap{1} & \qw \\
&...
0
votes
1
answer
546
views
Quantum gates, an example
I'm unable to type this in XeTeX:
Any hints ?
0
votes
0
answers
36
views
French babel conflict with quantikz [duplicate]
I've noticed a strange behavior using the babel and quantikz packages. The following code:
\documentclass{standalone}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\...
2
votes
1
answer
1k
views
Quantikz: equally sized gate boxes
I am composing a quantum circuit diagram using the LaTeX package Quantikz. My problem is that I want to have some gates equally sized, but don't manage to find a solution. Take this code:
\...
4
votes
1
answer
1k
views
Quantikz: no wires in gates spanning multiple wires
I tried to use the following quantikz code:
\documentclass{article}
\usepackage{tikz}
\usepackage{mathtools}
\usetikzlibrary{quantikz}
\begin{document}
\def\myvdots{\ \vdots\ }
\begin{quantikz}
\...