Skip to content

Commit 26843b1

Browse files
github-actionsgithub-actions
authored andcommitted
fixup! Format Python code with psf/black push
1 parent 1e62dde commit 26843b1

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

quantum/q1.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@
1111

1212

1313
def single_qubit_measure() -> q.result.counts.Counts:
14-
# Use Aer's qasm_simulator
15-
simulator = q.Aer.get_backend('qasm_simulator')
14+
# Use Aer's qasm_simulator
15+
simulator = q.Aer.get_backend("qasm_simulator")
1616

17-
# Create a Quantum Circuit acting on the q register
18-
circuit = q.QuantumCircuit(1, 1)
17+
# Create a Quantum Circuit acting on the q register
18+
circuit = q.QuantumCircuit(1, 1)
1919

20-
# Map the quantum measurement to the classical bits
21-
circuit.measure([0], [0])
20+
# Map the quantum measurement to the classical bits
21+
circuit.measure([0], [0])
2222

23-
# Execute the circuit on the qasm simulator
24-
job = q.execute(circuit, simulator, shots=1000)
23+
# Execute the circuit on the qasm simulator
24+
job = q.execute(circuit, simulator, shots=1000)
2525

26-
# Grab results from the job
27-
result = job.result()
26+
# Grab results from the job
27+
result = job.result()
2828

29-
# Returns counts
30-
counts = result.get_counts(circuit)
29+
# Returns counts
30+
counts = result.get_counts(circuit)
3131

32-
return counts
32+
return counts
3333

3434

35-
if __name__ == '__main__':
36-
counts = single_qubit_measure()
37-
print("Total count for various states are:", counts)
35+
if __name__ == "__main__":
36+
counts = single_qubit_measure()
37+
print("Total count for various states are:", counts)

0 commit comments

Comments
 (0)