Skip to content

Conversation

@msoeken
Copy link
Member

@msoeken msoeken commented Oct 15, 2025

This code provides Python models that can be used with qsharp.estimate_custom and provide the behavior of current hard-coded models in the Rust-based system implementation of resource estimation.

Note: The new test case file also implements a custom file system as in test_project.py. This code is now redundant and could be merged into a single file.

if isinstance(source, list):
qsharp.init()
for file in source:
qsharp.eval(qsharp._fs.read_file(file)[1])

Check notice

Code scanning / devskim

If untrusted data (data from HTTP requests, user submitted files, etc.) is included in an eval statement it can allow an attacker to inject their own code. Note

Review eval for untrusted data
qsharp.init()

source_file = "/SingleFile.qs"
qsharp.eval(qsharp._fs.read_file(source_file)[1])

Check notice

Code scanning / devskim

If untrusted data (data from HTTP requests, user submitted files, etc.) is included in an eval statement it can allow an attacker to inject their own code. Note test

Review eval for untrusted data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants