# Tag Info

4

As mentioned in the other answer, the Hadamard gate is a pi rotation (180 degree) around the $X + Z$ axis. That is, it is a 180 degree rotation around the purple axis indicated in the below figure: And the $Rx(\pi/2)$ follows by a $Rz(\pi/2)$ then follow by $Rx(\pi/2)$ does exactly this rotation as well. To have better visualization of this, suppose I ...

2

Any gate in the circuit can be seen as an element of SU(2), ignoring the global phase. Hence Hadamard gate can be changed into $$\sqrt{1/2}\begin{pmatrix} i & i\\ i & -i \end{pmatrix}.$$ And any element of SU(2) $\begin{pmatrix} a & b\\ -b^* & a^* \end{pmatrix}$can be changed into SO(3) with the formula below, which you can find it in some ...

3

I think the concept you are searching for is classically controlled gate, also known as conditional gate. A conditional gate only has an effect if a classical value matches a predefine result. In your case, $U2$ is conditioned by $\sigma_1$, for example. You can model that in Qiskit in the following way. First, define your $U$s from qiskit import ...

1

Simulator devices, like 'lightning.qubit' or 'default.qubit', can usually be run analytically. This is the default for most devices, but can be explicitly specified by setting shots=None. Devices inheriting from QubitDevice, like "default.qubit" and "lightning.qubit" currently rely on numpy.random for their random number generation. So ...

1

As noted in the comments by DaftWullie and me, the circuit is just missing a SWAP operation to return the qubit back to its original position... but this is not needed since your circuit only have one CNOT gate between the two end qubits. No other operations is being applied after the CNOT, hence you don't need to perform the SWAP again to return the qubit ...

2

qsel is an esoteric programming language similar to Ook! or whitespace. All it's doing is requiring you to decompose the circuit into the gateset [CS, H] and then representing the circuit with a ridiculous format. This is possible because [CS, H] is universal and because anything and everything can be efficiently encoded into a binary system that uses two ...

0

the control qubit governs the direction in which the target system experiences the unitary U. Can this be represented by a quantum circuit? Sure. For example, you can do this: Or this: Or lots of other things that are equivalent to "if control is off apply $U^{-1}$ otherwise apply $U$". In particular, note that if you have an explicit circuit ...

3

By the definition of $U1(\lambda)$ in qiskit, it is equivalent to $RZ$ up up a phase factor . Now note that: $$Z_0 Z_1 = Z \otimes Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \otimes \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0\\ 0 & 0 & -1 & 0\\ 0 ... 3 If you want to be more precise about it, quantum (pure, ket) states are elements of complex projective spaces, \mathbb{CP}^n. This is the set of equivalence classes of elements of \mathbb C^{n+1} modulo multiplication by complex scalars. So "gates" should really be described as maps between such equivalence classes. This is the projective ... 3 Two states that are the same up to a global phase are physically indistinguishable; some even go as far as to say that they are exactly the same state. Any U_{1} and U_{2} = e^{i\alpha}U_{1} will thus give physically indistinguishable states, meaning that there is nothing that U_{2} can do that U_{1} cannot. Would a quantum processor restricted to ... 1 When we make a measurement we project the state of the qubit to the z-basis (i.e 0 or 1) so in general it is not possible to measure a global phase. That said, Measuring such global phases is an important subroutine in many quantum algorithms such as Shor's algorithm. This can be done using the Quantum phase estimation algorithm. For details, check https://... 1 The short answer to your first question is no, there is no "single standard" of representing circuits in terms of text/language. The closest to a "single standard" of representing circuits visually is the qiskit and cirq draw functions which produce very similar results that are basically standard in format . Due to the fact that no ... 1 Where does that single evaluation of f(x) actually occur? Is it in the construction of U_f? U_f is an implementation of f in quantum gates. The evaluation of f occurs in the course of applying the gates making up U_f to the qubits. What is U_f in this case? I realize it depends on f, but how can we build it using at most one evaluation of ... 1 Suppose you have some state \newcommand{\ket}[1]{\lvert#1\rangle}\ket\psi (though note that you could make the identical argument using an arbitrary vector rather than a state), and you consider the action of some operator N on it. Here, N could be another gate, an operator representing some measurement, or just an arbitrary abstract operation that you ... 1 The easiest thing to do would be to check the circuit or just run several qubits through the circuit and measure these qubits. If checking the circuit or running several qubits through the circuit is not possible, then I think applying a CNOT gate to said qubit and a predetermined qubit should allow us to know. Set said qubit to be the control qubit and the ... 0 As far as I know there isn't a "once size fits all" algorithm, rather random bench-marking is performed to have a statistical accuracy of the gates your computer has. There wouldn't be much point to make it just as short as possible since you would ideally try as many times as you can your gates to get an accuracy for your computer. 3 The reason for this is that the actual oracle used in the algorithm is not obtained from oracle.to_operator(). If you look up the code for Grover's algorithm, you can see the following: grover_operator = GroverOperator(oracle=oracle, state_preparation=state_preparation, reflection_qubits=... 2 Yes, all quantum circuits can be view as a 2^n \times 2^n unitary matrix as n is the number of of qubits. Long way: For your circuits, first note the circuit identity: Now, using the circuit on the right, you can see that it can be written as$$ U = \big(CNOT \otimes I\big)\cdot\big(I \otimes CNOT\big)\cdot \big(CNOT \otimes I\big)\cdot\big(I \otimes ...

Top 50 recent answers are included