Quantum Operations: Arbitrary Initialization & State Fidelity
What if we want to initialize a qubit register to an arbitrary state?
An arbitrary state for n qubits may be specified by a vector of 2n (2 power n) amplitudes.
Fidelity is useful to check whether two states are the same or not.
The fidelity is equal to 1 if and only if two states are equal.
Source = https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html
Kode program tersedia di GitHub = https://github.com/keamanansiber/qiskit/tree/master/2QuantumOperations