Skip to content

Feedback for first attempt at noisy quantum computation.#13

Open
Sandborg wants to merge 4 commits intoAntonio-JP:quantum+cppfrom
Sandborg:quantum+cpp
Open

Feedback for first attempt at noisy quantum computation.#13
Sandborg wants to merge 4 commits intoAntonio-JP:quantum+cppfrom
Sandborg:quantum+cpp

Conversation

@Sandborg
Copy link
Copy Markdown

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).

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.

1 participant