Demonstrations for the theory of proveit.physics.quantum.circuits

In [1]:
import proveit
from proveit import Function, IndexedVar, ExprRange, ExprTuple, VertExprArray
from proveit import i, j, k, l, m, n, A, B, P, Q, R, S
from proveit.logic import Set
from proveit.numbers import one, two, three
from proveit.core_expr_types import a_i, b_i, c_i
from proveit.core_expr_types.expr_arrays import Aij, Bij, Cij, Dij, Eij, Pij, Qij, Rij, Sij, Tij, Uij, Vij, B11_to_Bmn, D11_to_Dmn, S11_to_Smn
from proveit.physics.quantum import I, X, Y, Z, H, CONTROL
from proveit.physics.quantum.circuits import Qcircuit, Input, Output, MultiQubitElem, Gate, target
%begin demonstrations
In [2]:
Qcircuit(VertExprArray([Gate(I), Gate(X)], [Gate(Y), Gate(H)]))
In [3]:
Qcircuit(VertExprArray([MultiQubitElem(CONTROL, Set(two)), target], [Gate(Y), Gate(H)]))
In [4]:
Qcircuit(VertExprArray([MultiQubitElem(CONTROL, Set(two)), target, Gate(I)], 
         [target, target, MultiQubitElem(CONTROL, Set(one, two))]))
In [5]:
%end demonstrations