Licensing your circuit
Forking is how people contribute to a circuit they don’t own on QubitHub. That only works if the original grants the right to do it — so every circuit picks a license when it’s created, and the choice is required.
You keep the copyright in your work. The license only says what others may do with it.
Why it’s a required choice
Section titled “Why it’s a required choice”The create form pre-selects nothing, and won’t submit until you pick.
That’s deliberate, and it cuts against the obvious alternatives:
- Pre-selecting a permissive license would be licensing your copyrighted work for you if you skimmed the form. GitHub’s own create-repo dropdown defaults to None for the same reason.
- Leaving it blank would be worse in a different way. A repository with no
LICENSEfile is all rights reserved by default — visible to everyone, legally forkable by no one. Silently defaulting to that would break the contribution model for anyone who didn’t notice the field.
Requiring an explicit choice is the only option that neither decides for you nor leaves the platform quietly broken.
The options
Section titled “The options”| License | Use it when |
|---|---|
| Apache-2.0 (recommended) | You want permissive reuse with an express patent grant. This is what the quantum framework ecosystem uses — Qiskit, Cirq and PennyLane are all Apache-2.0 — so a circuit importing them has no compatibility friction for whoever forks it. |
| MIT | You want the simplest, most widely understood permissive license and don’t need the patent grant. |
| CC-BY-4.0 | Your circuit is primarily teaching material or a data artifact rather than software. Creative Commons advises against CC licenses for code, so avoid this for anything executable. |
| GPL-3.0-or-later | You want derivatives to stay open under the same terms. |
| All rights reserved | You’re not ready to grant anything. Your circuit stays publicly visible but cannot be legally forked. You can pick a license later. |
| Custom | Anything else. Enter any SPDX identifier and commit your own LICENSE file — QubitHub won’t write one for a license only you have. |
Why the patent grant matters here
Section titled “Why the patent grant matters here”It’s the deciding factor between Apache-2.0 and MIT, and it matters more in quantum than in most domains: quantum algorithms are actively patented, often by the same vendors whose SDKs these circuits import. Apache-2.0 includes an express patent license from contributors. MIT grants nothing on that front.
What actually gets written
Section titled “What actually gets written”Picking a license produces two things:
- A
LICENSEfile in your circuit’s git repository, containing the full canonical text with your name and the year filled in. This is the legally operative artifact — it’s what someone sees when theygit clone. - A
licensefield inqubithub.toml, so tools can read the grant without checking out the repo.
Choosing All rights reserved or Custom writes no LICENSE file — in the
first case because the absence is the statement, and in the second because
only you have the text.
The scaffold’s own starter code carries no QubitHub license header. What the scaffold emits into your repository becomes your circuit, so it carries your choice, not ours.
Seeing a license before you fork
Section titled “Seeing a license before you fork”A circuit’s license appears next to the Fork button, because that’s where the decision gets made. You should not have to go looking for the terms after you’ve already copied someone’s work.
Three states you’ll see:
- An SPDX identifier (
Apache-2.0,MIT, …) — links to the full text. - All rights reserved — the owner explicitly chose not to grant reuse rights.
- No license — no one ever specified one. Legally this has the same effect as all rights reserved, but it’s a different fact: nobody made a decision. If it’s your circuit, this is worth fixing.
A fork inherits its parent’s license, because the LICENSE file is copied along
with the code.
Licensing and visibility are independent
Section titled “Licensing and visibility are independent”A private circuit can carry an open license, and a public circuit can be all rights reserved. Visibility controls who can see your circuit; the license controls what they may do with it once they can.
What QubitHub’s own circuits use
Section titled “What QubitHub’s own circuits use”Every circuit QubitHub publishes under the QubitHub/* namespace is
Apache-2.0, along with the scaffold templates — the reasoning above, applied
to our own work. Fork them freely.
Changing your mind
Section titled “Changing your mind”You can set or change a circuit’s license afterwards. Updating the record does
not rewrite the LICENSE file in your repository — that’s yours to control
via git, and the two should agree.
Be aware that withdrawing a license is not fully retroactive: anyone who already received your circuit under the old terms generally keeps those rights for the copy they have. This is not legal advice — if it matters to you, talk to a lawyer.