Skip to content

Releases: quantumlib/Cirq

Cirq v0.8.0

04 May 18:27
Compare
Choose a tag to compare

Major usability changes:

  • Reorganize and improve documentation and examples
  • Standardize CXPowGate, CCXPowGate, CNotPowGate, CCNotPowGate
  • Add and improve Clifford Simulator
  • Operations can now be "tagged" to support custom functionality.
  • Additional compilation methods added to optimizers
  • New noise models based on calibration metrics
  • Random quantum circuits to experiments
  • Moved measures and states to new qis sub-package
  • Added Pasqal API integration
  • Updates for Google API integration

New protocols:

  • SupportsCommutes (polish of cirq.definitely_commutes)

New top level objects:

  • cirq.pasqal sub-package

  • cirq.qis sub-package

  • cirq.CIRCUIT_LIKE

  • cirq.CXPowGate

  • cirq.decompose_multi_controlled_x

  • cirq.decompose_multi_controlled_rotation

  • cirq.final_density_matrix

  • cirq.GridQid

  • cirq.is_normal

  • cirq.json_serializable_dataclass

  • cirq.merge_single_qubit_gates_into_phxz

  • cirq.RANDOM_STATE_OR_SEED_LIKE

  • cirq.single_qubit_matrix_to_phxz

  • cirq.stratified_circuit

Full change list:

