Skip to content

Commit c24894e

Browse files
committed
Remove unused classical gate stats from qiskit_stats_extractor
- Delete unused stats["classical_gates"] and stats["rena"] entries - Remove unused _count_classical_gates
1 parent 52f65f3 commit c24894e

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/tranqu/transpiler/qiskit_stats_extractor.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ def extract_stats_from(self, program: QuantumCircuit) -> dict[str, int]:
3737
stats["n_gates_1q"] = self._count_single_qubit_gates(program)
3838
stats["n_gates_2q"] = self._count_two_qubit_gates(program)
3939
stats["depth"] = program.depth()
40-
"""
41-
stats["classical_gates"] = self._count_classical_gates(program) # classic gate
42-
stats["rena"] = 10507
43-
"""
4440
return stats
4541

4642
@staticmethod
@@ -80,11 +76,3 @@ def _count_two_qubit_gates(program: QuantumCircuit) -> int:
8076
continue
8177
count += 1
8278
return count
83-
84-
@staticmethod
85-
def _count_classical_gates(program: QuantumCircuit) -> int: # sum of classic gate
86-
return sum(
87-
1
88-
for instruction in program.data
89-
if instruction.operation.name in QiskitStatsExtractor._NON_GATE_OPERATION
90-
)

0 commit comments

Comments
 (0)