You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: qconv.rs
    path of file: ./repos/tract/nnef/src/ops/core
    
    the code of the file until where you have to start completion: use crate::deser::Value;
use crate::internal::*;
use crate::ops::nnef::deser::read_conv_parameters;
use crate::ops::nnef::ser::make_conv_named_args;
use crate::ser::*;
use tract_core::ops::cnn::Conv;
use tract_core::ops::cnn::KernelFormat;

use super::qmatmul::qparams_as_outlets;

pub fn register(registry: &mut Registry) {
    registry.register_dumper(qconv_unary_dump);
    registry.register_primitive(
        "tract_core_qconv",
        &qconv_parameters(),
        &[("output", TypeName::Scalar.tensor())],
        qconv_load,
    );
}

fn qconv_parameters() -> Vec<Parameter> {
    vec![
        TypeName::Scalar.tensor().named("input"),
        TypeName::Scalar.tensor().named("filter"),
        TypeName::Scalar.tensor().named("bias").default(0),
        TypeName::Integer.spec().named("group"),
        TypeName::Integer.array().named("dilation"),
        TypeName::Integer.array().named("stride"),
        TypeName::Integer.array().array().
    
fn qconv_load(builder: &mut ModelBuilder, invocation: &ResolvedInvocation) -> TractResult<Value> {
    let mut inputs: TVec<OutletId> = tvec!(invocation.named_arg_as(builder, "input")?);
    inputs.push(invocation.named_arg_as(builder, "filter")?);
    inputs.push(invocation.named_arg_as(builder, "bias")?);

    let input_fact = builder.model.outlet_fact(inputs[0])?.clone();
    let kernel_fact = builder.model.outlet_fact(inputs[1])?.clone();

    if input_fact.rank() != kernel_fact.rank() {
        bail!(
            "Convolution input expected as NCHW, filter as OIHW. Got {:?} and {:?}.",
            input_fact,
            kernel_fact
        );
    }

    let (group, pool_spec) = read_conv_parameters(
        builder,
        invocation,
        kernel_fact.shape.as_concrete().context("Expect fixed size kernel")?,
        &input_fact,
    )?;

    let mut qparams = qparams_as_outlets(builder, invocation).context("Loading qparams")?;
    qparams.swap(0, 2);
    qparams.swap(1, 3);
    inputs.extend(qparams.iter().cloned());

    let Some(c0) = &builder.model.outlet_fact(qparams[4])?.konst else {
        bail!("For quantized convolution, output quantization must be static");
    };
    let Some(c_scale) = &builder.model.outlet_fact(qparams[5])?.konst else {
        bail!("For quantized convolution, output quantization must be static");
    };
    let output_dt = input_fact.datum_type.with_qparams(QParams::ZpScale {
        zero_point: c0.cast_to_scalar()?,
        scale: c_scale.cast_to_scalar()?,
    });

    let op: Box<dyn TypedOp> =
        Box::new(Conv::new(pool_spec, KernelFormat::OIHW, group, Some(output_dt)));

    builder.wire(op, &inputs)
}