Show Menu

QISkit Cheat Sheet (DRAFT) by

cheat sheet for IBM's qiskit

This is a draft cheat sheet. It is a work in progress and is not finished yet.


Return OPENQASM string for this register
Check that j is a valid index into self


add( *regs )
add registers
barrier( *tuples )
apply barrier to tuples
(reg, idx)
ccx( ctl1, ctl2, tgt )
apply Toffoli
ch( ctl, tgt )
apply CH from ctl to tgt
combine( rhs )
if self has rhs's regs
return self + rhs
crz( ctl, tgt )
apply crz
from ctl to tgt
with angle theta
cswap( ctl, tgt1, tgt2 )
apply Fredkin
cu1( theta, ctl, tgt )
apply cu1 from ctl to tgt
with angle theta
cu3( theta, phi, lam, ctl, tgt )
apply cu3 from ctl to tgt
with angle theta, phi, lam
cx( ctl, tgt )
apply CNOT from
ctl to tgt
cx_base( ctl, tgt )
apply CX from
ctl to tgt
cy( ctl, tgt )
apply CY from
ctl to tgt
cz( ctl, tgt )
apply CZ from
ctl to tgt
extend( rhs )
append rhs to self if
self contains rhs's registers
modify and return self
return the host list of
the leaf gate on the left edge
get the cregs from the registers
get the qregs from the registers
h( q )
apply H to q
has_re­gister( register )
return True or False
iden( q )
apply Identity to q