Skip to content

Commit

Permalink
Solve piracies and ambiguities (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar committed Aug 6, 2024
1 parent 263195c commit e51a142
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/misc_ops.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import QuantumInterface: nsubsystems

"""A Stabilizer measurement on the entirety of the quantum register.
`projectrand!(state, pauli)` and `apply!(state, PauliMeasurement(pauli))` give the same (possibly non-deterministic) result.
Expand All @@ -17,6 +19,9 @@ function apply!(state::AbstractStabilizer, m::PauliMeasurement)
state
end

function apply!(state::MixedDestabilizer, indices::Base.AbstractVecOrTuple, operation::Type{<:AbstractSymbolicOperator})
apply!(state, operation(indices...))
end

"""A Clifford gate, applying the given `cliff` operator to the qubits at the selected `indices`.
Expand Down Expand Up @@ -140,3 +145,5 @@ struct ClassicalXOR{N} <: AbstractOperation
end

ClassicalXOR(bits,store) = ClassicalXOR{length(bits)}(tuple(bits...),store)

nsubsystems(state::MixedDestabilizer) = nqubits(state)

2 comments on commit e51a142

@Krastanov
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/112769

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.9 -m "<description of version>" e51a142d8c6b8300cfa1b417b677c7e349a1bb0b
git push origin v0.9.9

Please sign in to comment.