def test_nop(): prog = qf.Program() prog += qf.Nop() prog.run() for inst in prog: assert inst is not None assert qf.Nop().qubits == () assert qf.Nop().qubit_nb == 0
def test_compile_label(): prog = qf.Program() prog += qf.Label('Here') prog += qf.Nop() prog += qf.Label('There') ket = prog.run() assert ket.memory[TARGETS] == {'Here': 0, 'There': 2}
def test_nop_evolve(): prog = qf.Program() prog += qf.Nop() prog.evolve()
def test_defcircuit_param(): prog = qf.Program() circ = qf.DefCircuit('CIRCX', {'this': None}) circ += qf.Nop() prog += circ assert str(prog) == CIRC1