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

Add IQM devices #329

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Add IQM devices #329

wants to merge 21 commits into from

Conversation

flowerthrower
Copy link
Collaborator

Added configuration for IQM:

  • Adonis (5Qubits)
  • Apollo (20Qubits)

@flowerthrower flowerthrower linked an issue May 6, 2024 that may be closed by this pull request
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'm not entirely sure if this is the best solution. The r-gate is not available in Tket.
As far as I can tell any r-gate can be implemented by a single u3-gate but not vice versa(?).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Are the current native gates really the correct ones? See above for contradicting fact sheets from IQM.

Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.2%. Comparing base (8adbec6) to head (4e1de47).

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #329     +/-   ##
=======================================
+ Coverage   93.0%   93.2%   +0.1%     
=======================================
  Files         47      48      +1     
  Lines       2437    2493     +56     
=======================================
+ Hits        2268    2324     +56     
  Misses       169     169             
Flag Coverage Δ
python 93.2% <100.0%> (+0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@flowerthrower flowerthrower marked this pull request as ready for review May 13, 2024 15:42
Copy link
Collaborator

@nquetschlich nquetschlich left a comment

Choose a reason for hiding this comment

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

The only major comment is regarding the native gate set. Depending on your answer to that we can discuss the pytket handling.

{
"name": "iqm_apollo",
"num_qubits": 20,
"basis_gates": ["r", "cz", "measure", "barrier"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

According to this documentation (https://iqm-finland.github.io/cirq-on-iqm/api/iqm.cirq_iqm.devices.apollo.Apollo.html), the native gate set is different.

{
"name": "iqm_adonis",
"num_qubits": 5,
"basis_gates": ["r", "cz", "measure", "barrier"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, that is curious. I got the structure for the calibration data from this source. Also, I have rechecked with the LRZ lab team, and they have confirmed the native gate set is, in fact, "r" and "cz".

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 doublechecked now with the hardware guys and they reassured me "r" and "cz" are the correct native gates.
This is consistent with the iqm-client and qiskit-on-iqm. I also found this mapping for the cirq-on-iqm.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for double checking! I suspected as much. The R gate is just the phased x-pow gate and the other two gates are special cases where certain angles are set to some fixed values. So the R gate can represent all the possible gates.
What I would assume though (could be wrong), is that the simpler gates typically have better fidelities and are faster. So, in the future, it might make sense to differentiate between them, just because they are calibrated differently.
For now, the R gate should be fine and the appropriate definition for TKET is given by the special paramterization of the U gate.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Are the current native gates really the correct ones? See above for contradicting fact sheets from IQM.

@@ -0,0 +1,99 @@
"""Test the IQMProvider class and the IonQ devices."""
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am wondering whether we could in general improve the provider class tests. Currently, often only the type itself is tested while the type is already clear from the mypy type checking. Could we instead test for actual values or value ranges?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Add IQM devices ✨
3 participants