Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/itsubaki/qasm-playground/llms.txt

Use this file to discover all available pages before exploring further.

The public playground runs on a shared simulator backend. If you want full control — your own simulator, your own rate limits, your own data — you can deploy a private instance in about 15 minutes. The frontend deploys to Vercel; the simulator backend (quasar) deploys to Google Cloud Run. One environment variable connects them.
1

Deploy quasar to Google Cloud Run

The quasar service is the quantum simulator backend. It exposes an HTTP API that the playground calls to execute OpenQASM circuits.Clone the repository and deploy it to Google Cloud Run:
git clone https://github.com/itsubaki/quasar.git
cd quasar
gcloud run deploy quasar \
  --source . \
  --region us-central1 \
  --allow-unauthenticated
After deployment, the Cloud Run console displays the service URL. Copy it — you will need it in step 3. It looks like:
https://quasar-<hash>-uc.a.run.app
The --allow-unauthenticated flag makes the service publicly accessible. For a private deployment, remove this flag and configure authentication between Vercel and Cloud Run using a service account.
2

Deploy qasm-playground to Vercel

Fork or clone the qasm-playground repository, then import it into Vercel:
  1. Go to vercel.com/new and select your forked repository.
  2. Vercel detects the Next.js framework automatically — no build configuration changes are needed.
  3. Do not deploy yet. Continue to step 3 to add the required environment variable first.
You can also deploy from the CLI: vercel deploy in the repository root. The environment variable can be added afterward with vercel env add GOOGLE_CLOUD_SERVICE_URL.
3

Set the GOOGLE_CLOUD_SERVICE_URL environment variable

The playground needs to know where to send simulation requests. Set GOOGLE_CLOUD_SERVICE_URL to the Cloud Run service URL from step 1.In the Vercel project dashboard:
  1. Go to SettingsEnvironment Variables.
  2. Add a new variable:
    • Name: GOOGLE_CLOUD_SERVICE_URL
    • Value: your Cloud Run service URL (e.g., https://quasar-<hash>-uc.a.run.app)
  3. Select Production (and optionally Preview) as the environment.
  4. Click Save.
Then trigger a deployment from the Deployments tab, or push a new commit to your repository.
The playground will fail to simulate circuits if GOOGLE_CLOUD_SERVICE_URL is missing or points to an unreachable service. The browser will display an HTTP error when Run is clicked.
4

Verify the deployment

Open your Vercel deployment URL. The playground should load with the Bell state example pre-filled. Click Run and confirm that results appear in the output panel.If simulation fails, check:
  • The GOOGLE_CLOUD_SERVICE_URL value in Vercel matches the Cloud Run service URL exactly (no trailing slash)
  • The Cloud Run service is running and accessible (gcloud run services list)
  • The Vercel deployment picked up the environment variable (redeploy after adding it)

Summary

ComponentPlatformRepository
FrontendVercelitsubaki/qasm-playground
Simulator backendGoogle Cloud Runitsubaki/quasar
The only required configuration is the GOOGLE_CLOUD_SERVICE_URL environment variable in your Vercel project, pointing to your quasar Cloud Run service.

Build docs developers (and LLMs) love