Documentation Index
Fetch the complete documentation index at: https://docs.classiq.io/llms.txt
Use this file to discover all available pages before exploring further.
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