Note: related JAX test
func, mlir, jaxpr = None, None, None| import catalyst | |
| import pennylane as qml | |
| from time import time | |
| from json import dump as json_dump | |
| @qml.qjit | |
| @qml.qnode( | |
| qml.device( | |
| "qrack.simulator", |
Note: related JAX test
func, mlir, jaxpr = None, None, None| diff --git a/jax/_src/interpreters/mlir.py b/jax/_src/interpreters/mlir.py | |
| index d168d22ab..798d07a6d 100644 | |
| --- a/jax/_src/interpreters/mlir.py | |
| +++ b/jax/_src/interpreters/mlir.py | |
| @@ -1461,7 +1461,7 @@ def jaxpr_subcomp(ctx: ModuleContext, jaxpr: core.Jaxpr, | |
| ans, "lowering function returned a bad output", eqn) | |
| assert len(ans) == len(eqn.outvars), (ans, eqn) | |
| map(write, eqn.outvars, out_nodes) | |
| - core.clean_up_dead_vars(eqn, env, last_used) | |
| + # core.clean_up_dead_vars(eqn, env, last_used) |
@qjit(autograph=True, verbose=True, keep_intermediate=True)
@qml.qnode(qml.device("lightning.qubit", wires=1))
def fn(x: float):
qml.RY(x, wires=0)
return qml.expval(qml.PauliZ(0))
fn(np.pi)| Traceback (most recent call last): | |
| File "/workspace/modules/catalyst/frontend/catalyst/compiler.py", line 365, in run_from_ir | |
| compiler_output = run_compiler_driver( | |
| RuntimeError: Compilation failed: | |
| f:6:3: error: operand #0 does not dominate this use | |
| func.func private @"<lambda>"(%arg0: tensor<f64>) -> tensor<f64> attributes {llvm.linkage = #llvm.linkage<internal>} { | |
| ^ | |
| f:6:3: note: diagnostic emitted with trace: | |
| #0 0x00007f08dcb4ac13 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/workspace/_build_dialects/python_packages/quantum/mlir_quantum/compiler_driver.so+0x8b4ac13) | |
| #1 0x00007f08da98c1b9 emitDiag(mlir::Location, mlir::DiagnosticSeverity, llvm::Twine const&) Diagnostics.cpp:0:0 |
| module @C_workflow { | |
| llvm.func @__quantum__rt__finalize() | |
| llvm.func @__quantum__rt__initialize() | |
| llvm.mlir.global internal constant @backend_best("best\00") {addr_space = 0 : i32} | |
| llvm.mlir.global internal constant @backend("backend\00") {addr_space = 0 : i32} | |
| llvm.func @__quantum__rt__device(!llvm.ptr<i8>, !llvm.ptr<i8>) | |
| llvm.func @free(!llvm.ptr<i8>) | |
| llvm.func @malloc(i64) -> !llvm.ptr<i8> | |
| llvm.mlir.global private constant @__constant_4x3x4xf64(dense<9.9999999999999995E-8> : tensor<4x3x4xf64>) {addr_space = 0 : i32} : !llvm.array<4 x array<3 x array<4 x f64>>> | |
| llvm.mlir.global private constant @__constant_4x4xf64(dense<9.9999999999999995E-8> : tensor<4x4xf64>) {addr_space = 0 : i32} : !llvm.array<4 x array<4 x f64>> |
| from frozendict import frozendict | |
| from typing import List, Any, Callable | |
| from copy import deepcopy | |
| Dim = int # Dimention "names" | |
| Index = Dict[Dim, int] # `Index :: Dimention -> Coordinate` | |
| # (To-be implemented as Frozendict to make Python data hashable) | |
| Value = complex # A value | |
| Tensor = Dict[Index, Value] # `Tensor :: Index -> Value` |
| enable prepare protect duty hardware | |
| clock count count count rate accuracy phase cycle enable | |
| ------------------------------------------------------------------------------------------------------- | |
| iosc 1 1 0 16000000 300000000 0 50000 Y | |
| ar100 1 1 0 16000000 300000000 0 50000 Y | |
| ahb0 1 1 0 16000000 300000000 0 50000 Y | |
| apb0 2 2 0 16000000 300000000 0 50000 Y | |
| apb0-twd 1 1 0 16000000 300000000 0 50000 Y | |
| apb0-i2c 0 0 0 16000000 300000000 0 50000 N | |
| apb0-uart 0 0 0 16000000 300000000 0 |
| 0?0?��NmG?&?}ev?\?ӓ0 | |
| *?0?$10 *?H?? | |
| [email protected]0 URU10U77 Москва10Uг. Москва1.0,U %улица Тверская, дом 71,0*U | |
| #Минкомсвязь России10*?d | |
| 104770202670110*??0077104743751,0*U#Минкомсвязь России0 | |
| 180706121806Z | |
| 360701121806Z0?$10 *?H?? | |
| [email protected]0 URU10U77 Москва10Uг. Москва1.0,U %улица Тверская, дом 71,0*U | |
| #Минкомсвязь России10*?d | |
| 104770202670110*??0077104743751,0*U#Минкомсвязь России0f0*?0*?#*?C@u9*E????}??"???Zq?}}X??F?EaW??H??J?H?j)????xq?G?????6???????0??0??*?dp??0??4ПАКМ «КриптоПро HSM» версии 2.0CПАК «Головной удостоверяющий центр»5Заключение № 149/3/2/2/23 от 02.03.20184Заключение № 149/7/6/105 от 27.06.20180?*?do64ПАКМ «КриптоПро HSM» версии 2.00CU <0:0*?dq0*?dq0*?dq0*?dq0*?dq0U 0U?0U?0?0U?T??k?L??m6?#????<?0 |