mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
fix(quantum): Correct simulator deprecation (#7869)
This commit is contained in:
parent
84facb78b2
commit
48a73a28d4
@ -57,7 +57,7 @@ def quantum_teleportation(
|
|||||||
quantum_circuit.measure([2], [0]) # measure the qubit.
|
quantum_circuit.measure([2], [0]) # measure the qubit.
|
||||||
|
|
||||||
# Simulate the circuit using qasm simulator
|
# Simulate the circuit using qasm simulator
|
||||||
backend = Aer.get_backend("qasm_simulator")
|
backend = Aer.get_backend("aer_simulator")
|
||||||
job = execute(quantum_circuit, backend, shots=1000)
|
job = execute(quantum_circuit, backend, shots=1000)
|
||||||
|
|
||||||
return job.result().get_counts(quantum_circuit)
|
return job.result().get_counts(quantum_circuit)
|
||||||
|
Loading…
Reference in New Issue
Block a user