-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
994 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
OPENQASM 2.0; | ||
include "qelib1.inc"; | ||
qreg q[4]; | ||
creg c[4]; | ||
x q[0]; | ||
x q[1]; | ||
h q[3]; | ||
cx q[2],q[3]; | ||
t q[0]; | ||
t q[1]; | ||
t q[2]; | ||
tdg q[3]; | ||
cx q[0],q[1]; | ||
cx q[2],q[3]; | ||
cx q[3],q[0]; | ||
cx q[1],q[2]; | ||
cx q[0],q[1]; | ||
cx q[2],q[3]; | ||
tdg q[0]; | ||
tdg q[1]; | ||
tdg q[2]; | ||
t q[3]; | ||
cx q[0],q[1]; | ||
cx q[2],q[3]; | ||
s q[3]; | ||
cx q[3],q[0]; | ||
h q[3]; | ||
measure q[0] -> c[0]; | ||
measure q[1] -> c[1]; | ||
measure q[2] -> c[2]; | ||
measure q[3] -> c[3]; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Generated from Cirq v0.8.0 | ||
|
||
OPENQASM 2.0; | ||
include "qelib1.inc"; | ||
|
||
|
||
// Qubits: [(0, 0), (0, 1), (1, 0), (1, 1)] | ||
qreg q[4]; | ||
creg m_b[1]; | ||
creg m_y[1]; | ||
creg m_a[1]; | ||
creg m_x[1]; | ||
|
||
|
||
h q[0]; | ||
h q[1]; | ||
h q[3]; | ||
cx q[0],q[2]; | ||
rx(pi*-0.25) q[0]; | ||
|
||
// Gate: CNOT**0.5 | ||
ry(pi*-0.5) q[2]; | ||
u3(pi*0.5,0,pi*0.75) q[3]; | ||
u3(pi*0.5,0,pi*0.25) q[2]; | ||
rx(pi*0.5) q[3]; | ||
cx q[3],q[2]; | ||
rx(pi*0.25) q[3]; | ||
ry(pi*0.5) q[2]; | ||
cx q[2],q[3]; | ||
rx(pi*-0.5) q[2]; | ||
rz(pi*0.5) q[2]; | ||
cx q[3],q[2]; | ||
u3(pi*0.5,pi*0.5,pi*1.0) q[3]; | ||
u3(pi*0.5,pi*1.0,pi*1.0) q[2]; | ||
ry(pi*0.5) q[2]; | ||
|
||
// Gate: CNOT**0.5 | ||
ry(pi*-0.5) q[0]; | ||
u3(pi*0.5,0,pi*0.75) q[1]; | ||
u3(pi*0.5,0,pi*0.25) q[0]; | ||
rx(pi*0.5) q[1]; | ||
cx q[1],q[0]; | ||
rx(pi*0.25) q[1]; | ||
ry(pi*0.5) q[0]; | ||
cx q[0],q[1]; | ||
rx(pi*-0.5) q[0]; | ||
rz(pi*0.5) q[0]; | ||
cx q[1],q[0]; | ||
u3(pi*0.5,pi*0.5,pi*1.0) q[1]; | ||
u3(pi*0.5,pi*1.0,pi*1.0) q[0]; | ||
ry(pi*0.5) q[0]; | ||
|
||
measure q[2] -> m_b[0]; | ||
measure q[3] -> m_y[0]; | ||
measure q[0] -> m_a[0]; | ||
measure q[1] -> m_x[0]; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
OPENQASM 2.0; | ||
include "qelib1.inc"; | ||
qreg bits[4]; | ||
creg c[4]; | ||
|
||
h bits[0]; | ||
cx bits[0],bits[1]; | ||
cx bits[1],bits[2]; | ||
cx bits[2],bits[3]; | ||
|
||
measure bits[0] -> c[0]; | ||
measure bits[1] -> c[1]; | ||
measure bits[2] -> c[2]; | ||
measure bits[3] -> c[3]; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Implementation of Deutsch algorithm with two qubits for f(x)=x | ||
OPENQASM 2.0; | ||
include "qelib1.inc"; | ||
|
||
qreg q[2]; | ||
creg c[2]; | ||
|
||
x q[1]; | ||
h q[0]; | ||
h q[1]; | ||
cx q[0],q[1]; | ||
h q[0]; | ||
measure q[0] -> c[0]; | ||
measure q[1] -> c[1]; |
Oops, something went wrong.