Skip to content

Prevent doctest failures on QPU access#41

Merged
randomir merged 4 commits intodwavesystems:mainfrom
JoelPasvolsky:fix_doc_tests
Jan 29, 2026
Merged

Prevent doctest failures on QPU access#41
randomir merged 4 commits intodwavesystems:mainfrom
JoelPasvolsky:fix_doc_tests

Conversation

@JoelPasvolsky
Copy link
Contributor

See this PR

... # Sample an Ising problem
>>> response = composed_sampler.sample_ising({'a': -0.5, 'b': 1.0}, {('a', 'b'): -1})
>>> response.first.sample
>>> response.first.sample # doctest: +SKIP
Copy link
Member

Choose a reason for hiding this comment

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

Why skip here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the results are NumPy types and I didn't want to put those in the outputs in this PR. If @SebastianGitt wants that output he should update and then remove the SKIP.

Same for 587 and 608

>>> alpha = np.array([2,0,1], dtype=np.intp) # (0,2,1): 0->2, 1->0, 2->1
>>> beta = np.array([1,2,0], dtype=np.intp) # (0,1,2): 0->1, 1->2, 2->0
>>> mult(alpha, beta)
>>> mult(alpha, beta) # doctest: +SKIP
Copy link
Member

Choose a reason for hiding this comment

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

Why skip?

Copy link
Contributor

Choose a reason for hiding this comment

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

@randomir I'll address this on my current PR

...
>>> alpha = np.array([2,0,1], dtype=np.intp) # (0,2,1): 0->2, 1->0, 2->1
>>> inv(alpha)
>>> inv(3, alpha) # doctest: +SKIP
Copy link
Member

Choose a reason for hiding this comment

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

Again, shouldn't this be deterministic and testable?

JoelPasvolsky and others added 2 commits January 28, 2026 11:04
Co-authored-by: Radomir Stevanovic <radomir.stevanovic@gmail.com>
@randomir randomir merged commit 5598cd1 into dwavesystems:main Jan 29, 2026
1 check passed
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