qsci_vm_interface
¶
VM-Aware TE-QSCI Interface¶
This module provides enhanced interfaces for running TE-QSCI algorithms with integrated QURI VM analysis capabilities. It extends the base QSCI algorithms to capture and analyze quantum circuits at both LogicalCircuit and ArchLogicalCircuit levels.
Classes:
Name | Description |
---|---|
VMAnalysisResult |
Result of VM-enhanced circuit analysis. |
TEQSCIVMResult |
Enhanced TE-QSCI result with VM analysis. |
VMAwareTimeEvolutionCircuit |
Wrapper for time evolution circuits with VM analysis capabilities. |
VMAwareSingleTimeTE_QSCI |
TE-QSCI with integrated VM analysis capabilities. |
Functions:
Name | Description |
---|---|
create_vm_aware_te_qsci |
Create VM-aware TE-QSCI algorithm with VM sampling. |
demonstrate_h6_vm_analysis |
Demonstrate H6 TE-QSCI with VM analysis. |
VMAnalysisResult
dataclass
¶
Result of VM-enhanced circuit analysis.
Attributes:
Name | Type | Description |
---|---|---|
logical_analysis |
Dict[str, Any]
|
|
arch_analysis |
Dict[str, Any]
|
|
circuit_description |
str
|
|
analysis_time |
float
|
|
TEQSCIVMResult
dataclass
¶
TEQSCIVMResult(
qsci_result,
time_evolution_analysis,
sampling_circuits_analysis,
total_logical_time,
total_arch_time,
architecture_overhead,
fidelity_impact,
evolution_time,
trotter_steps,
architecture_name,
)
Enhanced TE-QSCI result with VM analysis.
Attributes:
Name | Type | Description |
---|---|---|
qsci_result |
QSCIResult
|
|
time_evolution_analysis |
VMAnalysisResult
|
|
sampling_circuits_analysis |
List[VMAnalysisResult]
|
|
total_logical_time |
TimeValue
|
|
total_arch_time |
TimeValue
|
|
architecture_overhead |
float
|
|
fidelity_impact |
float
|
|
evolution_time |
float
|
|
trotter_steps |
int
|
|
architecture_name |
str
|
|
VMAwareTimeEvolutionCircuit
¶
VMAwareTimeEvolutionCircuit(
base_circuit,
evolution_time,
trotter_steps,
vm_interface,
hamiltonian=None,
)
Wrapper for time evolution circuits with VM analysis capabilities.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
NonParametricQuantumCircuit
|
Base quantum circuit |
required |
|
float
|
Time evolution parameter |
required |
|
int
|
Number of Trotter decomposition steps |
required |
|
QURIVMInterface
|
QURI VM interface for analysis |
required |
|
Optional[Operator]
|
Target Hamiltonian for authentic analysis |
None
|
Methods:
Name | Description |
---|---|
analyze_at_level |
Analyze circuit at specified level with caching. |
get_analysis_summary |
Get comprehensive analysis summary. |
Attributes:
Name | Type | Description |
---|---|---|
base_circuit |
|
|
evolution_time |
|
|
trotter_steps |
|
|
vm_interface |
|
|
hamiltonian |
|
|
circuit |
NonParametricQuantumCircuit
|
Get the underlying circuit. |
Source code in src/qsci_vm_interface.py
analyze_at_level
¶
Analyze circuit at specified level with caching.
Source code in src/qsci_vm_interface.py
get_analysis_summary
¶
Get comprehensive analysis summary.
Source code in src/qsci_vm_interface.py
VMAwareSingleTimeTE_QSCI
¶
VMAwareSingleTimeTE_QSCI(
hamiltonian,
evolution_time,
sampler=None,
num_states_pick_out=None,
trotter_steps=10,
vm_interface=None,
sampling_level=ArchLogicalCircuit,
use_vm_sampling=True,
)
Bases: SingleTimeTE_QSCI
TE-QSCI with integrated VM analysis capabilities.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Operator
|
Target Hamiltonian |
required |
|
float
|
Time evolution parameter |
required |
|
Quantum sampler (used as fallback if use_vm_sampling=False) |
None
|
|
|
Optional[int]
|
Number of states for QSCI subspace |
None
|
|
int
|
Number of Trotter steps for time evolution |
10
|
|
Optional[QURIVMInterface]
|
Pre-configured QURIVMInterface with appropriate VMs |
None
|
|
LoweringLevel
|
LoweringLevel for VM sampling (LogicalCircuit or ArchLogicalCircuit) |
ArchLogicalCircuit
|
|
bool
|
Whether to use VM sampling or fallback to provided sampler |
True
|
Methods:
Name | Description |
---|---|
run_with_vm_analysis |
Run TE-QSCI with comprehensive VM analysis. |
Attributes:
Name | Type | Description |
---|---|---|
vm_interface |
|
|
sampling_level |
|
|
use_vm_sampling |
|
|
fallback_sampler |
|
|
trotter_steps |
|
|
architecture |
|
|
circuit_analyses |
List[VMAnalysisResult]
|
|
time_evolution_analysis |
Optional[VMAnalysisResult]
|
|
name |
str
|
Algorithm name with VM capabilities. |
Source code in src/qsci_vm_interface.py
run_with_vm_analysis
¶
run_with_vm_analysis(
initial_state, analyze_sampling=True, num_shots=1000
)
Run TE-QSCI with comprehensive VM analysis.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
CircuitQuantumState
|
Initial quantum state |
required |
|
bool
|
Whether to analyze sampling circuits |
True
|
Returns:
Type | Description |
---|---|
TEQSCIVMResult
|
Enhanced TE-QSCI result with VM analysis |
Source code in src/qsci_vm_interface.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 |
|
create_vm_aware_te_qsci
¶
create_vm_aware_te_qsci(
hamiltonian,
evolution_time=1.5,
vm_interface=None,
sampling_level=ArchLogicalCircuit,
use_vm_sampling=True,
**kwargs
)
Create VM-aware TE-QSCI algorithm with VM sampling.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Operator
|
Target Hamiltonian |
required |
|
float
|
Time evolution parameter |
1.5
|
|
Optional[QURIVMInterface]
|
Pre-configured QURIVMInterface with appropriate VMs |
None
|
|
LoweringLevel
|
LoweringLevel for VM sampling (LogicalCircuit for ideal, ArchLogicalCircuit for STAR) |
ArchLogicalCircuit
|
|
bool
|
Whether to use VM sampling or fallback to Qulacs |
True
|
|
Additional arguments for TE-QSCI |
{}
|
Returns:
Type | Description |
---|---|
VMAwareSingleTimeTE_QSCI
|
VM-aware TE-QSCI algorithm with VM sampling capabilities |
Source code in src/qsci_vm_interface.py
demonstrate_h6_vm_analysis
¶
Demonstrate H6 TE-QSCI with VM analysis.