qiskit_trebugger.model.circuit_stats

Module to implement a circuit stats class.

 1"""Module to implement a circuit stats class."""
 2
 3
 4class CircuitStats:
 5    """Class to capture different circuit statistics for a quantum circuit."""
 6
 7    def __init__(self) -> None:
 8        self.width = None
 9        self.size = None
10        self.depth = None
11        self.ops_1q = None
12        self.ops_2q = None
13        self.ops_3q = None
14
15    def __eq__(self, other):
16        return (
17            self.width == other.width
18            and self.size == other.size
19            and self.depth == other.depth
20            and self.ops_1q == other.ops_1q
21            and self.ops_2q == other.ops_2q
22            and self.ops_3q == other.ops_3q
23        )
24
25    def __repr__(self) -> str:
26        return f"""CircuitStats(width={self.width},
27                size={self.size}, depth={self.depth}, 
28                1q-ops={self.ops_1q},
29                2q-ops={self.ops_2q}, 
30                3+q-ops={self.ops_3q})"""
class CircuitStats:
 5class CircuitStats:
 6    """Class to capture different circuit statistics for a quantum circuit."""
 7
 8    def __init__(self) -> None:
 9        self.width = None
10        self.size = None
11        self.depth = None
12        self.ops_1q = None
13        self.ops_2q = None
14        self.ops_3q = None
15
16    def __eq__(self, other):
17        return (
18            self.width == other.width
19            and self.size == other.size
20            and self.depth == other.depth
21            and self.ops_1q == other.ops_1q
22            and self.ops_2q == other.ops_2q
23            and self.ops_3q == other.ops_3q
24        )
25
26    def __repr__(self) -> str:
27        return f"""CircuitStats(width={self.width},
28                size={self.size}, depth={self.depth}, 
29                1q-ops={self.ops_1q},
30                2q-ops={self.ops_2q}, 
31                3+q-ops={self.ops_3q})"""

Class to capture different circuit statistics for a quantum circuit.

width
size
depth
ops_1q
ops_2q
ops_3q