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

remove remote simulator #301

Merged
merged 12 commits into from
Mar 28, 2024
Merged

remove remote simulator #301

merged 12 commits into from
Mar 28, 2024

Conversation

cqc-melf
Copy link
Collaborator

@cqc-melf cqc-melf commented Mar 26, 2024

Description

Remove all the remote simulators

Related issues

Solves #300 #278 #272 #231 #287

Checklist

  • I have performed a self-review of my code.
  • I have commented hard-to-understand parts of my code.
  • I have made corresponding changes to the public API documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the changelog with any user-facing changes.

@@ -95,7 +94,7 @@ to disk:
IBMProvider.save_account(token=ibm_token)
QiskitRuntimeService.save_account(channel="ibm_quantum", token=ibm_token)

To see which devices you can access you can use the ``available_devices`` method on the :py:class:`IBMQBackend` or :py:class:`IBMQEmulatorBackend`. Note that it is possible to pass optional ``instance`` and ``provider`` arguments to this method. This allows you to see which devices are accessible through your IBM hub.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The local emulator was not listed here? Is this functionality available with the local setup?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The local emulator was not listed here? Is this functionality available with the local setup?

No, it's just a class method on IBMQBackend.

@cqc-melf
Copy link
Collaborator Author

I have tried to slip up the changes into different commits, looking at them separately might be helpful in the review.

@cqc-melf cqc-melf marked this pull request as ready for review March 26, 2024 11:48
for b in [brisbane_emulator_backend, brisbane_local_emulator_backend]:
assert b._noise_model is not None # type: ignore
b_ibm = b._ibmq # type: ignore
for b in [brisbane_local_emulator_backend]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for a for loop here now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in bff3e00

) -> None:
# https://github.com/CQCL/pytket-qiskit/issues/93
for b in [brisbane_emulator_backend, brisbane_local_emulator_backend]:
for b in [brisbane_local_emulator_backend]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for a for loop.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in bff3e00

@@ -1113,62 +1110,6 @@ def test_postprocess() -> None:
b.cancel(h)


@pytest.mark.flaky(reruns=3, reruns_delay=10)
@pytest.mark.skipif(skip_remote_tests, reason=REASON)
def test_postprocess_emu(ibmq_qasm_emulator_backend: IBMQEmulatorBackend) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make IBMQLocalEmulatorBackend support contextual optimization in the same way that IBMQEmulatorBackend did? Or make a new issue for this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added an issue for that #302

I will try to do this later today, would you be fine with doing a release without this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we rename this file to ibmq_emulator.py is that going to confuse git?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done this now in a separate commit, if you don't try to review all changes at once it should be fine.

Done in 12eb951


@pytest.fixture(scope="module")
def ibmq_qasm_emulator_backend() -> IBMQEmulatorBackend:
def brisbane_local_emulator_backend() -> IBMQEmulatorBackend:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename this to brisbane_emulator_backend, since we're dropping "local".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in b17a67e

@@ -5,6 +5,8 @@ Unreleased
----------

* Update qiskit-ibm-runtime version requirement to 0.22.
* remove all remote simulators
* rename ``IBMQLocalEmulatorBackend`` to ``IBMQEmulatorBackend``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add that simulatons that used IBMQEmulatorBackend previously will now run locally. Just to be explcit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in a7a2470

@cqc-melf cqc-melf merged commit c82e1ae into develop Mar 28, 2024
7 checks passed
@cqc-alec cqc-alec mentioned this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants