Skip to content
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

[WIP] Add getter of minimal attributes necessary for pulse simulation in FakeBackendV2 #8225

Closed
wants to merge 3 commits into from
Closed

[WIP] Add getter of minimal attributes necessary for pulse simulation in FakeBackendV2 #8225

wants to merge 3 commits into from

Conversation

itoko
Copy link
Contributor

@itoko itoko commented Jun 23, 2022

Summary

Exceptionally add getter function of two custom attributes hamiltonian and u_channel_lo to FakeBackendV2. Those attributes are necessary for pulse simulation. They were in configuration() in BackendV1 but they disappear in BackendV2.

Details and comments

Currently, FakeManila().configuration().hamiltonian (u_channel_lo) returns Hamiltonian string (list of u channels info) while the counterpart FakeManilaV2().hamiltonian (u_channel_lo) fails with AttributeError. This commit enables to get those two attributes without failing by adding FakeBackendV2.__getattr__() function.

@itoko itoko requested review from a team and jyu00 as code owners June 23, 2022 07:26
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@HuangJunye HuangJunye added the mod: fake_provider Related to the fake_provider module and fake backends label Jun 23, 2022
@itoko itoko changed the title Add attribute passthrough function in FakeBackendV2 [WIP] Add an attribute passthrough function in FakeBackendV2 Jun 23, 2022
@coveralls
Copy link

coveralls commented Jun 23, 2022

Pull Request Test Coverage Report for Build 2614734546

  • 4 of 10 (40.0%) changed or added relevant lines in 1 file are covered.
  • 205 unchanged lines in 14 files lost coverage.
  • Overall coverage increased (+0.04%) to 83.992%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/providers/fake_provider/fake_backend.py 4 10 40.0%
Files with Coverage Reduction New Missed Lines %
qiskit/exceptions.py 1 95.45%
qiskit/extensions/unitary.py 1 95.92%
qiskit/quantum_info/operators/symplectic/pauli_list.py 1 83.29%
qiskit/pulse/library/waveform.py 3 89.36%
qiskit/primitives/estimator.py 4 93.22%
qiskit/primitives/sampler.py 4 92.16%
qiskit/transpiler/passmanager.py 5 94.51%
qiskit/pulse/library/symbolic_pulses.py 6 94.69%
qiskit/qpy/interface.py 6 90.32%
qiskit/quantum_info/operators/symplectic/clifford.py 14 88.15%
Totals Coverage Status
Change from base Build 2546341916: 0.04%
Covered Lines: 55822
Relevant Lines: 66461

💛 - Coveralls

@itoko itoko changed the title [WIP] Add an attribute passthrough function in FakeBackendV2 [WIP] Add getter of minimal attributes necessary for pulse simulation in FakeBackendV2 Jun 24, 2022
@jakelishman
Copy link
Member

With Aer having removed pulse simulation in Aer 0.13 and the deprecation/removal of pulse simulation from the fake backends in #11439 and #11442, I think this PR is obsolete now. I'll close it, but please feel free to re-open if there's more to discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod: fake_provider Related to the fake_provider module and fake backends
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants