Skip to content

Workbench Integration

Resource Analyzer integrates seamlessly with PsiQuantum's Workbench, providing direct analysis capabilities for your quantum algorithms. Understanding this integration helps you move efficiently between development and analysis phases of your quantum computing projects.

Integration Overview

When you develop quantum algorithms in Workbench, your code generates resource estimates that can be directly analyzed in Resource Analyzer. This tight integration creates a smooth workflow from implementation to analysis, enabling rapid iteration and optimization of your quantum algorithms.

From Workbench to Resource Analyzer

Resource Estimate Generation

Workbench automatically generates resource estimates during program compilation. This process creates a detailed accounting of quantum resources required by your algorithm, including:

  1. Gate counts for different operation types
  2. Call relationships between functions
  3. Resource scaling with input size
  4. Ancilla qubit requirements

The resulting resource estimates are saved in a format that Resource Analyzer can directly interpret, enabling immediate visualization and analysis.

File Format Support

Resource estimates from Workbench are saved in one of two formats: - .qre-analysis.json - Standard format for resource estimates - .basq.dataset.json - Format used by specific Workbench tools

Both formats contain comprehensive resource usage data, though they may organize it differently. Resource Analyzer handles both formats transparently, allowing you to focus on analysis rather than file compatibility.

Analysis Workflow

Immediate Analysis

The typical workflow follows these steps:

  1. Develop your quantum algorithm in Workbench
  2. Compile your program to generate resource estimates
  3. Open the estimate directly in Resource Analyzer
  4. Begin analysis using Resource Analyzer's visualization tools

This immediate feedback loop helps you quickly understand the resource implications of your implementation choices.

Iterative Development

Resource Analyzer's insights often lead to algorithm refinements. The integration supports this iterative process:

  1. Identify optimization opportunities in Resource Analyzer
  2. Return to Workbench to implement changes
  3. Generate new resource estimates
  4. Compare results in Resource Analyzer

This cycle continues until you achieve your desired resource efficiency.

Best Practices

Development Organization

To make the most of the Workbench integration:

  1. Structure your Workbench projects to generate meaningful resource estimates
  2. Use consistent naming conventions for functions and modules
  3. Document resource estimation parameters
  4. Save baseline measurements for comparison

Version Control

The integration works well with version control:

  1. Store resource estimates alongside your Workbench code
  2. Track changes in resource usage over time
  3. Compare resource estimates between branches
  4. Document significant resource optimizations

Coming Enhancements

Future enhancements to the Workbench integration will include:

  1. Direct invocation of Resource Analyzer from Workbench
  2. Automated resource usage comparisons
  3. Enhanced metadata tracking
  4. Integrated optimization suggestions

Future Updates

These enhancements are planned for upcoming releases. Check the Construct release notes for availability.