pyquil.external.rpcq module¶
- class pyquil.external.rpcq.CompilerISA(**extra_data: Any)[source]¶
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- class pyquil.external.rpcq.Edge(*, ids: List[int], dead: bool | None = False, gates: List[GateInfo] = None)[source]¶
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- dead: bool | None¶
- dict(**kwargs: Any) Dict[str, Any] [source]¶
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- ids: List[int]¶
- class pyquil.external.rpcq.GateInfo(*, operator: str | None = None, duration: float | None = None, fidelity: float | None = None, parameters: List[float | str] = None, arguments: List[int | str] = None, operator_type: Literal['gate'] = 'gate')[source]¶
Bases:
Operator
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- arguments: List[int | str]¶
- operator_type: Literal['gate']¶
- parameters: List[float | str]¶
- class pyquil.external.rpcq.MeasureInfo(*, operator: str | None = None, duration: float | None = None, fidelity: float | None = None, qubit: int | str | None = None, target: int | str | None = None, operator_type: Literal['measure'] = 'measure')[source]¶
Bases:
Operator
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- operator_type: Literal['measure']¶
- qubit: int | str | None¶
- target: int | str | None¶
- class pyquil.external.rpcq.Operator(*, operator: str | None = None, duration: float | None = None, fidelity: float | None = None)[source]¶
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- duration: float | None¶
- fidelity: float | None¶
- operator: str | None¶
- class pyquil.external.rpcq.Qubit(*, id: int, dead: bool | None = False, gates: List[GateInfo | MeasureInfo] = None)[source]¶
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- dead: bool | None¶
- dict(**kwargs: Any) Dict[str, Any] [source]¶
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- gates: List[GateInfo | MeasureInfo]¶
- id: int¶
- class pyquil.external.rpcq.Supported1QGate[source]¶
Bases:
object
- I = 'I'¶
- MEASURE = 'MEASURE'¶
- RX = 'RX'¶
- RZ = 'RZ'¶
- WILDCARD = 'WILDCARD'¶
- class pyquil.external.rpcq.Supported2QGate[source]¶
Bases:
object
- CPHASE = 'CPHASE'¶
- CZ = 'CZ'¶
- ISWAP = 'ISWAP'¶
- WILDCARD = 'WILDCARD'¶
- XY = 'XY'¶
- pyquil.external.rpcq.add_edge(quantum_processor: CompilerISA, qubit1: int, qubit2: int) Edge [source]¶
- pyquil.external.rpcq.add_qubit(quantum_processor: CompilerISA, node_id: int) Qubit [source]¶
- pyquil.external.rpcq.compiler_isa_to_target_quantum_processor(compiler_isa: CompilerISA) TargetDevice [source]¶
- pyquil.external.rpcq.get_edge(quantum_processor: CompilerISA, qubit1: int, qubit2: int) Edge | None [source]¶
- pyquil.external.rpcq.get_qubit(quantum_processor: CompilerISA, node_id: int) Qubit | None [source]¶