# Questions tagged [quantum-circuit]

a model in which a computation is a sequence of quantum gates, which are reversible transformations on an n-qubit register (the quantum-mechanical analog of an n-bit register)

443 questions
Filter by
Sorted by
Tagged with
6 views

### An unexpected result of the Implementation of a finding minimum values algorithm using a qRAM

Motivated by the article Quantum algorithm for finding minimum values in a Quantum Random Access Memory, I'm training to implement a simplified version of the proposed algorithm. But the output isn't ...
11 views

### Why are the results of this Fourier adder circuit wrong?

I am attempting to implement the adder found in this paper. Here is the code: ...
1 vote
29 views

### Simplifying quantum circuits

I am very new to quantum circuits and am unsure how to simplify them. Say I'm given a very simple circuit: and I want to simplify it using basic quantum gates. I'm not looking for an answer, but more ...
83 views

### 4 qubit QFT decomposition in the qiskit textbook

I am reading about the quantum Fourier transform (QFT) in the qiskit textbook, but got stuck at the last part of it which shows a decomposed version of the 4 qubit QFT circuit. It seems that the ...
1 vote
139 views

### Symmetric Universal Quantum Cloning Machine (UQCM) $N \to M$ for unknown states

Does it exist a schematic diagram of the quantum circuit implementing the symmetric UQCM $N \to M$ for unknown states? If yes, does anyone know a Qiskit implementation of it?
1 vote
28 views

### Can the optimal synthesis of a parity matrix generate complex combinations of CXs?

Consider the method described in Optimal Synthesis of Linear Reversible Circuits. I am led to think that, for any parity matrix given in input to such a method, the output would be a sequence of CX ...
1 vote
28 views

### MissingOptionalLibraryError: "The 'pdflatex' library is required to use 'LaTeX circuit drawing' [closed]

Trying to run the below code block in a jupyter notebook in Windows 10: ...
124 views

### Specify bond dimension in tensor network simulation of quantum circuit (python)

I'm looking for a Python library that can help me simulating quantum circuit using Tensor Networks. In particular I would like to write a quantum circuit using the constiuent quantum gates and then ...
58 views

### Complexity of the quantum circuits that are needed to implement communication protocol?

Consider the following simultaneous communication problem. Alice and Bob do not share any entanglement or any common randomness, and cannot communicate directly with each other. As inputs, x is given ...
60 views

### Quantum circuits, quantum Turing machine and universal quantum computer-comparing different models of quantum computations

Forgive me if this question was already asked somewhere on this site-I haven't found it but it is possible that I've overlooked it. So basically, I would like to summarize different notions of quantum ...
1 vote
30 views

### Error in repeated applications of a quantum channel?

Suppose I have two quantum channels. Assume they they consist of $r\in \mathbb{Z}$ applications of unitaries, $U$ and $V$ respectively. Let the error between the channels acting on some state $\rho$ ...
1 vote
51 views

### How to implement non-unitary operator in qiskit?

I am trying to make a operator for S-Box for AES. The matrix is non-unitary. When I use Operator command for declaring it as a function. It gives error, the matrix is non-unitary. Thus, the qiskit ...
18 views

### Optimizing Selection of the Optimal Qubit in a 30-Qubit Quantum Circuit

I am working with a quantum circuit consisting of 30 qubits, and for each qubit, I have allocated a dedicated classical register to record individual measurement results. When I execute this circuit ...
28 views

86 views

### How do I prove these gate identities?

How do I approach on solving the below two problems?
166 views

### How to get the matrix of a quantum circuit when the ancilla qubit is set to a specific state?

I would like to get the matrix form of a quantum circuit, representing the operation on normal qubits, after specifying the ancilla qubit at a given state. Is there any way to realize this using ...
36 views

### Understanding circuit to Hamiltonian embedding where we do not have a separate clock register

I am trying to understand the clock construction given in this paper, to embed a circuit to a Hamiltonian, which doesn't need to access a separate clock register. The construction, at a high level, ...
36 views

### Quantum Crosstalk in gate scheduling with different gates

I am working on quantum crosstalk, specifically on CNOT and SWAP gate operations that lead to crosstalk. I have encountered works that decompose CNOT and SWAP with iSWAP and CZ gates. I would like to ...
174 views

### How do I bound parameters in RawFeatureVector with ParameterizedInitialize in Qiskit?

I'm not sure how to bind the parameters in the Qiskit RawFeatureVector circuit. Here is my code: ...
1 vote
108 views

### How to design a circuit which produces the state $|\psi\rangle = \frac{1}{2}|{010}\rangle + \frac{\sqrt{3}}{2} |{101}\rangle$?

The quantum state to achieve is: $$|{\psi}\rangle= \frac{1}{2}|{010}\rangle + \frac{\sqrt{3}}{2} |{101}\rangle$$ So far I know how to produce the $$\frac{1}{2}|{010}\rangle$$ state in qiskit as ...
170 views

### How to design a RF-SQUID qubit by Qiskit Metal?

