hhl=Block[{d=Log2@Length[b],qpe},QuantumCircuitOperator[{QuantumCircuitOperator[{QuantumState[Normalize[b]]1+prec+Range[d]},"State preparation"],qpe=QuantumCircuitOperator["PhaseEstimation"[QuantumOperator[MatrixExp[2PiIA]],prec],1+Range[prec+d]]〚d+1;;-prec-1〛,QuantumCircuitOperator["GrayOracle"[If[#0,0,1./#]&,prec,1],"Eigenvalue Inversion"],qpe["Dagger"],QuantumOperator[{QuantumState["Register"[prec+1,2^prec]]["Dagger"]Range[prec+1]},"Label""Post-selection"]}]];