Questions tagged [circuit-construction]
For questions about the construction of complex circuits using elementary quantum gates.
544
questions
1
vote
0
answers
60
views
Faithful description of a photonic setting with the circuit model
The above picture comes from this paper.
The circuit on the left and the one on the right are equivalent (up to the basis).
However, there is an important difference: the circuit makes the input -- i....
3
votes
1
answer
55
views
Can a polynomial-sized superposition of computational basis states be prepared with a polynomial-sized quantum circuit?
Suppose I am working with a class of states which consist of a superposition of $O(\text{poly}(N))$ computational basis states on $N$ qubits. Examples of this would be the subspace of states of fixed ...
0
votes
0
answers
12
views
Parallelizing a circuit with repetitive blocks on permuted qubits
Assume one has access to the following oracle:
$$
O
|i\rangle|z\rangle = |i\rangle|z\oplus f(i_{N-1},i_{N-2},\ldots i_{1},i_{0})\rangle
$$
where $ |i\rangle =|i_{N-1}i_{N-2}\ldots i_{1}i_{0}\rangle $...
1
vote
3
answers
41
views
Hadamard gate in Grover algorithm
What is the need to apply the Hadamard gate as the first step while designing the diffuser circuit in the implementation of Grover's algorithm? I know what the gate does but I cannot understand what ...
1
vote
1
answer
75
views
Is it possible to implement an in-place multiplication quantum circuit?
How can a reversible multiplication quantum circuit be implemented? By "reversible" I mean one that performs a *= b on the inputs a and b of the ...
1
vote
1
answer
31
views
Implementing Readout Error in my circuit seems to have no effect whatsoever
I am trying to perform a simulation using Qasm in order to see how the readout error actually affects my circuit. The circuit I am implementing is a trivial one, the three qubit one that implements ...
0
votes
2
answers
55
views
Raising Pauli Gate to power gives TypeError: unsupported operand type(s) for ** or pow(): 'complex' and 'ParameterVectorElement'
I am trying to implement a parameterised circuit in qiskit. Part of the circuit includes the operation
$(X \otimes X)^\alpha$
where $X$ is the standard Pauli-X gate, $\otimes$ is the tensor product, ...
1
vote
1
answer
61
views
Qiskit: Mismatch between run_config.parameter_binds and all circuit parameters
I am trying to run the following circuit:
...
1
vote
1
answer
29
views
Raise tensor product to float power in qiskit
I am trying to implement the gate
$(X \otimes X)^\alpha$
where $X$ is the standard Pauli-X gate, $\otimes$ is the tensor product and $\alpha$ is a real number. Is there a way to implement this in a ...
0
votes
1
answer
32
views
Circuits acting on subsets of qubits in other circuits
I am trying to figure out what is the best way of dealing with registers while constructing circuits from abstract blocks. Consider the following subcircuit:
\begin{equation}
U|x\rangle|y\rangle|z\...
2
votes
0
answers
24
views
Techniques to parallelize controlled-unitaries controlled by the same qubit but acting on different target qubits
I need to find a way to parallelize a set of controlled-unitaries that are all controlled by the same qubit and are targetting $n$ different qubits. The main constraint that I have is that I can only ...
2
votes
0
answers
21
views
What are the differences between discrete-time quantum walks between dimensions?
When working with quantum walks in other dimensions (1D – 2D – 3D...) do your results tend to be different from what is proposed in theory with the probability density? The results obtained in the ...
2
votes
1
answer
75
views
Qiskit: How to implement a classical function?
I'm quite lost, I have to implement the following function with qiskit
$$
f(x,y,z) = (\lnot x \land y \land z) \lor (x \land \lnot y \land z)
$$
but how can we do that ? I don't understand how to do ...
2
votes
1
answer
36
views
Oracle for amplitude addition
Assume one is given two oracle circuits providing access to matrices $A_{ij}$ and $B_{ij}$ as follows (see eq. (6.2) here):
\begin{equation}
O_A |0\rangle|i\rangle|j\rangle=\left(A_{ij}|0\rangle+\sqrt{...
1
vote
0
answers
50
views
Slight issue with QFTing two qubits
Let's consider two qubits and the corresponding computational basis $\{|0\rangle\, |1\rangle, |2\rangle, |3\rangle\}$. In binary form, any of these vectors can also be written as a product $|x_1\...
2
votes
3
answers
384
views
Depth circuit optimization for 6-qubits GHZ state
Standard implementation of the generalized GHZ circuit has a depth that grows linearly with the number of qubits.
I am looking for an optimized version in the case of 6 qubits.
Is there any?
2
votes
1
answer
44
views
What is the average amount of gates needed to implement a random Clifford gate?
Given a Clifford gate acting on $n$ qubits is implemented using its generators, what is the average number of gates needed to implement a random Clifford gate as a function of $n$?
0
votes
0
answers
33
views
What does "point-wise addition" mean in the context of this paper?
On page 11 of this study they write that "In order to calculate macroscopic values according to Eq.(11), point-wise addition of the distribution function ... is required. To perform this ...
2
votes
1
answer
68
views
Construct a two-qubit quantum gate with given action using the gates ${CNOT, H, T}$
Using the gates ${CNOT, H, T}$, construct a 2-qubit gate that acts as follows on the
computational basis
$ |0⟩⊗|0⟩ = |0⟩⊗|0⟩ $
$ |0⟩⊗|1⟩ = e^{pi*i/4}|0⟩⊗|1⟩ $
$ |1⟩⊗|0⟩ = e^{pi*i/4}|1⟩⊗|0⟩ $
$ |1⟩⊗|1⟩ ...
5
votes
1
answer
71
views
Qiskit: QAOAnsatz circuit with custom Hamiltonian
I am trying to implement the Quantum Approximate Optimization Ansatz by creating a parametrized subcircuit
$$V (α) = e^{−iH_M α_1} e^{−iH_D b_1} ... e^{−iH_M α_n} e^{−iH_D b_n}$$
with the custom ...
4
votes
1
answer
64
views
There exists an efficient gate that swaps values of different superposition kets?
Is there an efficient gate that swaps values of different superposition kets?
Let $ \alpha_i, \beta_i $ be string in $ \{0,1\}^n$, I'm wondering if there are a known results about the existence of ...
5
votes
1
answer
132
views
Is it essential to apply Quantum Singular Value transformation twice for Hamiltonian simulation?
I have been reading the paper A Grand Unification of Quantum Algorithms and I need clarification on the Hamiltonian simulation algorithm provided in the paper on page 23. . In procedure part point 2 ...
4
votes
1
answer
101
views
Constructing a pure state in Bloch sphere using 3 gates
We have the 3 following gates :
$$
H = \dfrac{1}{\sqrt{2}}\begin{bmatrix}1 & 1 \\ 1 & -1 \end{bmatrix}
$$
$$
R(\varphi) = \begin{bmatrix}1 & 0 \\ 0 & e^{-i\varphi} \end{bmatrix}
$$
$$
...
1
vote
2
answers
67
views
Creating a Qiskit circuit based on output states
I am trying to create a Qiskit circuit that:
starting in state |00⟩ generates a 1/2 * (|00⟩ - |01⟩ - |10⟩ + |11⟩)
state
starting in state |10⟩ generates a 1/2 * (|00⟩ + |01⟩ - |10⟩ -|11⟩) state
...
2
votes
1
answer
95
views
Creating a Qiskit Circuit sending $|00\rangle$ to $|1,-\rangle$ and $|11\rangle$ to $|0,-\rangle$
I am trying to create a circuit in Qiskit that performs the following transformations:
starting in state |00⟩ generates a √(2)/2 * (-|10⟩+|11⟩) state
starting in state |11⟩ generates a √(2)/2 * (|00⟩-|...
2
votes
0
answers
55
views
Creating maximally-entangled state in quantum circuits using Qiskit
I am trying to create a function in Qiskit that, given an integer n, returns a circuit of that size in which all qubits at the output are entangled together in a maximally-entangled state.
Some ...
0
votes
1
answer
84
views
How to do rotations along arbitrary multi-qubit basis
I was trying to implement Trotterization for a $k$-local Hamiltonian simulation using qiskit. For this, say I want to apply $e^{\lambda \sigma^1_z \otimes \sigma^2_z \otimes \sigma^3_z}$ (this being ...
0
votes
1
answer
61
views
Is there a toy oracle to show the feasibility of Grover's algorithm?
Is there any small 'toy' oracle that can show the feasibility of Grover's algorithm for searching (without using the geometric rotation interpretation)?
It is confusing that we cannot know the ...
0
votes
2
answers
69
views
What is measure_all function and the vertical dotted line represent in the circuit?
For the following code
qc = QuantumCircuit(2)
qc.cx(0,1)
qc.measure_all()
qc.draw()
Q1: What this vertical dotted line represent in the below circuit diagram?
Q2: '...
1
vote
0
answers
19
views
Why can't phonon vacancy be used to trap ions? [closed]
Provided symmetric coulomb repulsion forces, I can't see why one could not dope an ion on a hetero structure that could confine the ion without interacting with either substrate-circuit or ionized ...
1
vote
1
answer
46
views
Circuit Construction using IBM Quantum Composer
I am trying to create the following circuit in IBM Quantum Composer but I cannot add the last H gate correctly. It falls in the wrong place. Why?
3
votes
3
answers
145
views
does CNOT gate cause entanglement?
I have just started learning Quantum computing.
Pairs of qubits that are “entangled,” which means the two members of a pair exist in a single quantum state. Changing the state of one of the qubits ...
2
votes
2
answers
143
views
How to create a quantum circuit transforming $α|00⟩ + β|11⟩$ to $β|00⟩-α|01⟩+β|10⟩+α|11⟩$
Starting from an unknown state $α|00⟩ + β|11⟩$, where $\alpha,\beta$ are properly normalized, how can I create a circuit that transforms that state to a $\frac{1}{\sqrt{2}} (β|00⟩-α|01⟩+β|10⟩+α|11⟩)$ ...
0
votes
1
answer
66
views
How to create a quantum circuit checking whether two functions $f$ or $g$ are of the same type?
I want to create a quantum circuit that checks whether two functions f and g are of the same type, i.e., constant or balanced, or not. In other words, the output of the circuit should output 1 if both ...
-1
votes
1
answer
46
views
Quantum ripple-carry adder construction
I am attempting to build a 2-bit ripple-carry adder, using IBM Quantum Experience composer, but I'm confused on how to construct the carry transpose that is shown at the bottom?
1
vote
2
answers
69
views
Is there relation between IonQ native gates and the rotation gates $R_x$, $R_y$, $R_z$? [closed]
I know $GZ = R_z$ and $XX = MS$ but what about $GPI$ and $GPI2$?
1
vote
1
answer
47
views
How to construct Deutsch-Jozsa using CX and Hadamard gates?
How can I construct Deutsch-Jozsa?
I know that I need superposition and phase kickback, which means I need to apply Hadamard Gate at the beginning the at the end, I also need to apply an $X$ gate then ...
2
votes
2
answers
141
views
Remove Inactive Qubits from Qiskit Circuit
Is there any way to remove unused/inactive qubits from my Qiskit circuit? For example, I have the register $x0\_float$ who has an unused qubit $x0\_{float}_0$ (see image),
For context, my code is ...
5
votes
1
answer
125
views
Construction of unitary matrices built from linear combination of Pauli strings
Let's define $P_k \in \{ I, X, Y, Z \}^{\otimes n}$ and called each of these $P_k$ as a Pauli string (or word) then given that $$U = \sum_{k=1}^L c_kP_k $$ with the following conditions:
$\sum_{k=1}...
3
votes
1
answer
74
views
Grover's algorithm: Rotation in opposite direction
In Grover's algorithm we have the solution superposition $|\omega\rangle$ and the non-solution superposition $|s'\rangle$ (containing all non-solutions). Furthermore, we rotate our starting equal-...
6
votes
3
answers
244
views
Transforming a Quantum State to a superposition of its inverse [duplicate]
Does there exist a circuit that allows you to transform a quantum state into a superposition of its inverse; i.e., transform a state into an equal superposition of all basis states that are orthogonal ...
3
votes
1
answer
73
views
How does one derive quantum gates from a custom gate systematically?
I have been trying to solve a puzzle (not homework) in which I need to derive a quantum circuit from given a superposition, $|\psi\rangle$, where
$$
|00\rangle: 20\%\\
|10\rangle: 40\%\\
|11\rangle: ...
1
vote
1
answer
34
views
Implementation for a Translationally Invariant Algorithm
I'm working on inserting an item into a sorted list https://arxiv.org/pdf/quant-ph/9901059.pdf.
I would like to know how to implement this formula with Qiskit or just the circuit representing it :
...
4
votes
2
answers
127
views
What is wrong with my circuit for the fourth-root of $X$?
For learning purposes I would like to hand-craft my own circuit for the fourth-root of $X$, using $S$, $T$, and $\sqrt X$ gates.
Note that $\sqrt[4]X$ is of order four, and will need two ancillas to ...
2
votes
1
answer
56
views
Group of commuting Pauli matrices doesn't permit synthesis
I am working on learning grouped measurement and I began by reading this paper by a group out of UChicago showing a method for the synthesis of circuits for the grouped measurement of a set of ...
2
votes
0
answers
19
views
How to simulate these Floquet and Rotation operators for kicked top model?
In this and other papers relating to the kicked top model, it is mentioned that spin coherent states can be expressed as:
$$\left|\theta,\phi\right>=R(\theta,\phi)\left|j,j\right>$$ for given ...
1
vote
1
answer
39
views
Is there a construction and/or term for the following 'sandwich' measurement?
Suppose we have two projective measurements with elements $E_i$, $i=1...m$, and $F_j$, $j=1...n$. So we know $F_j^2=F_j$ and $E_i^2=E_i$ and $\sum_i E_i = \sum_j F_j = \mathbb{I}$. Then it is easy to ...
4
votes
1
answer
136
views
If $A^4=B^4=AB=I$, what is a good circuit for $\sqrt A\sqrt B$?
TL/DR
What is a good circuit for:
$$\frac{1}{2}\begin{pmatrix}
-i & i & 1 & 1 \\
1 & 1 & -i & i \\
i & -i & 1 & 1 \\
1 & 1 & i & -i\end{...
4
votes
2
answers
776
views
If two unitary operators commute, do their roots also commute?
This is probably a pretty basic linear algebra question, but suppose we have two unitary operators $A$ and $B$, acting on the same $n$ qubits of $|\psi\rangle$, with $[A,B]=0$ - that is, $A$ and $B$ ...
2
votes
1
answer
80
views
Is there a way to prove that the number of gates in Exercise 4.22 of Nielsen and Chuang's book is the smallest possible number?
I've been going over Nielsen and Chuang's Quantum Computation and Quantum Information and I ran into Exercise 4.22, which says,
Prove that a $C^{2}(U)$ gate (for any single qubit unitary $U$) can be ...