New answers tagged

0

Here's an image from a previous answer of mine: If you replace the $\sigma_1\otimes\sigma_2\otimes\ldots\otimes\sigma_n$ with the tensor product of operators that you want (a single tensor product; a sum of terms needs some extra techniques based on, at its most simplistic, a Trotter expansion), and set the phase of the phase gate, $t$ equal to $-2\theta$, ...


2

The statement that you’ve made about the size of the register that you use for phase estimation (the value of t) is correct. However, you don’t seem to have made any attempt to count the number of gates used in the circuit. To implement the phase estimation you need controlled-U, $U^2$, $U^4$, $U^8$, $U^{16}\ldots$ If you have to make these out of just ...


3

I think faster than light communication is more stubborn than that :-) The principle of deferred measurement, to quote Nielsen and Chuang, page 186, is Measurements can always be moved from an intermediate stage of a quantum circuit to the end of the circuit; if the measurement results are used at any stage of the circuit then the classically controlled ...


1

The problem is that IBM Q environment does not show all results in case there is more than 16 results (there is maximally 20 columns in the histogram). To get all results, you have to click on Download in the top right corner of a page with results. Two files with extension *.json are downloaded. Then open file ending with _results.json in notepad and look ...


3

As a general rule, just because you can produce controlled-$U$, it does not mean that you can produce controlled-$U^{2^k}$ with the same complexity. Modular exponentiation is a very special case where it turns out that you can. It is probably worth noting (iirc) that even if the best way of implementing controlled-$U^{2^k}$ is with $2^k$ controlled-$U$s, ...


0

Partial answer: If a operator $U$ is a single qubit rotation around axis $a$ for angle $\theta$ (denote $R_a(\theta)$) you can use additivity of such operator, i.e. $$ [R_{a}(\theta)]^k = R_{a}(k\theta). $$ The same is true for global phase gate $[Ph(\theta)]^k=Ph(k\theta)$. Overall, you only change the angle and only one gate is applied.


2

Controlled version of $e^{iHt}$: Often in the algorithms (e.g. in HHL or PEA), we want to construct not the circuit for Hamiltonian simulation $e^{iHt}$, but the controlled version of it. For this, we will use the result obtained from the previous answer. First of all, note that if we have $ABC$ circuit, where $A$, $B$ and $C$ are operators, then the ...


0

You can use a method described in Transformation of quantum states using uniformly controlled rotations. Authors of the article introduced method how to change an arbitrary state $|a\rangle$ to state $|b\rangle$ with so-called uniformly controlled rotation, i.e. a rotation which rotational angle depends on combination of zeros and ones in controlling ...


0

What you seem to be asking for is the general construction of an arbitrary permutation. There’s nothing quantum about this; the equivalent question in classical is how to construct an arbitrary reversible circuit of n bits. There are $2^n!$ such circuits, from which it is hopefully obvious that there is not a compact description for the vast majority. I ...


4

An approach for Hamiltonian simulation: Any Hermitian (Hamiltonian) matrix $H$ can be decomposed by sum of Pauli products with real coefficients (see this thread). An example for 3 qubit Hamiltonian: $$H = 11 \sigma_z \otimes \sigma_z + 7 \sigma_z \otimes \sigma_x - 5\sigma_z \otimes \sigma_x \otimes \sigma_y$$ The final circuit for $e^{iHt}$ can be ...


3

To find the expectation value of a given Pauli matrix, you just measure in the basis defined by the Pauli matrix. For example, to evaluate the expectation value of the $X$ matrix, you find the basis vectors of the $X$ matrix. These are $|+\rangle$ and $|-\rangle$, with corresponding eigenvalues +1 and -1. You measure in the $|\pm\rangle$ basis many times and ...


4

Your states differ in global phase only, hence they are indistinguishable (or in other words they are equivalent). Therefore you do not need to apply gate $-I$. Note that the global phase is $\pi$ as $-1 = \mathrm{e}^{i\pi}$ However, in case the state is produced by controlled gate, global phase cannot be neglected. In that case you can implement ...


1

Please have a look at article Transformation of quantum states using uniformly controlled rotations, chapters 1 and 2. These provides you with construction of general rotation gate controlled by $n$ qubits with different rotations angles for each basis state $|x\rangle$. You also might be interested in some of these articles on quantum computers application ...


2

Your state is a generalization of so-called W-state. Here is a implementation of the state for three qubits. You can also use method described in paper Transformation of quantum states using uniformly controlled rotations for preparing W-state with any qubits you want. When you use this method, set probability of states $|10\dots0 \rangle$, $|01\dots 0\...


1

There's one more way: Create two identical qubits on the Bloch sphere (this is start with 0 and apply the same random rotational gate). Then, apply a CNOT gate followed by a Hadamard gate to the first qubit to perform a measurement in the Bell basis. You will measure 00, 01, 10 (which are equivalent to the 3 symmetric Bell states) with equal probability ...


2

am I sure that the compiler will always be able to decompose this big gate into a succession of smaller, allowed gates, without breaking the complexity No, you're not. This is the whole problem with algorithms, be they classical or quantum. However, in the specific case you're talking about, there is a nice implementation. Imagine that you want to apply ...


3

Designing a logical function for quantum computer is similar to same process for classical one. You can also use truth tables. But you have to design the function to be reversible. Assume you have truth table for logical function $f(x): \{0;1\}^n \rightarrow \{0,1\}$, then reversible equivalent can be build in this way: $$ |x_n\rangle |y\rangle \rightarrow |...


2

A classical proof involves Lie algebra to show that the Deutsch's three Qubits gate is universal for three qubits gates and then showing that we can construct a $ n $ qubits Deutsch's gate using Toffoli gates and three qubits Deutsch's gate only, so the results extends to $n$ qubits. You can find the proof in the caltech's course on quantum computation, ...


3

I have thoughts on a couple of different approaches, although I'm sure there'll be simpler options. Firstly, imagine you start from a two-qubit state $|00\rangle$, and apply an $R_x$ rotation with an angle equivalent to half that of a Pauli $X$ to the first qubit (I forget which convention N&C is using for their rotation gates). Then apply a controlled-...


1

If you are using the QFT inside a bigger circuit you really can't avoid the swaps in the QFT and/or the invQFT the reason being that the value of qubit x1 dictates the symmetry of the phases in your entire superposition. Pay attention at how the phases look like in the following images: I think your intuition in question 1 is correct but it will only work ...


2

Found by just trying stuff in Quirk:


Top 50 recent answers are included