New answers tagged

3

It's impossible to do it in polylogarithmic depth, because for a modular multiplication (or even just an increment!) the output value of the most significant bit is a function of every other input bit. One spot is affected by all the other spots. So your runtime has to be at least as long as the longest path between that spot and any one of the other used ...


1

I think a good place to start is the chapter on quantum image processing in Qiskit Texbook. It introduces possible representations as well as some working code. A popular format for quantum storage of image data is FRQI. The chapter linked above treats about it in practice, though the original paper could be useful if you are interested in the intuition ...


3

TL;DR: There is no universal gateset with transversal implementation in the repetition code. This is the case not due to Eastin-Knill theorem, whose assumptions the code fails to satisfy, but due to the fact that logical states have varying amount of entanglement between physical qubits and that transversal operators cannot change the amount of it. ...


1

Would the Operator Flow feature be helpful? https://qiskit.org/documentation/tutorials/operators/01_operator_flow.html


3

From my experience, most of the time you can restructure your code to avoid the need for inserting gates in the middle of a circuit. That said, if you already know the insertion points at the time of circuit creation but you don't know the gates to be inserted, you can add placeholders at these places and replace them later with whatever gates you want. from ...


3

The short answer is no, there is no way to insert gates in a middle of a circuit. As explained, the issue https://github.com/Qiskit/qiskit-terra/issues/4736 has a longer explanation on why not. The mid size explanation is the following: generally speaking, a circuit is not a sequence of instructions and, therefore, there is no indices to insert things in. A ...


3

You cannot do any better than your stated decompositions. For example, think about cNOT. It is maximally entangling in the sense that a separable input (e.g. $|+\rangle|0\rangle$) can give a maximally entangled output. Any unitary that is a single controlled-NOT dressed by arbitrary single-qubit operations must also have this property, as single-qubit ...


5

I think the key fact you're missing is that $Z_2 \otimes Z_3 \otimes Z_4 = Z_2 \otimes Z_3$ when you know qubit 4 is in the $|0\rangle$ state; in the +1 eigenstate of $Z$. I'm not sure why that paper is using six CNOT gates instead of four. The ancilla isn't helping. Maybe it's just supposed to be an example for a more general case where it is helpful.


1

