# Questions tagged [circuit-construction]

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

197 questions
Filter by
Sorted by
Tagged with
24 views

### Why I am getting transpilation error while executing the following IBM Quantum Experience code?

While executing the following circuit (consisting 16 qubit and 4 classical bits) I am getting "Error in transpilation process. [1003]" error. I have a group of 2 operations (you can observe circuit ...
40 views

### Can we add two classical registers in IBM Quantum Experience?

Suppose I have 01 and 11 in classical register 1 and 2 respectively in IBM quantum experience circuit. I want 01 + 11 = 00 mod 4. Can it be done?
25 views

### Toffoli gates with Hadamard coins (QISKIT)

I am creating the following circuit with Qiskit (2Toffoli gates controlled with coins) And to set the coins for one iteration of the circuit i do the following : ...
54 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 ...
55 views

### How to make circuit of a 32 X 32 matrix?

I have a 32 X 32 matrix show in the picture below and I want to make a circuit for this matrix. Also in the picture below to the matrix picture I have written the each column in bra-ket notation to ...
71 views

### How to prepare mixed states on a quantum computer?

I am a little bit confused by density matrix notation in quantum algorithms. While I am pretty confident with working with pure states, I never had the need to work with algorithm using density ...
118 views

### If an auxiliary qubit is allowed, how to construct toffoli gate in easier way?

We know if we don't use auxiliary, the construction of Toffoli gate will be: However, if now you are allowed to use one auxiliary qubit, how to realize a CCNOT in a simplier way? (Can we only use X,Y,...
45 views

### Achieve a control gate with 2 hadamard coins

I want to implement two Toffoli gates with 4 qubits: 3 serving as control qubits (the 2 hadamard coins and one other qubit) and the last one as target qubit and 3 qubits (2 coins 1 target qubits) as ...
75 views

### Simpler implementation of the Toffoli gate on IBM Q for special circumstances

On current quantum hardware, a depth of circuit is constrained because of noise. In some cases, results are totally decoherent and as a result meaningless. This is especially true when Toffoli gates ...
294 views

### Minimum number of CNOTs for Toffoli with non-adjacent controls

I want to decompose a Toffoli gate into CNOTs and arbitrary single-qubit gates. I want to minimize the number of CNOTs. I have a locality constraint: because the Toffoli is occurring in a linear array,...
190 views

### How to construct a IBM Quantum Experience circuit for the following state transformation?

Please help me in building IBM Quantum Experience circuit for: $$M|0\rangle = \frac{1}{2}(|0\rangle+|1\rangle+|2\rangle+|3\rangle)$$ Edit: Is it possible to make a circuit for a general ...
57 views

### Swap test to calculate inner product with qiskit for multi-qubit states

Is it possible to perform a controlled swap test with multiple targets with qiskit? I have tried using cswap(ancilla[0],qb1,qb2), where qb1 is an n-qubit register and qb2 is as well
21 views

### Vetting the Circuit Gate for a 3 Qubit Entanglement [duplicate]

While I've seen plenty of examples on how to entangle two qubits, I've (unfortunately) not seen any on the generalized version of entangling multiple qubits, nor how you know your circuit is correct. ...
176 views

### Implementing QFT for Shor's Algorithm?

I'm studying Shor's algorithm. This diagram shows a calculation of $4^x\mod21$. I don't understand how this expresses $4^x \mod21$. Could you explain this? For example, by showing another calculation ...
32 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 ...
118 views

74 views

### Minimum number of ancilla qubits required to make a transformation unitary?

Background The counterpart of a NOT gate is the CNOT gate. They make use of ancilla qubits to achieve this. Question Given an arbitrary non-unitary transformation what are the minimum number of ...
92 views

### How to construct the unitary representation of the function $f(x, y, z) = (x \oplus y, y \oplus z)$?

Consider the function $f:\{0, 1\}^3\to\{0, 1\}^2$ with $f(x, y, z) = (x \oplus y, y \oplus z)$. How would you construct its standard unitary representation?