Skip to content

Commit

Permalink
fix: semgrep
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt-aws committed Jun 29, 2024
1 parent 3fda391 commit 8e0e822
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ function _validate_input_provided(circuit)
end

function _validate_ir_instructions_compatibility(
simulator::D,
circuit::Union{Program,Circuit},
supported_operations,
) where {D<:AbstractSimulator}
)
circuit_instruction_names = map(ix->replace(lowercase(string(typeof(ix.operator))), "_"=>"", "braket."=>""), circuit.instructions)
supported_instructions = Set(map(op->replace(lowercase(op), "_"=>""), supported_operations))
no_noise = true
Expand All @@ -94,7 +93,7 @@ function _validate_ir_instructions_compatibility(
end
return
end
_validate_ir_instructions_compatibility(simulator::D, circuit::Union{Program,Circuit}, v::Val{V}) where {D<:AbstractSimulator, V} = _validate_ir_instructions_compatibility(simulator, circuit, supported_operations(simulator, v))
_validate_ir_instructions_compatibility(simulator::D, circuit::Union{Program,Circuit}, v::Val{V}) where {D<:AbstractSimulator, V} = _validate_ir_instructions_compatibility(circuit, supported_operations(simulator, v))

_validate_result_type_qubits_exist(rt::Braket.StateVector, qubit_count::Int) = return
_validate_result_type_qubits_exist(rt::Braket.Amplitude, qubit_count::Int) = return
Expand Down

0 comments on commit 8e0e822

Please sign in to comment.