def test_s_gate_nondeterministic_minimal_basis_gates(self): """Test s-gate gate circuits compiling to u3,cx""" circuits = ref_1q_clifford.s_gate_circuits_nondeterministic(final_measure=False) targets = ref_1q_clifford.s_gate_statevector_nondeterministic() job = execute(circuits, StatevectorSimulator(), shots=1, basis_gates=['u3', 'cx']) result = job.result() self.is_completed(result) self.compare_statevector(result, circuits, targets)
def test_s_gate_nondeterministic_default_basis_gates(self): """Test s-gate circuits compiling to backend default basis_gates.""" circuits = ref_1q_clifford.s_gate_circuits_nondeterministic(final_measure=False) targets = ref_1q_clifford.s_gate_statevector_nondeterministic() job = execute(circuits, StatevectorSimulator(), shots=1) result = job.result() self.is_completed(result) self.compare_statevector(result, circuits, targets)