Skip to main content
edited title; edited tags
Link
glS
  • 26.9k
  • 6
  • 35
  • 121

Understanding how Superposition work/is used Does quantum superposition allow to apply an algorithm to all bits possibly in one shot?

Became Hot Network Question
qbit --> qubit
Source Link
Mark Spinelli
  • 14.4k
  • 2
  • 24
  • 78

From what I understood, quantum programming can solve some algorithm exponentially faster.

Thanks to the superposition, unlike a classic bit, which can be either 0 andor 1, a qbitqubit can be both 0 and 1.

Does that mean we can apply an algorithm for all bits possibilitypossibly in one shot  ?

Example: We have 2 qbitsqubits, we apply a Hadamard gate on it to be in superposition. So all possibility will be [00, 01, 10, 11], so [0, 1, 2, 3]

Can we apply an algorithm for all of these solutions ?

For example, apply *10 to the value. So we would get [0, 10, 20, 30]. Then sum it all to get 60. But, getting that in one shot ?

I tried to implement something similar on Qiskit. Creating 2 qbitsqubits, applying Hadamard gate on them. But I fail to go further. If I measure my qbitsqubits, they will be one of the solutions, but not all of them.

Am I missing something ?

From what I understood, quantum programming can solve some algorithm exponentially faster.

Thanks to the superposition, unlike a classic bit, which can be either 0 and 1, a qbit can be both 0 and 1.

Does that mean we can apply an algorithm for all bits possibility in one shot  ?

Example: We have 2 qbits, we apply a Hadamard gate on it to be in superposition. So all possibility will be [00, 01, 10, 11], so [0, 1, 2, 3]

Can we apply an algorithm for all of these solutions ?

For example, apply *10 to the value. So we would get [0, 10, 20, 30]. Then sum it all to get 60. But, getting that in one shot ?

I tried to implement something similar on Qiskit. Creating 2 qbits, applying Hadamard gate on them. But I fail to go further. If I measure my qbits, they will be one of the solutions, but not all of them.

Am I missing something ?

From what I understood, quantum programming can solve some algorithm exponentially faster.

Thanks to the superposition, unlike a classic bit, which can be either 0 or 1, a qubit can be both 0 and 1.

Does that mean we can apply an algorithm for all bits possibly in one shot?

Example: We have 2 qubits, we apply a Hadamard gate on it to be in superposition. So all possibility will be [00, 01, 10, 11], so [0, 1, 2, 3]

Can we apply an algorithm for all of these solutions ?

For example, apply *10 to the value. So we would get [0, 10, 20, 30]. Then sum it all to get 60. But, getting that in one shot ?

I tried to implement something similar on Qiskit. Creating 2 qubits, applying Hadamard gate on them. But I fail to go further. If I measure my qubits, they will be one of the solutions, but not all of them.

Am I missing something ?

Source Link
Globy
  • 13
  • 2

Understanding how Superposition work/is used

From what I understood, quantum programming can solve some algorithm exponentially faster.

Thanks to the superposition, unlike a classic bit, which can be either 0 and 1, a qbit can be both 0 and 1.

Does that mean we can apply an algorithm for all bits possibility in one shot ?

Example: We have 2 qbits, we apply a Hadamard gate on it to be in superposition. So all possibility will be [00, 01, 10, 11], so [0, 1, 2, 3]

Can we apply an algorithm for all of these solutions ?

For example, apply *10 to the value. So we would get [0, 10, 20, 30]. Then sum it all to get 60. But, getting that in one shot ?

I tried to implement something similar on Qiskit. Creating 2 qbits, applying Hadamard gate on them. But I fail to go further. If I measure my qbits, they will be one of the solutions, but not all of them.

Am I missing something ?