-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditionals must be updated to match schema #1778
Conditionals must be updated to match schema #1778
Conversation
Should be on hold until #861 supports qobj-conditionals for basic aer. |
Can you add the |
Can be taken off on-hold after #1955 merges. |
557f864
to
8d58111
Compare
bfunc's were defined previously, but a higher precedence condition required `register` and `memory` attributes to be arrays on all QASM instructions, while bfuncs define them as single integers. This fix moves the "memory/register should be an array" condition to the specific QASM instructions which require it.
8d58111
to
8207686
Compare
The
It should definitely NOT be an array. But the example given in #1283 seems to expect an array. @chriseclectic can you double check that in Aer you don't expect an array? With this patch, that example correctly outputs integers for the conditionals:
|
8207686
to
2b406e3
Compare
@ajavadia Updated, thanks for the comments. Agree that aer checks for an integer, and falls back to assuming an object: |
* Update qobj JSON schema to allow bfuncs. bfunc's were defined previously, but a higher precedence condition required `register` and `memory` attributes to be arrays on all QASM instructions, while bfuncs define them as single integers. This fix moves the "memory/register should be an array" condition to the specific QASM instructions which require it. * Update circuits_to_qobj to emit qobj-compliant conditionals.
Addresses #1283 by updating
assemble_circuits
to replace QASM-style conditionals with a bfunc+Qobj-conditional. Also, updates qobj json schema to allowbfunc
s with single integerregister
andmemory
attributes.