View on GitHub
Open this notebook in GitHub to run it yourself
prepare_ghz_state function to create a Greenberger-Horne-Zeilinger (GHZ) state.
i.e., a balanced superposition of all ones and all zeros, on an arbitrary number of qubits.
Syntax
Function:prepare_ghz_state
Arguments:
size: CIntq: Output[QArray[QBit]]
Example
prepare_ghz_state on 5 qubits