I have created a 9 qubit register:
q = QuantumRegister(9) c = ClassicalRegister(9) qc = QuantumCircuit(q, c)
I want to measure only 1 of the register(let's suppose i want to measure the 5th register.) How do I implement the code?
qc.measure(q[register],c[register]) job = execute(qc,simulator,shots = 1000) result = job.result() counts = result.get_counts(qc) print("\nTotal count for 0 and 1 are:",counts)
My code seems to measure all 9 registers.