I am working with Aqua sample (qiskit-aqua/test/finance/test_readme_sample.py
) that uses the FixedIncomeExpectedValue
and the AmplitudeEstimation
.
It is qiskit 0.18
This sample was previously working with qiskit 0.16.2 when Statevector_simulator
was used for AmplitudeEstimation
. Though I used to run into an error ERROR_RUNNING_JOB when running on ibmq_
hardware. I was told to upgrade to qiskit 0.18
to fix that.
Since the update it now fails in _check_conflicting_argument
with the message "The parameters pass_manager conflicts with the following parameter(s): backend.
" as shown below is a stack trace
:
qc = compiler.transpile(circuit, BasicAer.get_backend('qasm_simulator'), pass_manager=p_m)
File "C:\Users\-----\Anaconda3\envs\qiskite\lib\site-packages\qiskit\compiler\transpile.py", line 188, in transpile
routing_method=routing_method, backend=backend)
File "C:\Users\------\Anaconda3\envs\qiskite\lib\site-packages\qiskit\compiler\transpile.py", line 225, in _check_conflicting_argument
"parameter(s): {}.".format(', '.join(conflicting_args)))
TranspilerError: 'The parameters pass_manager conflicts with the following parameter(s): backend.'
Further walk through the stack trace shows the following
bckend = set_backend('STATEVEC')
ampest = AmplitudeEstimation(m, fixed_income)
result = ampest.run(quantum_instance=bckend)
..quantum_algorithm.run()
....ae.run
......if _quantum_instance.is_statevector:
........construct_circuit(measurement = False)
..........pec = PhaseEstimationCircuit(...)
..........pec.construct_circuit(measurement = False)
............._state_n_circuit_factory(qc,q,aux)
................uncertainty_model.build(...) #fixed_income_....py
..................cs = Custom(...) #multivariate_distribution.py
..................extend(cs.construct_circuit('circuit',q))
.....................cs.construct_circuit('circuit')
........................svc = StateVectorCircuit(_state_vector)
........................sv.construct_circuit(...)
..........................convert_to_basis_gates()
............................Unroller(...)
............................PassManager(...)
............................compiler.transpile(circuit, BasicAer.get_backend('qasm_simulator)...)
.............................. transpile (....)
................................._check_conflicting_argument(...backend=backend)
It is in this _check_conflicting_argument
that the error message is raised "The parameters pass_manager conflicts with the following parameter(s): backend."
and the script stops execution.
Please let me know what am I missing something here.
Thank you
qiskit 0.16.2
- I updated toqiskit 0.18
- I updated the description above $\endgroup$execute
$\endgroup$