Jones Lab Hatlab |
evmckinney9 / monodromy Goto Github PK
View Code? Open in Web Editor NEWThis project forked from qiskit-extensions/monodromy
Computations in the monodromy polytope for quantum gate sets
License: Apache License 2.0
This project forked from qiskit-extensions/monodromy
Computations in the monodromy polytope for quantum gate sets
License: Apache License 2.0
consider that some regions are cheaper with a larger basis gate when 1Q gates are non-neglible
See qiskit-advocate/qamp-spring-23#6
# TODO: here can implement approximate decomposition, e.g. instead of satisfying has_element,
# the target gate just needs to be sufficiently close to the polytope.
# find the point in the polytope that minimizes the distance -> maximizes fidelity.
def coverage_lookup_operation(coverage_set:List[CircuitPolytope], target: Instruction) -> Tuple[float, List]:
"""Calculates the cost of an operation
Finds the cost of an operation by iterating through the coverage set, sorted by cost.
Args:
coverage_set (List[CircuitPolytope]): The coverage set to search
target (Instruction): The operation to find the cost of
Returns:
(float, List): The cost of the operation and the list of operations that make up the circuit
"""
# convert gate to monodromy coordinate
try:
target_coords = unitary_to_monodromy_coordinate(target.to_matrix())
except AttributeError:
target_coords = unitary_to_monodromy_coordinate(Operator(target).data)
# iterate through coverage set, sorted by cost
for circuit_polytope in coverage_set:
if circuit_polytope.has_element(target_coords):
return circuit_polytope.cost, circuit_polytope.instructions
raise TranspilerError("Operation not found in coverage set.")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.