Abstract We introduce a first-order quantum programming language, named foq , whose terminating programs are reversible. restrict to strict and tractable subset, pfoq of with bounded width, that provides first language-based characterization the complexity class fbqp . finally present semantics-preserving algorithm compiling program circuit size polynomial in number input qubits.