# Tag Info

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.

5

Here's a circuit for it: Where I'm using an "odds gate": $$\text{Unitary}(a:b) = \begin{bmatrix} \sqrt{a} & -\sqrt{b} \\ \sqrt{b} & \sqrt{a}\end{bmatrix} / \sqrt{a + b}$$ The key idea is to use Hadamards to "double" the number of cases, and the 2:1 starting ratio to get a nice 3-way split after a conditional doubling. That gives ...

4

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. ...

4

If you were to apply QPE to this unitary, what you will get, assuming you start with a proper eigenvector $|\Lambda\rangle$, is an estimation of $x$, if the associated eigenvalue $\Lambda$ is written as $\mathrm{e}^{2\mathrm{i}\pi x}$. Thus, to know what you will measure, you have to know what the eigenvalues of this unitary are. There may be a faster way of ...

3

Here is another way with fewer CNOTs: Assume that we managed to have the first two qubits in the state $$|\psi\rangle = [0,\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}}]$$ Then the required state can be prepared by applying $H$ gate on the third qubit, then applying $X$ gate on the first two qubits conditioned on the third qubit. Now, all what we ...

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 ...

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 ...

3

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.

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

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 ...

2

Well, the matrix should be something like: $$\begin{bmatrix} 0 & * &*& * & * & * & * &* \\ 1/\sqrt{6} & * &*& * & * & * & * &* \\ 1/\sqrt{6} & * &*& * & * & * & * &* \\ 1/\sqrt{6} & * &*& * & * & * & * &* \\ 1/\sqrt{6} & * &*& * & *... 1 By default execute function sets optimization_level value to 1 which leads to some optimizations such as removing ID gates. Just set optimization_level to 0 to override this behavior: results = (execute(qc,Aer.get_backend("aer_simulator"),noise_model=get_noise_model(0.2),optimization_level=0,shots=2048).result().get_counts()) The result should ... 1 According to Equation 6 of the paper, the state one is considering is:$$\frac{\mathrm{i}\sin\left(\theta_d\right)}{2}|1\rangle\left(|\zeta\rangle|\psi\rangle-|\psi\rangle|\zeta\rangle\right)+\frac{\mathrm{e}^{-\mathrm{i}\theta_d}+\cos\left(\theta_d\right)}{2}|0\rangle|\psi\rangle|\zeta\rangle-\frac{\mathrm{i}\sin\left(\theta_d\right)}{2}|0\rangle|\zeta\...

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 ...

1

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

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 (...

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

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-...

Only top voted, non community-wiki answers of a minimum length are eligible