Customize the opening and closing brackets in `siunitx`

siunitx

It seems siunitx options open-bracket and close-bracket no longer work. Is it possible to get such functionalities back?

enter image description here

\documentclass{book}

    \usepackage{calc}
    
    
    % ========== Units and precision packages ==========
    \usepackage{siunitx}
    
            % complex numbers options
% BEGIN_FOLD
    
                \sisetup{complex-root-position=before-number, input-complex-root=ij}
                \newlength{\widthOperatorJSeparator}
                \setlength{\widthOperatorJSeparator}{\widthof{$\,$}}
                \sisetup{output-complex-root=\mathit{j}\hspace{0.11\widthOperatorJSeparator}}   
                
% END_FOLD
    
            % brackets options
% BEGIN_FOLD
    
                \sisetup{bracket-numbers=true, open-bracket=], close-bracket=]}

% END_FOLD



\begin{document}

\complexqty{11 + j11}{\ohm}

\end{document}

Best Answer

I believe this is an oversight and that there should be an option for setting the brackets. Something like

\documentclass{book}
\usepackage{amsmath}
\usepackage{siunitx}

\ExplSyntaxOn
\keys_define:nn { siunitx }
 {
  output-complex-bracket-open .tl_set:N = \l__siunitx_complex_bracket_open_tl,
  output-complex-bracket-close .tl_set:N = \l__siunitx_complex_bracket_close_tl,
 }
\ExplSyntaxOff

% complex numbers options
\sisetup{
  complex-root-position=before-number,
  input-complex-root=ij,
  output-complex-root=\mathit{j}\mspace{1mu},
  bracket-numbers=true,
  output-complex-bracket-open=[,
  output-complex-bracket-close=],
}

\begin{document}

\complexqty{11 + j11}{\ohm}

\end{document}

enter image description here

The option names might be not the preferred ones. The spacing for the j is much easier to obtain and customize.