Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself
The Hadamard transform function applies an H gate on each qubit of the register inputted to the function. Function: hadamard_transform Arguments:
  • target: QArray[QBit]
The target quantum argument is the quantum state on which we apply the Hadamard Transform.

Example

from classiq import *


@qfunc
def main(x: Output[QArray[QBit]]):
    allocate(3, x)
    hadamard_transform(x)


qmod = create_model(main)

qprog = synthesize(qmod)