-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add quantum array and operations support #5
Conversation
…s - Maintains original amplitude when projecting onto basis state - Properly implements quantum projection operator
…mplitudes - Maintains original amplitude when projecting onto basis state - Properly implements quantum projection operator" This reverts commit fbdbd28.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. After implementing control sequence structures (while, if etc.), rotation gates and the connection between qArray and partial density operator, we should be able to represent any arbitrary quantum program with this syntax. Do you agree?
ℝ × (Fin 2 → ℂ) := | ||
let prob := measure_probability state basis_state | ||
let post_state := project_state state basis_state | ||
(prob, post_state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the probability and post state pair returned so that it can be used for the classical and quantum state pair of the state or the program?
Fields: | ||
* `state` - The quantum state vector in the 2^n dimensional Hilbert space | ||
* `is_normalized` - Proof that the state is normalized (sum of probabilities = 1) -/ | ||
structure QArray (n : Nat) where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this going to be changed to n classical terms which are the index of each qubit? I.e when there are two classical terms, it represents a grid of qubits. Can revisit this definition after defining the other syntax and semantics first.
else -- control = 1 | ||
if target = (1 - j_target) then 1 else 0 | ||
else 0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These gates look good! Need to also implement the parametric rotation gates.
Quantum Types and Operations Implementation
This PR implements core quantum computing functionality for the Quave framework:
Changes