pyquil.external.rpcq module

class pyquil.external.rpcq.CompilerISA(qubits: Dict[str, pyquil.external.rpcq.Qubit] = <factory>, edges: Dict[str, pyquil.external.rpcq.Edge] = <factory>)[source]

Bases: object

dict(by_alias=False)[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

edges: Dict[str, Edge]
classmethod parse_file(filename: str)[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

classmethod parse_obj(dictionary: Dict)[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

qubits: Dict[str, Qubit]
class pyquil.external.rpcq.Edge(ids: List[int], dead: Optional[bool] = False, gates: List[pyquil.external.rpcq.GateInfo] = <factory>)[source]

Bases: object

dead: bool | None = False
dict()[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

gates: List[GateInfo]
ids: List[int]
classmethod parse_obj(dictionary: Dict)[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

class pyquil.external.rpcq.GateInfo(operator: Optional[str] = None, duration: Optional[float] = None, fidelity: Optional[float] = None, parameters: List[Union[float, str]] = <factory>, arguments: List[Union[int, str]] = <factory>, operator_type: Literal['gate'] = 'gate')[source]

Bases: Operator

arguments: List[int | str]
dict()[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

operator_type: Literal['gate'] = 'gate'
parameters: List[float | str]
classmethod parse_obj(dictionary: Dict)[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

class pyquil.external.rpcq.MeasureInfo(operator: str | None = None, duration: float | None = None, fidelity: float | None = None, qubit: int | str | NoneType = None, target: int | str | NoneType = None, operator_type: Literal['measure'] = 'measure')[source]

Bases: Operator

dict()[source]

Deprecated since version 4.7: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

operator_type: Literal['measure'] = 'measure'
classmethod parse_obj(dictionary: Dict)[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

qubit: int | str | None = None
target: int | str | None = None
class pyquil.external.rpcq.Operator(operator: str | None = None, duration: float | None = None, fidelity: float | None = None)[source]

Bases: object

dict()[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

duration: float | None = None
fidelity: float | None = None
operator: str | None = None
classmethod parse_obj(dictionary: Dict)[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

class pyquil.external.rpcq.Qubit(id: int, dead: Optional[bool] = False, gates: List[Union[pyquil.external.rpcq.GateInfo, pyquil.external.rpcq.MeasureInfo]] = <factory>)[source]

Bases: object

dead: bool | None = False
dict()[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

gates: List[GateInfo | MeasureInfo]
id: int
classmethod parse_obj(dictionary: Dict)[source]

Deprecated since version 4.6.2: No longer requires serialization of RPCQ objects and is dropping Pydantic as a dependency.

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]
pyquil.external.rpcq.make_edge_id(qubit1: int, qubit2: int) str[source]