R/I.R

Defines functions I

Documented in I

#' @export
I <- function(...){
	I <- matrix(c(1,0,0,1),nrow=2,ncol=2)
	ket <- list(...)
	if(length(ket) == 0){
		I
	} else {
		ket[[1]]	#I gate does not change ket
	}
}

Try the QuantumOps package in your browser

Any scripts or data that you put into this service are public.

QuantumOps documentation built on Feb. 3, 2020, 5:07 p.m.