fix: Replace deprecated qasm_simulator with aer_simulator (#7308) (#7556)

This commit is contained in:
Caeden Perelli-Harris 2022-10-23 14:06:12 +01:00 committed by GitHub
parent a5362799a5
commit d5f322f576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,7 @@ def superdense_coding(bit_1: int = 1, bit_2: int = 1) -> qiskit.result.counts.Co
# measure the circuit
quantum_circuit.measure(qr, cr)
backend = Aer.get_backend("qasm_simulator")
backend = Aer.get_backend("aer_simulator")
job = execute(quantum_circuit, backend, shots=1000)
return job.result().get_counts(quantum_circuit)