Skip to content

Commit

Permalink
added dag for data in qarray
Browse files Browse the repository at this point in the history
  • Loading branch information
Phionx committed Mar 4, 2024
1 parent a0c06ed commit aa4b2d9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion jaxquantum/core/qarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,4 +453,15 @@ def batch_dag_data(op: Array) -> Array:
"""
return jnp.moveaxis(
jnp.conj(op), -1, -2
) # transposes last two axes, good for batching
) # transposes last two axes, good for batching

def dag_data(op: Array) -> Array:
"""Conjugate transpose.
Args:
op: operator
Returns:
conjugate of op, and transposes last two axes
"""
return jnp.conj(op.T)

0 comments on commit aa4b2d9

Please sign in to comment.