The Wikipedia page on trebuchets links to a PDF paper which discusses exactly this question. It considers several models of varying complexity and finds a maximum range efficiency of 83% for a 100 pound counterweight, 1 pound projectile, a 5 foot long beam pivoted 1 foot from the point of attachment of the counterweight, and a 3.25 foot long sling. Here range efficiency is defined as the horizontal range of the realistic trebuchet model relative to the range of a "black box model" which is able to completely convert the gravitational potential energy of the counterweight into kinetic energy of the projectile.
In order to find the energy efficiency, defined as the fraction of the counterweight's gravitational potential energy that actually gets transferred to the projectile, you would need to use the relation
$$\frac{\epsilon_R}{\epsilon_E} = 2\sin\alpha\cos\alpha = \sin 2\alpha$$
where $\alpha$ is the angle of release of the projectile above the horizontal. Unfortunately, the paper doesn't give the value of $\alpha$ corresponding to the simulation that produced the maximum efficiency, so I can't give you a specific number without running the simulations myself. (Perhaps I'll do that when I have time; if anyone else gets to it first, feel free to edit the relevant numbers in.)
I am going to change the notation in order to make the equations more compact. The counter weight is $M$ and the payload is $m$. The length of the bar is $L$ and the distance of the center of gravity to the counterweight is $a=\frac{m}{M+m}\,L$ and from the payload $b=\frac{M}{M+m}\,L$ such that $L=a+b$. Note I have said nothing about the pivot yet.
The distance between the pivot and the center of gravity is $c$ and it is an independent variable we wish to optimize. The pivot is between the center of gravity and the payload (for positive $c$). The angle of the bar is $\theta$ with $\theta=0$ when horizontal.
The height of the pivot from the ground is $h$ such that when the counterweight hits the ground the payload is launched at $\theta_{f} = -45^\circ$. So $h=(a+c) \sin(- \theta_f$). As a consequence the initial angle is $\sin \theta_i = \frac{a+c}{b-c} \sin(- \theta_f )$ in order for the payload to rest in the ground initially. This is valid for $c<\frac{b-a}{2}$, otherwise the things sits vertically with $\theta_i=\frac{\pi}{2}$.
Doing the dynamics using Newtons's Laws, or Langrange's equations will yield the following acceleration formula
$$ \ddot{\theta} = -\,\frac{c g (M+m) \cos(\theta)}{\frac{m M}{M+m} L^2 + (M+m) c^2} $$
The denominator being the moment of inertia about the pivot. Here is the fun stuff.
The above can be integrated since the right hand side is a function of $\theta$ only with a constant $\alpha$:
$$ \ddot{\theta}=\frac{{\rm d}\dot\theta}{{\rm d}t} =-\alpha \cos(\theta) $$
$$ \frac{{\rm d}\dot\theta}{{\rm d}\theta} \frac{{\rm d}\theta}{{\rm d}t} = -\alpha \cos(\theta) $$
$$ \frac{{\rm d}\dot\theta}{{\rm d}\theta} \dot\theta = -\alpha \cos(\theta) $$
$$ \int \dot\theta {\rm d}\dot\theta =-\int \alpha \cos(\theta) {\rm d}\theta + K$$
$$ \frac{{\dot \theta}^2}{2} = -\alpha \sin \theta + K $$
with $K$ based on the initial conditions ($\theta=\theta_i$, $\dot\theta=0$)
$$ \dot\theta = \sqrt{2 \alpha (\sin(\theta_i)-\sin(\theta))}$$
and final rotational velocity
$$ \dot\theta_f = \sqrt{2 \alpha (\sin(\theta_i)-\sin(\theta_f))}$$
tangentially the payload launch velocity is
$$ v_{B_f} = (b-c) \dot\theta_f = (b-c) \sqrt{2 \alpha (\sin(\theta_i)-\sin(\theta_f))} $$
with both $\alpha$ and $\theta_i$ depending on the variable $c$.
To optimize we set $ \frac{{\rm d}v_{B_f}}{{\rm d}c}=0 $ which is solved for:
$$ \frac{c}{L} = \frac{\sqrt{m} \left( \sqrt{M+m}-\sqrt{m} \right)}{M+m } $$
For example, a $m=20 {\rm lbs}$ payload, with a $M=400 {\rm lbs}$ counter weight on a $L=20 {\rm ft}$ bar, requires the pivot to be $c=20\;\frac{\sqrt{20} \left( \sqrt{420}-\sqrt{20} \right)}{420 } = 3.412\;{\rm ft} $ from the center of gravity. The c.g. is $a=\frac{20}{420}\,20 = 0.952 {\rm ft}$ from the counterweight.
Edit 1
Based on comments made by the OP the launch velocity is
$$
v_{B_{f}}=\left(\frac{M}{M+m}L-c\right)\sqrt{\frac{2cg(M+m)}{\frac{M}{M+m}L^{2}+(M+m)c^{2}}\left(\sin\theta_{i}-\sin\theta_{f}\right)}
$$
where $g=9.80665\,{\rm m/s}$ is gravity.
With infinite counterweight the maximum launch velocity is $\max(v_{B_{f}})=\sqrt{\frac{2g(L-c)^{2}}{c}}$ so to reach $v_{B_{f}}=6000\,{\rm m/s}$ from earth if $c=1\,{\rm m}$ then $L>1355.8\,{\rm m}$.
With infinite bar length the maximum launch velocity is $\max(v_{B_{f}})=\sqrt{\frac{2Mcg}{m}}$ so to reach $v_{B_{f}}=6000\,{\rm m/s}$ from earth if $c=1\,{\rm m}$ then $M>18.3\,10^{6}\,{\rm kg}$.
So lets consider $L=2000\,{\rm m}$ and $M=40.0\,10^{6}\,{\rm kg}$ then we choose pivot location at $c=1.500\,{\rm m}$ to get
$$
v_{B_{f}}=(1999.999-1.5)\sqrt{2\;4.526\left(\sin\theta_{i}-\sin\theta_{f}\right)}
$$
which is solved for $v_{B_{f}}=6000\,{\rm m/s}$ when $\sin\theta_{i}-\sin\theta_{f}=0.9957$
with $\theta_{i}>0$ and $\theta_{f}<0$.
Best Answer
This question was asked four months ago, but none of the existing answers mentions trebuchets.
To my knowledge the trebuchet design is the only design that is purely mechanical. Other projectile throwing devices store elastic energy and on release transfer that to the projectile.
So a trebuchet it is.
(In effect 'lever' and 'trebuchet' are synonymous. A trebuchet gets its leverage by being a lever (pun intended)).
It may be worthwhile to research the noble art of pumpkin chunkin'. There's a town in the US where there is a yearly pumpkin chunkin' contest that also features a trebuchet category.
Can a trebuchet deliver close to 100% efficency?
For one thing, frictional losses can be kept quite low, that's good.
The problem is this: to throw the projectile the lever arm must be accelerated to a large angular velocity. After the projectile has been released the lever arm is swinging violently. That kinetic energy of the lever arm is energy from the counterweight that was not transferred to the projectile.
The trebuchet design involves trade-offs. A longer lever arm gives the potential for faster throws, but a longer arm also has a bigger moment of inertia.
An ideal trebuchet would transfer all of its kinetic energy to the projectile, so that right after releasing the projectile it would just sit there, nearly motionless. I'm not aware of any trebuchet design that achieves that.
To reduce the inefficiency the mass of the lever arm must be as low as possible. That is what the pumpkin chunkers do: they make the lever arm as flimsy as they dare. For every throw they stand well back, as their machines tend to self-destruct when the trigger is pulled.