-
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
Update configurations to perform serialization/deserialization scalings before initializing class #4728
Merged
mergify
merged 15 commits into
Qiskit:master
from
taalexander:issue-4720-mock-backend-defaults-bug
Jul 30, 2020
Merged
Update configurations to perform serialization/deserialization scalings before initializing class #4728
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7ee2c5f
Add fake backends for Bogota, Montreal, and Toronto
mtreinish 1d2bfc0
Merge branch 'master' into add-new-backends
taalexander 29c1888
Refactor QobjConfiguration transformations to happen in to_dict and f…
taalexander 26d97fb
Refactor PulseDefaults transformations to happen in to_dict and from_…
taalexander 4cd9a30
Remove conversions from update fake backends scripts.
taalexander eb5273c
Update mock backends. Added ibmq_toronto and ibmq_montreal.
taalexander 305c2ea
fix bug in the parametric pulse code.
taalexander 9ce8747
Undo from_dict/init changes.
taalexander 0187fb8
Do conversion of complex number better.
taalexander 9d7c6e5
Update mock backend files.
taalexander 8358481
Merge remote-tracking branch 'upstream/master' into issue-4720-mock-b…
taalexander f3430d5
Merge branch 'master' into issue-4720-mock-backend-defaults-bug
taalexander c26b56d
Linting.
taalexander 34437f2
Add conversion tests.
taalexander 994b670
Merge branch 'master' into issue-4720-mock-backend-defaults-bug
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"n_uchannels": 0, "u_channel_lo": [], "meas_levels": [1, 2], "qubit_lo_range": [[4.474467513126881, 5.474467513126881]], "meas_lo_range": [[6.493427855, 7.493427855]], "meas_kernels": ["boxcar"], "discriminators": ["linear_discriminator", "quadratic_discriminator"], "hamiltonian": {"description": "Qubits are modelled as a two level system. Qubits are coupled through resonator buses. The provided Hamiltonian has been projected into the zero excitation subspace of the resonator buses leading to an effective qubit-qubit flip-flop interaction. The qubit resonance frequencies in the Hamiltonian are the cavity dressed frequencies and not exactly what is returned by the backend defaults, which also includes the dressing due to the qubit-qubit interactions.\nWarning: Currently not all system Hamiltonian information is available to the public, missing values have been replaced with 0.\n", "h_latex": "\\begin{align} \\mathcal{H}/\\hbar = & \\sum_{i=0}^{0}\\left(\\frac{\\omega_{q,i}}{2} (\\mathbb{1}_i-\\sigma_i^{z})+ \\Omega_{d,i}D_i(t)\\sigma_i^{X}\\right) \\\\ \\end{align}", "h_str": ["_SUM[i,0,0,wq{i}/2*(I{i}-Z{i})]", "_SUM[i,0,0,omegad{i}*X{i}||D{i}]"], "osc": {}, "qub": {"0": 2}, "vars": {"omegad0": 0, "wq0": 31.255501189521}}, "rep_times": [1000.0000000000001], "dt": 0.2222222222222222, "dtm": 0.2222222222222222, "channels": {"acquire0": {"operates": {"qubits": [0]}, "purpose": "acquire", "type": "acquire"}, "d0": {"operates": {"qubits": [0]}, "purpose": "drive", "type": "drive"}, "m0": {"operates": {"qubits": [0]}, "purpose": "measure", "type": "measure"}}, "acquisition_latency": [], "conditional_latency": [], "meas_map": [[0]], "backend_name": "ibmq_armonk", "backend_version": "1.1.0", "n_qubits": 1, "basis_gates": ["id", "u1", "u2", "u3"], "gates": [{"name": "id", "parameters": [], "qasm_def": "gate id q { U(0,0,0) q; }", "coupling_map": [[0]]}, {"name": "u1", "parameters": ["lambda"], "qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "coupling_map": [[0]]}, {"name": "u2", "parameters": ["phi", "lambda"], "qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "coupling_map": [[0]]}, {"name": "u3", "parameters": ["theta", "phi", "lambda"], "qasm_def": "gate u3(theta,phi,lambda) q { U(theta,phi,lambda) q; }", "coupling_map": [[0]]}], "local": false, "simulator": false, "conditional": false, "open_pulse": true, "memory": true, "max_shots": 8192, "coupling_map": null, "max_experiments": 75, "sample_name": "SPARROW", "n_registers": 1, "credits_required": true, "online_date": "2019-10-16T04:00:00+00:00", "description": "1 qubit device", "allow_q_object": true, "parametric_pulses": [], "quantum_volume": null, "qubit_channel_mapping": [["m0", "d0"]], "uchannels_enabled": true, "url": "None", "allow_object_storage": true} | ||
{"n_uchannels": 0, "u_channel_lo": [], "meas_levels": [1, 2], "qubit_lo_range": [[4474445584.380117, 5474445584.380117]], "meas_lo_range": [[6493427855.0, 7493427855.0]], "meas_kernels": ["boxcar"], "discriminators": ["quadratic_discriminator", "linear_discriminator"], "hamiltonian": {"description": "Qubits are modeled as Duffing oscillators. In this case, the system includes higher energy states, i.e. not just |0> and |1>. The Pauli operators are generalized via the following set of transformations:\n\n$(\\mathbb{I}-\\sigma_{i}^z)/2 \\rightarrow O_i \\equiv b^\\dagger_{i} b_{i}$,\n\n$\\sigma_{+} \\rightarrow b^\\dagger$,\n\n$\\sigma_{-} \\rightarrow b$,\n\n$\\sigma_{i}^X \\rightarrow b^\\dagger_{i} + b_{i}$.\n\nQubits are coupled through resonator buses. The provided Hamiltonian has been projected into the zero excitation subspace of the resonator buses leading to an effective qubit-qubit flip-flop interaction. The qubit resonance frequencies in the Hamiltonian are the cavity dressed frequencies and not exactly what is returned by the backend defaults, which also includes the dressing due to the qubit-qubit interactions.\n\nQuantities are returned in angular frequencies, with units 2*pi*GHz.\n\nWARNING: Currently not all system Hamiltonian information is available to the public, missing values have been replaced with 0.\n", "h_latex": "\\begin{align} \\mathcal{H}/\\hbar = & \\sum_{i=0}^{0}\\left(\\frac{\\omega_{q,i}}{2}(\\mathbb{I}-\\sigma_i^{z})+\\frac{\\Delta_{i}}{2}(O_i^2-O_i)+\\Omega_{d,i}D_i(t)\\sigma_i^{X}\\right) \\\\ \\end{align}", "h_str": ["_SUM[i,0,0,wq{i}/2*(I{i}-Z{i})]", "_SUM[i,0,0,delta{i}/2*O{i}*O{i}]", "_SUM[i,0,0,-delta{i}/2*O{i}]", "_SUM[i,0,0,omegad{i}*X{i}||D{i}]"], "osc": {}, "qub": {"0": 3}, "vars": {"delta0": 0, "omegad0": 64964031.66196872, "wq0": 31.255363407141527}}, "dynamic_reprate_enabled": true, "rep_times": [0.001], "rep_delays": [1e-06], "dt": 2.2222222222222221e-10, "dtm": 2.2222222222222221e-10, "channels": {"acquire0": {"operates": {"qubits": [0]}, "purpose": "acquire", "type": "acquire"}, "d0": {"operates": {"qubits": [0]}, "purpose": "drive", "type": "drive"}, "m0": {"operates": {"qubits": [0]}, "purpose": "measure", "type": "measure"}}, "acquisition_latency": [], "conditional_latency": [], "meas_map": [[0]], "backend_name": "alt_armonk", "backend_version": "1.1.0", "n_qubits": 1, "basis_gates": ["id", "u1", "u2", "u3"], "gates": [{"name": "id", "parameters": [], "qasm_def": "gate id q { U(0,0,0) q; }", "coupling_map": [[0]]}, {"name": "u1", "parameters": ["lambda"], "qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "coupling_map": [[0]]}, {"name": "u2", "parameters": ["phi", "lambda"], "qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "coupling_map": [[0]]}, {"name": "u3", "parameters": ["theta", "phi", "lambda"], "qasm_def": "gate u3(theta,phi,lambda) q { U(theta,phi,lambda) q; }", "coupling_map": [[0]]}], "local": false, "simulator": false, "conditional": false, "open_pulse": true, "memory": true, "max_shots": 100000, "coupling_map": null, "max_experiments": 10000, "sample_name": "SPARROW", "n_registers": 1, "credits_required": true, "online_date": "2019-10-16T04:00:00+00:00", "description": "1 qubit device Armonk alternate", "allow_q_object": true, "parametric_pulses": [], "quantum_volume": null, "qubit_channel_mapping": [["d0", "m0"]], "uchannels_enabled": true, "url": "None", "allow_object_storage": true} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"backend_name": "ibmq_armonk", "backend_version": "1.1.0", "last_update_date": "2020-06-10T21:20:30+00:00", "qubits": [[{"date": "2020-06-09T21:03:58+00:00", "name": "T1", "unit": "\u00b5s", "value": 194.51644400301424}, {"date": "2020-06-10T21:15:38+00:00", "name": "T2", "unit": "\u00b5s", "value": 147.75709460786982}, {"date": "2020-06-10T21:20:30+00:00", "name": "frequency", "unit": "GHz", "value": 4.974467513126882}, {"date": "2020-06-10T21:12:29+00:00", "name": "readout_error", "unit": "", "value": 0.039000000000000035}, {"date": "2020-06-10T21:12:29+00:00", "name": "prob_meas0_prep1", "unit": "", "value": 0.048}, {"date": "2020-06-10T21:12:29+00:00", "name": "prob_meas1_prep0", "unit": "", "value": 0.030000000000000027}]], "gates": [{"qubits": [0], "gate": "id", "parameters": [{"date": "2020-06-10T21:17:55+00:00", "name": "gate_error", "unit": "", "value": 0.0005308549630003499}, {"date": "2020-06-10T21:20:30+00:00", "name": "gate_length", "unit": "ns", "value": 142.22222222222223}]}, {"qubits": [0], "gate": "u1", "parameters": [{"date": "2020-06-10T21:17:55+00:00", "name": "gate_error", "unit": "", "value": 0}, {"date": "2020-06-10T21:20:30+00:00", "name": "gate_length", "unit": "ns", "value": 0}]}, {"qubits": [0], "gate": "u2", "parameters": [{"date": "2020-06-10T21:17:55+00:00", "name": "gate_error", "unit": "", "value": 0.0005308549630003499}, {"date": "2020-06-10T21:20:30+00:00", "name": "gate_length", "unit": "ns", "value": 142.22222222222223}]}, {"qubits": [0], "gate": "u3", "parameters": [{"date": "2020-06-10T21:17:55+00:00", "name": "gate_error", "unit": "", "value": 0.0010614281190088892}, {"date": "2020-06-10T21:20:30+00:00", "name": "gate_length", "unit": "ns", "value": 284.44444444444446}]}], "general": []} | ||
{"backend_name": "alt_armonk", "backend_version": "1.1.0", "last_update_date": "2020-07-16T20:12:05+00:00", "qubits": [[{"date": "2020-07-16T12:03:50+00:00", "name": "T1", "unit": "\u00b5s", "value": 173.56037544043704}, {"date": "2020-07-16T20:09:14+00:00", "name": "T2", "unit": "\u00b5s", "value": 137.39745920906893}, {"date": "2020-07-16T20:12:05+00:00", "name": "frequency", "unit": "GHz", "value": 4.974445584380118}, {"date": "2020-07-16T20:07:43+00:00", "name": "readout_error", "unit": "", "value": 0.052000000000000046}, {"date": "2020-07-16T20:07:43+00:00", "name": "prob_meas0_prep1", "unit": "", "value": 0.056}, {"date": "2020-07-16T20:07:43+00:00", "name": "prob_meas1_prep0", "unit": "", "value": 0.04800000000000004}]], "gates": [{"qubits": [0], "gate": "id", "parameters": [{"date": "2020-07-16T20:10:30+00:00", "name": "gate_error", "unit": "", "value": 0.0005108302042606528}, {"date": "2020-07-16T20:12:05+00:00", "name": "gate_length", "unit": "ns", "value": 142.22222222222223}]}, {"qubits": [0], "gate": "u1", "parameters": [{"date": "2020-07-16T20:10:30+00:00", "name": "gate_error", "unit": "", "value": 0}, {"date": "2020-07-16T20:12:05+00:00", "name": "gate_length", "unit": "ns", "value": 0}]}, {"qubits": [0], "gate": "u2", "parameters": [{"date": "2020-07-16T20:10:30+00:00", "name": "gate_error", "unit": "", "value": 0.0005108302042606528}, {"date": "2020-07-16T20:12:05+00:00", "name": "gate_length", "unit": "ns", "value": 142.22222222222223}]}, {"qubits": [0], "gate": "u3", "parameters": [{"date": "2020-07-16T20:10:30+00:00", "name": "gate_error", "unit": "", "value": 0.0010213994610237531}, {"date": "2020-07-16T20:12:05+00:00", "name": "gate_length", "unit": "ns", "value": 284.44444444444446}]}], "general": []} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
How does this interact with the equivalent lines in
QasmBackendConfiguration
? I assume we just end up running this conversion twice and overwriting what's in out_dict with this fromsuper()
.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.
These are fields are only for pulse backends. They aren't in the
QasmBackendConfiguration
.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.
Ignore my previous comment. Apparently they are in the QASM backend. However, they should interact as you said so it shouldn't be an issue.
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.
I guess the follow on question here then is whether we need this duplicated, but it doesn't hurt anything and we can always clean it up in a follow up PR later.