Exam4Training

What will be the output of the result variable in the below snippet?

What will be the output of the result variable in the below snippet?

q = QuantumRegister(1,’q’)

qc = QuantumCircuit(q)

qc.y(0)

backend_unitary = BasicAer.get_backend(‘unitary_simulator’)

result = execute(qc,backend_unitary).result().get_unitary(decimals=3)
A .


B .

C .

D .

Answer: A

Exit mobile version