In this context, a "superoperator" is generally a linear map between linear operators, that is, an element of $\mathrm{Lin}(\mathrm{Lin}(\mathcal X),\mathrm{Lin}(\mathcal Y))$, if $\mathcal X,\mathcal Y$ are input and output Hilbert spaces. Whether a gate is represented as a superoperator depends on how you are modeling states. If you describe a (...


3

A canonical reference for gate decompositions is Barenco et al., Elementary gates for quantum computation. In particular, it also contains recipes to decompose an arbitrary $n$-qubit unitary into elementary gates (which, by parameter counting, requires about $4^n$ gates, assuming each gate has one real parameter.)


2

It should be $S^{-1}R_yS$ instead of $SR_yS^{-1}$. Change from one basis into another basis, you found the right matrix $S$ while the wrong method. For a pedagogical method about change basis(not only in quantum mechanics), you may refer to this link.


2

I believe this Q&A answers your question about decomposition in detail: Minimum number of 2 qubit gates to build any unitary In short, you are correct that the lower bound for a number of 2-qubit gates necessary to implement an arbitrary unitary $U$ is $\Omega(4^n)$ where $n$ is the number of qubits. I am not entirely sure what authors meant, but perhaps ...


1

I think there are two layers to that question. Physically, this would probably be implemented with swaps or post-interpretation. In other words, in your example qubits 1 or 3 would be swapped with 2, so that it now C-x can be performed on the neighoring qubits, and afterwards the swap would be undone. Swap can be implemented either physically (for ex. in ion-...


1

Here I am providing working code: import numpy as np import math as m idn = np.array([[1, 0], [0, 1]]) h = (1/m.sqrt(2))*np.array([[1, 1], [1, -1]]) t = np.array([[1, 0], [0, (1/m.sqrt(2))*(1+1j)]]) tdag = np.array([[1, 0], [0, (1/m.sqrt(2))*(1-1j)]]) cnot_adj = np.array([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, ...


1

In superconducting quantum computers, gates are implemented with microwave pulses. So, the gates do not have input/output nodes (wires) in classical sense. It it true, that qubits are connected among each other (although not always fully) with coupling capacitors in order to apply two-qubits gates, however, again they are microwave pulses. Another physical ...


4

In quantum circuits, the qubits are represented with the "wires" (the horizontal lines on which gates are chained) rather than "input" and "output" nodes. They usually start in the $|0\rangle$ state, their state changes as the gates are applied, and the classical output is the readout of the measurement nodes.


1

The question is a bit ambiguous but yes you can think of unentangled states as independent and the process of entanglement as "adding" correlations. Take the following unentangled state for instance: $$\vert 00 \rangle + \vert 10 \rangle$$ Then the probability distribution of each qubit is independent of the other: $$P(q_1|q_0) = P(q_1)\>\> ...


0

Your unitary matrix is $$U_H=\begin{pmatrix} \cos{\small(2\theta)}-i\sin{\small(2\theta)} & 0 & 0 & 0\\ 0 & \cos{\small(2\theta)} & -i\sin{\small(2\theta)} & 0\\ 0 & -i\sin{\small(2\theta)} & \cos{\small(2\theta)} & 0\\ 0 & 0 & 0 & cos{\small(2\theta)}-i\sin{\small(2\theta)} \\ \end{pmatrix}$$ That is, $$...


5

It's true that the $|\pm\rangle=\tfrac{1}{\sqrt{2}}(|0\rangle\pm|1\rangle$ states are orthonormal eigenvectors of the $X$ gate (meaning they are "unneffected" by $X$), but this does not mean that $X$ doesn't have any effect on states in other superpositions. For instance, consider the state $|\psi\rangle=\frac{1}{\sqrt{4}}|0\rangle+\frac{\sqrt{3}}{...


5

This depends on what superposition you're in. Recall that the not gate can be written in the form $$ \left(\begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array}\right) $$ so it has eigenvectors $(1,\pm 1)$. The whole point of an eigenvector is that when the matrix acts on it, it's unchanged. So, the state $H|0\rangle$ (Hadamard acting on a 0 input state) is $(...


2

This is an addendum to glS's answer and concern the issue of an "axis" in higher dimensions. Let us set $D:=N^2-1$ such that we are interested in elements $R\in SO(D)$. $R$ is in general only diagonalizable over the complex numbers and since it is a special orthogonal matrix, its eigenvalues generally come in conjugate pairs $\lambda_i = \omega_i$ ...


3

A few remarks: You can define a "Bloch representation" for higher-dimensional states. This amounts to representing density matrices by their coefficients in some basis of Hermitian (generally traceless) operators. It is however worth stressing that in more than two dimensions, you don't get a hypersphere but a much more involved kind of surface. ...


2

I'm not sure what the exact general requirement is, but a sufficient requirement is: The qubit's computational basis must be a function of other qubits' computational basis value. For example, the state should have the form: $$\sum_k \alpha_k |k\rangle |\dots\rangle |f(k)\rangle$$ where $f$ is some classical function that outputs a single bit. The fixup ...


2

This is a bit of a circular answer. But... if you need to do a lot of these operations, you can catalyze it. Given the phase gradient state $|0\rangle + e^{i 2 \pi / 3} |1\rangle + e^{i 4 \pi / 3} |2\rangle$ you can apply a controlled mod 3 increment to get phase kickback of exactly 120 degrees onto the control. If you decompose the Toffolis inline, using 7 ...


7

It's very similar to the same question for classical computation. You can express all algorithms that can be described with Boolean logic using only NOR or NAND logical gates, but you really don't want to do that manually when you're reasoning about functions with thousands of inputs. Instead, you want to use some convenient high-level representation to ...


3

It is not true that the increase in von Neumann entropy of entanglement between the two partitions due to a single cross-partition two-qubit gate is at most one. See below for an example where the increase is two. However, we can use log Schmidt rank to justify a different asymptotically linear upper bound. Product states A two-qubit gate cannot produce more ...


0

I would be inclined to say no, since Qiskit code itself seems to append pre and post-gate instruction chain of gates in case dirty_ancilla is passed to the chain MCX which is not the case for recursive MCX


0

It likely simply refers to a partial projection. It will probably be clearer using some parentheses: $$\langle y^{(n)}|\otimes𝟙 \,|\Psi_b\rangle \equiv (\langle y^{(n)}|\otimes𝟙 )|\Psi_b\rangle$$ where 𝟙 is the identity matrix. For example, you have $$(\langle 0|\otimes 𝟙)(|00\rangle+|01\rangle+|10\rangle) = |0\rangle+|1\rangle.$$


0

$ \def\bra#1{{\langle#1|}} \def\ket#1{{|#1\rangle}} $ The mathematical notation and the respective circuits (without swaps) for little- and big-endian of the $QFT$ are shown below: Little-endian: $$QFT_N(\ket{x_1x_2\dots x_n}) = \frac{1}{\sqrt{N}}(\ket{0}+e^{2\pi i[0.x_n]}\ket{1})\otimes(\ket{0}+e^{2\pi i[0.x_{n-1}x_n]}\ket{1})\otimes\dots\otimes(\ket{0}+e^{...


Top 50 recent answers are included