Hadamard Transform¶
The Hadamard transform function applies an H gate on each qubit of the register inputted to the function
Syntax¶
Function: HadamardTransform
Parameters:
num_qubits
:PositiveInt
Example¶
{
"functions": [
{
"name": "main",
"body": [
{
"function": "HadamardTransform",
"function_params": {
"num_qubits": 4
}
}
]
}
]
}
from classiq.builtin_functions import HadamardTransform
from classiq import Model, synthesize
model = Model()
params = HadamardTransform(
num_qubits=4,
)
model.HadamardTransform(params)
quantum_program = synthesize(model.get_model())