You are on page 1of 7

___________

1-2
2-2
3-2
___________

1. 1)
2. 1)

1) def main():
2) # Definition of registers
3) qr = qiskit.QuantumRegister(4)
4) cr = qiskit.ClassicalRegister(4)
5)
6) # Quantum circuit goes here!
7) qc = qiskit.QuantumCircuit(qr, cr)
8)
9) qc.h(0)
10)
11) for qubit in range(len(qr) - 1):
12) qc.cx(qubit, qubit + 1)
13)
14) # Measure the qubits
15) qc.measure(qr, cr)
16)
17) # Draw circuit
18) print(qc.draw())
19)
20) # Run circuit in simulator backend for 1000 shots
21) backend = AerSimulator()
22) job = backend.run(qc, shots = 1000)
23) results = job.result()
24) counts = results.get_counts()
25)
26) # Plot results
27) plot_histogram(counts)
28) plt.show()
2)

Before Bridge Gate:


After Bridge Gate:

3. 1)
2)

i. create_noise_model(0.5, 0, 0)

I. create_noise_model(0.5, 0.5, 0)
Iii. create_noise_model(0.5, 0, 0.1)

Noise affects quantum computing at large. Especially the probabilities of bit flips and random
errors could induce considerable deviations from the expected measurements. As I found noise
as in qubit’s probability being 1 or 0 does not have that much individual impact as a noise
parameter.

You might also like