Skip to main content
Notice removed Draw attention by Radu M.
Bounty Ended with Yet another Random Guy's answer chosen by Radu M.
Notice added Draw attention by Radu M.
Bounty Started worth 50 reputation by Radu M.
added 73 characters in body
Source Link
Radu M.
  • 228
  • 1
  • 9

I am running two circuits on IBMQ back to back like this:

from qiskit import execute
from qiskit.circuit import QuantumCircuit
from qiskit_ibm_provider import IBMProvider, least_busy

provider = IBMProvider(instance="ibm-q/open/main")

backends = provider.backends(filters=lambda x: x.configuration().open_pulse and x.status().operational)

backend = least_busy(backends)
print("Selected the least busy backend: ", backend.name)

circ1 = QuantumCircuit(1, 1)
circ1.x(0)
circ1.draw()

circ2 = QuantumCircuit(1, 1)
circ2.measure(0, 0)
circ2.draw()

job = execute([circ1, circ2], backend, shots=100, init_qubits=True)

results = job.result()
counts = results.get_counts()
print("\nTotal counts are:", counts)

The first circuit contains one X gate and that's it. The second circuit contains a measure gate only. Please note that init_qubits=True when I invoke execute. I would expect that the second circuit should measure mostly 0 state since there is supposed to be a reset at the beginning of any circuit, or at least this is what I believe should happen. However, I get this:

Total counts are: [{'0': 100}, {'1': 51, '0': 49}]

So the measure gate in the second circuit returns roughly 50% times the 0 state and 50% times the 1 state. I do not understand what is going on.

I am running two circuits on IBMQ back to back like this:

circ1 = QuantumCircuit(1, 1)
circ1.x(0)
circ1.draw()

circ2 = QuantumCircuit(1, 1)
circ2.measure(0, 0)
circ2.draw()

job = execute([circ1, circ2], backend, shots=100, init_qubits=True)

results = job.result()
counts = results.get_counts()
print("\nTotal counts are:", counts)

The first circuit contains one X gate and that's it. The second circuit contains a measure gate only. Please note that init_qubits=True when I invoke execute. I would expect that the second circuit should measure mostly 0 state since there is supposed to be a reset at the beginning of any circuit, or at least this is what I believe should happen. However, I get this:

Total counts are: [{'0': 100}, {'1': 51, '0': 49}]

So the measure gate in the second circuit returns roughly 50% times the 0 state and 50% times the 1 state. I do not understand what is going on.

I am running two circuits on IBMQ back to back like this:

from qiskit import execute
from qiskit.circuit import QuantumCircuit
from qiskit_ibm_provider import IBMProvider, least_busy

provider = IBMProvider(instance="ibm-q/open/main")

backends = provider.backends(filters=lambda x: x.configuration().open_pulse and x.status().operational)

backend = least_busy(backends)
print("Selected the least busy backend: ", backend.name)

circ1 = QuantumCircuit(1, 1)
circ1.x(0)
circ1.draw()

circ2 = QuantumCircuit(1, 1)
circ2.measure(0, 0)
circ2.draw()

job = execute([circ1, circ2], backend, shots=100, init_qubits=True)

results = job.result()
counts = results.get_counts()
print("\nTotal counts are:", counts)

The first circuit contains one X gate and that's it. The second circuit contains a measure gate only. Please note that init_qubits=True when I invoke execute. I would expect that the second circuit should measure mostly 0 state since there is supposed to be a reset at the beginning of any circuit, or at least this is what I believe should happen. However, I get this:

Total counts are: [{'0': 100}, {'1': 51, '0': 49}]

So the measure gate in the second circuit returns roughly 50% times the 0 state and 50% times the 1 state. I do not understand what is going on.

added 131 characters in body
Source Link
Radu M.
  • 228
  • 1
  • 9

I am running two circuits on IBMQ back to back like this:

circ1 = QuantumCircuit(1, 1)
circ1.x(0)
circ1.draw()

circ2 = QuantumCircuit(1, 1)
circ2.measure(0, 0)
circ2.draw()

job = execute([circuit1[circ1, circuit2]circ2], backend, shots=100, init_qubits=True)

