Commit b3a2d3b6 authored by dm48zazo's avatar dm48zazo
Browse files

Fix get_amplitudes

get_amplitudes returns now the expected amplitudes without any normalization and optimization in the background
parent e5bc9575
......@@ -26,7 +26,7 @@ def init_qvm_and_quilc(qvm_executable="qvm", quilc_executable="quilc"):
def get_amplitudes(circuit):
if isinstance(circuit, qiskit.circuit.quantumcircuit.QuantumCircuit):
backend = BasicAer.get_backend('statevector_simulator')
job = execute(circuit, backend)
job = execute(circuit, backend, optimization_level=0)
amplitudes = job.result().get_statevector(circuit)
elif isinstance(circuit, pyquil.quil.Program):
wf_sim = WavefunctionSimulator(connection=fc)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment