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

fix brisbane not working with ibmq_qasm_simulator anymore #287

Closed
wants to merge 8 commits into from

Conversation

cqc-melf
Copy link
Collaborator

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

Description

All devices available in the open plan have more then the 32 qubits that are supported by the ibmq_qasm_simulator. So we need to replace them. Not sure what the best strategy is...

Related issues

Please mention any github issues addressed by this PR.

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.

@@ -857,8 +857,8 @@ def test_ibmq_emulator(

c_cop_2 = c.copy()
c_cop_2 = b_aer.get_compiled_circuit(c_cop_2, ol)
if ol == 0:
assert not all(pred.verify(c_cop_2) for pred in b.required_predicates)
# if ol == 0:
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 circuit is already fully supported by the simulator without compilation, so this test fails with the change

@cqc-melf cqc-melf marked this pull request as ready for review March 6, 2024 16:19
@cqc-melf
Copy link
Collaborator Author

cqc-melf commented Mar 6, 2024

Ready for review.
I know that the tests are not working, but that is a different issue I am still investigating.

@cqc-melf cqc-melf requested a review from cqc-alec March 6, 2024 16:20
@cqc-alec
Copy link
Collaborator

cqc-alec commented Mar 6, 2024

What exactly is the issue with brisbane_emulator_backend? I see that it is used in several other tests, such as test_nshots()...

@cqc-melf
Copy link
Collaborator Author

cqc-melf commented Mar 6, 2024

This difference is that this testcase is the only test using the backend and compiling the circuit with one of the default compilation passes. All other testcases are running uncompiled circuits.

@cqc-melf
Copy link
Collaborator Author

cqc-melf commented Mar 6, 2024

When running this with the brisbane_emulator_backend the circuit has 51 qubits (only 32 allowed), and the circuit contains Ecr gates, which is not allowed, too.

@cqc-alec
Copy link
Collaborator

cqc-alec commented Mar 7, 2024

When running this with the brisbane_emulator_backend the circuit has 51 qubits (only 32 allowed), and the circuit contains Ecr gates, which is not allowed, too.

These both seem to indicate a bug in the compilation:

  • Why is a 3-qubit circuit being compiled to a 51-qubit circuit?
  • Why are we rebasing to ECR when that isn't supported by the backend?

@cqc-melf
Copy link
Collaborator Author

cqc-melf commented Mar 7, 2024

The IBMQEmulatorBackend is using the gateset, architecture, noisemodel and compilation passes of the real device, in our case the IBMQBackend. The IBMQEmulatorBackend is then always running the circuit on the simulator without additional compilation or checks. We could add that, but not sure how much would be left from the original device after that.

@cqc-alec
Copy link
Collaborator

cqc-alec commented Mar 7, 2024

The IBMQEmulatorBackend is using the gateset, architecture, noisemodel and compilation passes of the real device, in our case the IBMQBackend. The IBMQEmulatorBackend is then always running the circuit on the simulator without additional compilation or checks. We could add that, but not sure how much would be left from the original device after that.

Ah so the simulator doesn't support the ECR gate but the device does? I see. Maybe we should raise this issue with IBM? It would be useful if the simulator supported all the gates that the devices do.

Still not sure why we are compiling to a 51-qubit circuit?

@cqc-melf cqc-melf force-pushed the fix/backend-to-big-for-simulator branch from 2bc3c72 to 5df19e5 Compare March 12, 2024 09:52
@cqc-melf
Copy link
Collaborator Author

@cqc-alec this is currently not showing up on develop, but I am not sure why. I would keep this open and wait a few days?

@cqc-melf cqc-melf mentioned this pull request Mar 26, 2024
5 tasks
@cqc-melf cqc-melf closed this Mar 28, 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.

2 participants