
Last chance! 50% off unlimited learning
Sale ends in
Takes a given quantum gate and tests it with computational basis states as input. Can test a subset of possible inputs if specified, otherwise it tests all possible inputs. Useful for testing user defined gates.
testGate(g,inputs=0:(dim(g)[1]-1) )
Matrix that represents a quantum gate (operation)
Vector of indices of computational basis states to test. Default is that all computational basis states will be tested
None
# NOT RUN {
testGate(CX())
testGate(CX(),inputs=c(0,1))
# }
Run the code above in your browser using DataLab