# Tag Info

2

I have added an image for your reference. If you have to create any state but don't know the circuit then you can always initialize the state then using qiskit transpile, you can decompose the circuit in terms of basis gates

7

Note that you do not measure anything before sending to QC. What you actually send to QC is a sequence of instructions telling QC what to do. The measurement is the last instruction necessary for obtaining results as pointed out in the other answer.

5

The simple answer is that you can't get the statevector information out of a real quantum computer; or, more generally, a quantum system. For the real computer to extract information from the qubits, they have to collapse to some basis state $\left(|0\rangle \; \text{or} \; |1\rangle \right)$. And this collapse is performed by measuring the qubits.

1

What you did is right. However, the reason for the result you observe is because your output state is in the state $|000\rangle$ with 100% certainty. To see this, note that your circuit has the form: That is, it starts in the state $|0000\rangle$, then all those control operations don't do anything since all the controlled qubits are in the state $|0\rangle$...

6

If you're not concerned with global phase then the following works using only two rotation gates: \begin{align} R_y\left(-\frac{\pi}{2}\right) R_x\left(\pi\right) &= \exp \left(i\frac{\pi}{4}Y\right) \exp \left(-i\frac{\pi}{2}X\right) \\&= \left(\cos \frac{\pi}{4} I + i\sin \frac{\pi}{4} Y\right) \left(-iX\right) \\&=\begin{pmatrix} \cos \frac{\...

1

Based on your new additional inputs, it seems like you want to transpile the individual circuit before appending them together to potentially reduce the extra work needed for the transpiler since it won't have to transpile a large circuit. The problem that you run into then is that when you tried to transpile each individual circuit, their new transpiled ...

1

An example using .append(). If that does not answer to your need, it might be a start for you to explain what's wrong .... subcirc1 = QuantumCircuit(10) subcirc1.h(3) subcirc1.x(5) subcirc1.z(7) subcirc1.barrier() subcirc2 = QuantumCircuit(10) subcirc2.h(1) subcirc2.x(3) subcirc2.z(6) subcirc2.barrier() subcirc2.draw(idle_wires=False) circ = QuantumCircuit(...

3

Why that $|1\rangle^{\otimes N}$? The reason for requiring the final state to be $|1\rangle^{\otimes N}$, is that in this way you can easily propagate the information on an ancilla (i.e. additional) qubit using a multi controlled CNOT, with the target on the ancilla. In this way, measurements on the ancilla yield outcome $|1\rangle$ with probability given by ...

5

The first diagram is a generic construction showing how it is possible to build a $\mathsf{CC}\mathbf{U}$ gate, which is the gate that applies $\mathbf{U}$ to the third qubit only if both first qubits are in state $|1\rangle$. It uses the controlled version of the $\mathbf{V}$ gate (and its inverse), which is a gate such that: $$\mathbf{V}^2=\mathbf{U}$$ You ...

2

Firstly, you might be interested in paper Elementary gates for quantum computation explaining how complex gates can be decomposed to simpler ones. This would allow you understand how the matrix $U_j$ is decomposed. Before we proceeed further, we have to define gate $U1$ used on IBM Q computer:  U1(\lambda)= \begin{pmatrix} 1 & 0 \\ 0 & e^{i\lambda} ...

0

Adding to the above well informed points, IBM-Q introduced new feature where we can perform the measurement,in intermediate steps of the circuit as well.

Top 50 recent answers are included