Skip to content

Conversation

@eliarbel
Copy link
Member

This PR adds support for circuit text drawing through the C API. It is based and blocked on #15357. See commit fefdd03 for the changes of this PR only.

Shobhit21287 and others added 30 commits November 20, 2025 17:12
…nger needed to import qiskit._accelerate, can simply call qc.draw(text2)
eliarbel and others added 13 commits November 20, 2025 19:52
* Change the VisualizationElement::VerticalLine to hold a PackedInstruction reference
* Fix capitalization of labels
* Fix clippy
* Correct drawing vertical line of a measure
This commit fixes several issues discovered via manual testing. Specifically:

*  Single bit wires - avoid printing `_1` for bits of length 1. For example `my_qr` instead of `my_qr_1` if `my_qr` is of length 1
* Changed some standard gate names to match those in the Python drawer
* Count number of chars in label to account for Unicode chars properly when computing label length.
* Changed default names for qubit and clbit wires
* Added support for anonymous bits
* Fixed a bug with mapping clbit indices to `VisualizationMatrix` wires when `cregbunde=true`
@eliarbel eliarbel added this to the 2.3.0 milestone Nov 20, 2025
@eliarbel eliarbel requested a review from a team as a code owner November 20, 2025 22:45
@eliarbel eliarbel added the Changelog: New Feature Include in the "Added" section of the changelog label Nov 20, 2025
@eliarbel eliarbel added the C API Related to the C API label Nov 20, 2025
@qiskit-bot
Copy link
Collaborator

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

@eliarbel eliarbel added the on hold Can not fix yet label Nov 20, 2025
@coveralls
Copy link

coveralls commented Nov 20, 2025

Pull Request Test Coverage Report for Build 19696786623

Details

  • 15 of 788 (1.9%) changed or added relevant lines in 3 files are covered.
  • 36 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.6%) to 87.604%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/cext/src/circuit.rs 14 16 87.5%
crates/circuit/src/circuit_drawer.rs 0 771 0.0%
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 6 91.52%
crates/qasm2/src/parse.rs 30 95.68%
Totals Coverage Status
Change from base Build 19684338744: -0.6%
Covered Lines: 94408
Relevant Lines: 107767

💛 - Coveralls

@Cryoris Cryoris modified the milestones: 2.3.0, 2.4.0 Dec 9, 2025
@github-project-automation github-project-automation bot moved this to Ready in Qiskit 2.4 Dec 9, 2025
@Cryoris Cryoris removed this from Qiskit 2.3 Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C API Related to the C API Changelog: New Feature Include in the "Added" section of the changelog on hold Can not fix yet

Projects

Status: Ready

Development

Successfully merging this pull request may close these issues.

6 participants