Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now
5

The key to understanding many quantum protocols and circuits is in the following circuit: This is especially true in the case where $U^2=I$, such that $U$ has eigenvalues $\pm1$. You can readily calculate that if the input, $|\psi\rangle$, of the second qubit has an amplitude $\alpha_+$ for being supported on the $+1$ eigenspace, then at the end of the ...


4

If you look at the formula you want to prove term-by-term, you'll notice that the sum and the $(-1)^f(x)$ part is the same in both formulas; you just need to show that $$H^{\otimes n} |x\rangle = \frac{1}{\sqrt{2^n}} \left( \sum_{y=0}^{2^n-1} (-1)^{x \cdot y} |y\rangle \right )$$ You can either show this strictly by induction (similar to this question but ...


4

What that cSWAP test does (and doesn't) do The important thing about the controlled-SWAP test is that what it does isn't just to SWAP, or to not SWAP, the two inputs. The controlled-SWAP test involves a control qubit which is in a superposition of $\def\ket#1{\lvert#1\rangle}\def\bra#1{\langle#1\rvert}\ket{0}$ and $\ket{1}$: that is, we measure the first ...


3

$\def\braket#1#2{\langle#1|#2\rangle}\def\bra#1{\langle#1|}\def\ket#1{|#1\rangle}$ I was being silly :) The sign change that happens is in some sense either associated with the $\ket{a}$ or with the ancilla qubit. By taking the ancilla qubit to be (say) $\left(\frac{\ket{0}-\ket{1}}{\sqrt{2}}\right)$, upon XORing with $f(x)$ we get a sign change that we ...


3

To prepare this state specifically, start with $|000\rangle$ and apply H to the 0th and 1st qubits, yielding $$ \frac{1}{4} (|000\rangle + |010\rangle + |100\rangle + |110\rangle) $$ Then, we can apply the Toffoli gate to the 0th and 1st qubit with the 2nd qubit as the target, yielding: $$ \frac{1}{4} (|000\rangle + |010\rangle + |100\rangle + |111\...


3

The basic idea is to multiply $U$ on the left with $2\times 2$ unitaries until the identity is obtained. This method provides a sequence of gates $U_k$ such that $U_1\cdots U_n U=I$, which then gives you the decomposition of $U$ in terms of $2\times2$ unitaries: $U=U_1^\dagger \cdots U_n^\dagger$. For example, suppose you start with $$U=\begin{pmatrix}1/2&...


3

Their approach is more advanced than the simple one, described in the book "Quantum Computation and Quantum Information" by M. Nielsen and I. Chuang, section 4.5.1. It's better to understand it first. Basically we are just making zeros under diagonal step by step, where each step is the multiplication by some two-level unitary. Hence there are only $d(d-1)/2$...


2

This is not much of an answer, but is probably too long for a comment... I don't believe that there's a canonical way of doing this. You'd be best off understanding why you're asking the question, and what you want to get out of it. From there, you tailor how you're going to measure it. But multipartite entanglement is a really messy problem, even just for ...


2

I'll reiterate on my earlier answer to What can be a mini research project based on Grover's algorithm or the Deutsch Jozsa algorithm?: I think "Applying Grover's search algorithm to solve problem X" is a great topic for a small (or not-so-small) project. It is a very well-known algorithm (well, at least it is featured in the writings about quantum ...


2

There are a few ways to speed up this execution in Aqua. One way in the case of noiseless simulation is to use SLSQP instead of Cobyla, which we've noticed empirically seems to converge faster in noiseless environments. Another is to set skip_qobj_validation=True in the QuantumInstance init. I would start with these two and see how they do. QAOA in general ...


1

Yes. It is, for instance, part of Grover's algorithm and to be precise it is the 'Amplitude Amplification' part. $2| \psi \rangle \langle \psi | - I$, which will increase the amplitudes by their difference from the average


1

Measurements cannot produce an imaginary result. So if you want to measure an imaginary part, you need a suitable transformation before you measure. I haven't looked into the details of the mentioned operations but I'm sure that is what they do. On the last part of your question: the operation $R_x (\pi /2)$ can be visualized on the Bloch sphere by a ...


1

That tutorial was recently updated. In it you'll find a more familiar way to declare and execute algorithms. ee = ExactEigensolver(qubitOp, k=1) result = ee.run() The problem section of the older declarative form of Aqua execution (which is gradually being moved away from) is a way for the Aqua UI to display a list of algorithms applicable to a user-...


1

Grover's algorithm does not have an advantage when searching an unordered database, because encoding the oracle into a circuit requires $\tilde \Omega(n)$ operations. You can prove this with a simple circuit counting argument. If the circuit had size $O(n^{0.99})$ then there would be fewer distinct circuits than distinct oracles. So the actual operational ...


1

Grover's algorithm is a (quantum-)circuit-SAT solver. I suppose it could also be a literal black box solver, but it would only work with black boxes that don't decohere your entangled input state, and I'm having trouble believing that such things exist. I don't know why Grover or anyone else ever called it a database search algorithm. You can of course give ...


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