I am now learning how to use Qiskit Metal to design superconducting circuits. I found that there are only several transmon qubits in the library. Can I design an RF-SQUID qubit by using Qiskit metal? ...
1 vote
123 views

### Qiskit implementation for projecting a hermitian operator and finding its eigenvalues

I'm brand new to quantum computing and have been learning Qiskit for a few weeks now. I am attempting to find the number of 0 eigenvalues of the following operator: $$T = PHP$$ where $P$ is a ...
116 views

### Output of my quantum circuit to create 3-qubit GHZ-like state does not make sense mathematically

I want to create the GHZ-like state, $|\Psi\rangle = \frac{1}{\sqrt{2}} \left(|011\rangle - |100 \rangle \right)$. I build my circuit in the following way. apply the x gate to the first and third ...
1 vote
67 views

### If Statement OpenQasm 2.0

in the documentation for OpenQasm 2.0 it says one can use an if statement like so: if(c_reg==int) Quantum Operation. However, I would like to execute the following: ...
49 views

### Does subtraction circuit have a class like full or half Carry adder circuit in qiskit? one subtraction circuit code-example in qiskit?

I need a subtraction circuit to calculate Laplacian in edge processing, but I didn't find any class in qiskit.Do I have to write the code myself?
20 views

### How to account for a partial derivative term in an Operator, in Qiskit?

The crystal momentum p1 = h bar * k and this is defined in the reciprocal momentum, I am guessing this p1 is not a real momentum since the reciprocal space is an imaginary space which we use for ...
1 vote
300 views

### Gradient descent for a quantum-classical hybrid neural network

I am working on implementing a quantum-classical hybrid neural network in qiskit where input data is encoded on a quantum circuit (with say 3 qubits) using a ...
1 vote
12 views

### How to get rid of the indices of qubits at the side of a custom gate when visualizing a circuit (IBM Qiskit)

I have written a function that applies the Hadamard gate to all qubits in a circuit, and use the draw() function to visualize the circuit. However, there is this ...
1 vote
78 views

### Can any Qiskit circuit be converted to a gate?

I am trying to convert the following qiskit QuantumCircuit to a gate using to_gate() method. ...
1 vote
89 views

### Number of qubits in quantum circuits in ibm qiskit

How to find number of Qubits ? ...
108 views

### What's the circuit to create superpositions corresponding to efficiently integrable probability distributions?

See article here: https://arxiv.org/abs/quant-ph/0208112 There are two steps in this procedure that I am curious about. First off, they suppose one can construct a circuit which efficiently performs ...
50 views

### How to assign new parameters to an existing quantum circuit?

Say I have a quantum circuit like this This is an ansatz for solving linear equation provided in the Qiskit's textbook In the textbook, it was shown how to find the optimal parameters of this ansatz ...
263 views

### How to get QASM code from an Amazon Braket circuit in Python?

As an example, consider the following Circuit defined by using the Python amazon-braket-sdk: ...
31 views

...
1 vote
99 views

### Quantum Circuit not drawing?

I have coded this from a tutorial: ...
239 views

### Controlled NOT gate which flips target when at least one of the control qubits is |1>

I would like to have a controlled NOT gate which flips my target qubit when at least one of the control qubits is |1>. I would like to be able to do this for arbitrary n. For a system with 2 ...
114 views

### Exact expectation value of a quantum circuit simulated with the matrix product state method in qiskit

If I use the matrix product state method in Qiskit to simulate quantum circuits, I can obtain the exepctation value of an observable by using a finite amount of shots. Is there a way to obtain the ...
235 views

### How does CircuitQNN in qiskit machine learning calculate output probabiltiies?

This is a question I have based on this previous question on calculating quantum gradients in quantum-classical hybrid circuits. I would like to understand the output of the ...
74 views

### Applying Suzuki-Trotter approximation to a Quantum Circuit in Qiskit

I am trying to apply the Suzuki-Trotter approximation to a quantum circuit in Qiskit. However, when I attempt to use the st.synthesize() method on my quantum circuit, I encounter the following error: <...
1 vote
112 views

### Initial and final circuit layout with BQSKit compiler

The question concerns logical to physical qubit mapping when compiling quantum circuits with BQSKit. In Qiskit, I can specify the initial layout for the transpilation. It is also possible to retrieve ...
174 views

### How to come up with Simon's Algorithm circuit for this 3 qubit system? (given truth table & s)

I have this truth table, knowing that the S = 110. However, how do I come up with a circuit by recognizing the pattern? It has taken me hours but my 2 brain cells don't seem to get it... I know there ...
167 views

### What is the shortest-circuit-depth quantum-benchmarking algorithm?

An algorithm implementing a model whose results are known, and from the known results, the benchmarking of the device could be done. What is the currently known shortest circuit depth algorithm that ...
58 views

### In qiskit, how to consider only readings conditioned to some measurement outcome?

In a five qubit (q0, q1, q2, q3 and q4) quantum circuit, I need to consider only those measurement readings of q0, q1 and q2 for which q3 and q4 measures 0. More specifically, I am trying to implement ...