Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I acknowledge that:
cargo test
;cargo fmt
;where appropriate; and
dev
branch.What is the current problem, or feature that should be added?
What aspect of the project needs changing?
When printing large diagrams, the non-connected vertical lines with horizontal wires was discomforting for the eyes; especially when the circuit diagram is large.
Implementing custom functions are also tricky as there are a lack of methods for
States
andSuperPosition
that makes manipulating the qubits easier.More examples are need in the documentation for
Circuit
andPrinter
. Moreover, more runnable examples, that is of the formcargo run --example file
, should be added and appropriately commented.How does this fix and/or better quantr?
If it's a feature, please add examples on how you would use it.
The diagrams now have 'connected' wires when overlapping, causing less strain on the eyes, particularly for dark backgrounds. It's noted though, that the 'grid illusion' still appears for diagrams with many control nodes.
Two methods have been introduced that invert the binary labels of states in the computational basis, in addition to converting a
ProductState
into aSuperPosition
structure (although mathematically a lone product state is in a superposition itself).Examples of methods have been added to the documentation, and the grovers example taken from the quantr-book has been added to the
examples
folder too. This will help users in learning quanta and using it for projects.Finally, the
Printer::flush
is being deprecated as it cannot be meaningfully used in conjunction with Rust's lifetimes. It will be removed in the next major breaking update.Is this pull request a major or minor change with respect to the
dev
branch?Please refer to semantic versioning for Rust. If this is a major/breaking change, please add an explanation to why it could not be minor, or equally why it should break the current version.
Minor.
What do the unit tests cover?
Description of the unit tests added (if applicable).
Tests the two new methods introduced for manipulating qubits.
Added a 10 qubit grovers algorithm test, that should be complex enough to detect errors from custom functions and the circuit simulation itself.
Additional comments.
Any more justifications, examples of output, or even suggestions for improving this pull request template are all welcome!