a759e41 Add get_device for engine_processor (#2954)
f907314 Update xmon gate times (#2952)
d2d3356 Accept empty list of whitelisted_users when updating reservations. (#2950)
b67ef87 Add Example: Simon's Algorithm (#2649)
33194ad Create qis subpackage and move some existing code to qis.states and qis.measures (#2808)
e9b881a Speed up clifford simulator by short circuiting on known gates (#2919)
71df170 Fix time bugs in EngineProcessor.get_schedule (#2878)
4e86982 Remove deprecated methods and improve reprs (#2717)
b4c4066 Ensure exponent in eigen gate is real. (#2881)
a3af71f Add assert_specifies_has_unitary_if_unitary to consistency tests (#1759)
d147dda Add all_measurement_keys method to circuit (#2868)
675e4f0 Rename RANDOM_STATE_LIKE to RANDOM_STATE_OR_SEED_LIKE and expose at top level (#2942)
e34f8d1 Add shell:bash to run bash script on Windows. (#2943)
f2631ac Add more type annotations and f-strings (#2937)
46327bd Check 2x2 unitary in has_stabilizer_effect (#2938)
06f34f8 Allow creating device proto for specified qubits and pairs (#2934)
e08f94a Some more type annotations and format strings (#2935)
10fc655 Make from_json_dict return global Pauli instance so they commute(#2911)
9208613 Remove exponent parameter from _Pauli{X,Y,Z} (#2924)
0b050f7 Move studies to Tutorials (#2931)
23ce11c DFE with exhaustive sampling for exhaustive Clifford Pauli strings (#2918)
d0ec891 Fix pytest for mac by replacing grep with perl (#2930)
aa2a40a Update noise model to new metrics. (#2927)
9208cb3 Fix indentation on markdown (#2929)
67cd74b Add JSON serialization for CliffordState and CliffordTableau (#2894)
3bd420e Add JSON Serialization for GateTabulation. (#2883)
97701b1 More type annotations and format strings (#2914)
86bf42a Add notebook on Hidden Linear Function Problem (#2857)
7ec9e6f Loosen tolerance restrictions in Quantum Engine (#2921)
beaa782 DRY radian formatting (#2907)
3132f97 Actually test zip sweep with duplicate keys (#2913)
68bf299 Replace Travis with Github workflow except for script that performs devbuilds (#2859)
4c0cb2c Remove explicit object superclass (#2910)
110dd4a Add interop docs and optimizers (#2884)
4df6919 Add more missing type annotations (#2908)
1640175 Intermediate examples had the wrong header (#2909)
4792e8f Add some missing type annotations (#2906)
740ef6c Reorganize examples page to better list out examples (#2897)
32a4162 Add function to compute fidelity (#2797)
eef4105 Add ability to do exhaustive Clifford trial (#2837)
11b1433 Add return values to direct_fidelity_estimation() (#2889)
9b8eb8b Shortening titles of tutorials (#2901)
baa718e Fix invalid argument in list_processors. (#2899)
b1b09a0 upgrade pytest to version 5.4.1 (#2895)
ad6b822 Fix examples link (#2893)
1daad39 Fix links in github view (#2890)
4320e52 Fix column axis rename in pandas 1.0 (#2886)
76b2689 Reorder TOC and move development to dev/ (#2882)
230249c Define moment+moment operation to return a combined moment (#2879)
3fee6d5 Fix image links and headers (#2880)
d2a8fa1 Add CXPowGate and CCNotPowGate for completeness and consistency. (#2874)
1e50e4a Refactor DFE to run samplers (#2870)
d1d203e Fix images in cirq docs (#2876)
c769af8 Move notebooks from examples to docs (#2877)
41b8e8b Add new tutorial (#2865)
4521a9b Add CZ to combined FSim gate set (#2875)
3659c7f fix pytest changed files script for mac (#2871)
25e1668 Handle all possible 1-qubit Clifford gates in Clifford simulator (#2803)
0fccaae Add stratified_circuit method (#2852)
459f644 Add has_stabilizer_effect protocol and support native Clifford simulator gates (#2760)
08ee106 Add CZ serializer (#2866)
2a3f7e9 Restore single-Clifford inversion in RB benchmarking. (#2851)
6c57f2e Expand SWEEP_LIKE to work for {'t': [0, 1, 3]} (#2786)
2dd6e2e Add GridQid class (#2861)
eb9b13c Use UTC time for reservation interactions. (#2860)
4d044cf Use random seed in CliffordSimulator (#2845)
5a52d97 Upgraded Gate documentation (#2790)
825aa57 Add Pauli expansion for PhasedXZ (#2856)
ad87c57 Add circuits notebook back in (#2855)
6271cb6 Convert documentation to use nbsphinx (#2850)
2cb9787 Implement filtering by time slot type (#2849)
fa07ce3 Fix typo (#2854)
36f3262 Add preliminary doc on calibration metrics (#2761)
76a07c7 Support readout errors modeling in noise-from-metrics utility. (#2715)
e151dc7 Fix filters to include time slots that do not start within the window. (#2848)
61fd6f1 Pasqal api (#2751)
5c60a58 Reservation Client API for cirq google EngineProcessor (#2838)
afad82b Fix error message from cirq.final_wavefunction to cirq.final_density_matrix #2778 (#2844)
626e16e Added BB84_example (#2395)
61b4259 Fix quantum engine gRPC path (#2833)
4561991 Update google gRPC Client to include reservation calls (#2830)
9b14d2f More gates aqt (#2801)
4efcb74 Issue #2829 - moved Jupyter notebooks into examples/notebooks (#2831)
5d0ac1d Added Quantum Walks Tutorial (#2825)
2e80ac3 Restore deprecated noise models. (#2827)
a8c7ed2 docs: minor spelling tweaks (#2823)
9718bd7 Add symbol capability to LIMITED_FSIM gate set (#2822)
61ce1c3 Add EngineProcessorTimeSlot to cirq.google.engine (#2794)
9422f5c Speed up GridQubit eq (#2815)
4127397 Document external simulators. (#2811)
cdb24ea Slightly speed up comparison and hashes for GridQubit (#2814)
58bdb81 Speed up direct fidelity estimation for Clifford circuits (Issue #2639) (#2709)
86b89fb Fit depolarizing model to XEB result (#2784)
007f858 Add a limited FSIM gateset (#2804)
329765a Convert single-qubit gates to single-gate PhasedXZ for sycamore (#2796)
5da8f0f Add test for non-string tag for TaggedOperation circuit diagrams (#2800)
cc457d3 Add support for indexing circuits and moments by qubits (#2773)
5d9a464 In unitary_eig, check preconditions before performing computing eigenvalues (#2795)
f6b484a Updated Dev Documentation (#2792)
dec7313 Refactor and clean up of engine client and helper objects. (#2720)
3a6ad8d Accept FSim(pi/2, pi/6) in ConvertToSycamoreGates (#2788)
875132c Attempt to fix flaky test by fixing random seed in n_qubit_tomography_test.py (#2758)
c8beade unitary eigenvalue decomposition (#2736)
17d2b05 Apply 'virtual' tag in noise models. (#2734)
d8c8547 Enable optimized_for_sycamore with single qubit MatrixGates (#2766)
736e7ac Make auto_merge script use new update-branch API call (#2782)
343682d Add tags and untagged properties on cirq.Operation (#2783)
0915f94 Make GridInteractionLayer a JSON serializable dataclass (#2779)
5e81be8 Fix density matrix simulation of noise (#2776)
0cefd75 Add function to generate random density matrix (#2780)
9d926d6 Serialization for PhysicalZ gates (#2770)
a1d2fb1 Increase tolerance in n_qubit_tomography_test' (#2774)
82d4fb3 Add tags to circuit diagrams (#2759)
37a222f Improves semantics of Circuit.findall_operations_until_blocked (#1916)
6a4fbfb Added QAOA and Rabi Demo notebooks. (#2768)
645af19 Save repetitions in CrossEntropyResult and make it into a JSON serializable dataclass (#2765)
c0a1b55 Speed up single qubit gate layer generation for random quantum circuit (#2764)
89653aa Add PhysicalZTag (#2753)
ce13a73 Add random quantum circuit generation (#2621)
1b37885 Return unrecognized random state unmodified (#2622)
6ba76b8 Add algorithm for decomposing multi-controlled rotation (#2716)
926751d Make LineQubit and GridQubit immutable (#2756)
68ca843 Make Best Practices its own page (#2754)
1d35492 Remove Google index page and link directly to Google pages (#2752)
2715417 Add Tags and TaggedOperation class (#2670)
1e5bf55 Fix sign error in PhasedXZGate._canonical (#2744)
8a0339b Add documentation for Engine (#2663)
4b91b2c Adding, shifting, and stacking for TextDiagramDrawer (#1236)
e257e31 Add json_serializable_dataclass decorator (#2706)
4dae9b2 Fix n-qubit state tomography (#2739)
8612933 Fix ordering bug in fsim decomposition (#2732)
fa74b05 Turn off --actually-quiet for Windows (#2731)
8179aa2 Add more specialized controlled implementations (#2597)
d5ce404 Draw ket labels for both real and imaginary parts of density matrix (#2722)
db9a9ed requirements: remove sympy pin (#2721)
04e2a1b Pin pandas (#2724)
0882abb Add cirq.final_density_matrix utility method (#2487)
9293779 Use captions in TOC (#2703)
c54066b Unpin networkx (#2718)
e69a1ac Fix slow tests (#2714)
df15b9b Convert documentation in docs/ to jupyter notebooks (new PR) (#2713)
1bda272 Fix special new line characters in a file (#2708)
8f946e3 removing deprecated functions with v0.7 deadline (#2707)
0494323 Update the engine code to use gRPC instead of REST (#2675)
bc858fc Plumb gate tabulation through optimized_for_sycamore (#2697)
d470089 Fix occasional bug...

Read more

Cirq v0.7.0

18 Jan 00:50
cc61838
Compare
Choose a tag to compare

Major usability changes:

  • Added new gates: PhasedXZGate, WaitGate, givens, ISwapRotation, IdentityGate, MatrixGate
  • cirq.Rx cirq.Ry cirq.Rz cirq.MS changing to cirq.rx, cirq.ry, cirq.rz cirq.ms
  • Added commutes protocol
  • Added import capability from Quirk
  • Improved JSON serialization support
  • Many speed up and performance improvements.
  • Added Sycamore Devices and optimizers to cirq.google
  • Added many engine-related improvements to cirq.google
  • Deleted Schedules

New protocols:

  • cirq.apply_mixture
  • cirq.definitely_commutes

New top level objects:

  • cirq.givens
  • cirq.quirk_json_to_circuit
  • cirq.quirk_url_to_circuit
  • cirq.estimate_single_qubit_readout_errors
  • cirq.ISwapRotation
  • cirq.MatrixGate
  • cirq.PAULI_GATE_LIKE
  • cirq.PhasedXZGate
  • cirq.riswap
  • cirq.rx
  • cirq.ry
  • cirq.rz
  • cirq.decompose_two_qubit_interaction_into_four_fsim_gates_via_b
  • cirq.STATE_VECTOR_LIKE

Full change list:

f56e6fb Add test_json_data files to package
266491a Create add method for Moment (#2665)
de6ca2d Better decomposition of SWAP into ISWAP ** 0.5 (#2682)
575ae93 Make grid_qubits addable (#2681)
58741a1 Add gate duration for xyz gate (#2680)
91e919a Delete cirq.api.google (#2667)
3469e5c (t2_experiments) Change symbols in phased_iswap_test (#2672)
f306544 Remove code for GCS locations since they are no longer used. (#2668)
02ee285 Add PhasedXZ gate to standard single qubit (de)serializers (#2661)
86e059a Add device_specification to engine code (#2640)
f7f224c Fix typo in SerializableDevice print out (#2660)
2c8914b Quantum Volume: Add the ability to specify the device graph to compile the model circuit onto (#2645)
7fb1a49 Add documentation for cirq.google devices (#2636)
ed6188b Add commutes protocol (#1853)
1017bae Add __tracebackhide__ = True to several test methods (#2653)
1309e99 Add optional qubit_set property to cirq.Device (#2605)
5968ccd Adds basic PhasedISwapPow gate to Sycamore decomposition function (#2629)
933329b Fix automerge script not seeing PRs on second page (#2654)
b928a87 Fix instability in _decompose_interaction_into_two_b_gates_ignoring_single_qubit_ops (#2609)
9a5a09e Fix serialization breakage due to sympy.Rational now being a numbers.Number (#2655)
c78d345 Add optimized_for_gmon to optimize circuits for Sycamore devices (#2627)
58d7722 Fix documentation and key error in calibration (#2633)
da513ac adds max_num_empty_steps parameter (#2631)
a038bd3 Mark test that sometimes fails on windows as xfail. (#2630)
3217135 Add pretty str for devices with grid qubits (#2616)
6d81ddb fix of router hanging #2282 (#2619)
2b88d34 Add optional tabulation to ConvertToSycamoreGates (#2615)
18a677d Update Alpha Disclaimer (#2611)
31b5436 Fix doc build by removing tensorflow dependency (#2610)
3a32a40 Add support for u1(lambda) gate (#2608)
42f9a37 Add explicit JSON resolver function in contrib (#2559)
07955c5 Detect duplicate mesurement keys. (#2604)
912c82a Add (de)serializer for PhasedXZGate (#2598)
7f8a4ff Add WaitGate to gate sets (#2601)
690b5f7 lengthen randomly generated program id (#2599)
993fa1e Delete things marked as deprecated-until-v0.7 (#2594)
6d986e6 Implement TrialResult JSON serialization (#2576)
55c1590 Make 'async def' tests work (#2583)
d963a02 Add Conversion optimizers to cirq.google init (#2593)
5dcab58 Fix parametrized -> parameterized typos (#2592)
2963285 Initial draft of ConvertToSycamore (#2516)
1c5084a Delete schedules (#2589)
8902820 Use warnings.warn for deprecation warnings (#2586)
ebd0b36 Add cirq.PhasedXPowZPowGate (#2566)
35c64e4 Move deprecated functions to deprecated docs section (#2585)
8beef6d Implement decompose_two_qubit_interaction_into_four_fsim_gates_via_b (#2574)
2920804 Rename Rx, Ry and Rz factories (#2580)
e76e36a Add Sycamore23 device (#2547)
2201aa0 AQT: Improve documentation, Add Z operations and rename AQTRemoteSimulator to AQTSamplerLocalSimulator (#2578)
8408f89 Fix pytest (#2584)
96f5f54 Make pytest-changed-files include api tests when an init file is changed (#2575)
e2446d4 Update ZPow.controlled specialization (#2572)
52b14db Fix radd losing device (#2451)
f14ed20 Support arbitrary exponents when exporting X/Y/ZPowGate to quirk url (#2513)
0682134 Zlib fix (#2573)
837c4e4 Initial draft for convert_to_sqrt_iswap (#2528)
d2f6344 Test gate being added multiple times. (#2560)
907f990 Add CircuitDiagramInfoArgs.format_real (#2569)
ad98557 Add Gate and Operation Guidelines dev docs (#2558)
a8c6ca2 Don't run async methods on other threads by default (#2562)
fab633d Fix several dozen relative type annotations (#2568)
4be5578 Make QuantumEngineSampler engine accessible through property (#2564)
c055eea Fix NoisySingleQubitReadoutSampler test class (#2563)
a90051e Turn off flaky build-protos check (#2571)
e904305 Define cirq.PAULI_GATE_LIKE (#2557)
dac7814 Add single qubit readout calibration (#2532)
bb0afb3 Fixes "Mention the difference between stable docs and latest docs." (#2549)
3a4d8a7 Add optional readout error correction to Quantum Volume (#2522)
26cadfb Implement JSON serialization for ParamResolver (#2555)
2bf4826 Add a special case for WaitGate in known devices (#2545)
8a8696f Fix MatrixGate pow and repr failing for non-qubit shapes (#2556)
a4025d1 Add developer doc explaining serialization (#2548)
781e84c make resolver repr evaluatable (#2554)
d0fc17e Rename givens rotation factory (#2519)
08df3b4 Rename Mølmer–Sørensen gate factory (#2518)
d6f65c2 Deprecate IdentityOperation obsoleted by IdentityGate (#2546)
23ce7ca Fix ParamResolver.param_dict type (#2550)
4ff38cf Refactor json_test's TEST_OBJECTS value into test data files (#2527)
6d5087c Rename iswap rotation (#2526)
7a15f02 Fix typo in contrib noise models (#2529)
c90644e Update path to Cirq_logo_color.png to make it appear in the README. (#2540)
0a5d3d4 Add check/pytest-changed-files-and-incremental-coverage (#2510)
a167b64 Client change google api (#2530)
d7927cb use RANDOM_STATE_LIKE in simulators (#2531)
15c142d Fix timings for Google devices (#2521)
390cc4a Use sum instead of einsum in QAOA example (#2507)
e2373e6 Make circuit rendering of PhasedISwapPowGate consistent with other gates (#2524)
d60cd5b identity operation -> gate property (#2515)
990be61 Simplify logic in PhasedXPowGate.circuit_diagram_info (#2525)
8f1c30a Add EigenGate.equal_up_to_global_phase (#1840)
5207900 Add support for serializing linear combinations of symbols (#2358)
95a14f2 Move quirk url importing out of contrib into interop (#2512)
a1ba3f9 Add 2-qubit gate decomp based on randomly filling the Weyl chamber to contrib (#2420)
07d8cd2 Specialize ZPow.controlled() to return CZPow for single qubit control. (#2402)
17d94cf Add docstrings for additional methods in #2480 (#2489)
aade1f3 Bump qiskit version used during qasm compatibility test (#2511)
1cdf343 Add support for importing custom gates in Quirk URLS (#2473)
ad490a7 Sycamore Device (#2485)
4670173 Add a documentation coverage test (#2498)
9b51176 Use @DataClass for cirq.google.[De]SerializingArg (#2494)
de2039d Increase prominence of doc links in readme (#2490)
0d08c9f Add logo(s) to the docs (#2491)
4a96e04 use python -m install everywhere in travis.yml (#2500)
94f7fd2 Allow creating new gatesets with added gates (#2458)
58a794f Define cirq.STATE_VECTOR_LIKE (#2376)
efb3afe Fix various protocols and result types not being exported (#2496)
5d9b9bb Various doc improvements in cirq/ops (#2495)
9becde4 Various doc fixes (#2497)
5c13dea ISwapRotation (#2488)
d7fefa8 PointOptimizerSummary option to avoid flattening (#2461)
9c0eb4c Associate docstrings with public constants (#2471)
0df878c Skip install step in misc check (#2483)
cd84155 CliffordTableau stabilizers and destabilizers methods return list of DensePauliString (#2480)
190c41f Extract generic MatrixGate, deprecate SingleQubit/TwoQubitMatrixGate (#2381)
93a9312 SVG circuit drawing updates (#2414)
1df0979 Speed up QAOA example (#2470)
0b48318 use testing assert function for more readable output (#2469)
b221c52 add atol parameter to tests (#2467)
be0615d Gate.controlled(0) return self (#2465)
1ec8a68 Speed up sampling in the case of measuring all qudits (#2463)
e54f0f1 Speed up density matrix sampling (#2462)
ef86e7a Speed up wavefunction sampling (#2460)
c266da8 Add random_state argument to linalg testing functions for seeded randomness (#2459)
d3cfe3f Implement JSON serialization for numpy dtypes (#2456)
dffd4ea Add WaitGate proto serialization (#2437)

Cirq v0.6.0

30 Oct 21:48
d58c342
Compare
Choose a tag to compare

Major usability changes:

  • Pandas. cirq.TrialResult now has a data property that returns results as a pandas.DataFrame, providing access to all of pandas' convenience methods for working with data.
  • Qudit support. Added cirq.Qid.dimension and cirq.Operation._qid_shape_, as well as validation and simulator support.
  • Packaging. Package variant cirq[contrib] with requirements for cirq.contrib. Unstable package cirq-unstable tracking master.
  • Serialization. cirq.to_json and cirq.from_json methods can serialize (..almost) any cirq object.
  • Deterministic randomness. Almost all methods with random behavior now take a seed or numpy.Random instance.
  • Dropped support for python 2.7 and python 3.5.

New protocols:

  • cirq.equal_up_to_global_phase / _equal_up_to_global_phase_
  • cirq.qid_shape / _qid_shape_
  • cirq.num_qubits / _num_qubits_

New top level objects:

  • cirq.reset / cirq.ResetChannel
  • cirq.WaitGate
  • cirq.FSimGate
  • cirq.GlobalPhasedOperation (the first operation with no qubits)
  • cirq.ThreeQubitDiagonalGate
  • cirq.DensePauliString
  • cirq.MutableDensePauliString
  • cirq.ArithmeticOperation (helper class for defining arithmetic operations)
  • cirq.CCNOT = cirq.TOFFOLI alias
  • cirq.CX = cirq.CNOT alias
  • cirq.final_wavefunction
  • cirq.subwavefunction
  • cirq.wavefunction_partial_trace
  • cirq.von_neumann_entropy
  • cirq.apply_mixture
  • cirq.one_hot
  • cirq.axis_angle / cirq.AxisAngleDecomposition
  • cirq.apply_unitaries
  • cirq.approx_pauli_string_expectation
  • cirq.flatten[/_with_params/_with_sweep] for inlining complicated sympy expressions into sweeps
  • cirq.LinearCombinationOfOperations
  • cirq.PauliSum
  • cirq.SampleCollector
  • cirq.op_gate_of_type
  • cirq.op_gate_isinstance
  • cirq.NOISE_MODEL_LIKE (flexible argument type for specifying noise models)
  • cirq.PAULI_STRING_LIKE (flexible argument type for specifying pauli string arguments)
  • cirq.CliffordSimulator, cirq.StabilizerStateChForm, cirq.CliffordTableau, cirq.CliffordState, cirq.CliffordTrialResult (all still rough)
  • cirq.StabilizerStateChForm (still rough)
  • cirq.SimulatesAmplitudes interface
  • cirq.DepolarizingNoiseModel
  • cirq.DepolarizingWithReadoutNoiseModel
  • cirq.DepolarizingWithDampedReadoutNoiseModel
  • cirq.pow_pauli_combination

New sub package objects:

  • Added cirq.aqt package, which contains code to run cirq circuits on AQT's service.
  • cirq.experiments.cross_entropy_benchmarking
  • cirq.experiments.linear_xeb_fidelity
  • cirq.experiments.log_xeb_fidelity
  • cirq.experiments.log_xeb_fidelity_from_probabilities
  • cirq.experiments.t1_decay
  • cirq.experiments.xeb_fidelity
  • cirq.contrib.qasm_import.circuit_from_qasm
  • cirq.contrib.quirk.quirk_url_to_circuit
  • cirq.contrib.quirk.quirk_json_to_circuit
  • cirq.contrib.SVGCircuit
  • cirq.contrib.circuit_to_svg

Other changes (partial list):

  • Deprecated cirq.Circuit.from_ops in favor of cirq.Circuit.__init__
  • Deprecated cirq.Circuit.to_unitary_matrix in favor of cirq.Circuit.unitary
  • Deprecated cirq.Circuit.apply_unitary_effect_to_state in favor of cirq.Circuit.final_wavefunction
  • Deleted cirq.google.XmonSimulator (use cirq.Simulator instead)
  • cirq.approx_eq now recursively compares the items of iterables
  • cirq.resolve_parameters now recursively resolves the items of iterables
  • cirq.is_parameterized now recursively checks the items of iterables
  • Added cirq.TrialResult.data method
  • Added cirq.Sampler.sample method which returns a pandas.DataFrame
  • cirq.ControlledGate.on now returns a cirq.ControlledOperation instead of a cirq.GateOperation
  • simulator_state method on simulators is now private _simulator_state
  • cirq.QasmUGate.__init__ now takes operations in the same order as defined in QASM spec
  • cirq.PhasedXPowGate now longer auto-transforms itself into cirq.XPowGate or cirq.YPowGate at special phase angles
  • Attempting to sample a circuit with no measurements now raises an error
  • Fixed cirq.kak_canonicalize_vector not ensuring z>=0 when x=pi/4.
  • Added cirq.PauliString.__add__/__sub__ methods
  • Added cirq.PauliString.conjugated_by method
  • Added cirq.PauliString.dense method
  • Added cirq.X/Y/ZPowGate.__add__/__sub__ methods
  • Generalized cirq.Circuit.__init__ to take any tree of moments/operations.
  • Added cirq.PauliString._unitary_ methods
  • Added DensityMatrixTrialResult.__str__
  • Added a py.typed file telling mypy it can use cirq's inline type annotations
  • Added cirq.PeriodicValue.__repr__
  • cirq.GateOperation._pauli_expansion_
  • Controlling by nothing (operation.controlled_by()) now has no effect instead of unnecessarily wrapping
  • Added cirq.PauliString._decompose_
  • Added cirq.GridQubit.square static method
  • Added cirq.GridQubit.rect static method
  • Added cirq.GridQubit.from_pic static method
  • Added cirq.Circuit.__iadd__
  • Added cirq.PauliString.__bool__
  • Density matrix simulator now uses apply_channel when possible
  • Fixed cirq.AsymmetricDepolarizingChannel._circuit_diagram_info_ ignoring precision argument
  • cirq.SingleQubitGate.on_each method now takes any tree of qids
  • Added cirq.SimulationTrialResult.qubit_map method
  • Added cirq.KakDecomposition.__str__ method
  • Added cirq.control.UndirectedGraphDevice
  • Added CircuitDag.all_qubits
  • Added CircuitDag.is_topologically_sorted
  • Added CircuitDag.get_logical_operations
  • Added CircuitDag.random_circuit_dag
  • Added CircuitDag.random_topological_sort
  • Added examples/swap_networks.py
  • Added examples/qaoa.py
  • Added cirq.X/Y/ZPowGate.in_su2
  • Added cirq.X/Y/ZPowGate.with_canonical_global_phase
  • Added cirq.GridQubit.__add__/__sub__
  • Added cirq.LineQubit.__add__/__sub__
  • Added Circuit.with_noise method
  • Added cirq.Moment.__pow__
  • Added cirq.Sweep.__getitem__ with slice support
  • Added cirq.SynchronizeTerminalMeasurements.
  • cirq.experiments.RabiResult.plot now sets y axis range to [0, 1].
  • Fixed backwards qubit ordering in cirq.experiments.two_qubit_state_tomography
  • Fixed Circuit.findall_operations_until_blocked double counting operations
  • Added cirq.Sampler.run_sweep_async
  • Generalized cirq.PauliString.__init__ to take any tree of Pauli operations or dictionary from qubit to Pauli operation or complex number
  • cirq.EjectZ optimizer can now commute Z gates through swap-like gates
  • Continued development on cirq.google.QuantumEngine related classes, e.g. defined more flexible v2 proto serialization format
  • Fixed several instances of checking for sympy.Symbol instead of sympy.Basic
  • Added cirq.vis.Heatmap
  • cirq.EjectZ optimizer copes better in the presence of symbolic parameters
  • cirq.EjectPhasedPaulis optimizer copes better in the presence of symbolic parameters
  • Fixed several cases of simulators ignoring cirq.MeasurementGate.invert_mask
  • Fixed cirq.CSwapGate now supporting equality comparisons
  • cirq.Sweepable type union now allows dictionaries and lists of dictionaries
  • Added cirq.scatter_plot_normalized_kak_interaction_coefficients method
  • cirq.Moment.__eq__ no longer cares about operation order
  • Added cirq.TrialResult.__add__ method
  • Renamed cirq.experiments.generate_supremancy_circuit[...] to cirq.google.generate_boixo_2018_supremacy_circuits_[...]
  • Added cirq.Circuit.transform_qubits method
  • Fixed cirq.approx_eq hanging when given strings
  • Added cirq.kak_vector method for quickly computing many kak coefficients
  • cirq.Duration.__init__ now accepts timedelta and sympy.Basic values
  • Added ConstantQubitNoiseModel.__eq__
  • Added ConstantQubitNoiseModel.__repr__
  • Re-arranged some files within the cirq.ops package
  • Fixed cirq.SWAP and cirq.ISWAP decompositions not preserving global phase

Notable dev changes:

  • Defined development package variant cirq[dev-env] which includes development environment requirements
  • We have gradually begun deprecating things instead of simply deleting them.
  • Auto deploy to cirq-dev on push to master.
  • Continuous integration on Windows, OSX, and Linux instances instead of just Linux.
  • Incremental build tools compare against mergebase master instead of master itself
  • Added cirq.value.ABCMetaImplementAnyOneOf metaclass with cirq.value.alternative decorator
  • We have started adding doctest-ed Examples section to some doc strings
  • Added --actually_quiet parameter to the pytest check script
  • _compat.proper_repr now also works on pandas data frames.
  • Deleted continuous-integration/ in favor of check/ scripts

Cirq v0.5.0

24 Apr 03:23
e8f9323
Compare
Choose a tag to compare

Themes:

  • Noisy simulation.
  • Experiments.
  • Symbols via sympy.
  • Algebraic manipulation of gates.
  • Support for other hardware.

Notable new functionality:

  • Added cirq.controlled_by protocol. Gates and operations now have a controlled_by method. ControlledGate and ControlledOperation support arbitrary numbers of controls.
  • Added cirq.channel and cirq.mixture protocols for defining noisy evolution.
  • Added cirq.DensityMatrixSimulator.
  • Added cirq.NoiseModel/cirq.NO_NOISE/cirq.ConstantQubitNoiseModel classes. Some simulate and sample methods now take noise models.
  • Added cirq.amplitude_damp, cirq.phase_damp, and other noise channels.
  • Added convenience methods cirq.sample and cirq.sample_sweep for sampling from circuits without having to explicitly pick a simulator.
  • Added cirq.experiments package with rabi_oscillations, single_qubit_randomized_benchmarking, and other predefined experiments.
  • cirq.X, cirq.Y, and cirq.Z are now cirq.Pauli instances, whose operations can be multiplied together to produce cirq.PauliStrings.
  • Added cirq.pauli_expansion protocol
  • cirq.PauliString now supports exponentiation and raising to a power. The expression np.exp(1j * np.pi / 3 * cirq.X(q1) * cirq.Y(q2)) produces an operation you can append into a circuit.
  • Added cirq.LinearDict for representing linear combinations.
  • cirq.Gate instances can now be scaled and added together, producing a cirq.LinearCombinationOfGates.
  • The unitary protocol now falls back to decompose, allowing gates to be defined using only a _decompose_ method.
  • cirq.approx_eq now works on circuits and gates
  • cirq.value_equality now has an approximate flag, and there is now cirq.PeriodicValue for handling approximate angles.
  • All methods that take a parameter resolver can now take a raw dictionary and default to the empty resolver.
  • Gates can now be parameterized using arbitrary sympy expressions.
  • Added cirq.testing.random_superposition
  • Added cirq.NamedQubit.range.
  • Added cirq.IdentityGate and the single-qubit identity gate cirq.I.
  • Added cirq.IonDevice and cirq.NeutralAtomDevice and related helper methods.

Notable breaking changes:

  • cirq.QubitId has been renamed to cirq.Qid.
  • SingleQubitGate.on_each now takes a varargs *targets instead of a targets list.
  • All cirq.Gate instances must now implement a num_qubits method. cirq.MeasurementGate's first argument is now the number of qubits. Use cirq.measure instead.
  • cirq.Tolerance has been deleted, replaced by explicit atol/rtol arguments.
  • cirq.Symbol has been deleted, replaced by sympy.Symbol.
  • cirq.google.XmonSimulator no longer does automatic decomposition of circuits, which was hidden from and surprising to users. Circuits given to the xmon simulator must now only use supported operations. Use cirq.Simulator or cirq.sample instead.
  • Deleted cirq.contrib.jobs package, which was obsoleted by the introduction of cirq.NoiseModel.

Cirq v0.4.0

30 Nov 01:47
4460134
Compare
Choose a tag to compare

Themes:

  • Making the API more pythonic and more consistent (a.k.a. breaking changes and refactoring)
  • Faster simulation

Notable new functionality:

  • cirq.Rx, cirq.Ry, and cirq.Rz
  • cirq.XX, cirq.YY, cirq.ZZ, and cirq.MS (Mølmer–Sørensen gate)
  • cirq.Simulator
  • cirq.SupportsApplyUnitary protocol for specifying fast simulation methods
  • cirq.Circuit.reachable_frontier_from and cirq.Circuit.findall_operations_between
  • cirq.decompose
  • sorted(qubits) is now equivalent to cirq.QubitOrder.DEFAULT.order_for(qubits)
  • cirq.experiments.generate_supremacy_circuit_[...]
  • dtype parameters to control precision-vs-speed of simulations
  • cirq.TrialResult helper methods (dirac_notation / bloch_vector / density_matrix)
  • cirq.TOFFOLI and cirq.CCZ can now be raised to powers

Notable breaking changes:

  • Most gate classes have been standardized to take an exponent argument and have a name of the form NamePowGate. For example, RotXGate is now XPowGate and no longer takes rads, degs, or half_turns.
  • The xmon gate set has been merged into the common gate set.
  • Capability marker classes have been replaced by magic method protocols. For example, gates now just implement a _unitary_ method instead of inheriting from KnownMatrix.
  • cirq.Extensions and cirq.PotentialImplementation are gone.
  • Several decomposition classes and methods have been moved from cirq.google.* to cirq.*. For example,cirq.google.EjectFullW is now cirq.EjectPhasedPaulis.
  • Moved classes and methods related to line placement into cirq.google.

Notable bug fixes:

  • Two qubit gate decomposition no longer produces a glut of single qubit gates.
  • Circuit diagrams stay aligned when given multi-line entries, and now include "same moment" indicators.
  • Fixed false-positives and false-negatives in cirq.testing.assert_circuits_with_terminal_measurements_are_equivalent.
  • Fixed many repr methods returning code that assumed from cirq import * instead of import cirq.
  • Example code now runs in both python 2 and python 3 without transpilation.

Notable dev changes:

  • Test files now import cirq instead of specific modules.
  • Better testing and packaging scripts.
  • No longer using different package versions for python 2 and python 3
  • cirq.value_equality decorator.
  • New cirq.testing methods and classes.

Additions to contrib:

  • cirq.contrib.acquaintance: utilities for defining permutation gates
  • cirq.contrib.paulistring: utilities for optimizing non-Clifford operations separated by Clifford operations
  • cirq.contrib.tpu: utilities for converting circuits into a form executable on cloud TPUs (requires tensorflow)

Cirq v0.3.1

18 Jul 22:42
a11dc40
Compare
Choose a tag to compare

Minor package polish.

  • Now requiring python 3.5.3+ instead of 3.5+ (#710)
  • Added a description and long description to the package
  • Various doc fixes

Cirq v0.3

18 Jul 06:43
0b3f347
Compare
Choose a tag to compare

First release of Cirq with a publicly available pypi package.

Notable changes from v0.1:

  • Burned the 0.2 version number while testing pypi packages.
  • Massive breaking changes, both in terms of renaming things and changing how things behave.
  • Circuits now have an optional device.
  • Placement code for converting from LineQubit to GridQubit targeting a device.
  • More methods for querying/editing circuits (e.g. to_unitary_matrix(), batch_insert).
  • Notable increase in the amount of documentation and tooling.
  • Encapsulated optimizers behind cirq.google.optimized_for_xmon.
  • QASM output support.
  • Suggestive but inactive code for calling the engine.
  • Simulator support for specifying/receiving wavefunctions.
  • LineQubit and GridQubit.

Cirq v0.1

17 Apr 16:38
Compare
Choose a tag to compare

First release of Cirq.

This release is an initial development release, the public API should not be considered stable (it will become stable at a v1.0 release).