C1000-112 無料問題集「IBM Fundamentals of Quantum Computation Using Qiskit v0.2X Developer」
What is the output of the below snippet?
a = 1/np.sqrt(2)
desired_state = [a,np.sqrt(1-a**2)]
qc = QuantumCircuit(1)
qc.initialize(desired_state,0)
back_sv = BasicAer.get_backend('statevector_simulator')
result = execute(qc, back_sv).result()
qc_sv = result.get_statevector(qc)
state_fidelity(desired_state, qc_sv)
a = 1/np.sqrt(2)
desired_state = [a,np.sqrt(1-a**2)]
qc = QuantumCircuit(1)
qc.initialize(desired_state,0)
back_sv = BasicAer.get_backend('statevector_simulator')
result = execute(qc, back_sv).result()
qc_sv = result.get_statevector(qc)
state_fidelity(desired_state, qc_sv)
正解:A
解答を投票する