8

The Toffoli gate is just a permutation. If you start in a known basis state, application of a Toffoli just changes it into another basis state, one that you can easily calculate classically (after all, it’s a decision based on looking at 3 bit values). Repeating that doesn’t change anything. To make it universal, you need to add something like Hadamard ...


4

Whether or not quantum superposition is a "truth", is a philosophical question. Quantum theory is simply an axiomatic mathematical model of the universe that happens to give correct experimental predictions (at least, for a fairly broad range) for several physical phenomena. It certainly might be possible to come up with a different mathematical model of the ...


4

I think you would benefit from realizing that quantum gates are an abstraction of the actual operations that we perform on qubits. Just as a qubit is an abstraction (a mathematical model to describe the state of a two-level quantum mechanical system) a quantum (logical) gate is a mathematical construct that we use in the study of quantum algorithms & ...


3

[Can't comment and so, writing an answer] As @Sanchayan aptly pointed the theoretical/mathematical arguments which could indicate that superposition is not just an assumption. A couple more thoughts: You're right in observing that the superposition collapses to 0 or 1 when observed and that's expected due to the collapse of the wave function. A quick ...


3

This can be done by passing a style to the drawer, setting the cregbundle to be False as the default is True. For example, given the circuit qc we can draw all the classical registers as follows : qc.draw(output='mpl', filename='no_bundle.png', style={'cregbundle': False}) However, it is worth noting that only the mpl drawer supports setting things using a ...


3

I think you have a slight misunderstanding of what the $Z$ gate in the screenshot you attached is. It is, in fact, not a Z gate, but a (2-qubit) $CZ$ or controlled-$Z$. gate, also referred to as a controlled-phase gate (because the $Z$ operation is a flip of the phase of the $|1\rangle$ state). This $CZ$ gate is a lot like the $CX$ gate, however, it ...


3

I still run into this issue too. If you consider $|q0\rangle$ to be the most significant bit (MSB) you have to map it to the most significant classical bit as well, which is in your case a bit no. 2. Or you can flip your quatnum circuit upside down and then $|q0\rangle$ become the least significant bit (LSB) and the measurement will meet your expectation. A ...


3

I tried to implement your transformation on IBM Q. Here is the result: Input is $|00\rangle$ in this case. You can set input values by application of $X$ gates on q-bits $|q0\rangle$ and $|q1\rangle$. Please note that this circuit run on a simulator only as reset gate has not been implemented on real IBM Q quantum hardware. But it is possible to simply ...


2

By "copying a quantum state", we mean that we cannot take $$|\psi⟩|0⟩=\alpha|00⟩+\beta|10⟩$$ into $$|\psi⟩|\psi⟩=(\alpha|0⟩+\beta|1⟩)(\alpha|0⟩+\beta|1⟩)=\alpha^2|00⟩+\alpha\beta|01⟩+\beta\alpha|10⟩+\beta^2|11⟩$$ for arbitrary single qubit state $|\psi⟩=\alpha|0⟩+\beta|1⟩$. Notice that this resulting two-qubit state $|\psi⟩|\psi⟩$ is still separable. But in ...


2

This operation leaves all computational basis states unchanged, except for the $|0111\dots111\rangle$ and $|1000\dots000\rangle$ states, which it exchanges. The first thing to do is to make those two states differ in only one bit position. This can be done by applying CNOT operations controlled by one of the differing bit positions targeting all other ...


2

I investigated your gate for three different cases: 1) one q-bit: in this case the $U_f$ is simply $X$ 2) two q-bits: state $|01\rangle$ is mapped to $|10\rangle$ and conversely, otherwise q-bits are unchanged, so the gate implements q-bits swap 3) three or more q-bits: gate $U_f$ act like this: state $|011...1\rangle$ is mapped to $|100...0\rangle$ and ...


2

You can found some interesting approaches to decomposing gates also here: https://arxiv.org/abs/quant-ph/9503016 (Elementary gates for quantum computation).


2

I found paper Quantum Circuits for Isometries to be a useful reference on the topic. It describes several methods for decomposing multi-qubit unitaries into CNOT gates and qubit unitaries and also gives several references to earlier related works. There is also a Mathematica package that implements algorithms described in the mentioned paper. If you don't ...


2

Yes, when you run an algorithm, often specified as a sequence of gates, you get different results according to some probability distribution. Assuming we are talking about an error-free computation (this is where, in this field, we use the terminology "noise" which is distinct from the "noise" of "signal to noise ratio"), then most algorithms that you will ...


1

I hinted in the comments of your previous question that the answers to the above questions have a shared basis for an answer, and since you're already asking about that too I guess you have found that: the Bloch sphere. The Bloch sphere is a method of visualizing the state of a qubit. However, to really understand this visualization, you really need to use ...


1

Today many people believe that programming means coding on some language like python; this is not true. The early classical computers were programmed by inserting junctions which connect logical elements of an electronic scheme, and this is also programming. I believe modern programmable quantum computers are programmed like that: a programmer is given a ...


1

(...) depending on what you attempt to compute you "design" your circuit - this is what is called ASSP (Application Specific Signal Processor) where the input is Signal which are processed by the Circuit (processor) to create the processed output - the measure gate. [Source] Reading the question more carefully and after your clarification in the comments, I ...


1

I think this should help: circuit.measure([0,1,2,3], [0,1,2,3,4,5]) for 4 qubits. The secret number = '1001' for the circuit below: NOTE the xor gates "cx" in qbit 0 and 3 are because it is 1 on the first and last bit of the secret number. And after that simulate (to get the answer): I hope I've helped.


1

The point of the transplier is not only to map circuits to backends, but also to optimize the circuit to reduce the number of gates it contains so that the results you receive will (hopefully) be better. This is done through a series of optimizations, provided by things called transpiler passes. There is more information about them here. A unitary in this ...


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