Skip to content

Commit

Permalink
Format: Call cargo fmt
Browse files Browse the repository at this point in the history
- Use todo!() for newly changed Enum.
  • Loading branch information
raynelfss committed Jul 13, 2024
1 parent 99a9e1a commit 514aede
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 6 additions & 7 deletions crates/circuit/src/dag_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
use crate::bit_data::BitData;
use crate::circuit_instruction::PackedInstruction;
use crate::circuit_instruction::{
convert_py_to_operation_type,
operation_type_and_data_to_py,
CircuitInstruction,
ExtraInstructionAttributes,
OperationTypeConstruct,
convert_py_to_operation_type, operation_type_and_data_to_py, CircuitInstruction,
ExtraInstructionAttributes, OperationTypeConstruct,
};
use crate::dag_node::{DAGInNode, DAGNode, DAGOpNode, DAGOutNode};
use crate::dot_utils::build_dot;
Expand Down Expand Up @@ -2690,6 +2687,7 @@ def _format(operand):
match edge.weight() {
Wire::Qubit(qubit) => self.qubits.get(*qubit).unwrap(),
Wire::Clbit(clbit) => self.clbits.get(*clbit).unwrap(),
Wire::Var(var) => todo!(),
},
))
}
Expand Down Expand Up @@ -3083,7 +3081,7 @@ def _format(operand):
.iter()
.map(|clbit| self.clbits.get(*clbit)),
);
new_layer.apply_operation_back(
new_layer.py_apply_operation_back(
py,
node_obj.bind(py).getattr("op")?,
Some(TupleLikeArg { value: qubits }),
Expand Down Expand Up @@ -3160,7 +3158,7 @@ def _format(operand):
.map(|clbit| self.clbits.get(*clbit)),
);
// Add node to new_layers
new_layer.apply_operation_back(
new_layer.py_apply_operation_back(
py,
op.bind(py).to_owned(),
Some(TupleLikeArg {
Expand Down Expand Up @@ -3598,6 +3596,7 @@ impl DAGCircuit {
match wire {
Wire::Qubit(index) => Ok(Some(index.0 as usize)),
Wire::Clbit(_) => Ok(None),
Wire::Var(_) => todo!(),
}
};
rustworkx_core::dag_algo::collect_bicolor_runs(&self.dag, filter_fn, color_fn).unwrap()
Expand Down
1 change: 1 addition & 0 deletions crates/circuit/src/dot_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ where
let edge_weight = match edge.weight() {
Wire::Qubit(qubit) => dag.qubits.get(*qubit).unwrap(),
Wire::Clbit(clbit) => dag.clbits.get(*clbit).unwrap(),
Wire::Var(_) => todo!(),
};
writeln!(
file,
Expand Down

0 comments on commit 514aede

Please sign in to comment.