Skip to content

Commit

Permalink
make format
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdad2m committed Dec 17, 2024
1 parent 8bb0129 commit 511ea57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,13 @@ def change_instruction(ctx, eqn):

# Now, we can map to the correct op
# For now just assume rx
cuda_inst(ctx.kernel, *qubits_or_params, inst=cuda_inst_name, qubits_len=qubits_len, static_params=static_params)
cuda_inst(
ctx.kernel,
*qubits_or_params,
inst=cuda_inst_name,
qubits_len=qubits_len,
static_params=static_params,
)

# Finally determine how many are qubits.
qubits = qubits_or_params[:qubits_len]
Expand Down
4 changes: 3 additions & 1 deletion frontend/catalyst/third_party/cuda/primitives/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ def gate_func(kernel, *qubits_or_params, inst=None, qubits_len=-1, static_params
Quantum operations in CUDA-quantum return no values. But JAXPR expects return values.
We can just say that multiple_results = True and return an empty tuple.
"""
kernel_gate_p.bind(kernel, *qubits_or_params, inst=inst, qubits_len=qubits_len, static_params=static_params)
kernel_gate_p.bind(
kernel, *qubits_or_params, inst=inst, qubits_len=qubits_len, static_params=static_params
)
return tuple()

@kernel_gate_p.def_impl
Expand Down

0 comments on commit 511ea57

Please sign in to comment.