Questions tagged [quantum-gate]
For questions regarding usage, performance, implementation, application or theory related to quantum gates.
1,507
questions
0
votes
0
answers
20
views
Does the Hadamard gate synchonize the complex coefficients of the various states?
Suppose a two-qubit system has been set by a Hadamard gate into nearly equal superposition
$$ c_{00}|00\rangle + c_{01}|01\rangle + c_{10}|10\rangle + c_{11}|11\rangle $$
where $c_{00}, c_{01}, c_{10},...
0
votes
0
answers
18
views
How is the Pauli X, Y, Z implemented in order to "flip" the complex phase of the state probability?
Let's suppose that a 2 qubit system has the following wavefunction:
$$ \Psi = C_{00}\Psi_0\Psi_0 + C_{01}\Psi_0\Psi_1 + C_{10}\Psi_1\Psi_0 + C_{11}\Psi_1\Psi_1 $$
I suppose that what is meant by the &...
0
votes
0
answers
13
views
What would be the simplest physical implementation of a CNOT operation between spin and energy DoF's?
I'm working on a project where I'm considering a two-level system ("atom" for convenience) which possesses two linearly independent degrees of freedom, one of them a spin degree of freedom ...
0
votes
0
answers
11
views
Local Simulator for Aquila Aws
I am new to this field, so i would like to be sure that the local simulator is actually free.
Then, I would like to know how to check the number of qubits avaiable in the simulator.
0
votes
0
answers
15
views
How to create a multicontrol mcx gate or operation in cirq
In qiskit the method to apply a multi control with more than 2 control qubits is:
qc.mct ( listcontrols,targetbit,listancillas, mode=mode[i])
What is the ...
1
vote
3
answers
40
views
How to join different quantum circuits into one big circuit on specific qubits in qiskit?
I have a quantum circuit that loads the data and is acting on qubit q0,q1,q2 then another circuit that does the same on q3,q4,q5 ...
2
votes
1
answer
30
views
Converting a Matrix to a Gate in OpenQasm 2
I am a beginner when it comes to quantum computing so forgive me if this is a dumb question. Does anyone know how to create a gate from any matrix on OpenQasm2? Specifically, can anyone provide any ...
2
votes
1
answer
69
views
Why is Bernstein-Vazirani guessing considered a one guess?
In Bernstein-Vazirani algorithm, we can see the application of $CX$ gates from each qubit that represents the bit in state 1, onto the $|-\rangle$ state. It seems clear to me that the $CX$ will apply ...
1
vote
1
answer
33
views
Controlled unitaries in quantum singular value transformation
tldr -- Building general polynomials with QSVT requires implementing controlled versions of vanilla QSVT circuits. Is this a trivial task? Does it change the complexity? How is it done in practice?
...
1
vote
1
answer
22
views
How to best represent 5-Qbit codeword operator in Qiskit
We learned that in the 5-Qibit error correcting code, the logical zero state $ | \bar{0} \rangle $ is encoded in the form of $ \frac{1}{4} (\mathbb{1}+M_0)(\mathbb{1}+M_1)(\mathbb{1}+M_2)(\mathbb{1}+...
0
votes
1
answer
25
views
Nonsensical projection of initialized qubits in Qiskit
I wanted to try Qiskit by setting up two qubits initialized to $ | 11 \rangle $ or $ | 01 \rangle $ and two classical bits to measure those two initialized qubits.
For this simple demonstration, I ...
3
votes
2
answers
199
views
Name of quantum gate that cycles the Paulis
Background: There is a single qubit quantum gate of the form
$$
\frac{1}{\sqrt{2}}\begin{pmatrix}
1 & -i \\ 1 & i
\end{pmatrix}.
$$
As far as I know, this was originally introduced as the $T$ ...
2
votes
1
answer
85
views
Are quantum controlled non-unitary circuit operations possible?
Are quantum controlled non-unitary operations possible?
For instance can I define a controlled-reset where I reset a target qubit to $|0 \rangle$ if a controlled qubit is in the $|1\rangle$ state? How ...
0
votes
0
answers
52
views
Half-wave plate (HWP) Hadamard gate implementation
The transformation of a qubit encoded in the polarization state from $|H\rangle$ to the state $|+\rangle$ is theoretically achievable with an HWP@π/8. However, I rarely see this solution in ...
0
votes
1
answer
29
views
Qiskit_machine_learning QNNEstimator 'Estimator job failed' when using CU-Gates
I'm trying to construct a QNN using controlled arbitrary unitary gates. While some simple code versions work perfectly for controlled single rotations, the moment I add CU gate with parameters, the ...
0
votes
0
answers
17
views
How does using a controlled rotation gate , with the slope of the linear function as a parameter, loads that function onto the amplitude?
I was going through the paper Quantum Risk Analysis in the section III they came up with a technique, in which they represented the analytical function into a polynomial and then used the slope of ...
1
vote
1
answer
23
views
How to add noise mode in Sampler (SamplerQNN) in qiskit for quantum neural network?
I would like to add a noise model to one of the tutorial examples of quantum machine learning in the Qiskit site (PyTorch QGAN implementation).
I used the following codes
...
0
votes
1
answer
17
views
Creating a parameterized Operator in Qiskit that cannot be decomposed into Qiskit supported gates
I am trying to create a custom ansatz to use the built-in Qiskit VQE() function. My ansatz is composed of single qubit gates and a hamiltonian gate which cannot be decomposed into Qiskit supported ...
0
votes
0
answers
15
views
Derivation of complexity for data encoding schemes
Could anyone help to derive the space-time complexities of the following different data encoding schemes ?
0
votes
1
answer
15
views
Qiskit syntax to remove all gate operations for a given qubit line in a circuit
I am looking for a method to remove all operations for a given qubit in a Qiskit circuit. Here, I am looking to remove potentially many gate operations that are operating on that qubit line. Ideally I ...
3
votes
2
answers
63
views
Transformation of 0 state to superposition of 0 and + state with only using single qubit gates
How to transform a qubit from state $|0\rangle$ to $(|0\rangle+|+\rangle)/N$ by only using an additional qubit, a controlled Hadamard gate, a Hadamard gate and a $Y$ or $Z$ gate? Sequence of the gates ...
0
votes
0
answers
33
views
Understanding the meaning of [2, 2] for input_register and target_register in a custom Cirq gate
I'm learning a custom gate implementation from google Cirq official tutorial of shor algorithm(https://colab.research.google.com/github/quantumlib/Cirq/blob/master/docs/experiments/shor.ipynb#scrollTo=...
0
votes
1
answer
44
views
What state do you get applying the pauli Y gate to $|\pm\rangle$? [duplicate]
I know it's a basic question but what state gives when you apply pauli $Y$ gate over states $+$ and $-$?
If I apply $Y|+i⟩ = |+i⟩$ or $Y|0⟩ = i|1⟩$, but I don't understand what do you get when you do $...
1
vote
0
answers
26
views
Question on circuit function evaluation
In this question, from what I understand, the circuit on the right hand side can not be evaluated for f(0) so depending on value of y, we will have two different f(0)s so this equality of circuits ...
1
vote
1
answer
59
views
Is every diagonal gate whose non-zero entries are $2^k$th roots of unity in the two qubit Clifford hierarchy?
Does the two qubit Clifford hierarchy contain all diagonal gates whose entries are $ 2^k $ roots of unity?
In particular, is it true that every $ 4 \times 4 $ diagonal matrix whose diagonal entries ...
0
votes
1
answer
36
views
SX operator and superposition
I am running some tests using the probabilities we get from statevector to assert values in qiskit. For instance, with two qubits and a hadamard gate on the first one we have:
...
8
votes
0
answers
132
views
Can you programatically check whether a given set of gates is universal?
I am wondering if there is an automated way to determine whether a given set of quantum operations is universal.
More precisely given a set of 1 and 2 qubit gates can we write a program to determine ...
2
votes
1
answer
67
views
Does SZS equal Z?
I am completely new to quantum computing and playing QuantAttack. While playing, I found something strange: SZS turns into Z.
According to the Wikipedia article that the game recommends reading, SZS ...
2
votes
0
answers
34
views
Quantum circuit runtime
I want to estimate the execution time of some experiments, and I would be interested to know how the time needed to run a quantum circuit grows in function of the number of qubits and the parametric ...
0
votes
0
answers
29
views
Conjugation of Unitary Matrices in Quantum Channel
A quantum channel is given in the form $U(\rho)=\sum_{j}p_jK_j\rho K_j^\dagger$. I have read in another thread that a quantum channel is the generalized version of a quantum gate (represented by a ...
2
votes
2
answers
100
views
Conditional unitary based on output of a function
I read about dynamic circuits in Qiskit which uses an if-test. My question is how can we give a custom function in the if-test? Based on its documentation, we can only provide a classical register to ...
0
votes
3
answers
77
views
How to represent Beam-Splitter and Kerr gates as basic quantum logic gates?
I want to know how to convert these exponential forms to tensor products of well known logic gates (like the ones built into Qiskit). My goal is to program the Beam-splitter-Kerr ansatz circuit for ...
1
vote
1
answer
66
views
Origin of the names of S-gate and T-gate [duplicate]
I have had several opportunities to explain quantum computers to the general public, and I am always at a loss to explain S gate and T gate. Could someone please tell me if there is an origin of the ...
3
votes
3
answers
468
views
When does CNOT entangle?
Let $|\psi_1\rangle$ and $|\psi_2\rangle$ be qubit states such that $\text{CNOT}|\psi_1\rangle \otimes |\psi_2\rangle$ is entangled. I'm interested in if there is a simple condition that this imposes ...
3
votes
2
answers
68
views
Decomposition of rotational matrix using {$H, T$} only
We know that {$H,T$} is universal. However, I don't understand how we can generate any rotational matrix from this set. For example, how can I build
\begin{bmatrix}
cos(\pi/8) & sin(\pi/8)\\
...
1
vote
1
answer
17
views
How to mathematically represent the $CSWAP_{1 \rightarrow 0,2}$ gate?
The controlled-$SWAP$ gate represented in the circuit above can be written down by the following mathematical expression:
$$
CSWAP_{0 \rightarrow 1,2} = |0\rangle\langle0| \otimes I_{4 \times 4} + |1\...
1
vote
2
answers
84
views
What is CNOT1,3 gate? In general, what is CNOT1,n gate? [duplicate]
I'm familiar with the CNOT gate and I know the matrix of that gate.
But what is CNOT1,3 gate and what is its matrix, how to compute it?
0
votes
0
answers
64
views
Can Someone Help Me Create a Custom Feature Map with the Latest Version of Qiskit?
I am trying to create a custom feature map that I can use as input to the VQC classifier for classification purposes. I attempted to follow a GitHub repository: https://github.com/qiskit-community/...
0
votes
3
answers
56
views
How to prove that CNOT and Rz gates are permutable?
How to prove that CNOT and Rz gates are permutable?
I tried to equate their switch to zero and calculate it, but for this you need to multiply the matrices. But the 4x4 and 2x2 matrices cannot be ...
-3
votes
1
answer
30
views
What are the expected measurement results in the diagram below? [closed]
I ask you to give a mathematical solution to this problem
0
votes
0
answers
23
views
Physical implementation of error detection scheme with an ancilla qubit
I have two data qubits coupled with an ancilla qubit. I need a Hamiltonian H such that:
If the ancilla qubit is in state $|0⟩$, do nothing on the 2 qubits.
If the ancilla qubit is in state $|1⟩$, ...
1
vote
2
answers
55
views
Can a classical circuit of size $2^k$ be modelled by a quantum circuit of size $k$ or vice versa?
There is something fundamental I don’t understand about quantum computing and hence the following question may be very trivial or stupid for which I apologize in advance.
A boolean function $f:\{0,1\}^...
2
votes
0
answers
32
views
Can we show that a quantum circuit with Poly(n) gates has a Hamitonian with Poly(n) terms?
It is already known that if the Hamiltonian is a sum of Poly(N) Pauli terms, it has an efficient implementation as a quantum circuit. This should mean that the circuit can be implemented with Poly(N) ...
0
votes
0
answers
14
views
Quantum image encryption using NEQR and QTRNG
I have represented a 2x2 grayscale image using NEQR and I generated a key image using QTRNG. After the xor operation between the original and key image, I only need the encrypted image value, to avoid ...
1
vote
1
answer
51
views
CZ-gate in neutral atoms computer with Rydberg pulses
I'm trying to understand the protocol to obtain a CZ-Gate with two qubits and Rydberg pulses : https://queracomputing.github.io/Bloqade.jl/dev/3-level/#pulse-CZ-gate
Apply Rydberg π-pulse on control ...
1
vote
2
answers
58
views
Which IBM composer gate realizes the 2x2 single-qubit $-I$ matrix?
Which IBM Quantum composer gate is used to realize the 2x2 matrix $-I$ acting on a single qubit? And how is it called?
2
votes
1
answer
42
views
Diagonal gates in qubit Clifford hierarchy are generated by $ C^i Z^{1/2^j} $
Let $ \mathcal{C}^{(t)} $ denote the $ t $ level of the $ n $ qubit Clifford hierarchy.
Let $ \mathcal{F}^{(t)} $ denote the collection of all diagonal gates in $ \mathcal{C}^{(t)} $. $ \mathcal{C}^{(...
1
vote
1
answer
71
views
How to represent as a matrix the CSWAP on non-adjacent qubits?
I was reading this post recently on the CNOT gate between non-adjacent qubits in a 3 qubit system.
And the accepted answer generalizes to general controlled unitaries, saying that any controlled ...
1
vote
0
answers
38
views
Quantum algorithm with $|y\rangle \mapsto (-1)^{xy}|y\rangle$ for all $y$ with at most $T$ many $1$s
Given an N-bit string $x$, which we can access by queries, give a quantum algorithm that maps $$|y\rangle \mapsto (-1)^{xy}|y\rangle$$ for all $y \in \{0,1\}^{N}$ that have at most T many $1$s and the ...
1
vote
1
answer
46
views
How does grid or ring (coupling map topology) affect the depth of the circuit?
Why does different grid maps have different depths, i.e why does a 10x10 grid has more depth than 10x3. Also how does topology affect the depth?