def test_teleport_default_basis_gates(self): """Test teleport circuits compiling to backend default basis_gates.""" shots = 2000 circuits = ref_algorithms.teleport_circuit() targets = ref_algorithms.teleport_counts(shots) qobj = compile(circuits, self.SIMULATOR, shots=shots) result = self.SIMULATOR.run(qobj).result() self.is_completed(result) self.compare_counts(result, circuits, targets, delta=0.05 * shots)
def test_teleport_minimal_basis_gates(self): """Test teleport gate circuits compiling to U,CX""" shots = 2000 circuits = ref_algorithms.teleport_circuit() targets = ref_algorithms.teleport_counts(shots) job = execute(circuits, QasmSimulator(), shots=shots, basis_gates='U,CX') result = job.result() self.is_completed(result) self.compare_counts(result, circuits, targets, delta=0.05 * shots)
def test_teleport_default_basis_gates(self): """Test teleport circuits compiling to backend default basis_gates.""" shots = 2000 circuits = ref_algorithms.teleport_circuit() targets = ref_algorithms.teleport_counts(shots) job = execute(circuits, QasmSimulator(), shots=shots) result = job.result() self.is_completed(result) self.compare_counts(result, circuits, targets, delta=0.05 * shots)
def test_teleport_default_basis_gates(self): """Test teleport circuits compiling to backend default basis_gates.""" shots = 2000 circuits = ref_algorithms.teleport_circuit() qobj = qiskit_compile(circuits, QasmSimulator(), shots=shots) targets = ref_algorithms.teleport_counts(shots) job = QasmSimulator().run(qobj, backend_options={"method": "ch"}) result = job.result() self.is_completed(result) self.compare_counts(result, circuits, targets, delta=0.05 * shots)
def test_teleport_waltz_basis_gates(self): """Test teleport gate circuits compiling to u1,u2,u3,cx""" shots = 2000 circuits = ref_algorithms.teleport_circuit() targets = ref_algorithms.teleport_counts(shots) qobj = compile(circuits, self.SIMULATOR, shots=shots, basis_gates=['u1', 'u2', 'u3', 'cx']) result = self.SIMULATOR.run(qobj).result() self.is_completed(result) self.compare_counts(result, circuits, targets, delta=0.05 * shots)
def test_teleport_minimal_basis_gates(self): """Test teleport gate circuits compiling to U,CX""" shots = 2000 circuits = ref_algorithms.teleport_circuit() targets = ref_algorithms.teleport_counts(shots) qobj = compile(circuits, self.SIMULATOR, shots=shots, basis_gates='U,CX') result = self.SIMULATOR.run(qobj).result() self.is_completed(result) self.compare_counts(result, circuits, targets, delta=0.05 * shots)