def test_zyz_circuit(): gate0 = qf.zyz_circuit(0.1, 0.3, 0.2, 0).asgate() gate1 = qf.ZYZ(0.1, 0.3, 0.2, q0=0) assert qf.gates_close(gate0, gate1)
def test_str(): circ = qf.zyz_circuit(0.1, 2.2, 0.5, [0]) print(circ)
def test_asgate(): circ = qf.zyz_circuit(0.1, 2.2, 0.5, 0) print(">>>>", circ, len(circ.elements)) assert qf.gates_close(circ.asgate(), qf.ZYZ(0.1, 2.2, 0.5))
def test_asgate() -> None: circ0 = qf.zyz_circuit(0.1, 2.2, 0.5, 0) gate0 = circ0.asgate() dag0 = qf.DAGCircuit(circ0) gate1 = dag0.asgate() assert qf.gates_close(gate0, gate1)
def test_str() -> None: circ = qf.zyz_circuit(0.1, 2.2, 0.5, 0) str(circ)
def test_asgate(): gate0 = qf.ZYZ(0.1, 2.2, 0.5) circ0 = qf.zyz_circuit(0.1, 2.2, 0.5, 0) dag0 = qf.DAGCircuit(circ0) gate1 = dag0.asgate() assert qf.gates_close(gate0, gate1)