Questions tagged [circuit-construction]

For questions about the construction of complex circuits using elementary quantum gates.

Filter by
Sorted by
Tagged with
25
votes
2answers
1k views

How is the oracle in Grover's search algorithm implemented?

Grover's search algorithm provides a provable quadratic speed-up for unsorted database search. The algorithm is usually expressed by the following quantum circuit: In most representations, a crucial ...
12
votes
2answers
973 views

Given a decomposition for a unitary $U$, how do you decompose the corresponding controlled unitary gate $C(U)$?

Suppose we have a circuit decomposition of a unitary $U$ using some universal gate set (for example CNOT-gates and single qubit unitaries). Is there a direct way to write down the circuit of the ...
8
votes
1answer
221 views

Understanding the Group Leaders Optimization Algorithm

Context: I have been trying to understand the genetic algorithm discussed in the paper Decomposition of unitary matrices for finding quantum circuits: Application to molecular Hamiltonians (Daskin &...
26
votes
4answers
3k views

How do I add 1+1 using a quantum computer?

This can be seen as the software complement to How does a quantum computer do basic math at the hardware level? The question was asked by a member of the audience at the 4th network of the Spanish ...
12
votes
2answers
468 views

Automatic compilation of quantum circuits

A recent question here asked how to compile the 4-qubit gate CCCZ (controlled-controlled-controlled-Z) into simple 1-qubit and 2-qubit gates, and the only answer given so far requires 63 gates! The ...
9
votes
3answers
293 views

What would be the simplest addition that would make the D-Wave architecture universal?

The D-Wave system, as I understand it, allows us to program Ising models and to find their ground states. In this form, it is not universal for quantum computation: it can not simulate a circuit model ...
7
votes
2answers
150 views

Topological Circuit Simulator

Does something like Quirk exist for topological (eg. braided) circuits? Alternatively, any ideas on how @CraigGidney is getting these circuits (or something similar)?
7
votes
1answer
242 views

SWAP gate(s) in the $R(\lambda^{-1})$ step of the HHL circuit for $4\times 4$ systems

Context: On the 5th page of the paper Quantum circuit design for solving linear systems of equations (Cao et al, 2012) there's this circuit: Schematic: A brief schematic of what's actually ...
6
votes
3answers
141 views

Generalization for $n$ quantum teleportations

In Breaking Down the Quantum Swap, it is stated: Thanks to the CNOT, we can implement a xor-swap on a quantum computer. All we need to do is chain three CNOTs back and forth. In a comment to a ...
4
votes
2answers
534 views

How to superpose two composite qubit states?

Assuming we have two sets of $n$ qubits. The first set of $n$ qubits is in state $|a\rangle$ and second set in $|b\rangle$. Is there a fixed procedure that generates a superposed state of the two $|a\...
4
votes
4answers
366 views

How to re-create the following circuit image?

What would be the best way to re-create the following image of the HHL quantum circuit without compromising on image quality (the image is from this review paper)? Using qasm2circ I can create the ...
18
votes
2answers
399 views

Why is it important to eliminate the garbage qubits?

Most reversible quantum algorithms use standard gates like Toffoli gate (CCNOT) or Fredkin gate (CSWAP). Since some operations require a constant $\left|0\right>$ as input and the number ...
5
votes
0answers
247 views

Error: Simulation of “Quantum algorithm for linear systems of equations” for $4\times 4$ systems on Quirk (without SWAP) - Global phase

Following @DaftWullie's answer I tried to simulate the circuit given in Fig. 4 of the paper (arXiv pre-print): Quantum circuit design for solving linear systems of equations (Cao et al, 2012), on ...
6
votes
2answers
259 views

Why do we need a Classical Register for carrying out Quantum Computations?

I've just started to mess about with QISKit on Python and one thing is confusing me a fair bit. Given that we are building Quantum Circuits what is the need for a classical register ? Is it because ...
4
votes
1answer
99 views

How are two different registers being used as “control”?

On page 2 of the paper Quantum Circuit Design for Solving Linear Systems of Equations (Cao et al.,2012) there's this circuit: It further says: After the inverse Fourier transform is executed on ...
1
vote
1answer
107 views

Measurement of a qubit and storage of the information on a bit

Suppose we have the quantum circuit below with a quantum register of 2 qubits and a classical register of 2 bits. The Hadamard gates and CNOT gate are not important for the question. When we measure a ...
6
votes
1answer
691 views

How exactly does Simon's algorithm solve the Simon's problem?

Problem Statement: We are given a $2-1$ function $f:\{0,1\}^{n}\to\{0,1\}^{n}$ such that: there is a secret string $s\in\{0,1\}^{n}$ such that: $f(x)=f(x\oplus s)$. Challenge: find $s$. Simon's ...
5
votes
3answers
162 views

What's an example of building a circuit $U_f$ that implements a simple function $f$?

I'd like to be able to program simple functions into simulators such as QCL. I read that any function $f$ can be implemented, but I don't know how to get say a unitary matrix that implements $f$. $\...
4
votes
2answers
210 views

How to calculate circuit depth properly?

Is the circuit depth the longest sequence of gates applied on one of the qubits? Or is it something more complicated?
4
votes
1answer
288 views

Implementation of inverse QFT?

When implementing the inverse quantum Fourier transform, in addition to reversing the circuit, does one need to take the conjugate transpose of the phase shift gates in the circuit as well?
3
votes
1answer
78 views

Implementing a complex circuit for a Szegedy quantum walk in qiskit

Problem definition I'm implementing a quantum circuit in qiskit for a Szegedy quantum walk, (reference, Fig 21.). It uses two registers of dimension $N$ ($N=3$) each one. The challenges I'm facing ...
2
votes
1answer
158 views

Circuit construction and Dirac notation of the following operation

I have a state $$ |\tilde{\Phi_2}\rangle =\dfrac{1}{2^{3l/2}}\sum_{x=0}^{2^l-1}\sum_{y=0}^{2^l-1}\sum_{z=0}^{2^l-1}|0\rangle^{\otimes q}\otimes |x\rangle^{\otimes l}\otimes |y\rangle^{\otimes l}\...
1
vote
2answers
133 views

How can the state $\lvert0\rangle+M^{-1/2}\sum_{j=1}^M\lvert j\rangle$ be generated?

I was wondering if anybody to help me to generate the following state. It would be preferable if you use only Hadamard, CNOT and T-gates, on $\lceil\log_2(M+1)\rceil$ qubits: $$|\psi\rangle = \frac{1}{...
1
vote
1answer
169 views

How to construct a quantum circuit for the following state transformation?

                       I have a certain transformations that goes as follows: Given $A=|...