Skip to content

Commit

Permalink
Also include vars in depth short circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Aug 16, 2024
1 parent 694d78e commit a8a10db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/circuit/src/dag_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,7 @@ def _format(operand):
/// flow is present in a non-recursive call.
#[pyo3(signature= (*, recurse=false))]
fn depth(&self, py: Python, recurse: bool) -> PyResult<usize> {
if self.qubits.is_empty() && self.clbits.is_empty() {
if self.qubits.is_empty() && self.clbits.is_empty() && self.vars_info.is_empty() {
return Ok(0);
}

Expand Down

0 comments on commit a8a10db

Please sign in to comment.