<jupyter_start><jupyter_text>Making this harderutilizing superposition<jupyter_code>circuit = q.QuantumCircuit(2,2)

# adding a Hadamard gate, which puts qubit 0 into superposition
circuit.h(0)

# cnot gate, which flips the second qubits value if the first qubit is 1
circuit.cx(0, 1)

circuit.measure([0,1], [0,1])
circuit.draw(output='mpl')
backend = provider.get_backend('ibmq_16_melbourne')
job = q.execute(circuit, backend=backend, shots=500)
job_monitor(job)
result = job.result()
counts = result.get_counts(circuit)
plot_histogram([counts], legend=['Device'])<jupyter_output><empty_output><jupyter_text>Aer, the quantum simulatorUsing Aer allows us to use a quantum simulator without bogging down IBMs systems|<jupyter_code>from qiskit import Aer

for backend in Aer.backends():
    print(backend)<jupyter_output>qasm_simulator
statevector_simulator
unitary_simulator
pulse_simulator<jupyter_text>`QasmSimulator`: Allows ideal and noisy multi-shot execution of qiskit circuits and returns counts or memory`StatevectorSimulator`: Allows ideal single-shot execution of qiskit circuits and returns the final statevector of the simulator after application`UnitarySimulator`: Allows ideal single-shot execution of qiskit circuits and returns the final unitary matrix of the circuit itself. Note that the circuit cannot contain measure or reset operations for this backend`PulseSimulator`: ?These simulators only simulate a perfect quantum environment. Below we rerun the prior job and only get `00` and `11` results<jupyter_code>sim_backend = Aer.get_backend('qasm_simulator')
job = q.execute(circuit, backend=sim_backend, shots=10000)
job_monitor(job)
result = job.result()
counts = result.get_counts(circuit)
plot_histogram([counts], legend=['Device'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08622620380739082, 'fraction_numerical': 0.013997760358342666, 'mean_word_length': 7.632850241545894, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '538587', 'license': 'MIT', 'n_tokens_mistral': 580, 'n_tokens_neox': 526, 'n_words': 170, 'path': 'notebooks/intro-to-quantum-circuits.ipynb', 'repo_name': 'zbloss/quantum-playground', 'size': '1786'}