Default value of `meas_return` should be `single`.
See original GitHub issueInformation
- Qiskit Terra version:
- Python version:
- Operating system:
What is the current behavior?
Currently default values of meas_level
and meas_return
are respectively set to 2
and avg
.
https://github.com/Qiskit/qiskit-terra/blob/fa09a7f6d2c6d6b35f8b221221264f7a437a5b17/qiskit/compiler/assemble.py#L30-L39
However meas_level=2
and meas_return='avg'
are invalid combination and this error is caught by qobj validator in ibmq provider.
Steps to reproduce the problem
qobj = qiskit.assemble(some_schedule, backend)
backend.rund(qobj) # error raises here
What is the expected behavior?
invalid default setting should be replaced.
Suggested solutions
maybe one of below
- change default
meas_return
tosingle
- add validation in assembler
- overwrite
meas_return
ifmeas_level
is 2.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
3 Ways to Set Default Value in JavaScript | SamanthaMing.com
Let's break down the 3 different ways to set Default Values using logical operator ... The value produced will always be the value...
Read more >Executing Experiments ( qiskit.execute_function )
If a single LO config or dict is used, the values are set at job level. If a list is used, ... If...
Read more >Assigning default values to shell variables with a single ...
how would I set multiple default values? I tried ": ${VARIABLE:=DEFAULT_VALUE} : ${VARIABLE2:=DEFAULT_VALUE2}" but that doesnt seem to work... – Björn.
Read more >value expressions - produce the default value for any type
Use the default value expressions to obtain the default, uninitialized value of a type. The default value expression can be used with ...
Read more >Default parameters - JavaScript - MDN Web Docs
Now, you can assign 1 as the default value for b in the function head: ... Note: Parameters after the first default parameter...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is a problem with the schemas. Both are required for the schemas to pass validation even in measurement level 2. The schemas would have to be updated to be conditional if this was to be fixed properly.
On Fri, Dec 20, 2019, 10:47 PM nkanazawa notifications@github.com wrote:
Closing as this is not an issue as we do not plan to implement conditional JSON schemas. Extra parameters are fine to be ignored.