mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-08 03:54:26 +08:00
fix(quantum): Correct simulator deprecation (#7869)
This commit is contained in:

committed by
GitHub

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)
|
||||||
|
Reference in New Issue
Block a user