-
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
Remove marshmallow from providers/ #4016
Merged
nonhermitian
merged 21 commits into
Qiskit:master
from
mtreinish:remove-marshmallow-backends
Apr 10, 2020
Merged
Remove marshmallow from providers/ #4016
nonhermitian
merged 21 commits into
Qiskit:master
from
mtreinish:remove-marshmallow-backends
Apr 10, 2020
Conversation
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
As a follow on to Qiskit#3383 this continues the process of removing marshmallow from the provider interface in an effort to stabilize it before freezing it and introducing a new version. This commit removes all the usage of marshmallow schemas and models from the providers/ directory and replaces all the classes using it with flat classes and/or SimpleNamespace classes (if the models allowed arbitrary key value pairs).
mtreinish
requested review from
1ucian0,
ajavadia,
chriseclectic,
ewinston,
jyu00,
kdk and
taalexander
as code owners
March 24, 2020 22:09
mtreinish
added a commit
to mtreinish/qiskit-core
that referenced
this pull request
Mar 25, 2020
Right now there is nothing in validating that we're able to use all the fake backends defined in qiskit.test.mock.backends. So when we make changes to the fake backends (or backends in general) we don't know if they work until someone goes to use them. This was especially needed for Qiskit#4016. During the development of that PR all the tests pass but the docs builds failed because a fake backend is used in a jupyter-execute section. This commit addresses the situation by adding a simple test that just runs a simple deterministic circuit that just has some easy 1q gate run optimizations on the fake backend at each optimization level (to ensure we use all the backend properties needed for execution). This will provide us coverage over the fake backends to ensure that they at least are functional as we make changes to terra. As part of the development of these tests, 2 missing properties from the new qobj classes were added because the tests caught that they were missing. Additionally the properties json file for fake yorktown had to be updated, the properties there were incorrect when run with aer (and thus a noise model) all the results were invalid. Fixes Qiskit#3735
ajavadia
pushed a commit
that referenced
this pull request
Mar 25, 2020
* Add tests executing a circuit on each fake backend Right now there is nothing in validating that we're able to use all the fake backends defined in qiskit.test.mock.backends. So when we make changes to the fake backends (or backends in general) we don't know if they work until someone goes to use them. This was especially needed for #4016. During the development of that PR all the tests pass but the docs builds failed because a fake backend is used in a jupyter-execute section. This commit addresses the situation by adding a simple test that just runs a simple deterministic circuit that just has some easy 1q gate run optimizations on the fake backend at each optimization level (to ensure we use all the backend properties needed for execution). This will provide us coverage over the fake backends to ensure that they at least are functional as we make changes to terra. As part of the development of these tests, 2 missing properties from the new qobj classes were added because the tests caught that they were missing. Additionally the properties json file for fake yorktown had to be updated, the properties there were incorrect when run with aer (and thus a noise model) all the results were invalid. Fixes #3735 * Add qiskit-aer to ci jobs To fully test the fake backend properties we need to use aer to build a noise model and run the simulation with that. This commit adds qiskit-aer to the ci configuration so that it is a vailable for these new tests. In general we don't want to rely on aer (because of the potential circular dependency) but for this case it's seems worth the tradeoff. * Reduce error rates on fake_openpulse_2q backend When running simulations with a noise model the tests were failing on fake_openpulse_2q because it was set as being too noisy. This commit drops the error rates set in the properties so we can run a circuit with a single x gate and get the expected result. * Handle simulators properly for fake backends The fake_qasm_simulator is set as a simulator, but the base fake_provider class was not setup to handle a backend which was a simulator. This commit handles this by having the fake_qasm_simulator return no properties, and also updates the run() method to not try and build a noise model for a simulator. * Adjust tests to use fake provider This commit adjusts the tests to use the fake provider to get a list of backends instead of scanning the backends module for Fake* objects. * Change fake_qasm_simulator basis to basic aer's For fake_qasm_simulator's run() method top work when aer is not installed it needs to be usable with the basic aer simulator. However, right now the basis set was closer to aer's. This commit adjusts it to be basic aer's which is LCD for running in a simulator. * Cleanup arg name for test
The parameters attribute of the GateConfig class is a list of Nduv objects not a single Nduv. So when running to_dict() on a GateConfig object it's necessary to run to_dict() on each Nduv, not the list. This commit corrects this oversight, and adds a test for it.
mtreinish
force-pushed
the
remove-marshmallow-backends
branch
from
March 25, 2020 23:02
19c0be6
to
a12055e
Compare
PulseLibraryItems are normally constructed either manually or by a provider with a pulse backend. In the case of ibmq and the mock backends these are constructed from the deserialized json dicts of the response (or the stored response) from the iqx api. While the pulselibraryitem class expects a list of complex numbers, the json format for iqx sends complex numbers as a list of the form [real, imag]. To ease the transition to being able to just directly passing a list of complex numbers this commit handles the case where a PulseLibraryItem is attempted to be created with samples in the json format. When a list of lists is receieved for the samples parameter the class will convert that to an array of complex numbers. Ideally in the longer term this will not be necessary and providers (both ibmq and the fake provider) will do this conversion for us.
mtreinish
added a commit
to mtreinish/qiskit-core
that referenced
this pull request
Mar 26, 2020
This commit finishes the process of removing marshmallow from terra. It rebuilds the result class as bare python classes or SimpleNamespace subclasses (for classes that allow arbitrary fields). After the result class has been converted there is nothing using marshmallow or all the support code in qiskit/validation. So this continues the removal process by removing those and removing marshmallow and marshmallow-polyfield from the requirements list. This commit depends on Qiskit#4027 and Qiskit#4016 and can't be merged without those.
lcapelluto
reviewed
Mar 26, 2020
@@ -279,6 +348,7 @@ def __init__(self, | |||
open_pulse: bool, | |||
memory: bool, | |||
max_shots: int, | |||
coupling_map, |
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.
type hints?
@@ -335,16 +444,77 @@ def __init__(self, | |||
self.dt = dt * 1e-9 # pylint: disable=invalid-name | |||
self.dtm = dtm * 1e-9 | |||
|
|||
channel_bandwidth = kwargs.pop('channel_bandwidth', None) | |||
if channel_bandwidth: | |||
if channel_bandwidth is not None: |
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.
nice
mtreinish
added
Changelog: API Change
Include in the "Changed" section of the changelog
performance
labels
Apr 10, 2020
mtreinish
added a commit
to mtreinish/qiskit-core
that referenced
this pull request
Apr 10, 2020
After Qiskit#4016 has merged a missed edge case in the handling of to_dict() and from_dict() for PulseBackendConfiguration was discovered via the aer unit tests. The u_channel_lo attribute is a nested object and needs to call UChannelLO's to_dict() and from_dict() methods in those respective calls. However, this conversion was not being done. This commit corrects the oversight.
mtreinish
added a commit
to mtreinish/qiskit-core
that referenced
this pull request
Apr 10, 2020
Now Qiskit#4016 has merged this is unblocked on the terra side. This commit makes some changes and fixes issues found from testing.
mtreinish
added a commit
to mtreinish/qiskit-aer
that referenced
this pull request
Apr 14, 2020
In Qiskit/qiskit#4016 the pulse defaults (as well as backend configuration and properties) were updated to not rely on marshmallow. A side effect of this change is that the return from to_dict() on pulse defaults no longer will convert complex -> [real, imag] since this is typically an unecessary conversion that complicates using the output. However, the pulse system model class was not handling this as expected and will fail trying to access the the components from [real, imag]. This commit updates this to handle the case when a complex number is passed in.
mtreinish
added a commit
to mtreinish/qiskit-aer
that referenced
this pull request
Apr 14, 2020
As fall out from Qiskit/qiskit#4016 there was a bug in the to_dict() method of the backend configuration that was resulting in UChannelLO objects not getting converted to their dict form in the output of to_dict(). While this is being fixed in Qiskit/qiskit#4124 this commit side steps the issue by adapting the access patterns in the pulse system model to rely on class attribute access and getattr() instead of dict access and get().
mtreinish
added a commit
to mtreinish/qiskit-aer
that referenced
this pull request
Apr 14, 2020
As fall out from Qiskit/qiskit#4016 there was a bug in the to_dict() method of the backend configuration that was resulting in UChannelLO objects not getting converted to their dict form in the output of to_dict(). While this is being fixed in Qiskit/qiskit#4124 this commit side steps the issue by adapting the access patterns in the pulse system model to rely on class attribute access and getattr() instead of dict access and get().
chriseclectic
added a commit
to Qiskit/qiskit-aer
that referenced
this pull request
Apr 14, 2020
* Avoid to_dict() when possible in pulse system model As fall out from Qiskit/qiskit#4016 there was a bug in the to_dict() method of the backend configuration that was resulting in UChannelLO objects not getting converted to their dict form in the output of to_dict(). While this is being fixed in Qiskit/qiskit#4124 this commit side steps the issue by adapting the access patterns in the pulse system model to rely on class attribute access and getattr() instead of dict access and get(). Co-authored-by: Christopher J. Wood <[email protected]>
hhorii
pushed a commit
to hhorii/qiskit-aer
that referenced
this pull request
Apr 16, 2020
* Avoid to_dict() when possible in pulse system model As fall out from Qiskit/qiskit#4016 there was a bug in the to_dict() method of the backend configuration that was resulting in UChannelLO objects not getting converted to their dict form in the output of to_dict(). While this is being fixed in Qiskit/qiskit#4124 this commit side steps the issue by adapting the access patterns in the pulse system model to rely on class attribute access and getattr() instead of dict access and get(). Co-authored-by: Christopher J. Wood <[email protected]>
scottwn
added a commit
to scottwn/qiskit-terra
that referenced
this pull request
Apr 16, 2020
chriseclectic
added a commit
to chriseclectic/qiskit-aer
that referenced
this pull request
Apr 20, 2020
* Avoid to_dict() when possible in pulse system model As fall out from Qiskit/qiskit#4016 there was a bug in the to_dict() method of the backend configuration that was resulting in UChannelLO objects not getting converted to their dict form in the output of to_dict(). While this is being fixed in Qiskit/qiskit#4124 this commit side steps the issue by adapting the access patterns in the pulse system model to rely on class attribute access and getattr() instead of dict access and get(). Co-authored-by: Christopher J. Wood <[email protected]>
mergify bot
added a commit
that referenced
this pull request
Apr 21, 2020
Co-authored-by: Thomas Alexander <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot
pushed a commit
that referenced
this pull request
Apr 21, 2020
* Add missing dict conversion in backconfiguration class After #4016 has merged a missed edge case in the handling of to_dict() and from_dict() for PulseBackendConfiguration was discovered via the aer unit tests. The u_channel_lo attribute is a nested object and needs to call UChannelLO's to_dict() and from_dict() methods in those respective calls. However, this conversion was not being done. This commit corrects the oversight. * Fix pulse defaults to dict There was an issue in the pulse defaults to_dict() method too where the converters attribute was incorrectly attempted to be output as a property in the output dictionary. This was incorrect and it just a helper there constructed based on other input. So outputting it with the dictionary was incorrect. This commit corrects this oversight. * Fix typo and tests * Fix typo in tests * Remove another extra defaults attribute * Update type hint Co-authored-by: Christopher J. Wood <[email protected]>
mergify bot
added a commit
that referenced
this pull request
May 7, 2020
* Remove marshmallow from result/ and requirements This commit finishes the process of removing marshmallow from terra. It rebuilds the result class as bare python classes or SimpleNamespace subclasses (for classes that allow arbitrary fields). After the result class has been converted there is nothing using marshmallow or all the support code in qiskit/validation. So this continues the removal process by removing those and removing marshmallow and marshmallow-polyfield from the requirements list. This commit depends on #4027 and #4016 and can't be merged without those. * Fixes from testing Now #4016 has merged this is unblocked on the terra side. This commit makes some changes and fixes issues found from testing. * Abandon SimpleNamespace for Result and ExperimentResult While both Result and ExperimentResult take arbitrary key value date via the kwargs using SimpleNamespace as a parent class like in other places is not a good fit. This is because the signatures for these classes are signfiicantly different from the base SimpleNamespace. So when Results are pickled via async execution (like in the BasicAer and Aer providers) this causes it to either fail or if a custom __reduce__ method is defined it to not work as expected. This commit pivots the new classes to be bare objects that store the arbitrary kwargs as a private dictionary attribute. Attribute access for these fields are implemented via a custom __getattr__. * Use correct header type in tests The results tests were using a raw Marshmallow.Obj object in the tests to construct the Result qobj headers and relying on the schema to convert it to a QobjExperimentHeader when it was passed to the Result constructor. When marshmallow was removed this was updated to a dict() since that was the closest mapping, but that ignored the transform marshmallow would do. This commit corrects that oversight and constructs QobjExperimentHeader object where dict was incorrectly used before. This is probably what the original tests should have done for clarity anyway. * Fix lint * Fix docstring * Add release notes * Fix docs issues from review comments Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
faisaldebouni
pushed a commit
to faisaldebouni/qiskit-terra
that referenced
this pull request
Aug 5, 2020
* Add tests executing a circuit on each fake backend Right now there is nothing in validating that we're able to use all the fake backends defined in qiskit.test.mock.backends. So when we make changes to the fake backends (or backends in general) we don't know if they work until someone goes to use them. This was especially needed for Qiskit#4016. During the development of that PR all the tests pass but the docs builds failed because a fake backend is used in a jupyter-execute section. This commit addresses the situation by adding a simple test that just runs a simple deterministic circuit that just has some easy 1q gate run optimizations on the fake backend at each optimization level (to ensure we use all the backend properties needed for execution). This will provide us coverage over the fake backends to ensure that they at least are functional as we make changes to terra. As part of the development of these tests, 2 missing properties from the new qobj classes were added because the tests caught that they were missing. Additionally the properties json file for fake yorktown had to be updated, the properties there were incorrect when run with aer (and thus a noise model) all the results were invalid. Fixes Qiskit#3735 * Add qiskit-aer to ci jobs To fully test the fake backend properties we need to use aer to build a noise model and run the simulation with that. This commit adds qiskit-aer to the ci configuration so that it is a vailable for these new tests. In general we don't want to rely on aer (because of the potential circular dependency) but for this case it's seems worth the tradeoff. * Reduce error rates on fake_openpulse_2q backend When running simulations with a noise model the tests were failing on fake_openpulse_2q because it was set as being too noisy. This commit drops the error rates set in the properties so we can run a circuit with a single x gate and get the expected result. * Handle simulators properly for fake backends The fake_qasm_simulator is set as a simulator, but the base fake_provider class was not setup to handle a backend which was a simulator. This commit handles this by having the fake_qasm_simulator return no properties, and also updates the run() method to not try and build a noise model for a simulator. * Adjust tests to use fake provider This commit adjusts the tests to use the fake provider to get a list of backends instead of scanning the backends module for Fake* objects. * Change fake_qasm_simulator basis to basic aer's For fake_qasm_simulator's run() method top work when aer is not installed it needs to be usable with the basic aer simulator. However, right now the basis set was closer to aer's. This commit adjusts it to be basic aer's which is LCD for running in a simulator. * Cleanup arg name for test
faisaldebouni
pushed a commit
to faisaldebouni/qiskit-terra
that referenced
this pull request
Aug 5, 2020
* Remove marshmallow from providers/ As a follow on to Qiskit#3383 this continues the process of removing marshmallow from the provider interface in an effort to stabilize it before freezing it and introducing a new version. This commit removes all the usage of marshmallow schemas and models from the providers/ directory and replaces all the classes using it with flat classes and/or SimpleNamespace classes (if the models allowed arbitrary key value pairs). * Handle parameters correctly in GateConfig.to_dict() The parameters attribute of the GateConfig class is a list of Nduv objects not a single Nduv. So when running to_dict() on a GateConfig object it's necessary to run to_dict() on each Nduv, not the list. This commit corrects this oversight, and adds a test for it. * Fix nesting for properties.qubits.to_dict() * Fix docs * Add release notes * Fix new docs issues * Correct oversights in new classes * Handle wire protocol input for PulseLibraryItems PulseLibraryItems are normally constructed either manually or by a provider with a pulse backend. In the case of ibmq and the mock backends these are constructed from the deserialized json dicts of the response (or the stored response) from the iqx api. While the pulselibraryitem class expects a list of complex numbers, the json format for iqx sends complex numbers as a list of the form [real, imag]. To ease the transition to being able to just directly passing a list of complex numbers this commit handles the case where a PulseLibraryItem is attempted to be created with samples in the json format. When a list of lists is receieved for the samples parameter the class will convert that to an array of complex numbers. Ideally in the longer term this will not be necessary and providers (both ibmq and the fake provider) will do this conversion for us. * Update qiskit/providers/models/backendproperties.py Co-Authored-By: Lauren Capelluto <[email protected]> * Don't force the 5 base job states Job statuses are often outside the 5 status that were previously defined in the marshmallow schema. This commit removes this restriction so providers can just set the status instead of overloading the class to change which status are allowed. * Fix lint Co-authored-by: Lauren Capelluto <[email protected]>
faisaldebouni
pushed a commit
to faisaldebouni/qiskit-terra
that referenced
this pull request
Aug 5, 2020
Co-authored-by: Thomas Alexander <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
faisaldebouni
pushed a commit
to faisaldebouni/qiskit-terra
that referenced
this pull request
Aug 5, 2020
* Add missing dict conversion in backconfiguration class After Qiskit#4016 has merged a missed edge case in the handling of to_dict() and from_dict() for PulseBackendConfiguration was discovered via the aer unit tests. The u_channel_lo attribute is a nested object and needs to call UChannelLO's to_dict() and from_dict() methods in those respective calls. However, this conversion was not being done. This commit corrects the oversight. * Fix pulse defaults to dict There was an issue in the pulse defaults to_dict() method too where the converters attribute was incorrectly attempted to be output as a property in the output dictionary. This was incorrect and it just a helper there constructed based on other input. So outputting it with the dictionary was incorrect. This commit corrects this oversight. * Fix typo and tests * Fix typo in tests * Remove another extra defaults attribute * Update type hint Co-authored-by: Christopher J. Wood <[email protected]>
faisaldebouni
pushed a commit
to faisaldebouni/qiskit-terra
that referenced
this pull request
Aug 5, 2020
* Remove marshmallow from result/ and requirements This commit finishes the process of removing marshmallow from terra. It rebuilds the result class as bare python classes or SimpleNamespace subclasses (for classes that allow arbitrary fields). After the result class has been converted there is nothing using marshmallow or all the support code in qiskit/validation. So this continues the removal process by removing those and removing marshmallow and marshmallow-polyfield from the requirements list. This commit depends on Qiskit#4027 and Qiskit#4016 and can't be merged without those. * Fixes from testing Now Qiskit#4016 has merged this is unblocked on the terra side. This commit makes some changes and fixes issues found from testing. * Abandon SimpleNamespace for Result and ExperimentResult While both Result and ExperimentResult take arbitrary key value date via the kwargs using SimpleNamespace as a parent class like in other places is not a good fit. This is because the signatures for these classes are signfiicantly different from the base SimpleNamespace. So when Results are pickled via async execution (like in the BasicAer and Aer providers) this causes it to either fail or if a custom __reduce__ method is defined it to not work as expected. This commit pivots the new classes to be bare objects that store the arbitrary kwargs as a private dictionary attribute. Attribute access for these fields are implemented via a custom __getattr__. * Use correct header type in tests The results tests were using a raw Marshmallow.Obj object in the tests to construct the Result qobj headers and relying on the schema to convert it to a QobjExperimentHeader when it was passed to the Result constructor. When marshmallow was removed this was updated to a dict() since that was the closest mapping, but that ignored the transform marshmallow would do. This commit corrects that oversight and constructs QobjExperimentHeader object where dict was incorrectly used before. This is probably what the original tests should have done for clarity anyway. * Fix lint * Fix docstring * Add release notes * Fix docs issues from review comments Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-ibm-provider
that referenced
this pull request
Oct 9, 2023
* Add tests executing a circuit on each fake backend Right now there is nothing in validating that we're able to use all the fake backends defined in qiskit.test.mock.backends. So when we make changes to the fake backends (or backends in general) we don't know if they work until someone goes to use them. This was especially needed for Qiskit/qiskit#4016. During the development of that PR all the tests pass but the docs builds failed because a fake backend is used in a jupyter-execute section. This commit addresses the situation by adding a simple test that just runs a simple deterministic circuit that just has some easy 1q gate run optimizations on the fake backend at each optimization level (to ensure we use all the backend properties needed for execution). This will provide us coverage over the fake backends to ensure that they at least are functional as we make changes to terra. As part of the development of these tests, 2 missing properties from the new qobj classes were added because the tests caught that they were missing. Additionally the properties json file for fake yorktown had to be updated, the properties there were incorrect when run with aer (and thus a noise model) all the results were invalid. Fixes Qiskit/qiskit#3735 * Add qiskit-aer to ci jobs To fully test the fake backend properties we need to use aer to build a noise model and run the simulation with that. This commit adds qiskit-aer to the ci configuration so that it is a vailable for these new tests. In general we don't want to rely on aer (because of the potential circular dependency) but for this case it's seems worth the tradeoff. * Reduce error rates on fake_openpulse_2q backend When running simulations with a noise model the tests were failing on fake_openpulse_2q because it was set as being too noisy. This commit drops the error rates set in the properties so we can run a circuit with a single x gate and get the expected result. * Handle simulators properly for fake backends The fake_qasm_simulator is set as a simulator, but the base fake_provider class was not setup to handle a backend which was a simulator. This commit handles this by having the fake_qasm_simulator return no properties, and also updates the run() method to not try and build a noise model for a simulator. * Adjust tests to use fake provider This commit adjusts the tests to use the fake provider to get a list of backends instead of scanning the backends module for Fake* objects. * Change fake_qasm_simulator basis to basic aer's For fake_qasm_simulator's run() method top work when aer is not installed it needs to be usable with the basic aer simulator. However, right now the basis set was closer to aer's. This commit adjusts it to be basic aer's which is LCD for running in a simulator. * Cleanup arg name for test
ElePT
pushed a commit
to ElePT/qiskit-ibm-provider
that referenced
this pull request
Oct 9, 2023
* Remove marshmallow from providers/ As a follow on to Qiskit/qiskit#3383 this continues the process of removing marshmallow from the provider interface in an effort to stabilize it before freezing it and introducing a new version. This commit removes all the usage of marshmallow schemas and models from the providers/ directory and replaces all the classes using it with flat classes and/or SimpleNamespace classes (if the models allowed arbitrary key value pairs). * Handle parameters correctly in GateConfig.to_dict() The parameters attribute of the GateConfig class is a list of Nduv objects not a single Nduv. So when running to_dict() on a GateConfig object it's necessary to run to_dict() on each Nduv, not the list. This commit corrects this oversight, and adds a test for it. * Fix nesting for properties.qubits.to_dict() * Fix docs * Add release notes * Fix new docs issues * Correct oversights in new classes * Handle wire protocol input for PulseLibraryItems PulseLibraryItems are normally constructed either manually or by a provider with a pulse backend. In the case of ibmq and the mock backends these are constructed from the deserialized json dicts of the response (or the stored response) from the iqx api. While the pulselibraryitem class expects a list of complex numbers, the json format for iqx sends complex numbers as a list of the form [real, imag]. To ease the transition to being able to just directly passing a list of complex numbers this commit handles the case where a PulseLibraryItem is attempted to be created with samples in the json format. When a list of lists is receieved for the samples parameter the class will convert that to an array of complex numbers. Ideally in the longer term this will not be necessary and providers (both ibmq and the fake provider) will do this conversion for us. * Update qiskit/providers/models/backendproperties.py Co-Authored-By: Lauren Capelluto <[email protected]> * Don't force the 5 base job states Job statuses are often outside the 5 status that were previously defined in the marshmallow schema. This commit removes this restriction so providers can just set the status instead of overloading the class to change which status are allowed. * Fix lint Co-authored-by: Lauren Capelluto <[email protected]>
ElePT
pushed a commit
to ElePT/qiskit-ibm-provider
that referenced
this pull request
Oct 9, 2023
…#4124) * Add missing dict conversion in backconfiguration class After Qiskit/qiskit#4016 has merged a missed edge case in the handling of to_dict() and from_dict() for PulseBackendConfiguration was discovered via the aer unit tests. The u_channel_lo attribute is a nested object and needs to call UChannelLO's to_dict() and from_dict() methods in those respective calls. However, this conversion was not being done. This commit corrects the oversight. * Fix pulse defaults to dict There was an issue in the pulse defaults to_dict() method too where the converters attribute was incorrectly attempted to be output as a property in the output dictionary. This was incorrect and it just a helper there constructed based on other input. So outputting it with the dictionary was incorrect. This commit corrects this oversight. * Fix typo and tests * Fix typo in tests * Remove another extra defaults attribute * Update type hint Co-authored-by: Christopher J. Wood <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Summary
As a follow on to #3383 this continues the process of removing
marshmallow from the provider interface in an effort to stabilize it
before freezing it and introducing a new version. This commit removes
all the usage of marshmallow schemas and models from the providers/
directory and replaces all the classes using it with flat classes
and/or SimpleNamespace classes (if the models allowed arbitrary key
value pairs).
Details and comments
After this PR merges the only place left to remove marshmallow from is
results/