-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Replace backend.calibration & backend.parameters with backend.properties #870
Replace backend.calibration & backend.parameters with backend.properties #870
Conversation
381ebf3
to
b2c0794
Compare
@dcmckayibm This is what i get from the merge of {'backend': 'ibmqx4',
'fridge_parameters': {'Temperature': {'date': '-', 'unit': '-', 'value': []},
'cooldownDate': '2017-09-07'},
'last_update_date': '2018-09-11T10:01:05.000Z',
'multi_qubit_gates': [{'gateError': {'date': '2018-09-11T10:01:05Z',
'value': 0.025416565897270732},
'name': 'CX1_0',
'qubits': [1, 0],
'type': 'CX'},
{'gateError': {'date': '2018-09-11T10:01:05Z',
'value': 0.025959274240280383},
'name': 'CX2_0',
'qubits': [2, 0],
'type': 'CX'},
{'gateError': {'date': '2018-09-11T10:01:05Z',
'value': 0.025823578091021426},
'name': 'CX2_1',
'qubits': [2, 1],
'type': 'CX'},
{'gateError': {'date': '2018-09-11T10:01:05Z', 'value': 0.0752538677586006},
'name': 'CX3_2',
'qubits': [3, 2],
'type': 'CX'},
{'gateError': {'date': '2018-09-11T10:01:05Z', 'value': 0.04412209362278141},
'name': 'CX3_4',
'qubits': [3, 4],
'type': 'CX'},
{'gateError': {'date': '2018-09-11T10:01:05Z', 'value': 0.05384498081562386},
'name': 'CX4_2',
'qubits': [4, 2],
'type': 'CX'}],
'qubits': [{'T1': {'date': '2018-09-11T10:01:05Z', 'unit': 'µs', 'value': 44},
'T2': {'date': '2018-09-11T10:01:05Z', 'unit': 'µs', 'value': 52.9},
'buffer': {'date': '2018-09-11T10:01:05Z', 'unit': 'ns', 'value': 10},
'frequency': {'date': '2018-09-11T10:01:05Z',
'unit': 'GHz',
'value': 5.24983},
'gateError': {'date': '2018-09-11T10:01:05Z',
'value': 0.0006867731322012238},
'gateTime': {'date': '2018-09-11T10:01:05Z', 'unit': 'ns', 'value': 60},
'name': 'Q0',
'readoutError': {'date': '2018-09-11T10:01:05Z', 'value': 0.069}},
{'T1': {'date': '2018-09-11T10:01:05Z', 'unit': 'µs', 'value': 65.9},
'T2': {'date': '2018-09-11T10:01:05Z', 'unit': 'µs', 'value': 28.9},
'buffer': {'date': '2018-09-11T10:01:05Z', 'unit': 'ns', 'value': 10},
'frequency': {'date': '2018-09-11T10:01:05Z',
'unit': 'GHz',
'value': 5.29578},
'gateError': {'date': '2018-09-11T10:01:05Z',
'value': 0.002662115274625232},
'gateTime': {'date': '2018-09-11T10:01:05Z', 'unit': 'ns', 'value': 60},
'name': 'Q1',
'readoutError': {'date': '2018-09-11T10:01:05Z', 'value': 0.057}},
{'T1': {'date': '2018-09-11T10:01:05Z', 'unit': 'µs', 'value': 43.2},
'T2': {'date': '2018-09-11T10:01:05Z', 'unit': 'µs', 'value': 38.7},
'buffer': {'date': '2018-09-11T10:01:05Z', 'unit': 'ns', 'value': 10},
'frequency': {'date': '2018-09-11T10:01:05Z',
'unit': 'GHz',
'value': 5.35322},
'gateError': {'date': '2018-09-11T10:01:05Z',
'value': 0.0009443532335046134},
'gateTime': {'date': '2018-09-11T10:01:05Z', 'unit': 'ns', 'value': 60},
'name': 'Q2',
'readoutError': {'date': '2018-09-11T10:01:05Z', 'value': 0.028}},
{'T1': {'date': '2018-09-11T10:01:05Z', 'unit': 'µs', 'value': 48.5},
'T2': {'date': '2018-09-11T10:01:05Z', 'unit': 'µs', 'value': 20.3},
'buffer': {'date': '2018-09-11T10:01:05Z', 'unit': 'ns', 'value': 10},
'frequency': {'date': '2018-09-11T10:01:05Z',
'unit': 'GHz',
'value': 5.43499},
'gateError': {'date': '2018-09-11T10:01:05Z',
'value': 0.001803112096824766},
'gateTime': {'date': '2018-09-11T10:01:05Z', 'unit': 'ns', 'value': 60},
'name': 'Q3',
'readoutError': {'date': '2018-09-11T10:01:05Z', 'value': 0.033}},
{'T1': {'date': '2018-09-11T10:01:05Z', 'unit': 'µs', 'value': 53.1},
'T2': {'date': '2018-09-11T10:01:05Z', 'unit': 'µs', 'value': 12.1},
'buffer': {'date': '2018-09-11T10:01:05Z', 'unit': 'ns', 'value': 10},
'frequency': {'date': '2018-09-11T10:01:05Z',
'unit': 'GHz',
'value': 5.17581},
'gateError': {'date': '2018-09-11T10:01:05Z',
'value': 0.0013737021608475342},
'gateTime': {'date': '2018-09-11T10:01:05Z', 'unit': 'ns', 'value': 60},
'name': 'Q4',
'readoutError': {'date': '2018-09-11T10:01:05Z', 'value': 0.157}}]}
|
@ajavadia lets not worry about the elements until we update the API. This looks good to me |
actually why not use merged_dict = {**base_dict, **other_dict} instead of making function. |
b2c0794
to
9744fa3
Compare
@jaygambetta the merging is slightly more complicated because the arrays within the dicts need to be combined as well. For example, the key The function I've written handles recursive merging for cases like this (dict inside list inside dict). I rebased against master. |
8f65fb5
to
b9f10d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ajavadia - and specially for taking the time to catch and fully deprecate a number of things in the process 🎉
b9f10d2
to
e977e70
Compare
This looks good. |
Replace backend.calibration & backend.parameters with backend.properties
Fix #778
Summary
One major inconsistency between the defined spec/schemas and the current qiskit API is the methods
backend.calibration
andbackend.parameters
. The data returned from these should just be combined and returned viabackend.properties
.The API doesn't have this endpoint yet, so this is a temporary hack in Qiskit to make the API consistent for 0.6 Should fix (along with a bunch of other FIXMEs) when the API finally gets updated.
The PR also does the following cleanups:
_register.py
andqasm_simulator_py
Details and comments