diff --git a/src/validation.jl b/src/validation.jl index 06b4b8c..53ebb0d 100644 --- a/src/validation.jl +++ b/src/validation.jl @@ -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 @@ -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