Skip to content

Quantum Program Visualization Tool

The Classiq analyzer application helps you visualize and analyze quantum programs. The input to the application is a quantum program synthesized by the Classiq synthesis engine, or an OpenQASM quantum program.

Accessing the Quantum Program Visualization Tool

There are 2 ways to view a quantum program using the visualization tool:

  • Through the Classiq Python SDK

  • Direct access via the Classiq IDE

Classiq Python SDK

  • Synthesize your model using synthesize() to obtain a quantum program, and pass it as a parameter to the function show(). Here is an example with a trivial model:
from classiq import Output, QBit, allocate, create_model, synthesize, show
from classiq.qmod.quantum_function import QFunc


@QFunc
def main(res: Output[QBit]) -> None:
    allocate(1, res)


model = create_model(main)
qprog = synthesize(model)
show(qprog)

Direct Access

  • Synthesizing a quantum program using the IDE (https://platform.classiq.io/synthesis) automatically redirects you to the visualization tool.
  • Upload (drag and drop) a file that contains a quantum program synthesized using the Classiq engine (either synthesized and downloaded from the IDE or obtained from the python SDK using qprog.save_result("file-name"))) into https://platform.classiq.io/circuit/.

upload_qp

Using Visualization Tool

Within the Quantum Program page you can toggle between 2 versions of the visualization tool:

toggle_versions