Skip to content

Conversation

@shiavm006
Copy link
Contributor

Purpose of PR

Fix draw_circuit() method to return visualization string instead of None. The method was printing the circuit visualization but returning None, which contradicted the docstring that claimed it returns a visualization object. Now all backends (Qiskit, Cirq, Amazon Braket) return the visualization string as documented, allowing users to capture and use the return value.

Related Issues or PRs

Changes Made

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Test
  • CI/CD pipeline
  • Other

Breaking Changes

  • Yes
  • No

Checklist

  • Added or updated unit tests for all changes
  • Added or updated documentation for all changes
  • Successfully built and ran all unit tests or manual tests locally
  • PR title follows "MAHOUT-XXX: Brief Description" format (if related to an issue)
  • Code follows ASF guidelines

Copy link
Member

@guan404ming guan404ming left a comment

Choose a reason for hiding this comment

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

LGTM

@guan404ming guan404ming merged commit 635a62c into apache:main Dec 26, 2025
3 checks 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.

[Bug] draw() API returns None instead of circuit visualization object

3 participants