Questions tagged [circuit-construction]

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

61 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
74 views

Sequential circuit using quantum gates

Without feedback/loop how can we build a sequential circuit? The basic feature of sequential circuit is that is depends not only on the current inputs but also on the previous inputs/outputs. I've ...
5
votes
0answers
61 views

Correspondence between the Topological model and Quantum Circuit model

For example, given the $R$ & $F$ gates and Toric codes for a given problem, how to convert this code into the conventional circuit model and vice versa. From the literature developed, it seems ...
5
votes
0answers
366 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 ...
5
votes
0answers
120 views

How exactly is the stated composite state of the two registers being produced using the $R_{zz}$ controlled rotations?

This is a sequel to How are two different registers being used as "control"? I found the following quantum circuit given in Fig 5 (page 6) of the same paper i.e. Quantum Circuit Design for ...
4
votes
0answers
31 views

Reducing the depth of quantum circuits with ancilla qubits

This question is two-fold and considers general $n$-qubit operations on a quantum computer. First, can a general $n$-qubit operation be implemented on a quantum computer without the use of ancilla ...
4
votes
0answers
35 views

Equivalence checking of quantum circuits up to error

Suppose you are given two circuit descriptions $A$ and $B$ where by a circuit description I mean a sequence of gates (in the order they are applied) and the qubits they are applied on. (For the sake ...
4
votes
1answer
88 views

Stabilizer circuit synthesis via Clifford gates

I have been working with stabilizer codes and I understand the mathematical way that they are described and how to simulate such in a classical computer in order to check their performance. However, ...
4
votes
0answers
71 views

How to generate the following $n$-level $n$-particle singlet state?

Could you please give a direction/reference towards realising the following using any set of realisable quantum gates $$\boxed{|S_{n}\rangle = \frac{1} {\sqrt{n!}} \sum_{S\in P_n^{n}} ( \,-1) \,^{\...
4
votes
0answers
101 views

What implementation changes should be done in maxcut code using VQE?

In the paper, "Quantum algorithm implementations for beginners" in the section XVII. QUANTUM SIMULATION OF THE TRANSVERSE ISING MODEL (page 54-58), the authors have plotted energy $E$ vs magnetic ...
4
votes
0answers
48 views

Can anybody explain or suggest a good reference on how to make a modular exponentiation circuit for N=15 with any coprime base?

I have read many papers related to it but in every paper, they just show the circuit of order finding algorithm for N=15, but did not explain what is the procedure to make it. It will be great if ...
4
votes
0answers
257 views

How to build a quantum circuit representing the Ising Model?

Can someone explain to me how to build a quantum circuit representing the Ising Model? I just want to understand how to represent the Ising Model for the purposes of quantum state label classification....
3
votes
1answer
67 views

Why do the constant operations in a quantum computer need second qubits?

From what I'm reading, building the constant-1 and constant-0 operations in a quantum computer involves building something like this, where there are two qubits being used. Why do we need two? The ...
3
votes
0answers
66 views

What is the thought process for circuit making after seeing input and output of a matrix?

Here is an exercise (4.27) from Nielsen and Chuang and I found the answer (given in the figure below) online without any explanation. The question was to construct a circuit by seeing a matrix (given ...
3
votes
0answers
66 views

Preparation of states that correspond to efficiently integrable probability distributions

I have been trying to implement methods from paper Creating superpositions that correspond to efficiently integrable probability distributions by Grover and Rudolph. It is stated that there exists an ...
3
votes
0answers
134 views

XX, YY, ZZ circuit representations?

Is there a good primer or set of lectures\examples that show entirely how to take a given matrix and developing a circuit that represents it. I am trying to implement a program to find the lowest ...
3
votes
0answers
126 views

Simulation for the [5,1,3] stabilizer code in Qiskit

Sorry that I keep asking questions for the same subject. It is driving me crazy. I have followed the [5,1,3] stabilizer code circuit designed by Gottesman in page 35 in his paper (also illustrated in ...
3
votes
0answers
132 views

Quantum Optimization via Quantum Label Classification in Quantum Circuits

I have been reading Farhi and Neven's paper on quantum neural networks on quantum circuits. I also found an example - albeit not ideal as pointed out by a couple of users - thank you - in here. ...
3
votes
0answers
43 views

How to derive a circuit from given equations?

I was reading a paper on Quantum Neural Networks where the authors discussed a new back propagation algorithm. They shared a schematic of the circuit. However, I am unable to understand how the ...
3
votes
0answers
79 views

There seems to be a problem with the implementation of identity gates on Qiskit as compared to the circuit composer

I have been experimenting with slowing down the decay of qubits, and as a control, I implemented a circuit with just identity gates for comparison. However, when I implement such circuits in Qiskit, ...
3
votes
0answers
89 views

How to implement the mixed quantum state fidelity in a quantum circuit?

Suppose we use Uhlmann-Josza fidelity $F(\rho, \sigma):=(\mathrm{tr}\sqrt{\sqrt{\rho}\sigma\sqrt{\rho}})^2$, can we construct a quantum circuit that help us to calculate the fidelity of two mixed ...
2
votes
0answers
45 views

Preparing arbitrary two- and multi-qubit states with real amplitudes

Is it correct that the following circuit can produce any two-qubit state with real amplitudes? (Meaning that for any set of the four real amplitudes there exists a set of angles...) If so, should I ...
2
votes
1answer
87 views

What is the best way to handle parametric circuits in Qiskit?

What is the best way to handle parametric circuits in Qiskit? When I create a variational form like TwoLocal and then do ...
2
votes
0answers
20 views

Can low-rank factorizations approximate quantum circuits?

Quantum circuits can be expressed as the matrix product of each gate in the circuit, where each gate is a unitary matrix (say) $G_i$. So, the whole circuit is $S = G_n G_{n-1} \cdots G_1$. Since $S$ ...
2
votes
0answers
75 views

Hadamard Overlap Test

I am trying to understand a test called Hadamard Overlap Test, which consists of a destructive swap test (section IV of swap test and Hong-Ou-Mandel effect are equivalent) right after a Hadamard test. ...
2
votes
0answers
29 views

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

A similar question has been previously asked & has an excellent answer discussing half, full & ripple carry adders. I am curious to find out how these adders would be constructed in the ...
2
votes
1answer
91 views

Why I am not getting approximate equiprobable states in the following circuit on IBM Q simulator?

I have the following circuit which consists of symmetric modules. I compiled the circuit in IBM Quantum experience backend - ibmq_qasm_simulator, 8192 shots. The result is not equiprobable. Why? Since ...
2
votes
0answers
50 views

Easiest hash function to implement on Qiskit

Trying to build an Oracle circuit for Grover's algorithm that will try to find a desired input in order to get a certain output of a hash function. Was wondering if there were any 4 or 8 bit hash ...
2
votes
0answers
85 views

Measuring the expected energy of a quantum circuit

I implemented the following circuit: I am interested in measuring the expected energy of the circuit. I am using Cirq. I am wondering what are the next steps. Sorry if the question seems very basic, ...
2
votes
0answers
35 views

Understanding CNOT gate for indirect measurement

I am trying to write a simple circuit to understand the process of finding the set of parameters such that the cost function of that circuit in question is minimized. For that I understand one has to ...
2
votes
0answers
51 views

Restoring an initial state after computation

Let me first tell my problem statement. Suppose I have a uniform superposition of states $$|A\rangle=\dfrac{1}{2^{9}}\sum_{i,j,k=0}^{2^6-1}|0\rangle^{\otimes 8}|i\rangle|j\rangle|k\rangle,$$ where $|0\...
2
votes
0answers
61 views

Tensorial notation for this quantum XOR circuit

Suppose I have this quantum XOR circuit; this is a quantum circuit for the classical XOR operation $$\begin{eqnarray*} x_1'= x_1\oplus x_2\oplus x_3\oplus x_4,\\ x_2'=x_2\oplus x_3\oplus x_4\oplus x_5,...
2
votes
0answers
87 views

How to simulate a simple circuit to add two numbers in Quirk?

I am new and I don't understand where I should give the input and where I should get the output. Please explain with an example of a circuit run on the Quirk simulator. How to add two numbers?
2
votes
0answers
68 views

Implement a circuit as a matrix in ProjectQ

Suppose a have a circuit coded up in ProjectQ, suppose also it is that large to be hard enough to write it down as a unitary matrix by hands (e.g. order-finding, which is rather standard, but turns ...
1
vote
0answers
47 views

How do I construct a circuit to reshuffle some computational basis vectors?

I would like to construct a quantum circuit s.t. It maps a certain (relatively small) subset of computational basis vectors onto a different subset of those, e.g. $$ |0101001\rangle \to |1000010\...
1
vote
1answer
49 views

Loading a random distribution using controlled-Y rotations

In the paper by Stamatopoulos et al., the authors say that it is possible to load a distribution on a three qubit state to obtain: In Qiskit finance this is performed using the uncertainty model ...
1
vote
0answers
47 views

qiskit - MCMT - base gate acting on only one qubit

I want to reduce the depth of a ucrz gate acting on multiple qubits with ancilla qubits in qiskit. One way to do this could be the mcmt implementation with ...
1
vote
0answers
25 views

Difference between a Non-Gaussian Circuit and Gaussian Circuit

I am fairly new to this topic and I couldn't find resources that were beginner-friendly. So basically what are the differences between these two?
1
vote
0answers
26 views

Gate definitions for quantum random access codes

I would like to know how the gates are defined in quantum random access codes? Consider the $2 \to 1$ code described in Lemma 3.1 of this paper. The section defines the encoding and decoding circuits. ...
1
vote
0answers
34 views

What is the maximum circuit depth for Qiskit Aer Simulator?

I'm running some simulator circuit on my computer, and I see that (using 3 qubits, and thousands of classical registers), the max cap seems to be about qc.depth() ...
1
vote
0answers
52 views

Generalized construction of W basis

Although this question deals with the construction of a W-state, I was looking for a general way to find all the orthogonal W-states, given a number of qubits. For example, for three qubits, the first ...
1
vote
0answers
87 views

Creating Bell States with CNOT conditioned to the control qubit being set to zero

I was using qiskit to generate all of the Bell States. I created the following circuits for each state: $|\Phi^+\rangle :$ $|\Phi^-\rangle :$ $|\Psi^+\rangle :$ $|\Psi^-\rangle :$ The $|\Psi^\pm\...
1
vote
0answers
26 views

Can We Currently Import Quantum Datasets (Datasets Containing Quantum Data) Onto NISQ-era Quantum Computers?

I'm still investigating the TFQ whitepaper. In one section of the paper, the authors say this with respect to Quantum Datasets In general, [a quantum dataset] might come from a given black-box ...
1
vote
1answer
52 views

IBM quantum circuit - order of tensor product for equivalent matrix

I'm trying to understand how to apply tensor products on a 3 qbit systems (or well at least 2 qbits). Let's take a basic example: where $$\lvert \psi \rangle = \lvert q2q1q0\rangle $$ with q2 being ...
1
vote
0answers
213 views

Simple Quantum Circuit to calculate sum of input states $|a\rangle + |b\rangle$

What is the simplest quantum circuit which takes states $|a\rangle$ and $|b\rangle$ as its input, and outputs their (normalized) sum $|a\rangle+|b\rangle$? Cross-posted on Physics.SE
1
vote
0answers
52 views

Repeating Quantum Phase Estimation algorithm

In the Quantum Recommendation Systems paper, the authors use the Quantum Phase Estimation algorithm in a way that is slightly different from what I've seen so far. This is how it is described: The ...
1
vote
0answers
37 views

Primer for Quantum Circuits and Optimization

I am interested in studying physical systems and trying to build circuits to simulate them. Now, of course, all the systems I could try to work with at simple, toy, systems - and that's fine. ...
1
vote
0answers
22 views

Methods for encoding non-linear probabilities as data

I am working on translating a computing method I developed to model complex non-linear systems with classical computational methods into a form that is natural to quantum computing. The technique ...
1
vote
0answers
17 views

Ansatz Techniques to Multi-Body Physics Problems

I have been reading this paper: https://arxiv.org/abs/1906.01563v1. I am wondering: is it possible to use the idea behind quantum circuits to build classical Hamiltonians represented in the same way?...
1
vote
0answers
48 views

Controlled controlled adder gates involved

Let's say I have a circuit that given in the figure As we can see that this circuit consists of $2$-Toffoli gates and $4$ C-NOT gates, and to construct this entire circuit using only single qubit ...
1
vote
0answers
71 views

Quantum operation involving permutation

Suppose I have the state $\frac{1}{2^l/2}\sum_{i=0}^{2^l-1}|0\rangle^{\otimes q}\otimes |i\rangle^{\otimes}|0\rangle_i^{\otimes l}$. I perform some unitary transformation between the registers $|i\...