Learn R Programming

QuantumOps (version 3.0.1)

CX: CX

Description

If no argument is supplied, returns the matrix of Controlled-X gate. If ket given as input, applies a Controlled-X gate to the input ket and returns the resulting ket

Usage

CX(...)

Arguments

...

No argument, or 4 dimensional (2 qubit) ket (column vector) that is input to the gate

Value

Matix of the Controlled-X gate or ket after a Controlled-X gate is applied

Examples

Run this code
# NOT RUN {
 CX(ket(1,1,1,1))
 CX()
# }

Run the code above in your browser using DataLab