Quantum Computing Asked by Pingal Pratyush Nath on December 12, 2020
In Qiskit we can’t use noise models in the ‘state vector_simulator’ or the ‘unitary simulator’, hence making it impossible to compute fidelity of the output of the noisy circuit and the noiseless circuit. We can, of course, do a noisy simulation using the qasm simulator but it gives us the probability distribution instead of a state vector/density matrix. How do we compare the fidelity in this case?
Or is there any other way to do it?
I think you can use noise in the statevector simulator. If nevertheless you want to use the qasm simulator, you can use snapshots: https://qiskit.org/documentation/apidoc/aer_extensions.html. Although in the lack of notebooks it's a little tricky to understand how to use. You can see examples here for how to insert a snapshot in a circuit: https://github.com/Qiskit/qiskit-aer/blob/master/test/terra/reference/ref_snapshot_state.py. Then another example here for how to read the snapshot result: https://github.com/Qiskit/qiskit-aer/blob/master/test/terra/backends/qasm_simulator/qasm_snapshot.py If you apply the snapshot on a subset of the qubits, be aware that the qubit ordering may be confusing.
Answered by Yael Ben-Haim on December 12, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP