Questions tagged [circuit-construction]

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

74 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
356 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. ...
7
votes
0answers
97 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 ...
7
votes
0answers
70 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 ...
6
votes
0answers
64 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 ...
6
votes
0answers
126 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 ...
5
votes
0answers
41 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 ...
5
votes
0answers
54 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 ...
5
votes
0answers
361 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....
5
votes
0answers
432 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 ...
4
votes
0answers
66 views

An algorithm to perform Gram-Schmidt orthogonalization of linearly independent state vectors

In the first paragraph of the 2nd section of this article, it is stated that given a set of linearly independent $n$-qubit state vectors, Alice can perform the Gram-Schmidt procedure to obtain ...
4
votes
0answers
105 views

Is the No-Cloning Theorem Violated in $C^\ast$-Circuit Models?

In Cleve, et al., the authors discuss self-embezzlement of a catalyst state $\psi$, making the statement on page 2, [B]y local operations, state $\psi\otimes(\vert 0 \rangle \otimes \vert 0 \rangle)$ ...
4
votes
0answers
77 views

Is there a systematic way how to generate the Hamiltonian from a given circuit?

If I have a designed circuit to solve a particular problem. Is there a systematic way how to generate the Hamiltonian from it?
4
votes
0answers
144 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 ...
4
votes
0answers
87 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
111 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 ...
3
votes
0answers
104 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
67 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 ...
3
votes
1answer
105 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 ...
3
votes
0answers
181 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
232 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
147 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
49 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
96 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
130 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, ...
3
votes
0answers
43 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 ...
3
votes
0answers
58 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\...
3
votes
0answers
70 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,...
3
votes
0answers
117 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?
3
votes
0answers
86 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 ...
2
votes
0answers
33 views

Could the Hamiltonian of a Rubik's Cube be simulated with a NISQ device?

Consider the four cells on each of the six faces of the 2x2x2 Rubik's cube (the pocket cube), with front, up, and right twists being labelled as $\langle F,U,R\rangle$. Each move uses fifteen SWAP ...
2
votes
0answers
30 views

Managing memory while running a high depth circuit simulation (amplitude amplification) using Qiskit

I am running an instance of amplitude amplification using Qiskit (v 26) on Google Colab. The circuit is approximately 17 qubits in space and $O(ck)$ in depth where $k \in \left \{1,2,3....,22 \right \...
2
votes
0answers
80 views

Two possible ways how to implement Shor's Algorithm

Among many paper describing circuit solving period finding problem and discrete logarithm problem (DLP) (for simplity, let's say $g \equiv x^r$ (mod n) and try to find $r$), there are two variants ...
2
votes
0answers
36 views

Marginal output probability of first bit for constant-depth circuits

Consider a constant depth $1\text{D}$ quantum circuit, which is applied to the input state $|0^{n}\rangle$, and whose output is measured in the standard basis. You can assume that the gates of the ...
2
votes
0answers
92 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
0answers
24 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
72 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() ...
2
votes
1answer
110 views

IBM quantum circuit - order of tensor product for equivalent matrix

I'm trying to understand how to apply tensor products on 3-qubit systems (or well at least 2 qubits). Let's take a basic example: where $$\lvert \psi \rangle = \lvert q_2q_1q_0\rangle $$ with $q_2$ ...
2
votes
0answers
96 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 ...
2
votes
0answers
77 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\...
1
vote
0answers
24 views

How should I think about circuit metrics like "qubit count," "circuit depth," and "gate count" when dealing with the OpenQASM 3 `ctrl` modifier?

It seems like circuit metrics like qubit count, circuit depth, and gate count are pretty useful. Qubit count determines whether a it's even possible to run a program on resource-limited quantum ...
1
vote
0answers
49 views

Eigenvalues and energy levels of 1D Heisenberg model using real Quantum Computers?

The 1D Quantum Heisenberg model is $$H_\textrm{Heisenberg} = -~J \sum_{\langle i\ j\rangle} \hat{S}_{i} \cdot \hat{S}_{j}$$ where each spin is an operator. For simple cases, for example, a system with ...
1
vote
1answer
41 views

How many single and double qubit gates are required to create a uniform superposition of vertices of a Johnson Graph J(n,r)?

Can I in $\tilde{O}(r)$ number of gates (single and double qubit) create a uniform superposition of vertices of Johnson Graph $J(n,r)$? I would like to create a state $|\psi\rangle = \frac{1}{\sqrt{n \...
1
vote
0answers
59 views

What is the right way to teleport qubits on a real quantum computer?

I've been using the teleportation protocol to teleport qubits and then using Qiskit state tomography for reconstructing my qubits. Using this circuit using open qasm I regularly obtain fidelity 0.9. ...
1
vote
0answers
72 views

Quantum Circuits for Time-Series Data

I am currently working with a dataset with autocorrelated features, i.e, x(t) affects the value of x(t+1) which affects the value of x(t+2). Suppose this is the circuit representing x(t): Does ...
1
vote
0answers
82 views

Circuit state preparation using amplitude encoding

I am following an example of preparing an input state using amplitude encoding from this book. How to calculate $\beta_1^1$ using given formula above? In my understanding, $\beta_1^1 = 2\arcsin(\frac{\...
1
vote
0answers
61 views

3-qubit phase shift gate/circuit implementation without any Ancilla qubits

Hi, I need help me with figuring out the 3-qubit phase shift circuit without any ancillas similar to the 2-qubit circuit shown in below attached picture....... Please do let me know! Thanks in advance!...
1
vote
0answers
47 views

Quantum Search/Count on an unknown superposition state

Question: Search a 'known' element in an 'unknown' quantum database Alternatively, show this is fundamentally impossible (somehow related to the Holevo bound or P < NP?) Related yet different: ...
1
vote
0answers
54 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
0answers
301 views

Can one use a quantum circuit as a pathfinding algorithm?

I've been learning about quantum computing, and I noticed that another way to describe the state vector is as a path in a binary tree where each level of tree represents another qubit, each node ...