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:
- Gate counts for different operation types
- Call relationships between functions
- Resource scaling with input size
- 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:
- Develop your quantum algorithm in Workbench
- Compile your program to generate resource estimates
- Open the estimate directly in Resource Analyzer
- 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:
- Identify optimization opportunities in Resource Analyzer
- Return to Workbench to implement changes
- Generate new resource estimates
- 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:
- Structure your Workbench projects to generate meaningful resource estimates
- Use consistent naming conventions for functions and modules
- Document resource estimation parameters
- Save baseline measurements for comparison
Version Control¶
The integration works well with version control:
- Store resource estimates alongside your Workbench code
- Track changes in resource usage over time
- Compare resource estimates between branches
- Document significant resource optimizations
Coming Enhancements¶
Future enhancements to the Workbench integration will include:
- Direct invocation of Resource Analyzer from Workbench
- Automated resource usage comparisons
- Enhanced metadata tracking
- Integrated optimization suggestions
Future Updates
These enhancements are planned for upcoming releases. Check the Construct release notes for availability.