Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.11 tests to CI #6191

Merged
merged 11 commits into from
Jul 17, 2023
2 changes: 1 addition & 1 deletion .github/workflows/ci-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Pytest Ubuntu
strategy:
matrix:
python-version: ['3.9', '3.10']
python-version: ['3.9', '3.10', '3.11']
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
name: Pytest Ubuntu
strategy:
matrix:
python-version: [ '3.9', '3.10' ]
python-version: [ '3.9', '3.10', '3.11' ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:
name: Pytest Windows
strategy:
matrix:
python-version: [ '3.9', '3.10' ]
python-version: [ '3.9', '3.10', '3.11' ]
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
Expand All @@ -269,7 +269,7 @@ jobs:
name: Pytest MacOS
strategy:
matrix:
python-version: [ '3.9', '3.10' ]
python-version: [ '3.9', '3.10', '3.11' ]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion cirq-ft/cirq_ft/algos/generic_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def target_registers(self) -> infra.Registers:
def decompose_from_registers(self, context, **qubit_regs: Sequence[cirq.Qid]) -> cirq.OP_TREE:
if self.control_val == 0:
yield cirq.X(*qubit_regs['control'])
yield super().decompose_from_registers(context=context, **qubit_regs)
yield super(GenericSelect, self).decompose_from_registers(context=context, **qubit_regs)
if self.control_val == 0:
yield cirq.X(*qubit_regs['control'])

Expand Down
2 changes: 1 addition & 1 deletion cirq-ft/cirq_ft/algos/hubbard_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def controlled(
)

def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs) -> cirq.CircuitDiagramInfo:
info = super()._circuit_diagram_info_(args)
info = super(SelectHubbard, self)._circuit_diagram_info_(args)
if self.control_val is None:
return info
ctrl = ('@' if self.control_val else '@(0)',)
Expand Down
4 changes: 3 additions & 1 deletion cirq-ft/cirq_ft/algos/selected_majorana_fermion.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def decompose_from_registers(
qubit_regs['accumulator'] = context.qubit_manager.qalloc(1)
control = qubit_regs[self.control_regs[0].name] if self.control_registers.bitsize else []
yield cirq.X(*qubit_regs['accumulator']).controlled_by(*control)
yield super().decompose_from_registers(context=context, **qubit_regs)
yield super(SelectedMajoranaFermionGate, self).decompose_from_registers(
context=context, **qubit_regs
)
context.qubit_manager.qfree(qubit_regs['accumulator'])

def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs) -> cirq.CircuitDiagramInfo:
Expand Down
450 changes: 23 additions & 427 deletions cirq-google/cirq_google/api/v1/operations_pb2.py

Large diffs are not rendered by default.