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)

Filter by
Sorted by
Tagged with
0 votes
0 answers
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 ...
0 votes
0 answers
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
1 answer
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 ...
3 votes
1 answer
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
2 answers
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
0 answers
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
0 answers
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: ...
-1 votes
3 answers
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 ...
2 votes
0 answers
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 ...
2 votes
1 answer
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
0 answers
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
1 answer
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 ...
0 votes
0 answers
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 ...
2 votes
1 answer
28 views

Computing the evolution of expectation values of the Pauli observable

I have a quantum state described by $N$ qubits, and I don't know anything about this quantum state except the expectation value of the single-qubit Pauli observables of the $i$-th qubit ($\langle X_i \...
0 votes
2 answers
76 views

Conditional quantum circuits

Let's suppose that we have the following $\text{GHZ}$-state $$|\psi\rangle = \frac{1}{\sqrt{2}}|a_1a_2a_3a_4\rangle + \frac{1}{\sqrt{2}}|b_1b_2b_3b_4\rangle$$ By using quantum gates, can we evaluate $...
0 votes
1 answer
86 views

How do I prove these gate identities?

How do I approach on solving the below two problems?
0 votes
1 answer
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 ...
2 votes
0 answers
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, ...
0 votes
0 answers
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 ...
0 votes
1 answer
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
2 answers
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 ...
3 votes
0 answers
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
1 answer
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 ...
3 votes
1 answer
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
1 answer
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: ...
2 votes
1 answer
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?
0 votes
0 answers
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
2 answers
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
0 answers
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
2 answers
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
1 answer
89 views

Number of qubits in quantum circuits in ibm qiskit

How to find number of Qubits ? ...
4 votes
0 answers
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 ...
0 votes
1 answer
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 ...
2 votes
2 answers
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: ...
0 votes
1 answer
31 views

"Mismatch between run_config.parameter_binds and all circuit parameters" when executing qiskit circuit

...
1 vote
3 answers
99 views

Quantum Circuit not drawing?

I have coded this from a tutorial: ...
2 votes
3 answers
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 ...
0 votes
1 answer
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 ...
0 votes
1 answer
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 ...
0 votes
2 answers
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
2 answers
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 ...
3 votes
1 answer
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 ...
5 votes
2 answers
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 ...
0 votes
1 answer
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 ...
0 votes
1 answer
161 views

How to create a quantum circuit to implement the same operations but acting on different qubits?

I want the draw the quantum circuit of the following Hamiltonian: $$H = - 4 \times X\otimes X\otimes X\otimes X - 4\times Z\otimes Z\otimes Z \otimes Z$$. I have been able to draw the circuits of $ - ...
2 votes
3 answers
93 views

How do we measure the probability of outcomes in a quantum computer if qubits collapse when measured?

I understand the idea behind Quantum Computing being that we superpose all possible states of a system of qubits and amplify the probabilities of whatever it is that we want depending on the circuit ...
0 votes
1 answer
53 views

What is the gate order in QuantumCircuit.data?

I'm trying to print the quantum gates in a circuit using the QuantumCircuit.data. However, the printed quantum gate order is not the same as the drawing. For example, in the QFT5 circuit generated ...
0 votes
1 answer
113 views

qiskit-nature accessing circuit

There are some very nice examples on how to handle circuits using qiskit. However, once we get to the qiskit-nature documentation, it feels like a complete new world for the untrained eye. I am ...
1 vote
0 answers
21 views

Efficient classical simulation technique to execute this specific quantum circuit

I have a quantum circuit similar to the ones used in VQE methods. One difference is that the angles of the $R_y$ rotations are limited in the range $[0, 0.2]$ (and chosen randomly). In my case, I have ...
0 votes
1 answer
104 views

How to change the qubits of a cirq Circuit?

I am constructing generic circuits, and I would like to change the qubits after creating the circuits. Is there a way in cirq to do so? for instance: ...

1
2 3 4 5
9