QXel.transpiler.state_vector_transpiler module¶
- class QXel.transpiler.state_vector_transpiler.StateVectorTranspiler¶
Bases:
BaseTranspilerBuild the pass pipeline used by the state-vector simulator.
- class Pass(*values)¶
Bases:
EnumNamed passes understood by
StateVectorTranspiler.- PARTITIONER = 1¶
- LOCALIZER = 2¶
- ELIMINATOR = 3¶
- FUSIONER = 4¶
- GATE_TRANSFORMER = 5¶
- __init__()¶
Initialize the transpiler with no configured passes.
- set_qubit_count(qubit_count)¶
Set the total logical qubit count used by subsequent passes.
- set_qubit_count_local(qubit_count_local)¶
Set the local working-set qubit count for partition-aware passes.
- set_rank(rank)¶
Set the MPI rank used by distributed localization passes.
- set_world_size(world_size)¶
Set the total MPI world size used by distributed passes.
- set_max_fusion(max_fusion)¶
Set the largest fused gate width emitted by the transformer.
- add_pass(ps)¶
Append a configured optimization pass to the pipeline.
- Parameters:
ps (Pass) – Symbolic pass identifier. The current transpiler settings are captured when the concrete pass object is created.
- Raises:
TypeError – If
psis not one of the supported enum members.
- transpile(circuit)¶
Run the configured passes over a circuit queue.
Each pass can emit either a single circuit or multiple derived subcircuits. The output queue of one pass becomes the input queue of the next pass.
- Parameters:
circuit (QuantumCircuit) – Circuit to optimize.
- Returns:
Final circuits emitted by the last pass.
- Return type:
list[QuantumCircuit]