New answers tagged

0

Just to emphasise the point on the accepted answer... The two gates, when applied to a specific state, give the same output. That does not mean they are the same, because the action on another state may be different (and I don't just mean a global phase). For example, if you take the state $|+\rangle=(|0\rangle+|1\rangle)/\sqrt{2}$ then $$ H|+\rangle=|0\...


7

While Hadamard gate is defined as $$ H= \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, $$ $y$-rotation by $\pi/2$ leads to gate $$ Ry(\pi/2)= \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & -1 \\ 1 & 1 \end{pmatrix}. $$ So, there is a difference in position of -1 in the second column. Application of the $X$ gate returns the -1 in $...


6

If you are trying to implement a fault-tolerant quantum computation, you need to implement unitary gates that act on logical qubits. You typically have a finite set of these gates available, and what you really care about is making your operations in such a way as to keep the fault-tolerant threshold as small as possible. If you calculate a fault-tolerant ...


1

Leaving this here. Recently published, might be useful for this question. Efficient Evaluation of Exponential and Gaussian Functions on a Quantum Computer https://arxiv.org/abs/2110.05653


1

There currently isn't a controlled Pauli product gate in Stim. You have to decompose it into a series of CX, CY, and CZ gates. # Apply X1*Y2*Z3 controlled by qubit 0 CX 0 1 CY 0 2 CZ 0 3 # Apply X1*Y2*Z3 if latest measurement result was True CX rec[-1] 1 CY rec[-1] 2 CZ rec[-1] 3


0

5.1 Implementation of oracles P_A and P_b (p. 13) https://arxiv.org/pdf/1910.10649.pdf


5

The matrix $$ M = \frac{1}{\sqrt{2}}\begin{bmatrix}-i & 1\\-1 & i\end{bmatrix} $$ resembles $$ X/2 = \frac{1}{\sqrt{2}}\begin{bmatrix}1 & -i\\-i & 1\end{bmatrix}\tag1 $$ where we follow the notation $\pm X/2$ for the $\pm\frac{\pi}{2}$ rotation around the $X$ axis as used in the table B.6 on page 101 in Julian Kelly's PhD thesis. We can make ...


1

Qiskit defines the $RX$ gate as follows: $$ RX(\theta) = \exp\left(-i \frac{\theta}{2} X\right) = \begin{pmatrix} \cos{\frac{\theta}{2}} & -i\sin{\frac{\theta}{2}} \\ -i\sin{\frac{\theta}{2}} & \cos{\frac{\theta}{2}} \end{pmatrix} $$ Thus, setting $\theta = \pi$, would give us: $$ RX(\pi) = \...


1

Retrieving an arbitrary qubit, even using an ancilla qubit, would violate the no-cloning theorem. This can be seen in the simplest case where the array stores a single qubit and is indexed by a single qubit. So the array is of the form $$ \left|\psi\right> = a \left|00\right> + b \left|01\right> + c \left|10\right> + d\left|11\right>$$ where $|...


3

The decomposition they give is the following: $$ R_z(\theta) = R_x\left(\pi / 2\right) R_y(\theta) R_x\left(-\pi / 2\right) $$ Therefore, the Qiskit code would look like: from qiskit import QuantumCircuit from qiskit.quantum_info import Operator import numpy as np theta = np.pi / 4 qc = QuantumCircuit(1) qc.rx(-np.pi / 2, 0) qc.ry(theta, 0) qc.rx(np.pi / 2,...


3

You can decompose the T gates themselves to create a Toffoli Gate. Here is one way of doing this:- You can refer to this Qiskit chapter if you are interested and want to understand gate decomposition: https://qiskit.org/textbook/ch-gates/more-circuit-identities.html


Top 50 recent answers are included