Joseph Geipel
• Member for 2 years, 6 months
• Last seen this week

446 views

This is actually very easy in Cirq. The controlled_by method can be used to automatically make any given gate controlled by an arbitrary number of control qubits. Here is a simple example for creating ...

334 views

This can work. There's no reliance on powers of two or anything like that in the basic conception of the algorithm. If $S$ is a subset of computational basis states with $N$ elements and you have a ...

240 views

First, we can start with $U = P_+ - P_-$, since the Hermitian is the sum of the projection operators of the eigenspaces scaled by their eigenvalues. If $U^2 = I$, that means $I = (P_+ - P_-)(P_+ - P_-)... View answer 1 answers 4 votes 489 views Accepted answer 5 votes The Grover diffusion operator, the second phase of the algorithm, is given by: $$D = 2\left|s\right&gt;\left&lt;s\right| - I$$ where$\left|s\right&gt; = \frac{1}{\sqrt{N}}\sum_{x=0}^{N-1}\left|x\...

122 views

The tensor product of two vectors $\begin{pmatrix} a \\ b \end{pmatrix}$ and $\begin{pmatrix}c \\ d \end{pmatrix}$ is $\begin{pmatrix} ac \\ ad \\ bc \\ bd \end{pmatrix}$. In this case, determining ...

66 views

&quot;Large-scale&quot; generally means that the quantum computer's ability scales to practical instances of problems. For the case of factoring, RSA keys are usually 1024/2048/4096 bit sized: if a ...

293 views

For a 2x2 unitary matrix given by four complex numbers $\begin{pmatrix} a &amp; b\\ c &amp; d \end{pmatrix}$, the aspects of the $z$-$y$ decomposition $e^{i\alpha}R_z(\beta)R_y(\gamma)R_z(\delta)$ can ...

183 views

If you apply the $n$-qubit QFT defined as $\frac{1}{\sqrt{N}}\sum_{k = 0}^{N - 1}\sum_{n = 0}^{N - 1}a_n e^{2 \pi i n k/N}\left|k \right&gt;$ acting on a state $\sum_{x = 0}^{N - 1}a_x\left|x\right&gt;... View answer 2 answers 0 votes 188 views 3 votes If$\left|\psi\right&gt; = \alpha \left|0\right&gt; + \beta \left|1\right&gt;$, then$\alpha = \left&lt;0|\psi\right&gt;$and$\beta = \left&lt;1|\psi\right&gt;$. A 1-qubit unitary operator can be ... View answer 2 answers 8 votes 742 views 3 votes In this case, &quot;measuring an operator&quot; is meant to describe measuring the observable associated with the operator. More commonly one would put a &quot;using&quot; or &quot;with&quot; or &quot;... View answer 1 answers 3 votes 210 views Accepted answer 2 votes Number of states marked isn't a strict correspondence with number of CZ gates: your new oracle still marks two states, but, rather than$\left|101\right&gt;$and$\left|110\right&gt;$, it marks$\left|...

179 views

$\left&lt;\psi\right|$ is not a state of a quantum system, it is a linear functional that takes a quantum state and returns a scalar. In terms of basic Linear Algebra, it is a row vector rather than a ...

880 views
The problem is actually in the oracle. First, $O_1$'s state is 1 if $a$ (the constant which you are checking against) is greater than $b$, so 000 and 001 will be the only marked states: you want $O_2$ ...