Skip to content

Commit 4724933

Browse files
github-actionsgithub-actions
authored andcommitted
fixup! Format Python code with psf/black push
1 parent 6c52efb commit 4724933

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
@@ -10,27 +10,27 @@
1010

1111

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

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

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

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

25-
# Grab results from the job
26-
result = job.result()
25+
# Grab results from the job
26+
result = job.result()
2727

28-
# Returns counts
29-
counts = result.get_counts(circuit)
28+
# Returns counts
29+
counts = result.get_counts(circuit)
3030

31-
return counts
31+
return counts
3232

3333

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

0 commit comments

Comments
 (0)