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
515 views

### How to read the result of quantum shor circuit for N=15

I found many circuits for the Shor algorithm for N=15, but i don't understand how to read the result 3 or 5. Where can i find the result e.g. for this circuit I found it here
63 views

### Multi-qubit rotation using Quirk

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

### Exact meaning of "parity control" in quirk

I am trying to understand this distillation circuit (related to this question), but I am confused by the meaning of the "parity control Z" operations represented with this symbol: The ...
244 views

### What is wrong with my circuit for the fourth-root of $X$?

For learning purposes I would like to hand-craft my own circuit for the fourth-root of $X$, using $S$, $T$, and $\sqrt X$ gates. Note that $\sqrt[4]X$ is of order eight while $\sqrt X$ is of order ...
349 views

### Why does entanglement of 3 qubits break this?

Another user asked about the Ekert Quantum Key Distribution protocol: Alice and Bob each randomly choose one of three bases separated by $120^{\circ}$ in which to measure, and then later compare the ...
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 ...
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 vote
238 views

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 ...
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'...
1 vote
313 views

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

I want to implement the Grover iteration instead of the multi-control qubit implemented as in this picture: I want to implement them like in this example of five qubits: I mean how can I decompose ...
139 views

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

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

I'm given with a Hamiltonian, $H=H_1+H_2$, where $H_1=\sigma_x\otimes\sigma_z$ and $H_2=\sigma_y\otimes\sigma_y$, and want to built a circuit which will implement $e^{-iHt},t=\pi/6$. We see that as $\... 2 votes 1 answer 1k views ### Building a matrix corresponding to the teleportation circuit I'm trying to build the matrix that corresponds to this quantum teleportation circuit, but it never works when I test it in the quirk simulator, I tried finding the matrix corresponding to every part ... 5 votes 0 answers 158 views ### Exact functions of a single-iteration Grover Search Algorithm's operators I'm doing a practice assignment where I'm asked to identify specific features of the Grover Search Algorithm's second operator (picture in post, further on "$Us$"), which mirrors the system relative ... 2 votes 1 answer 547 views ### How to use the input gates in Quirk Strolling around I came across Craig Gidney's Blog and his awesome tool Quirk. I proceeded to read this interesting post of his where he alludes to the difference between actually measuring qubits in ... 2 votes 1 answer 263 views ### How to implement a$\frac{\theta}{2}$rotation from$\theta$rotation? Is there a way to create a rotation gate which has half the angle of some implementable gate? I am looking to implement a gate on Quirk which allows for standard time-dependent rotations $$R_x(\... 1 vote 1 answer 87 views ### Explanation of the function of the circuit I once experimented with the tool "quirk" and came to a gate, whose function I can not properly tap into. I'm working in the circuit with 4 bits, the last bit is negated, so from 0 to 1. On all 4 bits ... 3 votes 0 answers 195 views ### How to simulate a simple circuit to add two numbers in Quirk? I am new and I don't understand where I should give the input and where I should get the output. Please explain with an example of a circuit run on the Quirk simulator. How to add two numbers? 8 votes 3 answers 2k views ### Is there any method of adding two operators in a circuit? I am trying to reconstruct the time evolution of a Hamiltonian on the quantum computing simulator, quirk. Ideally I would like to generalise this to any simulator. The unitary matrix is$$U(t)=e^{-... 4 votes 1 answer 104 views ### Creating .gifs corresponding to Quirk simulations Craig Gidney's blog has some .gifs which directly link to the corresponding simulation on Quirk. For example: Grover Search Delayed Eraser Is it possible to create these .gifs from within Quirk? Or ... 1 vote 1 answer 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 ... 7 votes 1 answer 85 views ### How to avoid error when applying certain combinations of degree of freedom rotations using a quantum circuit? When applying each of the six degree of freedom rotations (or certain combinations of them) in an SO(4) using quantum gates, the results I expected are produced. For example, the following circuit in ... 5 votes 0 answers 560 views ### Error: Simulation of "Quantum algorithm for linear systems of equations" for$4\times 4\$ systems on Quirk (without SWAP) - Global phase

Following @DaftWullie's answer I tried to simulate the circuit given in Fig. 4 of the paper (arXiv pre-print): Quantum circuit design for solving linear systems of equations (Cao et al, 2012), on ...
663 views

### Incorrectly Calculating Probability Amplitudes for 3-qbit Circuit

I’m trying to calculate the probability amplitudes for this circuit: My Octave code is: ...
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 ...
1 vote