Skip to Content

Quickstart

Write and run a quantum workflow in under 5 minutes.

Install Marqov

pip install marqov

Write a Bell State workflow

Create a file called bell_state.py:

from marqov import task, workflow, Circuit, get_device @task def create_bell_pair(): """Build a Bell State circuit: (|00> + |11>) / sqrt(2).""" return Circuit().h(0).cnot(0, 1) @task def measure(circuit): """Run the circuit on a simulator and return measurement counts.""" device = get_device({"backend": "local"}) return device.run(circuit, shots=1000) @workflow(name="Bell-State") def bell_state(): circuit = create_bell_pair() counts = measure(circuit) return { "counts": counts, "_summary": { "Circuit": "Bell State", "Shots": "1000", } }

This script defines two tasks and one workflow. Marqov builds a dependency graph automatically: create_bell_pair runs first, then measure uses its output.

Run it

Option 1: On the Marqov platform

  1. Go to the Playground 
  2. Paste the script above
  3. Click Run on Server
  4. View results — you’ll see measurement counts ({"00": ~500, "11": ~500}) and the execution dashboard

Option 2: With Temporal locally

import asyncio from temporalio.client import Client async def main(): client = await Client.connect("localhost:7233") dispatch = bell_state() result = await dispatch.run(client) print(result) asyncio.run(main())

What happened?

  1. @task marks create_bell_pair and measure as parallelizable units of work
  2. @workflow composes them into a dependency graph
  3. Marqov dispatches the workflow to Temporal, which executes tasks in the correct order
  4. The _summary dict produces dashboard cards in the Marqov UI

Next steps

Last updated on