# Tag Info

15

To simplify the question consider CNOT gate instead of Toffoli gate; CNOT is also fanout because \begin{align} |0\rangle|0\rangle \rightarrow |0\rangle|0\rangle\\ |1\rangle|0\rangle \rightarrow |1\rangle|1\rangle \end{align} and it looks like cloning for any basis state $x\in\{0,1\}$ \begin{align} |x\rangle|0\rangle \rightarrow |x\rangle|x\rangle \end{...

10

Below is a recent paper by Gilyén et al on doing "quantum matrix arithmetics", allowing to implement linear combinations of unitary operators. They consider the general case where the linear combination in itself might not be unitary. Since the linear combination in your case is unitary, maybe there's a more efficient way. : Gilyén, András, et al. "...

8

What you are trying to do is called Hamiltonian Simulation. If your exponential can be split in a sum of unitary matrices, @smapers' answer guide you to a good algorithm: the Linear Combination of Unitary (LCU) algorithm. In addition to the paper linked by @smapers, here are some other papers/videos explaining LCU: Maybe the first paper to present LCU: ...

8

The no cloning theorem says that there is no circuit which creates independent copies of all quantum states. Mathematically, no cloning states that: $$\forall C: \exists a,b: C \cdot \Big( (a|0\rangle + b|1\rangle)\otimes|0\rangle \Big) \neq (a|0\rangle + b|1\rangle) \otimes (a|0\rangle + b|1\rangle)$$ Fanout circuits don't violate this theorem. They don't ...

7

The answer is that the no-cloning theorem states that you cannot clone an arbitrary unknown state. This circuit does not violate the no-cloning theorem, because let's look at what it does when the input is $\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$. The output at the third register still has to be a $|0\rangle$ or a $|1\rangle$. Therefore it's impossible ...

5

You're getting the same output as Quirk, just with a different bit ordering convention for the kets. Quirk considers the top qubit to be the "least significant" qubit (i.e. if you count 000, 001, 010, ... then it refers to the rightmost bit). So if you apply a Hadamard gate to the top qubit of a three-qubit circuit in Quirk you get the state |000> + |001>. ...

4

Those figures were created manually with sketchup, which is a 3d modelling tool. There was no simulation involved, only careful application of known rules.

4

There is QTop which is an open-source project that can simulate but also visualize topological quantum codes.

4

Since the quantum teleportation circuit has three qbits, the matrix at each step is 8x8 and thus has 64 elements; this is pretty clunky to type out in its entirety, so I'll just walk you through step by step and you can derive the full matrix for a specific step if you want. Given a qbit we want to teleport: $|\psi\rangle = \begin{bmatrix} \alpha \\ \beta \... 4 It seems that you need oblivious fixed point amplitude amplification. See Theorem 26-28 in the aforementioned paper: arXiv:1806.01838 [quant-ph]. As a first step, you can implement$\frac{A+B(t)}{2}$as a block of a unitary. This is however not a unitary itself, but then you can turn it into a unitary using oblivious fixed point amplitude amplification. If ... 4 I made those GIFs using the screen recorder ScreenToGif. ScreenToGif is not very good at compressing while maintaing quality, so I found it worked better to disable all optimizations while recording, try to preserve all detail, then post-process using GIMP's "Optimize (for GIF)" filter. GIMP is also handy for e.g. adding the text labels you see in the ... 3 (This answer is specific to the context of the question, which is about doing this construction out of Quirk's time dependent gates.) It's not possible to have proper half-speed time-dependent rotations in Quirk. Behind the scenes there is actually a value$t$that is varying from 0 to 1 and then cycling. If you managed to find a construction to cut the ... 3 Since you haven't told us how you've tried to do the calculation, I don't know where you're making the mistake. (I'm also unfamiliar with Quirk, which seems to be using an unusual ordering of basis elements in the output matrix. If anything looks inconsistent in the following answer, try swapping the middle two rows/columns, and adding a transpose!) The ... 3 The output you've stated there appears to be correct. The Hadamard produces $$|000\rangle\mapsto\frac{1}{\sqrt{2}}(|000\rangle+|100\rangle).$$ Then, the two controlled-nots give $$\mapsto\frac{1}{\sqrt{2}}(|000\rangle+|111\rangle).$$ The final Hadamard then yields $$\mapsto\frac{1}{2}((|0\rangle+|1\rangle)|00\rangle+(|0\rangle-1|\rangle)|11\rangle).$$ ... 3 Your implementation is really close - on the website, here's the diagram that they used: So, I think you reversed the angles - it should be$-\pi/2, -\pi/4, -\pi/2$. (Also: there's a QFT inverse that Quirk has, so you can verify that the first half of your circuit is correct). 2 In the second half of the circuit you're mixing up which qubits are your ancillae and which are the ones you want to operate on. You can't use one of your system qubits as an ancilla. 2 Trace out everything except the qubit you are interested in. Do this by computing the outer product of the state of the target qubit, for each possible value of the other qubits, and summing up all those outer products. This will produce the 2x2 density matrix of the target qubit. Get the x, y, z coordinates of the Bloch vector from the 2x2 density matrix$D$... 2 I agree that$Y$is not the best notation. Actually, in the paper that I was referring in the answer there was a gate$Y$that was doing the desired job (it was also not a self-inverse gate). I didn't use the gate from the paper, but I kept the notation. Anyway, I like more Craig Gidney's suggestion to use$H_{YZ}$gate. I will edit my answer to replace Y ... 2 You reversed the order of$Y^\dagger$and$Y$compared to the answer you linked. Instead of using the "$Y^\dagger$" operation that sends the X axis to the Y axis to the Z axis to the X axis, you're doing the reverse. So you're operating on$X \otimes X$instead of$Y \otimes Y$. (Incidentally, given the confusion w.r.t. the Y axis, it's hard to think of a ... 2 The input gates are in the bottom toolbox, near the center: If you place an input gate in the same column as an arithmetic gate requiring that input, they will link together into a combined operation: You can also precede the input-requiring gate with a classical setting of the value: Separating the input and the target into separate boxes makes using ... 2 This gate is closely related to the CNOT gate that you've already learnt about. Where the CNOT gate says "apply NOT to the target if the control is in the state$|1\rangle$", this gate says "apply NOT to the target if all 3 control qubits are in the state$|1\rangle$". The three control qubits are the closed black circles, and the target qubit is the other ... 2 The endian-ness of the qubits is the answer. Both QFT and phase estimation rely on certain endianness of the register, and the representations used in the controlled-unitary part has to match the endianness used in the QFT part (and in the answer). This circuit produces the expected outcome with the inverse QFT block: 1 The only way to make a time-dependent custom gate is to decompose the desired unitary into a circuit using the built-in time-dependent gates (typically$X$,$Y$or$Z^t\$), then make a custom circuit gate using that circuit. (Assuming you're not willing to implement the gate by editing the source code.) The reason I didn't add support for e.g. using the ...

1

You have to put an extra SWAP-gate after the QFT, see this circuit. Furthermore, the two controlled-Z gates on the same qubit are not necessary. This can reduce the circuit further to this.

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