Implement sparse isometry with binary encoding#435
Conversation
📊 Coverage Summary
Detailed Coverage ReportsC++ Coverage DetailsPython Coverage DetailsPybind11 Coverage Details |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 22 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 22 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
python/src/qdk_chemistry/utils/qsharp/src/StatePreparation.qs:12
- These imports appear unused in this file (
ApplyControlledOnBitString,MResetZ, andStd.TableLookup.Select). Unused imports add noise and can trigger compiler/linter warnings; consider removing them or using them if intended.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Logger.info( | ||
| f"Binary encoding produced {len(params['binaryEncodingOps'])} operations " | ||
| f"for {n_qubits}-qubit system with {len(bitstrings)} determinants " |
There was a problem hiding this comment.
This log message references n_qubits and bitstrings, but neither is defined in _run_impl (they’re locals inside _build_binary_encoding_params). This will raise NameError on every run. Use values derived from params (e.g., params['numQubits'] and len(params['stateVector']) / determinant count) or compute these in _run_impl before logging.
| Logger.info( | |
| f"Binary encoding produced {len(params['binaryEncodingOps'])} operations " | |
| f"for {n_qubits}-qubit system with {len(bitstrings)} determinants " | |
| n_qubits = params["numQubits"] | |
| determinants = params.get("bitstrings", params.get("stateVector", [])) | |
| Logger.info( | |
| f"Binary encoding produced {len(params['binaryEncodingOps'])} operations " | |
| f"for {n_qubits}-qubit system with {len(determinants)} determinants " |
| import Std.Math.Ceiling; | ||
| import Std.Math.Lg; | ||
| import Std.Measurement.MResetX; | ||
| import Std.StatePreparation.PreparePureStateD; |
There was a problem hiding this comment.
PreparePureStateD is imported here but not referenced in this file (dense prep is delegated to ApplyDensePreparation). Consider removing the unused import to avoid warnings and keep dependencies minimal.
| import Std.StatePreparation.PreparePureStateD; |
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 22 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 22 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
python/src/qdk_chemistry/utils/qsharp/src/StatePreparation.qs:13
- These
importstatements appear to be unused in this file (Std.Canon.ApplyControlledOnBitString,Std.Measurement.MResetZ, andStd.TableLookup.Select). If they’re no longer needed after the refactor toApplyMatrixCompressionOp, consider removing them to avoid Q# compiler warnings and keep dependencies minimal.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| program=QSHARP_UTILS.BinaryEncoding.MakeBinaryEncodingStatePreparationCircuit, | ||
| parameter=params, | ||
| ) | ||
| qsharp_op = QSHARP_UTILS.BinaryEncoding.MakeBinaryEncodingStatePreparationOp(*params.values()) |
📊 Coverage Summary
Detailed Coverage ReportsC++ Coverage DetailsPython Coverage DetailsPybind11 Coverage Details |
No description provided.