GithubHelp home page GithubHelp logo

cksystemsgroup / unicorn Goto Github PK

View Code? Open in Web Editor NEW
28.0 8.0 9.0 10.45 MB

Unicorn: Symbolic Execution, Bounded Model Checking, and Code Optimization of RISC-V Code using Classical Solvers and Quantum Computers

License: MIT License

Shell 0.40% Rust 95.20% Python 0.52% Makefile 1.19% C 2.69%
quantum-annealing quantum-computing adiabatic-quantum-computing ising-spin-models quantum-circuits rust

unicorn's People

Contributors

abolotina avatar actions-user avatar alexanderlackner avatar blazefrost avatar cas-ual-ty avatar christianmoesl avatar ckirsch avatar danielkocher avatar dependabot[bot] avatar finga avatar geo-bert avatar jety567 avatar lexmonster avatar mstarzinger avatar rac-122 avatar renovate-bot avatar renovate[bot] avatar saraseidl avatar semantic-release-bot avatar smml1996 avatar user-0xcafe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unicorn's Issues

Qrack back end

Per earlier discussions, this ticket is to track the integration of the (C++11) Qrack quantum computer simulator as an optional back end, via the qook Rust bindings: https://crates.io/crates/qook.

(The Qrack library and utility binary installer is updated with each subsequent release: https://github.com/unitaryfund/qrack/releases)

@smml1996 and I have discussed a plan.

Firstly, Qrack needs to simulate the CNOT, NOT, and MCX quantum instructions of the oracle, (all of which it can do natively).

Qrack also needs to track and internally mirror allocation of every qubit that participates in a given system of qubits that can potentially interact among each other. If the qubits are in different simulator instances, they cannot interact, though simulator instances or "registers" can be readily composed and decomposed along separable qubit subsystem bounds, (without guarantee that "decompose" operations will not denormalize, but Qrack internals do not denormalize, and it is the resposibility of user code to not denormalize when "decomposing," as can be achieved by measuring first). However, notably, the Qrack simulator is designed for easy dynamic bounds resizing and dynamic allocation (and deallocation) of qubits, by the user.

Whatever the oracle inputs are, Qrack also needs to simulate the preparation of the input, whether this is simply via parallel Hadamard gates to all input qubits.

I suspect those are the three major "ingredients." I'm trying my hand at this, but all input is welcome. (I can't assign myself to this issue ticket on GitHub, by the way, but I have created a fork.)

[EDITED above, for clarity and specificity.]

RUSTSEC-2021-0139: ansi_term is Unmaintained

ansi_term is Unmaintained

Details
Status unmaintained
Package ansi_term
Version 0.12.1
URL ogham/rust-ansi-term#72
Date 2021-08-18

The maintainer has adviced this crate is deprecated and will not
receive any maintenance.

The crate does not seem to have much dependencies and may or may not be ok to use as-is.

Last release seems to have been three years ago.

Possible Alternative(s)

The below list has not been vetted in any way and may or may not contain alternatives;

See advisory page for additional details.

RUSTSEC-2022-0048: xml-rs is Unmaintained

xml-rs is Unmaintained

Details
Status unmaintained
Package xml-rs
Version 0.8.4
URL https://github.com/netvl/xml-rs/issues
Date 2022-01-26

xml-rs is a XML parser has open issues around parsing including integer
overflows / panics that may or may not be an issue with untrusted data.

Together with these open issues with Unmaintained status xml-rs
may or may not be suited to parse untrusted data.

Alternatives

See advisory page for additional details.

Pre-commit hook fails because of style issue.

The pre-commit hook fails because clippy runs with --all-features and raises two style issues:

❯ git commit
+cargo clippy --all-features --all-targets -- -D warnings
    Checking unicorn-rs v0.4.1 (/data/jonathan/repos/unicorn)
error: this if-then-else expression assigns a bool literal
   --> src/unicorn/qubot.rs:880:36
    |
880 |   ...                   } else if !value_x3 {
    |  ______________________________^
881 | | ...                       aux = true;
882 | | ...                   } else {
883 | | ...                       aux = false;
884 | | ...                   }
    | |_______________________^ help: you can reduce it to: `aux = !value_x3;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign
    = note: `-D clippy::needless-bool-assign` implied by `-D warnings`

error: this if-then-else expression assigns a bool literal
   --> src/unicorn/qubot.rs:887:32
    |
887 |                           } else if value_x3 {
    |  ________________________________^
888 | |                             aux = false;
889 | |                         } else {
890 | |                             aux = true;
891 | |                         }
    | |_________________________^ help: you can reduce it to: `aux = !value_x3;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign

RUSTSEC-2023-0018: Race Condition Enabling Link Following and Time-of-check Time-of-use (TOCTOU)

Race Condition Enabling Link Following and Time-of-check Time-of-use (TOCTOU)

Details
Package remove_dir_all
Version 0.5.3
URL XAMPPRocky/remove_dir_all@7247a8b
Date 2023-02-24
Patched versions >=0.8.0

The remove_dir_all crate is a Rust library that offers additional features over the Rust
standard library fs::remove_dir_all function.

It was possible to trick a privileged process doing a recursive delete in an
attacker controlled directory into deleting privileged files, on all operating systems.

For instance, consider deleting a tree called 'etc' in a parent directory
called 'p'. Between calling remove_dir_all("a") and remove_dir_all("a")
actually starting its work, the attacker can move 'p' to 'p-prime', and
replace 'p' with a symlink to '/'. Then the privileged process deletes 'p/etc'
which is actually /etc, and now your system is broken. There are some
mitigations for this exact scenario, such as CWD relative file lookup, but
they are not guaranteed - any code using absolute paths will not have that
protection in place.

The same attack could be performed at any point in the directory tree being
deleted: if 'a' contains a child directory called 'etc', attacking the
deletion by replacing 'a' with a link is possible.

The new code in this release mitigates the attack within the directory tree
being deleted by using file-handle relative operations: to open 'a/etc', the
path 'etc' relative to 'a' is opened, where 'a' is represented by a file
descriptor (Unix) or handle (Windows). With the exception of the entry points
into the directory deletion logic, this is robust against manipulation of the
directory hierarchy, and remove_dir_all will only delete files and directories
contained in the tree it is deleting.

The entry path however is a challenge - as described above, there are some
potential mitigations, but since using them must be done by the calling code,
it is hard to be confident about the security properties of the path based
interface.

The new extension trait RemoveDir provides an interface where it is much
harder to get it wrong.

somedir.remove_dir_contents("name-of-child").

Callers can then make their own security evaluation about how to securely get
a directory handle. That is still not particularly obvious, and we're going to
follow up with a helper of some sort (probably in the fs_at crate). Once
that is available, the path based entry points will get deprecated.

In the interim, processes that might run with elevated privileges should
figure out how to securely identify the directory they are going to delete, to
avoid the initial race. Pragmatically, other processes should be fine with the
path based entry points : this is the same interface std::fs::remove_dir_all
offers, and an unprivileged process running in an attacker controlled
directory can't do anything that the attacker can't already do.

See advisory page for additional details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.