Commit ffb57d9
authored
Fix num_qubits() and num_clbits() methods (#122)
The num bits methods were incorrectly querying the target stored with
the circuit, when present, for the number of bits instead of the actual
circuit attributes. This commit fixes this issue so the circuit bit
counts are correctly returned.
There is a larger question around why the circuit is locally storing the
bit counts instead of just querying the inner qiskit circuit object. But
for just fixing this issue I kept the change minimal rather than
removing the protected attribute. We can do that in a follow up if
needed.1 parent b386265 commit ffb57d9
1 file changed
Lines changed: 0 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 107 | | |
112 | 108 | | |
113 | 109 | | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
117 | 113 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | 114 | | |
123 | 115 | | |
124 | 116 | | |
| |||
0 commit comments