# 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\...
• 3,034

### 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 ...
• 314
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 ...
• 4,477

• 47.1k

### 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 ...
• 8,091
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.
• 22.3k
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 ...
• 22.3k
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 ...
• 4,048

### 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 ...
• 22.3k
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:...
• 22.3k
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 ...
• 47.1k
1 vote

### Manually calculating quantum circuit with custom gate

While quantum circuits are written such that time goes left to right[1], matrix multiplication goes the other direction[2]. That is, a quantum circuit contains the gate $U_1$ followed by $U_2$ is ...
• 4,523
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).
• 364
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 ...
• 22.3k
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 ...
• 22.3k
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.
• 1,412

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