Skip to content

docs: update Algorithmiq TEM documentation and tutorial#4639

Open
robertodr wants to merge 20 commits intoQiskit:mainfrom
Algorithmiq:docs-update-algorithmiq-tem
Open

docs: update Algorithmiq TEM documentation and tutorial#4639
robertodr wants to merge 20 commits intoQiskit:mainfrom
Algorithmiq:docs-update-algorithmiq-tem

Conversation

@robertodr
Copy link
Contributor

No description provided.

robertodr and others added 2 commits February 6, 2026 12:46
Signed-off-by: Roberto Di Remigio Eikås <robertodr@users.noreply.github.com>
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@qiskit-bot
Copy link
Contributor

Thanks for contributing to Qiskit documentation!

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. Thanks! 🙌

One or more of the following people are relevant to this code:

@@ -5,12 +5,6 @@
"id": "f7d9993f",
Copy link
Contributor

@HuangJunye HuangJunye Feb 6, 2026

Choose a reason for hiding this comment

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

Is this change intended? AFAIK we don't need to mentioned IQP Classic.


Reply via ReviewNB

Copy link
Collaborator

Choose a reason for hiding this comment

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

You are correct @HuangJunye, it appears this PR is based on an outdated version of the repo, and isn't including updates to this file that are on the latest main branch. @robertodr can you note the needed updates for the Guide, and then pull the current version of that guide file from main and apply just your newest changes?

@@ -5,12 +5,6 @@
"id": "f7d9993f",
Copy link
Contributor

@HuangJunye HuangJunye Feb 6, 2026

Choose a reason for hiding this comment

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

Is the change from et al. to at al. intended? I think et al. is correct.


Reply via ReviewNB

@@ -5,12 +5,6 @@
"id": "f7d9993f",
Copy link
Contributor

@HuangJunye HuangJunye Feb 6, 2026

Choose a reason for hiding this comment

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

I don't think we need to use the old channels and HGP / IQP API token.


Reply via ReviewNB

@@ -5,12 +5,6 @@
"id": "f7d9993f",
Copy link
Contributor

@HuangJunye HuangJunye Feb 6, 2026

Choose a reason for hiding this comment

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

The formatting of the table seems to have issues, at least viewing on reviewnb. Can you please double check?


Reply via ReviewNB

@@ -5,12 +5,6 @@
"id": "f7d9993f",
Copy link
Contributor

@HuangJunye HuangJunye Feb 6, 2026

Choose a reason for hiding this comment

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

The rendering after num_readout_calibration_shots is off as well, at least viewing on reviewnb. Can you please double check the formatting?

I like the newly added options and the explanation for precision.


Reply via ReviewNB

Copy link
Contributor

Choose a reason for hiding this comment

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

Now the whole table rendering is off. Can you please take a look?

@@ -5,12 +5,6 @@
"id": "f7d9993f",
Copy link
Contributor

@HuangJunye HuangJunye Feb 6, 2026

Choose a reason for hiding this comment

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

Has the resource_usage metadata been removed from the latest version of the function? I think those info are very useful.


Reply via ReviewNB

@HuangJunye
Copy link
Contributor

@robertodr Thanks a lot for adding the new docs. I have reviewed the updated user guide and left some comments. Can you please also take a look at the linting error:

Error in file 'docs/guides/algorithmiq-tem.ipynb':

  • Missing title in the metadata
  • Missing description in the metadata

Error in file 'docs/tutorials/algorithmiq-tem.ipynb':

  • Missing title in the metadata

I will review the new tutorial shortly.

@abbycross
Copy link
Collaborator

abbycross commented Feb 6, 2026

@robertodr I would like to push several commits that will fix the linting errors, but I don't have access to this branch. Can you see if it's possible in the settings for your copy of the repo, to check "Allow edits and access to secrets by maintainers"? https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork

@robertodr
Copy link
Contributor Author

@abbycross I'm unable to find that option... I can't even edit the title of the PR 🤔

@abbycross
Copy link
Collaborator

Hm @robertodr GitHub sometimes works against us 🤣 I think perhaps the right starting place is to return the /guides/algorithmiq-tem file back to its current state (using the most recent version on the main branch) and then re-apply any necessary updates you had made to it in this PR. Once that has succeeded, then we can try to fix the linting errors.

@CLAassistant
Copy link

CLAassistant commented Feb 11, 2026

CLA assistant check
All committers have signed the CLA.

@robertodr robertodr requested a review from a team February 13, 2026 08:18
Copy link
Contributor

@HuangJunye HuangJunye left a comment

Choose a reason for hiding this comment

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

Thanks a lot for adding the tutorial. This is a first part review. Overall it looks great. I am running jobs to validate the codes are working as expected.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we rename this file to distinguish it from the guide? The corresponding index, json, toml, yaml files will need to be updated as well if we do so.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree - to avoid confusion we should have different names. In my PR I have changed it to simulate-kicked-ising-tem.ipynb

"metadata": {},
"outputs": [],
"source": [
"%pip install numpy matplotlib qiskit qiskit_ibm_catalog qiskit-ibm-runtime"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"%pip install numpy matplotlib qiskit qiskit_ibm_catalog qiskit-ibm-runtime"
"%pip install numpy matplotlib qiskit qiskit-ibm-catalog qiskit-ibm-runtime"

Unify the style. Use - instead of _ for pip install

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

Can you please add a QPU usage estimate, see this for example.

Usage estimate: 20 seconds on a Heron r2 processor. (NOTE: This is an estimate only. Your runtime might vary.)

Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

Can you create the circuit using Qiskit instead of loading a .qpy file? We want to minimize data storage on the docs for security compliance.


Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

@abbycross Is there a standard / recommended way for writing api_key, channel and crn?


Reply via ReviewNB

Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't have a standard, but for the token I would recommend <API-KEY> since that is how IBM Cloud refers to them.

The default channel is "ibm_quantum_platform".

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

Add something like "When the status is DONE, we can..."


Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

I got 0.9566488314675223 ± 0.04520526641815972 from ibm_boston which is pretty good!


Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

Line #8.    print(f"TEM Result: {tem_evs} ± {tem_std}")

Can you match the format with the job with custom options?

print(f"TEM Result: {tem_evs:.3f} ± {tem_std:.3f}")

Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

The job on boston consumed 152 seconds, for reference.


Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

Line #8.    options |= nl_options

Can you please add a comments after this line: "Add noise learning options to the overall options" because |= is not a very commonly used python operator.


Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

Remove this cell


Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

Create the circuit using Qiskit instead of loading a qpy file, similar to the first circuit


Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

tem job is not set as private by default, right? I can't see how to set private mode in the user guide: https://quantum.cloud.ibm.com/docs/en/guides/algorithmiq-tem I think we don't need to mention private mode in the tutorial.


Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

The results are not as good as the default setting for some reasons. I got 0.937 ± 0.013 on ibm_boston


Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

The unmitigated result is worse than the default setting on boston as well 0.905 ± 0.010.


Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

769s and 188s respectively for the boston job


Reply via ReviewNB

@@ -0,0 +1,869 @@
{
Copy link
Contributor

@HuangJunye HuangJunye Feb 13, 2026

Choose a reason for hiding this comment

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

Remove this cell before merging


Reply via ReviewNB

@abbycross
Copy link
Collaborator

@robertodr @HuangJunye since I don't have write access to this branch, I opened another PR in the Algorithmiq repo to address some of the structural/linting changes. I renamed the file there. There's also some copyediting to do, but I need to wait to do that till all the content changes that @HuangJunye has made are resolved. I'll plan to do the copyedits in a followup PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

7 participants