Feedback for first attempt at noisy quantum computation.#13
Open
Sandborg wants to merge 4 commits intoAntonio-JP:quantum+cppfrom
Open
Feedback for first attempt at noisy quantum computation.#13Sandborg wants to merge 4 commits intoAntonio-JP:quantum+cppfrom
Sandborg wants to merge 4 commits intoAntonio-JP:quantum+cppfrom
Conversation
… Need to do testing now.
…ng a layer and the succesfull capture of non compatible layers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
First attempt at adding noise to a circuit.
NOT INTENDED TO GET MERGED. Only made so that I could receive feedback and then close the PR after.
There are some comments in the code asking for feedback, you can answer them here or quote the line they are at.
I would very much appreciate your feedback @Antonio-JP, since this is only a first attempt and might diverge from what you have imagined.
I have also added tests for some of the functionality of my code, such as a gate to the NoisyQuantumComputation, making sure only compatible gates are in the list and that we can build QuantumComputations to be used in the experiments.
The way I am doing it is that we create a NoisyQuantumComputation, which has a list of QuantumComputations and double tuples. The QuantumComputation in the list only have 1 operation in it, so only one gate is added to each. This is done because we said each layer is just one gate. The doubles are the epsilon values giving the probability that a gate might fail and is not applied. Each element in the list is essentially a layer of the circuit, where there is only one gate in each layer.
I have implemented a function that will build a QuantumComputation from the list of layers. If we get a randomly generated number in the range of [0,1) lower than epsilon, we add the identity gate to the intended target of the gate; otherwise, we add the gate as is, meaning the gate is applied as intended.
I removed the main_QASM_script from the cmake file (just put it in a comment since it won't build).