results = job.result()
counts = results.get_counts()
print("\nTotal counts are:", counts)

The first circuit contains one X gate and that's it. The second circuit contains a measure gate only. Please note that init_qubits=True when I invoke execute. I would expect that the second circuit should measure mostly 0 state since there is supposed to be a reset at the beginning of any circuit, or at least this is what I believe should happen. However, I get this:

Total counts are: [{'0': 100}, {'1': 51, '0': 49}]

So the measure gate in the second circuit returns roughly 50% times the 0 state and 50% times the 1 state. I do not understand what is going on.

I am running two circuits on IBMQ back to back like this:

    execute([circuit1, circuit2], backend, shots=100, init_qubits=True)

The first circuit contains one X gate and that's it. The second circuit contains a measure gate only. Please note that init_qubits=True when I invoke execute. I would expect that the second circuit should measure mostly 0 state since there is supposed to be a reset at the beginning of any circuit, or at least this is what I believe should happen. However, I get this:

Total counts are: [{'0': 100}, {'1': 51, '0': 49}]

So the measure gate in the second circuit returns roughly 50% times the 0 state and 50% times the 1 state. I do not understand what is going on.

I am running two circuits on IBMQ back to back like this:

circ1 = QuantumCircuit(1, 1)
circ1.x(0)
circ1.draw()

circ2 = QuantumCircuit(1, 1)
circ2.measure(0, 0)
circ2.draw()

job = execute([circ1, circ2], backend, shots=100, init_qubits=True)

results = job.result()
counts = results.get_counts()
print("\nTotal counts are:", counts)

The first circuit contains one X gate and that's it. The second circuit contains a measure gate only. Please note that init_qubits=True when I invoke execute. I would expect that the second circuit should measure mostly 0 state since there is supposed to be a reset at the beginning of any circuit, or at least this is what I believe should happen. However, I get this:

Total counts are: [{'0': 100}, {'1': 51, '0': 49}]

So the measure gate in the second circuit returns roughly 50% times the 0 state and 50% times the 1 state. I do not understand what is going on.

deleted 17 characters in body
Source Link
Radu M.
  • 228
  • 1
  • 9

I am running two circuits on IBMQ back to back like this:

    execute([circuit1, circuit2], backend, shots=100, init_qubits=True)

The first circuit contains one X gate and that's it. The second circuit contains a measure gate only. Please note that init_qubits=True when I invoke execute. I would expect that the second circuit should measure mostly 0 state since there is supposed to be a reset at the beginning of any circuit, or at least this is what I believe should happen. However, I get this:

Total counts are: [{'0': 100}, {'1': 51, '0': 49}]

So mythe measure gate in the second circuit, the measure gate returns roughly 50% times the 0 state and 50% times the 1 state. I do not understand what is going on.

I am running two circuits on IBMQ back to back like this:

    execute([circuit1, circuit2], backend, shots=100, init_qubits=True)

The first circuit contains one X gate and that's it. The second circuit contains a measure gate only. Please note that init_qubits=True when I invoke execute. I would expect that the second circuit should measure mostly 0 state since there is supposed to be a reset at the beginning of any circuit, or at least this is what I believe should happen. However, I get this:

Total counts are: [{'0': 100}, {'1': 51, '0': 49}]

So my measure gate in the second circuit, the measure gate returns roughly 50% times the 0 state and 50% times the 1 state. I do not understand what is going on.

I am running two circuits on IBMQ back to back like this:

    execute([circuit1, circuit2], backend, shots=100, init_qubits=True)

The first circuit contains one X gate and that's it. The second circuit contains a measure gate only. Please note that init_qubits=True when I invoke execute. I would expect that the second circuit should measure mostly 0 state since there is supposed to be a reset at the beginning of any circuit, or at least this is what I believe should happen. However, I get this:

Total counts are: [{'0': 100}, {'1': 51, '0': 49}]

So the measure gate in the second circuit returns roughly 50% times the 0 state and 50% times the 1 state. I do not understand what is going on.

added 18 characters in body
Source Link
Radu M.
  • 228
  • 1
  • 9
Loading
Source Link
Radu M.
  • 228
  • 1
  • 9
Loading