Created
June 24, 2018 10:41
-
-
Save nelimee/5f34e369105bd3cd46eec98893f3914f to your computer and use it in GitHub Desktop.
This file contains 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
// Quantum circuit to illustrate issue #1 | |
// of https://github.com/nelimeee/qasm2error | |
OPENQASM 2.0; | |
include "qelib1.inc"; | |
// A quantum gate that applies 10 times non-simplifiable | |
// gates to the given qubit | |
gate g10 q { | |
y q; | |
barrier q; | |
x q; | |
barrier q; | |
z q; | |
barrier q; | |
h q; | |
barrier q; | |
y q; | |
barrier q; | |
z q; | |
barrier q; | |
h q; | |
barrier q; | |
x q; | |
barrier q; | |
tdg q; | |
barrier q; | |
s q; | |
barrier q; | |
} | |
// A quantum gate that applies 100 times the H gate | |
// to the given qubit | |
gate g100 q { | |
g10 q; | |
g10 q; | |
g10 q; | |
g10 q; | |
g10 q; | |
g10 q; | |
g10 q; | |
g10 q; | |
g10 q; | |
g10 q; | |
} | |
// A quantum gate that applies 1000 times the H gate | |
// to the given qubit | |
gate g1000 q { | |
g100 q; | |
g100 q; | |
g100 q; | |
g100 q; | |
g100 q; | |
g100 q; | |
g100 q; | |
g100 q; | |
g100 q; | |
g100 q; | |
} | |
qreg q[2]; | |
// Repeat single qubit operation to increase error | |
g1000 q[0]; | |
// Perform a SWAP. | |
swap q[0], q[1]; | |
// Errors here should be: | |
// 1. Very high for q[1] | |
// 2. Low for q[0]: only the errors on SWAP should affect | |
// q[0]. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment