[Circuit diagrams] Show conditionals in circuits based on RIR debug metadata (all the changes)#2943
Conversation
There was a problem hiding this comment.
devskim found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
6d0da64 to
48d9f1f
Compare
| max_ops_exceeded: bool, | ||
| operations: Vec<OperationOrGroup>, | ||
| source_locations: bool, | ||
| operations_container: OperationOrGroup, // TODO: weird |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
| controls: &'a [usize], | ||
| } | ||
|
|
||
| // TODO: this should be renamed to clarify purpose |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
source/compiler/qsc_circuit/src/rir_to_circuit/tests/logical_stack_trace.rs
Fixed
Show fixed
Hide fixed
source/compiler/qsc_circuit/src/rir_to_circuit/tests/logical_stack_trace.rs
Fixed
Show fixed
Hide fixed
source/compiler/qsc_circuit/src/rir_to_circuit/tests/logical_stack_trace.rs
Fixed
Show fixed
Hide fixed
| } | ||
|
|
||
| /// RIR blocks -> Structured Control Flow | ||
| /// TODO: other naming suggestions: decompile, build postdominator tree, etc |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
| extend_block_with_binop_instruction(variables, operand, operand1, *variable)?; | ||
| } | ||
| instruction @ (InstructionKind::LogicalNot(..) | InstructionKind::BitwiseNot(..)) => { | ||
| // TODO: I'm guessing we need to handle these? |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
| debug!("ignoring not instruction: {instruction:?}"); | ||
| } | ||
| instruction @ InstructionKind::Store(..) => { | ||
| // TODO: who generates these? |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
| extend_block_with_logical_not_instruction(&mut state.variables, operand, *variable)?; | ||
| } | ||
| instruction @ (InstructionKind::Store(..) | InstructionKind::BitwiseNot(..)) => { | ||
| // TODO: what generates this? what should we do? |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
| } | ||
|
|
||
| // current stack should have been fully consumed | ||
| // TODO: not sure why this failed - bring it bacK? |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
| if let Some(old_value) = variables.get(variable_id) | ||
| && old_value != &expr | ||
| { | ||
| // TODO: do we ever get here now where we store the same variable twice? |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
| let mut remapper = WireMapBuilder::default(); | ||
|
|
||
| for id in 0..num_qubits { | ||
| remapper.map_qubit(id, None); // TODO: source location |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
| let compute_properties = PassContext::run_fir_passes_on_fir(&fir_store, id, capabilities) | ||
| .expect("FIR passes should succeed"); | ||
|
|
||
| // TODO: can we pass none for compute_properties? |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note test
|
|
||
| #[test] | ||
| fn adjoint_operation_in_entry_expr() { | ||
| // TODO: adjoints not showing up |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note test
|
|
||
| #[test] | ||
| fn dynamic_double_arg() { | ||
| // TODO: I don't know about this trace |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note test
…nditionals-working
| let mut wire_map_builder = FixedQubitRegisterMapBuilder::new(num_qubits); | ||
|
|
||
| let mut builder = OperationListBuilder::new( | ||
| 100, |
No description provided.