Share Your Experience: Take the 2024 Developer Survey

# Questions tagged [quirk]

Quirk is an open-source drag-and-drop quantum circuit simulator for exploring and understanding small quantum circuits. It was developed by Craig Gidney.

31 questions
Filter by
Sorted by
Tagged with
4k views

### Toffoli gate as FANOUT

I was searching for examples of quantum circuits to exercise with Q# programming and I stumbled on this circuit: From: Examples of Quantum Circuit Diagrams - Michal Charemza During my introductory ...
• 413
280 views

### Topological Circuit Simulator

Does something like Quirk exist for topological (eg. braided) circuits? Alternatively, any ideas on how @CraigGidney is getting these circuits (or something similar)?
• 3,312
2k views

• 217
159 views

### Problem with eigenvalue evaluation algorithm application on matrix $U$

Once I get to the end of the algorithm, I can't understand how to calculate the eigenvalue using formulas. Bear in mind that it is an exercise to be carried out with pen and paper. the matrix of $U$ ...
1 vote
461 views

### Trying to perform Quantum Phase Estimation on T-gate

I'm trying to perform QPE on the T-gate in Quirk but I'm not getting the correct result. For the T-gate, I should be measuring (001) with 100% probability, but instead, I'm getting the following: I'...
• 2,503
1 vote
158 views

### How to store error caused by circuit manipulation

Given that is equivalent to I am interested into not performing the last CNOT. Rather, I want to keep track of the error I intentionally introduced by removing it. I am trying to do this by means of ...
• 1,958
1 vote
238 views

• 678
1 vote
267 views

### Creating a time dependent custom gate in Quirk

I have created a $16\times 16$ unitary operator using a Hamiltonian by finding its exponential $$U=\exp(-iH\delta t)$$ If I set $\delta t=1$ then I can take this matrix and input it into quirk using ...
• 217
1 vote
100 views

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

I am simulating the phase shift algorithm on the Quirk platform. Even when the endian-ness of the built-in inverse QFT gate is corrected for, the circuits still output different results. Shouldn't the ...
• 990
1 vote
439 views

### Not understanding gates being generated by MCX in "recursion" mode

I was curious about the various ways of generating code for MCX when there are multiple controls. I saw that qiskit provided multiple algorithms for generating code, depending on the number of ...
• 733
In a multi-qubit system I can find the amplitudes of a state and compute probabilities, $\theta$, and $\varphi$. This falls out from simulation with simple numpy arrays. For example, after application ...
I was wondering, how can one perform a multi-qubit rotation in Quirk? For example, if I want to simulate the magic-state distillation protocol, I need e.g. a $(IIZZZ)_{\pi/8}$ rotation of 5 qubits. Is ...