# Tag Info

Accepted

### Toffoli gate as FANOUT

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

### Is there any method of adding two operators in a circuit?

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

### Is there any method of adding two operators in a circuit?

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

### Why are these circuits not producing the expected output?

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

### Question about Grover algorithm implementation in the Quirk simulator

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

### Find local state and compute Bloch coordinates, like Quirk

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

### Problem with commutation of $e^{-iH_1t}$ and $e^{-iH_2t}$, where $H_1$ commutes with $H_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 ...

### Problem with commutation of $e^{-iH_1t}$ and $e^{-iH_2t}$, where $H_1$ commutes with $H_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 ...
Accepted

### How to use the input gates in Quirk

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

### Explanation of the function of the circuit

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

### Manually calculating quantum circuit with custom gate

While quantum circuits are written such that time goes left to right, matrix multiplication goes the other direction. That is, a quantum circuit contains the gate $U_1$ followed by $U_2$ is ...
1 vote

### How to implement *nested* Grover search (in Quirk)?

Well, checking again with the paper it seems I simply forgot a pair of Hadamard gates (Correct Quirk Cicruit).
1 vote

### Implementation of quantum phase estimation in Quirk

Quirk uses the convention that the top qubit is the least significant qubit. When Quirk shows the ket $|001\rangle$, the rightmost bit (the 1) is the top qubit line and the equivalent decimal value is ...
1 vote

### Creating a time dependent custom gate in Quirk

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

### Why are these circuits not producing the same output?

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 scored, non community-wiki answers of a minimum length are eligible