<jupyter_start><jupyter_text>Simulators<jupyter_code>from qiskit import BasicAer

backend1 = BasicAer.get_backend('statevector_simulator')
backend2 = BasicAer.get_backend('unitary_simulator')
backend3 = BasicAer.get_backend('qasm_simulator')
from qiskit import QuantumCircuit
qc = QuantumCircuit(1)
qc.h(0)
qc.draw('mpl')<jupyter_output><empty_output><jupyter_text>1. Statevector Simulator<jupyter_code>from qiskit import execute
from qiskit.visualization import plot_histogram
job = execute(qc, backend1)
result = job.result()
count = result.get_counts()
print(count)
plot_histogram(count)<jupyter_output>{'0': 0.5, '1': 0.5}<jupyter_text>The histogram plots theoretical values of probability<jupyter_code># returns the output statevector
result.get_statevector()
# you can use save_statevector() to save the state<jupyter_output><empty_output><jupyter_text>2. Unitary Simulator<jupyter_code># error shown on purpose
from qiskit import execute
from qiskit.visualization import plot_histogram

job = execute(qc, backend2)
result = job.result()
count = result.get_counts()
print(count)
plot_histogram(count)<jupyter_output><empty_output><jupyter_text>Unitary Simulator doesn't give counts or plot histogram But it does give the effective operator of the circuit, in this case Hadamard Gate.<jupyter_code>result.get_unitary()<jupyter_output><empty_output><jupyter_text>3. Qasm Simulator<jupyter_code>job = execute(qc, backend3)
result = job.result()
count = result.get_counts()<jupyter_output>No classical registers in circuit "circuit-0", counts will be empty.<jupyter_text>Doesn't give a result without explicitly measuring the circuit<jupyter_code># measure the circuit and the graph will be plotted
qc.measure_all()

job = execute(qc, backend3)
result = job.result()
count = result.get_counts()
print(count)
plot_histogram(count)<jupyter_output>{'1': 508, '0': 516}<jupyter_text>Also the plot takes into account the noise in the channel of the quantum circuit and plots the values accordingly instead of the theoretical values of the probability like statevector simulator  Backend<jupyter_code>import qiskit
from qiskit import IBMQ
provider = IBMQ.enable_account('Your API')
provider.backends()<jupyter_output><empty_output><jupyter_text>Gate MapA gate map shows the connections between nodes on a physical quantum computing device.<jupyter_code>from qiskit.visualization import plot_gate_map
backend = provider.get_backend('ibmq_bogota')
plot_gate_map(backend)<jupyter_output><empty_output><jupyter_text>Error MapAn error map shows both the node connections of a gate map, in addition to the error rate expected on the backend.<jupyter_code>from qiskit.visualization import plot_error_map
plot_error_map(backend)<jupyter_output><empty_output><jupyter_text>Version Checking<jupyter_code>qiskit.__version__
qiskit.__qiskit_version__
# import qiskit.tools.jupyter
# qiskit_version_table
# qiskit_backend_overview<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08596670064559973, 'fraction_numerical': 0.009174311926605505, 'mean_word_length': 8.652459016393443, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '152811', 'license': 'MIT', 'n_tokens_mistral': 996, 'n_tokens_neox': 951, 'n_words': 242, 'path': '5. Qiskit Specific Stuff/2. Backends.ipynb', 'repo_name': 'developer-student-club-thapar/Quantum-Computing', 'size': '2943'}